Page MenuHomePhabricator

D8811.diff
No OneTemporary

D8811.diff

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
@@ -67,3 +67,9 @@
border: #6a20e399 solid 1px;
transition: border 0.35s ease;
}
+
+div.form_qrcode_login {
+ display: flex;
+ flex-direction: column;
+ margin-top: 12px;
+}
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
@@ -7,10 +7,13 @@
import uuid from 'uuid';
import { useSigner } from 'wagmi';
+import { isDev } from 'lib/utils/dev-utils.js';
+
import css from './log-in-form.css';
import SIWEButton from './siwe-button.react.js';
import SIWELoginForm from './siwe-login-form.react.js';
import TraditionalLoginForm from './traditional-login-form.react.js';
+import Button from '../components/button.react.js';
import OrBreak from '../components/or-break.react.js';
import { initOlm } from '../olm/olm-utils.js';
import {
@@ -98,6 +101,26 @@
})();
}, [dispatch, notificationIdentityPublicKeys, primaryIdentityPublicKeys]);
+ const onQRCodeLoginButtonClick = React.useCallback(() => {}, []);
+
+ const qrCodeLoginButton = React.useMemo(() => {
+ if (!isDev) {
+ return null;
+ }
+
+ return (
+ <div className={css.form_qrcode_login}>
+ <Button
+ variant="outline"
+ type="submit"
+ onClick={onQRCodeLoginButtonClick}
+ >
+ Sign in via QR Code
+ </Button>
+ </div>
+ );
+ }, [onQRCodeLoginButtonClick]);
+
const [siweAuthFlowSelected, setSIWEAuthFlowSelected] =
React.useState<boolean>(false);
@@ -123,6 +146,7 @@
<TraditionalLoginForm />
<OrBreak />
<SIWEButton onSIWEButtonClick={onSIWEButtonClick} />
+ {qrCodeLoginButton}
</div>
);
}

File Metadata

Mime Type
text/plain
Expires
Mon, Dec 23, 3:28 PM (18 h, 38 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2695155
Default Alt Text
D8811.diff (1 KB)

Event Timeline