Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3367336
D9195.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
D9195.diff
View Options
diff --git a/web/settings/account-settings.css b/web/settings/account-settings.css
--- a/web/settings/account-settings.css
+++ b/web/settings/account-settings.css
@@ -1,6 +1,7 @@
.container {
padding: 40px;
width: 456px;
+ overflow-y: auto;
}
.header {
@@ -63,3 +64,13 @@
color: var(--account-settings-label);
cursor: pointer;
}
+
+.preferencesContainer {
+ padding-top: 24px;
+}
+
+.preferencesHeader {
+ color: var(--fg);
+ font-weight: var(--semi-bold);
+ line-height: var(--line-height-display);
+}
diff --git a/web/settings/account-settings.react.js b/web/settings/account-settings.react.js
--- a/web/settings/account-settings.react.js
+++ b/web/settings/account-settings.react.js
@@ -20,6 +20,7 @@
import EditUserAvatar from '../avatars/edit-user-avatar.react.js';
import Button from '../components/button.react.js';
import { useSelector } from '../redux/redux-utils.js';
+import { useStaffCanSee } from '../utils/staff-utils.js';
function AccountSettings(): React.Node {
const sendLogoutRequest = useServerCall(logOut);
@@ -57,6 +58,12 @@
const currentUserInfo = useSelector(state => state.currentUserInfo);
const stringForUser = useStringForUser(currentUserInfo);
+ const staffCanSee = useStaffCanSee();
+
+ const showAppearanceModal = React.useCallback(() => {
+ // TODO
+ }, []);
+
if (!currentUserInfo || currentUserInfo.anonymous) {
return null;
}
@@ -76,6 +83,25 @@
);
}
+ let preferences;
+ if (staffCanSee) {
+ preferences = (
+ <div className={css.preferencesContainer}>
+ <h4 className={css.preferencesHeader}>Preferences</h4>
+ <div className={css.content}>
+ <ul>
+ <li>
+ <span>Appearance</span>
+ <a className={css.editPasswordLink} onClick={showAppearanceModal}>
+ <SWMansionIcon icon="edit-1" size={22} />
+ </a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ );
+ }
+
return (
<div className={css.container}>
<h4 className={css.header}>My Account</h4>
@@ -106,6 +132,7 @@
</li>
</ul>
</div>
+ {preferences}
</div>
);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Nov 26, 2:33 PM (19 h, 55 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2585126
Default Alt Text
D9195.diff (2 KB)
Attached To
Mode
D9195: [web] introduce preferences settings in account settings
Attached
Detach File
Event Timeline
Log In to Comment