Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3335921
D13907.id45841.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
D13907.id45841.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
@@ -81,7 +81,11 @@
'worklet';
const headerHeight = Platform.OS === 'ios' ? 62.33 : 58.54;
let containerSize = headerHeight;
- if (modeValue === 'loading' || modeValue === 'prompt') {
+ if (
+ modeValue === 'loading' ||
+ modeValue === 'prompt' ||
+ modeValue === 'restore'
+ ) {
containerSize += Platform.OS === 'ios' ? 40 : 61;
} else if (modeValue === 'log-in') {
containerSize += 140;
@@ -499,12 +503,14 @@
[styles.buttonContainer, buttonsViewOpacity],
);
const buttons = React.useMemo(() => {
- if (mode.curMode !== 'prompt') {
+ if (mode.curMode !== 'prompt' && mode.curMode !== 'restore') {
return null;
}
const signInButtons = [];
- if (!usingRestoreFlow) {
+ if (!usingRestoreFlow || mode.curMode === 'restore') {
+ const buttonText =
+ mode.curMode === 'restore' ? 'Sign in with password' : 'Sign in';
signInButtons.push(
<TouchableOpacity
onPress={onPressLogIn}
@@ -512,11 +518,11 @@
activeOpacity={0.6}
key="login-form"
>
- <Text style={classicAuthButtonTextStyle}>Sign in</Text>
+ <Text style={classicAuthButtonTextStyle}>{buttonText}</Text>
</TouchableOpacity>,
);
}
- if (__DEV__ || usingRestoreFlow) {
+ if ((__DEV__ || usingRestoreFlow) && mode.curMode === 'prompt') {
const buttonText = usingRestoreFlow ? 'Sign in' : 'Sign in (QR)';
signInButtons.push(
<TouchableOpacity
@@ -531,7 +537,17 @@
}
let siweSection = null;
- if (!usingRestoreFlow) {
+ if (!usingRestoreFlow || mode.curMode === 'restore') {
+ let siweOr = null;
+ if (mode.curMode !== 'restore') {
+ siweOr = (
+ <View style={styles.siweOr}>
+ <View style={styles.siweOrLeftHR} />
+ <Text style={styles.siweOrText}>or</Text>
+ <View style={styles.siweOrRightHR} />
+ </View>
+ );
+ }
siweSection = (
<>
<TouchableOpacity
@@ -544,20 +560,14 @@
</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>
+ {siweOr}
</>
);
}
- return (
- <AnimatedView style={buttonsViewStyle}>
- <LoggedOutStaffInfo />
- {siweSection}
- <View style={styles.signInButtons}>{signInButtons}</View>
+ let registerButtons = null;
+ if (mode.curMode === 'prompt') {
+ registerButtons = (
<View style={styles.registerButtons}>
<TouchableOpacity
onPress={onPressNewRegister}
@@ -568,6 +578,20 @@
<Text style={classicAuthButtonTextStyle}>Register</Text>
</TouchableOpacity>
</View>
+ );
+ }
+
+ let loggedOutStaffInfo = null;
+ if (mode.curMode === 'prompt') {
+ loggedOutStaffInfo = <LoggedOutStaffInfo />;
+ }
+
+ return (
+ <AnimatedView style={buttonsViewStyle}>
+ {loggedOutStaffInfo}
+ {siweSection}
+ <View style={styles.signInButtons}>{signInButtons}</View>
+ {registerButtons}
</AnimatedView>
);
}, [
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Nov 22, 12:27 PM (18 h, 17 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2540753
Default Alt Text
D13907.id45841.diff (3 KB)
Attached To
Mode
D13907: [lib] Introduce a restore screen
Attached
Detach File
Event Timeline
Log In to Comment