Skip to content

Commit 413ac64

Browse files
committed
small changes
Signed-off-by: Shea <nu@she-a.eu>
1 parent 2179d9d commit 413ac64

3 files changed

Lines changed: 54 additions & 28 deletions

File tree

src/app/pages/client/navigate/Navigate.tsx

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -71,15 +71,11 @@ export function Navigate() {
7171
<Box grow="Yes" direction="Column" style={{ background: color.Background.Container }}>
7272
<PageNavHeader size="600">
7373
<Box grow="Yes" gap="300" justifyContent="Center">
74-
{!hideText ? (
75-
<Box grow="Yes">
76-
<Text size="H4" align="Center" truncate style={{ width: '100%' }}>
77-
Navigate
78-
</Text>
79-
</Box>
80-
) : (
81-
sizedIcon(SquaresFour, '200', { filled: true })
82-
)}
74+
<Box grow="Yes">
75+
<Text size="H4" align="Center" truncate style={{ width: '100%' }}>
76+
Navigate
77+
</Text>
78+
</Box>
8379
</Box>
8480
</PageNavHeader>
8581
<Scroll hideTrack visibility="Hover">

src/app/pages/client/profile/Profile.tsx

Lines changed: 34 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,12 @@ import { useUserProfile } from '$hooks/useUserProfile';
3434
import type { SettingsMenuItem } from '$features/settings';
3535
import { settingsMenuIcons, settingsSections, useOpenSettings } from '$features/settings';
3636
import { UserQuickTools } from '../sidebar/UserQuickTools';
37-
import { CaretDownIcon, CaretRightIcon, SignOutIcon } from '@phosphor-icons/react';
37+
import {
38+
CaretDownIcon,
39+
CaretRightIcon,
40+
PencilSimpleIcon,
41+
SignOutIcon,
42+
} from '@phosphor-icons/react';
3843
import { UseStateProvider } from '$components/UseStateProvider';
3944
import { FocusTrap } from 'focus-trap-react';
4045
import { LogoutDialog } from '$components/LogoutDialog';
@@ -133,6 +138,15 @@ export function ProfileMobile() {
133138
justifyContent="SpaceBetween"
134139
style={{ width: '100%', minWidth: '100%' }}
135140
>
141+
<PageNavHeader size="600">
142+
<Box grow="Yes" gap="300" justifyContent="Center">
143+
<Box grow="Yes">
144+
<Text size="H4" align="Center" truncate style={{ width: '100%' }}>
145+
Account
146+
</Text>
147+
</Box>
148+
</Box>
149+
</PageNavHeader>
136150
<Menu
137151
style={{
138152
minWidth: '100%',
@@ -159,10 +173,23 @@ export function ProfileMobile() {
159173

160174
<Box direction="Column" gap="100" style={{ padding: config.space.S100 }}>
161175
<UnverifiedMenuOption />
176+
<MenuItem
177+
size="300"
178+
radii="300"
179+
before={menuIcon(PencilSimpleIcon)}
180+
style={{
181+
background: isSettingsOpen ? color.Surface.Container : color.Background.Container,
182+
}}
183+
onClick={() => openSettings('account')}
184+
>
185+
<Text style={{ flexGrow: 1 }} size="T300">
186+
Edit profile
187+
</Text>
188+
</MenuItem>
162189
</Box>
163190
<Line variant="Surface" size="300" />
164191

165-
<Box direction="Column" gap="100" style={{ padding: config.space.S100 }}>
192+
<Box direction="Column" style={{ padding: config.space.S100 }}>
166193
<PresenceMenuOption isMobile />
167194
</Box>
168195
<AccountMenuOption isMobile />
@@ -209,15 +236,16 @@ export function ProfileMobile() {
209236

210237
<UseStateProvider initial={false}>
211238
{(logout, setLogout) => (
212-
<Box direction="Column" gap="100" style={{ padding: config.space.S100 }}>
239+
<>
240+
<Line variant="Surface" size="300" />
213241
<MenuItem
214242
size="300"
215243
variant="Background"
216244
style={{ color: color.Critical.OnContainer }}
217245
before={menuIcon(SignOutIcon)}
218246
onClick={() => setLogout(true)}
219247
>
220-
<Text size="B400">Logout</Text>
248+
<Text size="T300">Logout</Text>
221249
</MenuItem>
222250
{logout && (
223251
<Overlay open backdrop={<OverlayBackdrop />}>
@@ -234,9 +262,10 @@ export function ProfileMobile() {
234262
</OverlayCenter>
235263
</Overlay>
236264
)}
237-
</Box>
265+
</>
238266
)}
239267
</UseStateProvider>
268+
<div style={{ height: toRem(60) }} />
240269
</Box>
241270
</Menu>
242271
</Box>

src/app/pages/client/sidebar/UserMenuTab.tsx

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ import {
88
Chip,
99
Dialog,
1010
Header,
11-
Icon,
12-
Icons,
1311
Line,
1412
Menu,
1513
MenuItem,
@@ -38,7 +36,7 @@ import { createLogger } from '$utils/debug';
3836
import type { Session } from '$state/sessions';
3937
import { activeSessionIdAtom, backgroundUnreadCountsAtom, sessionsAtom } from '$state/sessions';
4038
import { UnreadBadge, UnreadBadgeCenter } from '$components/unread-badge';
41-
import { Check, chipIcon, Plus } from '$components/icons/phosphor';
39+
import { Check, chipIcon, menuIcon, Plus } from '$components/icons/phosphor';
4240
import { useSessionProfiles } from '$hooks/useSessionProfiles';
4341
import { useClientConfig } from '$hooks/useClientConfig';
4442
import { getHomePath, getLoginPath, getProfilePath, withSearchParam } from '$pages/pathUtils';
@@ -56,7 +54,14 @@ import {
5654
useUnverifiedDeviceCount,
5755
VerificationStatus,
5856
} from '$hooks/useDeviceVerificationStatus';
59-
import { ShieldWarningIcon } from '@phosphor-icons/react';
57+
import {
58+
CaretDownIcon,
59+
CaretRightIcon,
60+
GearSixIcon,
61+
PencilSimpleIcon,
62+
ShieldWarningIcon,
63+
UserIcon,
64+
} from '@phosphor-icons/react';
6065
import * as css from './UserMenuTab.css';
6166

6267
const log = createLogger('AccountSwitcherTab');
@@ -262,10 +267,8 @@ export function AccountMenuOption({ isMobile, isRight }: { isMobile: boolean; is
262267
<MenuItem
263268
size="300"
264269
radii="300"
265-
before={<Icon size="100" src={Icons.User} />}
266-
after={
267-
<Icon size="100" src={isOpen && isMobile ? Icons.ChevronBottom : Icons.ChevronRight} />
268-
}
270+
before={menuIcon(UserIcon)}
271+
after={isOpen && isMobile ? menuIcon(CaretDownIcon) : menuIcon(CaretRightIcon)}
269272
style={{
270273
position: 'relative',
271274
background: isMobile
@@ -465,7 +468,7 @@ export function PresenceMenuOption({
465468
display: 'flex',
466469
justifyContent: 'center',
467470
alignContent: 'center',
468-
width: 18,
471+
width: toRem(20),
469472
}}
470473
>
471474
{savingStatus ? (
@@ -479,9 +482,7 @@ export function PresenceMenuOption({
479482
)}
480483
</div>
481484
}
482-
after={
483-
<Icon size="100" src={isOpen && isMobile ? Icons.ChevronBottom : Icons.ChevronRight} />
484-
}
485+
after={isOpen && isMobile ? menuIcon(CaretDownIcon) : menuIcon(CaretRightIcon)}
485486
style={{
486487
position: 'relative',
487488
background: isMobile
@@ -766,7 +767,7 @@ export function UserMenuTab({ isBottom, isMobile }: { isBottom?: boolean; isMobi
766767
onClick={() => openSettings('account')}
767768
size="300"
768769
radii="300"
769-
before={<Icon size="100" src={Icons.Pencil} />}
770+
before={menuIcon(PencilSimpleIcon)}
770771
>
771772
<Text style={{ flexGrow: 1 }} size="T300">
772773
Edit Profile
@@ -790,7 +791,7 @@ export function UserMenuTab({ isBottom, isMobile }: { isBottom?: boolean; isMobi
790791
<MenuItem
791792
size="300"
792793
radii="300"
793-
before={<Icon size="100" src={Icons.Setting} />}
794+
before={menuIcon(GearSixIcon)}
794795
onClick={() => openSettings()}
795796
>
796797
<Text style={{ flexGrow: 1 }} size="T300">

0 commit comments

Comments
 (0)