Skip to content

Commit

Permalink
将密码输入框包裹在form中 (#787)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhheo authored Jan 14, 2025
1 parent a076c93 commit a44633d
Showing 1 changed file with 18 additions and 14 deletions.
32 changes: 18 additions & 14 deletions src/client/view/components/TkAdmin.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,27 +9,31 @@
<div v-if="!needUpdate">
<div class="tk-login" v-if="!isLogin && isSetPassword">
<div class="tk-login-title">{{ t('ADMIN_LOGIN_TITLE') }}</div>
<input type="hidden" />
<el-input class="tk-password" :placeholder="t('ADMIN_PASSWORD_PLACEHOLDER')" v-model="password" show-password @keyup.enter.native="onLogin" ref="focusme">
<template slot="prepend">{{ t('ADMIN_PASSWORD') }}</template>
<el-button slot="append" @click="onLogin">{{ t('ADMIN_LOGIN') }}</el-button>
</el-input>
<form>
<input type="hidden" />
<el-input class="tk-password" :placeholder="t('ADMIN_PASSWORD_PLACEHOLDER')" v-model="password" show-password @keyup.enter.native="onLogin" ref="focusme">
<template slot="prepend">{{ t('ADMIN_PASSWORD') }}</template>
<el-button slot="append" @click="onLogin">{{ t('ADMIN_LOGIN') }}</el-button>
</el-input>
</form>
<div class="tk-login-msg" v-if="loginErrorMessage">
{{ loginErrorMessage }}
<a href="https://twikoo.js.org/faq.html" rel="noopener noreferrer" target="_blank">{{ t('ADMIN_FORGOT') }}</a>
</div>
</div>
<div class="tk-regist" v-if="!isLogin && !isSetPassword">
<div class="tk-login-title">{{ t('ADMIN_LOGIN_TITLE') }}</div>
<el-input class="tk-password" :placeholder="t('ADMIN_CREDENTIALS_PLACEHOLDER')" v-if="!isSetCredentials" v-model="credentials" ref="focusme">
<template slot="prepend">{{ t('ADMIN_CREDENTIALS') }}</template>
</el-input>
<el-input class="tk-password" :placeholder="t('ADMIN_SET_PASSWORD_PLACEHOLDER')" v-model="password" show-password>
<template slot="prepend">{{ t('ADMIN_SET_PASSWORD') }}</template>
</el-input>
<el-input class="tk-password" :placeholder="t('ADMIN_SET_PASSWORD_CONFIRM_PLACEHOLDER')" v-model="passwordConfirm" show-password>
<template slot="prepend">{{ t('ADMIN_SET_PASSWORD_CONFIRM') }}</template>
</el-input>
<form>
<el-input class="tk-password" :placeholder="t('ADMIN_CREDENTIALS_PLACEHOLDER')" v-if="!isSetCredentials" v-model="credentials" ref="focusme">
<template slot="prepend">{{ t('ADMIN_CREDENTIALS') }}</template>
</el-input>
<el-input class="tk-password" :placeholder="t('ADMIN_SET_PASSWORD_PLACEHOLDER')" v-model="password" show-password>
<template slot="prepend">{{ t('ADMIN_SET_PASSWORD') }}</template>
</el-input>
<el-input class="tk-password" :placeholder="t('ADMIN_SET_PASSWORD_CONFIRM_PLACEHOLDER')" v-model="passwordConfirm" show-password>
<template slot="prepend">{{ t('ADMIN_SET_PASSWORD_CONFIRM') }}</template>
</el-input>
</form>
<el-button class="tk-regist-button" :disabled="!canRegist" @click="onRegist">{{ t('ADMIN_REGIST') }}</el-button>
<div class="tk-login-msg" v-if="loginErrorMessage">{{ loginErrorMessage }}</div>
<div class="tk-login-msg" v-if="!isSetCredentials">
Expand Down

0 comments on commit a44633d

Please sign in to comment.