add log in frontend

This commit is contained in:
MaysWind
2020-11-22 11:01:06 +08:00
parent 801ceeaa2d
commit 800e922aec
15 changed files with 129 additions and 9 deletions
+5 -3
View File
@@ -112,12 +112,14 @@ export default {
self.$user.saveWebAuthnConfig(id);
self.$settings.setEnableApplicationLockWebAuthn(true);
self.$toast('You have enabled Face ID/Touch ID successfully');
}).catch(({ notSupported, invalid }) => {
}).catch(error => {
self.$logger.error('failed to enable FaceID/Touch ID', error);
self.$hideLoading();
if (notSupported) {
if (error.notSupported) {
self.$toast('This device does not support Face ID/Touch ID');
} else if (invalid) {
} else if (error.invalid) {
self.$toast('Failed to enable Face ID/Touch ID');
} else {
self.$toast('User has canceled or this device does not support Face ID/Touch ID');