Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3522206
D14038.id46219.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D14038.id46219.diff
View Options
diff --git a/native/account/qr-code-screen.react.js b/native/account/qr-code-screen.react.js
--- a/native/account/qr-code-screen.react.js
+++ b/native/account/qr-code-screen.react.js
@@ -8,11 +8,15 @@
import { qrCodeLinkURL } from 'lib/facts/links.js';
import { platformToIdentityDeviceType } from 'lib/types/identity-service-types.js';
import { getConfig } from 'lib/utils/config.js';
+import { usingRestoreFlow } from 'lib/utils/services-utils.js';
+import RegistrationButtonContainer from './registration/registration-button-container.react.js';
import RegistrationContainer from './registration/registration-container.react.js';
import RegistrationContentContainer from './registration/registration-content-container.react.js';
import type { SignInNavigationProp } from './sign-in-navigator.react.js';
+import LinkButton from '../components/link-button.react.js';
import type { NavigationRoute } from '../navigation/route-names.js';
+import { RestorePromptScreenRouteName } from '../navigation/route-names.js';
import { useStyles } from '../themes/colors.js';
type QRCodeScreenProps = {
@@ -20,7 +24,6 @@
+route: NavigationRoute<'QRCodeScreen'>,
};
-// eslint-disable-next-line no-unused-vars
function QRCodeScreen(props: QRCodeScreenProps): React.Node {
const { qrData, generateQRCode } = useQRAuthContext();
@@ -39,6 +42,24 @@
}, [platform, qrData]);
const styles = useStyles(unboundStyles);
+
+ let primaryRestoreButton = null;
+ const goToRestoreFlow = React.useCallback(() => {
+ props.navigation.navigate(RestorePromptScreenRouteName);
+ }, [props.navigation]);
+ if (usingRestoreFlow) {
+ primaryRestoreButton = (
+ <RegistrationButtonContainer>
+ <View style={styles.primaryRestoreButton}>
+ <LinkButton
+ text="Not logged in on another phone?"
+ onPress={goToRestoreFlow}
+ />
+ </View>
+ </RegistrationButtonContainer>
+ );
+ }
+
return (
<RegistrationContainer>
<RegistrationContentContainer>
@@ -70,6 +91,7 @@
</View>
</View>
</RegistrationContentContainer>
+ {primaryRestoreButton}
</RegistrationContainer>
);
}
@@ -118,6 +140,9 @@
backgroundColor: 'panelForegroundLabel',
alignSelf: 'center',
},
+ primaryRestoreButton: {
+ alignItems: 'center',
+ },
};
export default QRCodeScreen;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Dec 24, 6:05 AM (19 h, 56 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2698641
Default Alt Text
D14038.id46219.diff (2 KB)
Attached To
Mode
D14038: [native] Navigate from the QR screen to the restore screen
Attached
Detach File
Event Timeline
Log In to Comment