Page MenuHomePhabricator

D13907.id45797.diff
No OneTemporary

D13907.id45797.diff

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;
@@ -504,12 +508,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}
@@ -517,11 +523,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') {
signInButtons.push(
<TouchableOpacity
onPress={onPressQRCodeSignIn}
@@ -535,7 +541,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
@@ -548,17 +564,13 @@
</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}
</>
);
}
let restoreButton = null;
- if (usingRestoreFlow) {
+ if (usingRestoreFlow && mode.curMode === 'prompt') {
restoreButton = (
<TouchableOpacity
onPress={onPressRestore}
@@ -571,12 +583,9 @@
);
}
- return (
- <AnimatedView style={buttonsViewStyle}>
- <LoggedOutStaffInfo />
- {siweSection}
- {restoreButton}
- <View style={styles.signInButtons}>{signInButtons}</View>
+ let registerButtons = null;
+ if (mode.curMode === 'prompt') {
+ registerButtons = (
<View style={styles.registerButtons}>
<TouchableOpacity
onPress={onPressNewRegister}
@@ -587,6 +596,21 @@
<Text style={classicAuthButtonTextStyle}>Register</Text>
</TouchableOpacity>
</View>
+ );
+ }
+
+ let loggedOutStaffInfo = null;
+ if (mode.curMode === 'prompt') {
+ loggedOutStaffInfo = <LoggedOutStaffInfo />;
+ }
+
+ return (
+ <AnimatedView style={buttonsViewStyle}>
+ {loggedOutStaffInfo}
+ {siweSection}
+ {restoreButton}
+ <View style={styles.signInButtons}>{signInButtons}</View>
+ {registerButtons}
</AnimatedView>
);
}, [

File Metadata

Mime Type
text/plain
Expires
Thu, Nov 21, 2:35 PM (10 h, 10 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2556359
Default Alt Text
D13907.id45797.diff (3 KB)

Event Timeline