diff options
| author | Shishkevich D. <135337715+shishkevichd@users.noreply.github.com> | 2025-07-02 12:25:25 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-07-02 12:25:25 +0300 |
| commit | 5d11e6e13f7254a72874dabee6c1cf4e81f5ec52 (patch) | |
| tree | 3e255de35ef4f9f4cb79daabaa7a696f10263dc1 /web/html/modals | |
| parent | f3d0b92e4ab2737f96fea3d0f567fdc040c21acb (diff) | |
chore: reset two-factor authentication after changing admin credentials (#3029)
* chore: add `resetTwoFactor` argument for main.go
fixes #3025
* chore: reset two-factor authentication after changing admin credentials
* chore: reset two-factor authentication after changing admin credentials
---------
Co-authored-by: somebodywashere <68244480+somebodywashere@users.noreply.github.com>
Co-authored-by: Sanaei <ho3ein.sanaei@gmail.com>
Diffstat (limited to 'web/html/modals')
| -rw-r--r-- | web/html/modals/two_factor_modal.html | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/web/html/modals/two_factor_modal.html b/web/html/modals/two_factor_modal.html index 7823485f..13d22a5e 100644 --- a/web/html/modals/two_factor_modal.html +++ b/web/html/modals/two_factor_modal.html @@ -15,8 +15,8 @@ <p>{{ i18n "pages.settings.security.twoFactorModalSecondStep" }}</p> <a-input v-model.trim="twoFactorModal.enteredCode" :style="{ width: '100%' }"></a-input> </template> - <template v-if="twoFactorModal.type === 'remove'"> - <p>{{ i18n "pages.settings.security.twoFactorModalRemoveStep" }}</p> + <template v-if="twoFactorModal.type === 'confirm'"> + <p>[[ twoFactorModal.description ]]</p> <a-input v-model.trim="twoFactorModal.enteredCode" :style="{ width: '100%' }"></a-input> </template> <template slot="footer"> @@ -32,6 +32,7 @@ <script> const twoFactorModal = { title: '', + description: '', fileName: '', token: '', enteredCode: '', @@ -45,17 +46,6 @@ ObjectUtil.execute(twoFactorModal.confirm, true) twoFactorModal.close() - - switch (twoFactorModal.type) { - case 'set': - Vue.prototype.$message['success']('{{ i18n "pages.settings.security.twoFactorModalSetSuccess" }}') - break; - case 'remove': - Vue.prototype.$message['success']('{{ i18n "pages.settings.security.twoFactorModalDeleteSuccess" }}') - break; - default: - break; - } } else { Vue.prototype.$message['error']('{{ i18n "pages.settings.security.twoFactorModalError" }}') } @@ -67,11 +57,13 @@ }, show: function ({ title = '', + description = '', token = '', type = 'set', confirm = (success) => { } }) { this.title = title; + this.description = description; this.token = token; this.visible = true; this.confirm = confirm; |
