Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3521678
D13906.id46296.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
3 KB
Referenced Files
None
Subscribers
None
D13906.id46296.diff
View Options
diff --git a/native/account/logged-out-modal.react.js b/native/account/logged-out-modal.react.js
--- a/native/account/logged-out-modal.react.js
+++ b/native/account/logged-out-modal.react.js
@@ -27,7 +27,10 @@
import { isLoggedIn } from 'lib/selectors/user-selectors.js';
import { recoveryFromReduxActionSources } from 'lib/types/account-types.js';
import { useDispatch } from 'lib/utils/redux-utils.js';
-import { usingCommServicesAccessToken } from 'lib/utils/services-utils.js';
+import {
+ usingCommServicesAccessToken,
+ usingRestoreFlow,
+} from 'lib/utils/services-utils.js';
import { splashBackgroundURI } from './background-info.js';
import FullscreenSIWEPanel from './fullscreen-siwe-panel.react.js';
@@ -496,17 +499,20 @@
}
const signInButtons = [];
- signInButtons.push(
- <TouchableOpacity
- onPress={onPressLogIn}
- style={classicAuthButtonStyle}
- activeOpacity={0.6}
- key="login-form"
- >
- <Text style={classicAuthButtonTextStyle}>Sign in</Text>
- </TouchableOpacity>,
- );
- if (__DEV__) {
+ if (!usingRestoreFlow) {
+ signInButtons.push(
+ <TouchableOpacity
+ onPress={onPressLogIn}
+ style={classicAuthButtonStyle}
+ activeOpacity={0.6}
+ key="login-form"
+ >
+ <Text style={classicAuthButtonTextStyle}>Sign in</Text>
+ </TouchableOpacity>,
+ );
+ }
+ if (__DEV__ || usingRestoreFlow) {
+ const buttonText = usingRestoreFlow ? 'Sign in' : 'Sign in (QR)';
signInButtons.push(
<TouchableOpacity
onPress={onPressQRCodeSignIn}
@@ -514,29 +520,38 @@
activeOpacity={0.6}
key="qr-code-login"
>
- <Text style={classicAuthButtonTextStyle}>Sign in (QR)</Text>
+ <Text style={classicAuthButtonTextStyle}>{buttonText}</Text>
</TouchableOpacity>,
);
}
+ let siweSection = null;
+ if (!usingRestoreFlow) {
+ siweSection = (
+ <>
+ <TouchableOpacity
+ onPress={onPressSIWE}
+ style={siweAuthButtonStyle}
+ activeOpacity={0.6}
+ >
+ <View style={styles.siweIcon}>
+ <EthereumLogo />
+ </View>
+ <Text style={siweAuthButtonTextStyle}>Sign in with Ethereum</Text>
+ </TouchableOpacity>
+ <View style={styles.siweOr}>
+ <View style={styles.siweOrLeftHR} />
+ <Text style={styles.siweOrText}>or</Text>
+ <View style={styles.siweOrRightHR} />
+ </View>
+ </>
+ );
+ }
+
return (
<AnimatedView style={buttonsViewStyle}>
<LoggedOutStaffInfo />
- <TouchableOpacity
- onPress={onPressSIWE}
- style={siweAuthButtonStyle}
- activeOpacity={0.6}
- >
- <View style={styles.siweIcon}>
- <EthereumLogo />
- </View>
- <Text style={siweAuthButtonTextStyle}>Sign in with Ethereum</Text>
- </TouchableOpacity>
- <View style={styles.siweOr}>
- <View style={styles.siweOrLeftHR} />
- <Text style={styles.siweOrText}>or</Text>
- <View style={styles.siweOrRightHR} />
- </View>
+ {siweSection}
<View style={styles.signInButtons}>{signInButtons}</View>
<View style={styles.registerButtons}>
<TouchableOpacity
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Dec 24, 4:24 AM (19 h, 13 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2698308
Default Alt Text
D13906.id46296.diff (3 KB)
Attached To
Mode
D13906: [native] Update the logged out modal
Attached
Detach File
Event Timeline
Log In to Comment