on master help sign in
ux: keyfile unavailable modal
2492fc2tomholford
src/components/L2/Modal.scss+12
@@ -39,3 +39,15 @@
39 }
39 }
40 }
40 }
41}
41}
42+
43+.info-modal-content {
44+ position: relative;
45+ background-color: white;
46+ width: 280px;
47+ border-radius: $large-border-radius;
48+ font-family: $default-font;
49+ padding: 24px;
50+ font-size: 14px;
51+ line-height: 24px;
52+ max-width: 100%;
53+}
src/views/Login/LoginSelector.scss−12
@@ -60,18 +60,6 @@
60 }
60 }
61 }
61 }
62
62
63− .info-modal-content {
64− position: relative;
65− background-color: white;
66− width: 280px;
67− border-radius: $large-border-radius;
68− font-family: $default-font;
69− padding: 24px;
70− font-size: 14px;
71− line-height: 24px;
72− max-width: 100%;
73− }
74−
75 .master-ticket {
63 .master-ticket {
76 .body-pane {
64 .body-pane {
77 .input-form {
65 .input-form {
src/views/Login/Mnemonic.tsx+1−1
@@ -105,7 +105,7 @@ export default function Mnemonic({ className, goHome }: MnemonicProps) {
105 {
105 {
106 selected: useLegacyTokenSigning,
106 selected: useLegacyTokenSigning,
107 key: 'useLegacyTokenSigning',
107 key: 'useLegacyTokenSigning',
108− label: 'Use Legacy Compatibility',
108+ label: 'Use Legacy Keyfile',
109 onClick: () => setUseLegacyTokenSigning(!useLegacyTokenSigning),
109 onClick: () => setUseLegacyTokenSigning(!useLegacyTokenSigning),
110 },
110 },
111 ];
111 ];
src/views/Login/Ticket.tsx+1−1
@@ -179,7 +179,7 @@ export default function Ticket({ className, goHome }: TicketProps) {
179 {
179 {
180 selected: useLegacyTokenSigning,
180 selected: useLegacyTokenSigning,
181 key: 'useLegacyTokenSigning',
181 key: 'useLegacyTokenSigning',
182− label: 'Use Legacy Compatibility',
182+ label: 'Use Legacy Keyfile',
183 onClick: () => setUseLegacyTokenSigning(!useLegacyTokenSigning),
183 onClick: () => setUseLegacyTokenSigning(!useLegacyTokenSigning),
184 },
184 },
185 ];
185 ];
src/views/UrbitOS/Home.tsx+23−6
@@ -7,6 +7,7 @@ import Window from 'components/L2/Window/Window';
7import HeaderPane from 'components/L2/Window/HeaderPane';
7import HeaderPane from 'components/L2/Window/HeaderPane';
8import BodyPane from 'components/L2/Window/BodyPane';
8import BodyPane from 'components/L2/Window/BodyPane';
9import { ReactComponent as KeyfileIcon } from 'assets/keyfile.svg';
9import { ReactComponent as KeyfileIcon } from 'assets/keyfile.svg';
10+import { ReactComponent as InfoIcon } from 'assets/info.svg';
10
11
11import { useLocalRouter } from 'lib/LocalRouter';
12import { useLocalRouter } from 'lib/LocalRouter';
12import { useSingleKeyfileGenerator } from 'lib/useKeyfileGenerator';
13import { useSingleKeyfileGenerator } from 'lib/useKeyfileGenerator';
@@ -16,7 +17,6 @@ import CopiableWithTooltip from 'components/copiable/CopiableWithTooltip';
16import './UrbitOS.scss';
17import './UrbitOS.scss';
17import Modal from 'components/L2/Modal';
18import Modal from 'components/L2/Modal';
18import { useRollerStore } from 'store/rollerStore';
19import { useRollerStore } from 'store/rollerStore';
19−import WithTooltip from 'components/WithTooltip';
20
20
21export default function UrbitOSHome() {
21export default function UrbitOSHome() {
22 const { point } = useRollerStore();
22 const { point } = useRollerStore();
@@ -47,6 +47,9 @@ export default function UrbitOSHome() {
47 {}
47 {}
48 );
48 );
49 const keyfileAvailable = available && !generating;
49 const keyfileAvailable = available && !generating;
50+ const [showKeysUnavailableModal, setShowKeysUnavailableModal] = useState(
51+ false
52+ );
50
53
51 const headerButton = () => {
54 const headerButton = () => {
52 if (!hasSetNetworkKeys) {
55 if (!hasSetNetworkKeys) {
@@ -63,11 +66,25 @@ export default function UrbitOSHome() {
63 Download Keyfile
66 Download Keyfile
64 </Button>
67 </Button>
65 ) : (
68 ) : (
66− <WithTooltip content="Either the key was derived non-deterministically, or try Login > Use Legacy Compatibility">
69+ <>
70+ <Button
67− <Box className="header-button keyfile-unavailable">
71+ className="header-button keyfile-unavailable"
72+ onClick={() => setShowKeysUnavailableModal(true)}>
73+ <InfoIcon />
68− Keyfile Unavailable
74+ &nbsp;Keyfile Unavailable
69− </Box>
75+ </Button>
70− </WithTooltip>
76+ <Modal
77+ show={showKeysUnavailableModal}
78+ hide={() => setShowKeysUnavailableModal(false)}>
79+ <Box className="info-modal-content">
80+ <div className="fw-bold mb5">Keyfile Unavailable</div>
81+ <div className="mb5">
82+ Keys generated between 2021-05 and 2022-02 used a different
83+ algorithm. Please login again with 'Use Legacy Keyfile' selected.
84+ </div>
85+ </Box>
86+ </Modal>
87+ </>
71 );
88 );
72 };
89 };
73
90