mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-15 23:47:33 +08:00
migrate webauthn.js to typescript
This commit is contained in:
@@ -41,8 +41,10 @@ import { useSettingsStore } from '@/stores/setting.ts';
|
||||
import { useUserStore } from '@/stores/user.ts';
|
||||
import { useTransactionsStore } from '@/stores/transaction.js';
|
||||
|
||||
import logger from '@/lib/logger.ts';
|
||||
import webauthn from '@/lib/webauthn.js';
|
||||
import {
|
||||
isWebAuthnCompletelySupported,
|
||||
registerWebAuthnCredential
|
||||
} from '@/lib/webauthn.ts';
|
||||
import {
|
||||
getUserAppLockState,
|
||||
encryptToken,
|
||||
@@ -51,6 +53,7 @@ import {
|
||||
saveWebAuthnConfig,
|
||||
clearWebAuthnConfig
|
||||
} from '@/lib/userstate.ts';
|
||||
import logger from '@/lib/logger.ts';
|
||||
|
||||
export default {
|
||||
data() {
|
||||
@@ -88,7 +91,7 @@ export default {
|
||||
if (newValue) {
|
||||
self.$showLoading();
|
||||
|
||||
webauthn.registerCredential(
|
||||
registerWebAuthnCredential(
|
||||
getUserAppLockState(),
|
||||
self.userStore.currentUserBasicInfo,
|
||||
).then(({ id }) => {
|
||||
@@ -124,7 +127,7 @@ export default {
|
||||
},
|
||||
created() {
|
||||
const self = this;
|
||||
webauthn.isCompletelySupported().then(result => {
|
||||
isWebAuthnCompletelySupported().then(result => {
|
||||
self.isSupportedWebAuthn = result;
|
||||
});
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user