Skip to content

Commit

Permalink
feat: 优化密码显示,可点击查看
Browse files Browse the repository at this point in the history
  • Loading branch information
devhaozi committed Oct 24, 2024
1 parent 17cce7e commit 3507517
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 7 deletions.
6 changes: 5 additions & 1 deletion web/src/views/apps/mysql/IndexView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,11 @@ onMounted(() => {
</n-card>
<n-card title="Root 密码" rounded-10>
<n-space vertical>
<n-input v-model:value="rootPassword"></n-input>
<n-input
v-model:value="rootPassword"
type="password"
show-password-on="click"
></n-input>
<n-button type="primary" @click="handleSetRootPassword">保存修改</n-button>
</n-space>
</n-card>
Expand Down
3 changes: 2 additions & 1 deletion web/src/views/apps/pureftpd/IndexView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,8 @@ onMounted(() => {
<n-form-item path="password" label="密码">
<n-input
v-model:value="addUserModel.password"
type="text"
type="password"
show-password-on="click"
@keydown.enter.prevent
placeholder="建议使用生成器生成随机密码"
/>
Expand Down
3 changes: 2 additions & 1 deletion web/src/views/apps/rsync/IndexView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,8 @@ onMounted(() => {
<n-form-item path="secret" label="密码">
<n-input
v-model:value="editModuleModel.secret"
type="text"
type="password"
show-password-on="click"
@keydown.enter.prevent
placeholder="填写模块的密码"
/>
Expand Down
2 changes: 1 addition & 1 deletion web/src/views/apps/toolbox/IndexView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ onMounted(() => {
<n-tab-pane name="root-password" tab="Root 密码">
<n-form>
<n-form-item label="Root 密码">
<n-input v-model:value="rootPassword" />
<n-input v-model:value="rootPassword" type="password" show-password-on="click" />
</n-form-item>
</n-form>
</n-tab-pane>
Expand Down
1 change: 1 addition & 0 deletions web/src/views/container/ImageView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,7 @@ onMounted(() => {
<n-input
v-model:value="pullModel.password"
type="password"
show-password-on="click"
@keydown.enter.prevent
placeholder="输入密码"
/>
Expand Down
2 changes: 1 addition & 1 deletion web/src/views/login/IndexView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,8 @@ onMounted(async () => {
:maxlength="32"
class="h-50 items-center pl-10 text-16"
placeholder="密码"
show-password-on="mousedown"
type="password"
show-password-on="click"
@keydown.enter="handleLogin"
/>
</div>
Expand Down
2 changes: 1 addition & 1 deletion web/src/views/ssh/CreateModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ const handleSubmit = async () => {
<n-input v-model:value="model.user" placeholder="root" />
</n-form-item>
<n-form-item v-if="model.auth_method == 'password'" label="密码">
<n-input v-model:value="model.password" />
<n-input v-model:value="model.password" type="password" show-password-on="click" />
</n-form-item>
<n-form-item v-if="model.auth_method == 'publickey'" label="私钥">
<n-input v-model:value="model.key" type="textarea" />
Expand Down
2 changes: 1 addition & 1 deletion web/src/views/ssh/UpdateModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ watch(show, () => {
<n-input v-model:value="model.user" placeholder="root" />
</n-form-item>
<n-form-item v-if="model.auth_method == 'password'" label="密码">
<n-input v-model:value="model.password" />
<n-input v-model:value="model.password" type="password" show-password-on="click" />
</n-form-item>
<n-form-item v-if="model.auth_method == 'publickey'" label="私钥">
<n-input v-model:value="model.key" type="textarea" />
Expand Down

0 comments on commit 3507517

Please sign in to comment.