Skip to content

Commit 6d7e5fc

Browse files
feat(mosaic): add a lock icon to the password row in user profile (#10394)
Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
1 parent 74157a0 commit 6d7e5fc

3 files changed

Lines changed: 14 additions & 1 deletion

File tree

‎.changeset/lock-password-row.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
---
2+
---

‎packages/mosaic/src/features/user-profile/user-profile-password-section/user-profile-password-row.view.tsx‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { Section } from '../../../components/section';
22
import { fill, useMessages } from '../../../localization';
33
import { UserProfileManagedByLabel } from '../user-profile-managed-by';
4+
import { UserProfileSecurityIcon } from '../user-profile-security-icon';
45
import type { UserProfilePasswordSectionViewProps } from './user-profile-password-section.types';
56

67
export function UserProfilePasswordRowView({
@@ -12,6 +13,7 @@ export function UserProfilePasswordRowView({
1213
return (
1314
<Section.Items>
1415
<Section.Item>
16+
<UserProfileSecurityIcon name='password' />
1517
<Section.Content>
1618
<Section.Description>{hasPassword ? m.masked : m.noPasswordSet}</Section.Description>
1719
</Section.Content>

‎packages/mosaic/src/features/user-profile/user-profile-security-icon.tsx‎

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,28 @@ import { Icon, IconFrame } from '../../components/icon';
22
import { Section } from '../../components/section';
33
import { DeviceLaptop } from '../../icons/glyphs/device-laptop';
44
import { DevicePhone } from '../../icons/glyphs/device-phone';
5+
import { Lock } from '../../icons/glyphs/lock';
56
import { SecurityLockSquare } from '../../icons/glyphs/security-lock-square';
67
import { SecurityPasskey } from '../../icons/glyphs/security-passkey';
78
import { SecurityPhone } from '../../icons/glyphs/security-phone';
89
import { styles } from './user-profile-security-panel.styles';
910

10-
export type UserProfileSecurityIconName = 'authenticator' | 'backup-codes' | 'desktop' | 'mobile' | 'passkey' | 'sms';
11+
export type UserProfileSecurityIconName =
12+
| 'authenticator'
13+
| 'backup-codes'
14+
| 'desktop'
15+
| 'mobile'
16+
| 'passkey'
17+
| 'password'
18+
| 'sms';
1119

1220
const icons = {
1321
authenticator: SecurityLockSquare,
1422
'backup-codes': SecurityPhone,
1523
desktop: DeviceLaptop,
1624
mobile: DevicePhone,
1725
passkey: SecurityPasskey,
26+
password: Lock,
1827
sms: SecurityPhone,
1928
} as const;
2029

0 commit comments

Comments
 (0)