enhance(frontend): TOTPの入力ダイアログを改良 (#13607)

* enhance(frontend): TOTPの入力ダイアログを改良

* Update Changelog
This commit is contained in:
かっこかり
2024-03-22 15:03:21 +09:00
committed by GitHub
parent 40bb6069ec
commit c9c6424205
8 changed files with 41 additions and 19 deletions

View File

@@ -80,7 +80,7 @@ import MkSwitch from '@/components/MkSwitch.vue';
import FormSection from '@/components/form/section.vue';
import MkFolder from '@/components/MkFolder.vue';
import * as os from '@/os.js';
import { signinRequired } from '@/account.js';
import { signinRequired, updateAccount } from '@/account.js';
import { i18n } from '@/i18n.js';
const $i = signinRequired();
@@ -116,6 +116,10 @@ async function unregisterTOTP(): Promise<void> {
os.apiWithDialog('i/2fa/unregister', {
password: auth.result.password,
token: auth.result.token,
}).then(res => {
updateAccount({
twoFactorEnabled: false,
});
}).catch(error => {
os.alert({
type: 'error',