Page MenuHomePhabricator

D8811.id29870.diff
No OneTemporary

D8811.id29870.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}
+ >
+ Login 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, Nov 18, 7:47 AM (21 h, 13 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2534304
Default Alt Text
D8811.id29870.diff (1 KB)

Event Timeline