|  | 
| 176 | 176 |     import utc from 'dayjs/plugin/utc'; | 
| 177 | 177 |     import timezone from 'dayjs/plugin/timezone'; | 
| 178 | 178 |     import { useCoreStore } from '@/stores/core'; | 
| 179 |  | -    import { useUserStore } from '@/stores/user' | 
| 180 | 179 | 
 | 
| 181 | 180 |     dayjs.extend(utc); | 
| 182 | 181 |     dayjs.extend(timezone); | 
| 183 | 182 |     const coreStore = useCoreStore(); | 
| 184 |  | -    const userStore = useUserStore(); | 
| 185 | 183 |     const passkeys = ref([]); | 
| 186 | 184 |     const isPasskeySupported = ref(false); | 
| 187 | 185 |     const passkeysNewName = ref(''); | 
|  | 
| 204 | 202 |     const fetchedOptions = ref(null); | 
| 205 | 203 | 
 | 
| 206 | 204 |     onMounted(async () => { | 
| 207 |  | -        if (userStore.isAuthorized === true ) { | 
| 208 |  | -            await getPasskeys(); | 
| 209 |  | -            await checkForCompatibility(); | 
| 210 |  | -            if (authenticatorAttachment.value === "cross-platform") { | 
| 211 |  | -                addPasskeyMode.value = 'cross-platform'; | 
| 212 |  | -            }    | 
| 213 |  | -            isInitialFinished.value = true; | 
| 214 |  | -        } | 
|  | 205 | +        await getPasskeys(); | 
|  | 206 | +        await checkForCompatibility(); | 
|  | 207 | +        if (authenticatorAttachment.value === "cross-platform") { | 
|  | 208 | +            addPasskeyMode.value = 'cross-platform'; | 
|  | 209 | +        }    | 
|  | 210 | +        isInitialFinished.value = true; | 
| 215 | 211 |     }); | 
| 216 | 212 | 
 | 
| 217 | 213 |     onMounted(() => { | 
|  | 
| 276 | 272 |             authenticatorAttachment.value = response.authenticatorAttachment; | 
| 277 | 273 |         } catch (error) { | 
| 278 | 274 |             console.error('Error fetching passkeys:', error); | 
| 279 |  | -            adminforth.alert({message: 'Error fetching passkeys.', variant: 'warning'}); | 
|  | 275 | +            if ( coreStore.adminUser.username ) { | 
|  | 276 | +                adminforth.alert({message: 'Error fetching passkeys.', variant: 'warning'}); | 
|  | 277 | +            } | 
| 280 | 278 |         } | 
| 281 | 279 |     } | 
| 282 | 280 | 
 | 
|  | 
0 commit comments