Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3294693
D6104.id20422.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
D6104.id20422.diff
View Options
diff --git a/native/profile/profile-screen.react.js b/native/profile/profile-screen.react.js
--- a/native/profile/profile-screen.react.js
+++ b/native/profile/profile-screen.react.js
@@ -6,6 +6,7 @@
import { logOutActionTypes, logOut } from 'lib/actions/user-actions';
import { preRequestUserStateSelector } from 'lib/selectors/account-selectors';
import { createLoadingStatusSelector } from 'lib/selectors/loading-selectors';
+import { accountHasPassword } from 'lib/shared/account-utils';
import type { LogOutResult } from 'lib/types/account-types';
import { type PreRequestUserState } from 'lib/types/session-types';
import { type CurrentUserInfo } from 'lib/types/user-types';
@@ -100,6 +101,26 @@
);
}
+ let passwordEditionUI;
+ if (accountHasPassword(this.props.currentUserInfo)) {
+ passwordEditionUI = (
+ <Action.Row>
+ <Text style={this.props.styles.label}>Password</Text>
+ <Text
+ style={[this.props.styles.content, this.props.styles.value]}
+ numberOfLines={1}
+ >
+ ••••••••••••••••
+ </Text>
+ <EditSettingButton
+ onPress={this.onPressEditPassword}
+ canChangeSettings={true}
+ style={this.props.styles.editPasswordButton}
+ />
+ </Action.Row>
+ );
+ }
+
return (
<View style={this.props.styles.container}>
<ScrollView
@@ -122,20 +143,7 @@
<Text style={this.props.styles.logOutText}>Log out</Text>
</Button>
</Action.Row>
- <Action.Row>
- <Text style={this.props.styles.label}>Password</Text>
- <Text
- style={[this.props.styles.content, this.props.styles.value]}
- numberOfLines={1}
- >
- ••••••••••••••••
- </Text>
- <EditSettingButton
- onPress={this.onPressEditPassword}
- canChangeSettings={true}
- style={this.props.styles.editPasswordButton}
- />
- </Action.Row>
+ {passwordEditionUI}
</View>
<View style={this.props.styles.section}>
<ProfileRow
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Nov 17, 7:51 PM (20 h, 8 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2531545
Default Alt Text
D6104.id20422.diff (2 KB)
Attached To
Mode
D6104: Conditionally hide possibility to change password for SIWE accounts
Attached
Detach File
Event Timeline
Log In to Comment