Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3295951
D3321.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
D3321.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
@@ -7,4 +7,30 @@
color: var(--fg);
font-weight: var(--semi-bold);
line-height: var(--line-height-display);
+ padding-bottom: 55px;
+}
+
+.content ul {
+ list-style-type: none;
+}
+
+.content li {
+ color: var(--account-settings-label);
+ border-bottom: 1px solid var(--border-color);
+ padding: 24px 16px 16px;
+}
+
+.logoutContainer {
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ color: var(--fg);
+}
+
+.logoutLabel {
+ color: var(--account-settings-label);
+}
+
+.username {
+ color: var(--fg);
}
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
@@ -2,12 +2,29 @@
import * as React from 'react';
+import { useSelector } from '../redux/redux-utils';
import css from './account-settings.css';
function AccountSettings(): React.Node {
+ const currentUserInfo = useSelector(state => state.currentUserInfo);
+ if (!currentUserInfo || currentUserInfo.anonymous) {
+ return null;
+ }
+ const { username } = currentUserInfo;
+
return (
<div className={css.container}>
<h4 className={css.header}>My Account</h4>
+ <div className={css.content}>
+ <ul>
+ <li>
+ <p className={css.logoutContainer}>
+ <span className={css.logoutLabel}>{'Logged in as '}</span>
+ <span className={css.username}>{username}</span>
+ </p>
+ </li>
+ </ul>
+ </div>
</div>
);
}
diff --git a/web/theme.css b/web/theme.css
--- a/web/theme.css
+++ b/web/theme.css
@@ -111,4 +111,5 @@
--app-list-icon-read-only-color: var(--shades-black-60);
--app-list-icon-enabled-color: var(--success-primary);
--app-list-icon-disabled-color: var(--shades-white-80);
+ --account-settings-label: var(--shades-black-60);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Nov 18, 12:03 AM (21 h, 17 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2532373
Default Alt Text
D3321.diff (2 KB)
Attached To
Mode
D3321: [web] Add logged in section
Attached
Detach File
Event Timeline
Log In to Comment