Skip to content

Commit

Permalink
[SALAD-21921] WebApp: Passkey vendor icons (#1207)
Browse files Browse the repository at this point in the history
* passkey vendor icon - added

* Default Passkey Icon - added
  • Loading branch information
vitto-moz authored Sep 26, 2024
1 parent 59932d0 commit 319dd82
Show file tree
Hide file tree
Showing 42 changed files with 407 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ import { SuccessText } from '../../../../../components/primitives/content/Succes
import type { EditPasskeyNameStatus, Passkey, RegisterPasskeyStatus } from '../../../../passkey-setup'
import type { ProtectRewardsRedemptionStatus } from '../../../../profile'
import type { FormValues } from '../Account'
import DefaultPasskeyIcon from './assets/DefaultPasskeyIcon.svg'
import { passkeyVendorIcons } from './constants'

const styles: () => Record<string, CSS.Properties> = () => ({
accountSecurityWrapper: {
Expand Down Expand Up @@ -70,7 +72,7 @@ const styles: () => Record<string, CSS.Properties> = () => ({
marginRight: '5px',
},
passkeyNameWrapper: {
width: '200px',
width: '180px',
height: '30px',
overflow: 'hidden',
},
Expand Down Expand Up @@ -123,6 +125,10 @@ const styles: () => Record<string, CSS.Properties> = () => ({
height: '40px',
width: '100%',
},
passkeyVendorIcon: {
width: '15px',
height: '15px',
},
})

const passkeysAmountLimit = 30
Expand Down Expand Up @@ -240,8 +246,15 @@ const _AccountSecurity: FC<Props> = ({
</div>
<div className={classes.passkeysList}></div>
{passkeys.map((passkey) => {
const passkeyVendorIcon = passkeyVendorIcons[passkey.aaGuid]
const icon = isTabletOrMobile ? passkeyVendorIcon?.iconLight : passkeyVendorIcon?.iconDark
return (
<div className={classes.passkeysListItem} key={passkey.id}>
<img
className={classes.passkeyVendorIcon}
src={icon ?? DefaultPasskeyIcon}
alt={passkeyVendorIcon?.alt}
/>
<div className={classes.passkeyNameWrapper}>
{passkey.id === editPasskeyId ? (
<TextField
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 319dd82

Please sign in to comment.