diff options
| author | Shishkevich D. <135337715+shishkevichd@users.noreply.github.com> | 2025-04-06 12:40:33 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-04-06 12:40:33 +0300 |
| commit | bea19a263db88fef44b4356082b199fbfcc39a25 (patch) | |
| tree | a111e9328c6273ad9721118238c40cf3004f72a9 /web/html/settings/panel/security.html | |
| parent | 878e0d02cd01a045f4f32464124c59e24f98aedd (diff) | |
Code refactoring (#2865)
* refactor: use vue inline styles in entire application
* refactor: setting row in dashboard page
* refactor: use blob for download file in text modal
* refactor: move all html templates in `web/html` folder
* refactor: `DeviceUtils` -> `MediaQueryMixin`
The transition to mixins has been made, as they can update themselves.
* chore: pretty right buttons in `outbounds` tab in xray settings
* refactor: add translations for system status
* refactor: adjust gutter spacing in setting list item
* refactor: use native `a-input-password` for password field
* chore: return old system status
with new translations
* chore: add missing translation
Diffstat (limited to 'web/html/settings/panel/security.html')
| -rw-r--r-- | web/html/settings/panel/security.html | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/web/html/settings/panel/security.html b/web/html/settings/panel/security.html new file mode 100644 index 00000000..48e7796f --- /dev/null +++ b/web/html/settings/panel/security.html @@ -0,0 +1,60 @@ +{{define "settings/panel/security"}} +<a-collapse default-active-key="1"> + <a-collapse-panel key="1" header='{{ i18n "pages.settings.security.admin"}}'> + <a-setting-list-item paddings="small"> + <template #title>{{ i18n "pages.settings.oldUsername"}}</template> + <template #control> + <a-input autocomplete="username" v-model="user.oldUsername"></a-input> + </template> + </a-setting-list-item> + <a-setting-list-item paddings="small"> + <template #title>{{ i18n "pages.settings.currentPassword"}}</template> + <template #control> + <a-input-password autocomplete="current-password" v-model="user.oldPassword"></a-input-password> + </template> + </a-setting-list-item> + <a-setting-list-item paddings="small"> + <template #title>{{ i18n "pages.settings.newUsername"}}</template> + <template #control> + <a-input v-model="user.newUsername"></a-input> + </template> + </a-setting-list-item> + <a-setting-list-item paddings="small"> + <template #title>{{ i18n "pages.settings.newPassword"}}</template> + <template #control> + <a-input-password autocomplete="new-password" v-model="user.newPassword"></a-input-password> + </template> + </a-setting-list-item> + <a-list-item> + <a-space direction="horizontal" :style="{ padding: '0 20px' }"> + <a-button type="primary" @click="updateUser">{{ i18n "confirm" }}</a-button> + </a-space> + </a-list-item> + </a-collapse-panel> + <a-collapse-panel key="2" header='{{ i18n "pages.settings.security.secret"}}'> + <a-setting-list-item paddings="small"> + <template #title>{{ i18n "pages.settings.security.loginSecurity" }}</template> + <template #description>{{ i18n "pages.settings.security.loginSecurityDesc" }}</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> + </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 |
