Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F33313026
D6218.1768817188.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D6218.1768817188.diff
View Options
diff --git a/web/account/log-in-form.css b/web/account/log-in-form.css
--- a/web/account/log-in-form.css
+++ b/web/account/log-in-form.css
@@ -40,3 +40,10 @@
padding-left: 6px;
align-self: center;
}
+
+div.ethereum_logo_container {
+ display: flex;
+ justify-content: center;
+ align-content: center;
+ margin: 0 4px;
+}
diff --git a/web/account/log-in-form.react.js b/web/account/log-in-form.react.js
--- a/web/account/log-in-form.react.js
+++ b/web/account/log-in-form.react.js
@@ -10,6 +10,7 @@
import invariant from 'invariant';
import _merge from 'lodash/fp/merge';
import * as React from 'react';
+import { FaEthereum } from 'react-icons/fa';
import { chain, configureChains, createClient, WagmiConfig } from 'wagmi';
import { alchemyProvider } from 'wagmi/providers/alchemy';
import { publicProvider } from 'wagmi/providers/public';
@@ -30,6 +31,7 @@
useDispatchActionPromise,
useServerCall,
} from 'lib/utils/action-utils';
+import { isDev } from 'lib/utils/dev-utils.js';
import Button from '../components/button.react';
import LoadingIndicator from '../loading-indicator.react';
@@ -151,6 +153,27 @@
return 'Log in';
}, [inputDisabled]);
+ const siweButtonColor = React.useMemo(
+ () => ({ backgroundColor: 'white', color: 'black' }),
+ [],
+ );
+
+ let siweButton;
+ if (isDev) {
+ siweButton = (
+ <Button
+ onClick={undefined}
+ variant="filled"
+ buttonColor={siweButtonColor}
+ >
+ <div className={css.ethereum_logo_container}>
+ <FaEthereum />
+ </div>
+ Sign in with Ethereum
+ </Button>
+ );
+ }
+
return (
<div className={css.modal_body}>
<form method="POST">
@@ -187,6 +210,7 @@
>
{loginButtonContent}
</Button>
+ {siweButton}
<div className={css.modal_form_error}>{errorMessage}</div>
</div>
</form>
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Jan 19, 10:06 AM (16 h, 11 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5952554
Default Alt Text
D6218.1768817188.diff (1 KB)
Attached To
Mode
D6218: [web] Add `siweButton` to `LogInForm` component
Attached
Detach File
Event Timeline
Log In to Comment