Fix passkey icons lost in refactoring.
This commit is contained in:
+1
-1
@@ -44,7 +44,7 @@ export interface UserInfo {
|
||||
sign_count: number
|
||||
is_current_session: boolean
|
||||
}>
|
||||
aaguid_info: Record<string, { name: string; icon_light?: string; icon_dark?: string }>
|
||||
aaguid_info: Record<string, { name: string; icon?: string; icon_dark?: string }>
|
||||
sessions: Array<{
|
||||
id: string
|
||||
credential: string
|
||||
|
||||
@@ -148,8 +148,8 @@ const getCredentialAuthIcon = (credential) => {
|
||||
const info = props.aaguidInfo?.[credential.aaguid]
|
||||
if (!info) return null
|
||||
const isDarkMode = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches
|
||||
const iconKey = isDarkMode ? 'icon_dark' : 'icon_light'
|
||||
return info[iconKey] || null
|
||||
// Fall back to icon if icon_dark is not available
|
||||
return (isDarkMode && info.icon_dark) || info.icon || null
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user