diff options
| author | Shishkevich D. <135337715+shishkevichd@users.noreply.github.com> | 2025-05-08 17:20:58 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-05-08 17:20:58 +0300 |
| commit | fe3b1c9b52f584b0f045907585b206344fed55db (patch) | |
| tree | aeef0fa82a0355ee899ec3aecee23045a327a6dc /web/html/settings/panel/security.html | |
| parent | d39ccf4b8f77f99d4468580085e9d89e8b5f0b1c (diff) | |
chore: implement 2fa auth (#2968)
* chore: implement 2fa auth
from #2786
* chore: format code
* chore: replace two factor token input with qr-code
* chore: requesting confirmation of setting/removing two-factor authentication
otpauth library was taken from cdnjs
* chore: revert changes in `ClipboardManager`
don't need it.
* chore: removing twoFactor prop in settings page
* chore: remove `twoFactorQr` object in `mounted` function
Diffstat (limited to 'web/html/settings/panel/security.html')
| -rw-r--r-- | web/html/settings/panel/security.html | 24 |
1 files changed, 4 insertions, 20 deletions
diff --git a/web/html/settings/panel/security.html b/web/html/settings/panel/security.html index 48e7796f..2a570faa 100644 --- a/web/html/settings/panel/security.html +++ b/web/html/settings/panel/security.html @@ -31,30 +31,14 @@ </a-space> </a-list-item> </a-collapse-panel> - <a-collapse-panel key="2" header='{{ i18n "pages.settings.security.secret"}}'> + <a-collapse-panel key="2" header='{{ i18n "pages.settings.security.twoFactor" }}'> <a-setting-list-item paddings="small"> - <template #title>{{ i18n "pages.settings.security.loginSecurity" }}</template> - <template #description>{{ i18n "pages.settings.security.loginSecurityDesc" }}</template> + <template #title>{{ i18n "pages.settings.security.twoFactorEnable" }}</template> + <template #description>{{ i18n "pages.settings.security.twoFactorEnableDesc" }}</template> <template #control> - <a-switch @change="toggleToken(allSetting.secretEnable)" v-model="allSetting.secretEnable"></a-switch> - <a-icon :style="{ marginLeft: '1rem' }" v-if="allSetting.secretEnable" :spin="this.changeSecret" type="sync" - @click="getNewSecret"></a-icon> + <a-switch @click="toggleTwoFactor" :checked="allSetting.twoFactorEnable"></a-switch> </template> </a-setting-list-item> - <a-setting-list-item paddings="small"> - <template #title>{{ i18n "pages.settings.security.secretToken" }}</template> - <template #description>{{ i18n "pages.settings.security.secretTokenDesc" }}</template> - <template #control> - <a-textarea type="text" :disabled="!allSetting.secretEnable" v-model="user.loginSecret"></a-textarea> - </template> - </a-setting-list-item> - <a-list-item> - <a-space direction="horizontal" :style="{ padding: '0 20px' }"> - <a-button type="primary" :loading="this.changeSecret" @click="updateSecret"> - <span>{{ i18n "confirm"}}</span> - </a-button> - </a-space> - </a-list-item> </a-collapse-panel> </a-collapse> {{end}}
\ No newline at end of file |
