fix: update login settings UI and improve localization for verification code messages
parent
80da909dc3
commit
52e737c31b
|
|
@ -131,7 +131,9 @@ export default {
|
||||||
management: 'management',
|
management: 'management',
|
||||||
},
|
},
|
||||||
default_login: 'Default Login Method',
|
default_login: 'Default Login Method',
|
||||||
display_code: 'Display verification code when login fails',
|
display_code: 'Account login verification code setting',
|
||||||
|
loginFailed: 'Login failed',
|
||||||
|
loginFailedMessage: 'Display verification code twice',
|
||||||
display_codeTip: 'When the value is -1, the verification code is not displayed',
|
display_codeTip: 'When the value is -1, the verification code is not displayed',
|
||||||
time: 'Times',
|
time: 'Times',
|
||||||
setting: 'Login Setting',
|
setting: 'Login Setting',
|
||||||
|
|
|
||||||
|
|
@ -132,7 +132,9 @@ export default {
|
||||||
management: '管理',
|
management: '管理',
|
||||||
},
|
},
|
||||||
default_login: '默认登录方式',
|
default_login: '默认登录方式',
|
||||||
display_code: '登录失败显示验证码',
|
display_code: '账号登录验证码设置',
|
||||||
|
loginFailed: '登录失败',
|
||||||
|
loginFailedMessage: '次显示验证码',
|
||||||
display_codeTip: '值为-1时,不显示验证码',
|
display_codeTip: '值为-1时,不显示验证码',
|
||||||
time: '次',
|
time: '次',
|
||||||
setting: '登录设置',
|
setting: '登录设置',
|
||||||
|
|
|
||||||
|
|
@ -131,7 +131,9 @@ export default {
|
||||||
management: '管理',
|
management: '管理',
|
||||||
},
|
},
|
||||||
default_login: '預設登入方式',
|
default_login: '預設登入方式',
|
||||||
display_code: '登入失敗顯示驗證碼',
|
display_code: '帳號登入驗證碼設定',
|
||||||
|
loginFailed: '登入失敗',
|
||||||
|
loginFailedMessage: '次顯示驗證碼',
|
||||||
display_codeTip: '值為-1時,不顯示驗證碼',
|
display_codeTip: '值為-1時,不顯示驗證碼',
|
||||||
time: '次',
|
time: '次',
|
||||||
setting: '登录設置',
|
setting: '登录設置',
|
||||||
|
|
|
||||||
|
|
@ -116,6 +116,7 @@
|
||||||
</el-checkbox-group>
|
</el-checkbox-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item
|
<el-form-item
|
||||||
|
v-if="form.authentication_value.type === 'login' && form.authentication_value?.login_value?.includes('LOCAL')"
|
||||||
:label="$t('views.system.display_code')"
|
:label="$t('views.system.display_code')"
|
||||||
:rules="[
|
:rules="[
|
||||||
{
|
{
|
||||||
|
|
@ -126,15 +127,22 @@
|
||||||
]"
|
]"
|
||||||
prop="authentication_value.max_attempts"
|
prop="authentication_value.max_attempts"
|
||||||
>
|
>
|
||||||
|
<span style="font-size: 13px;">
|
||||||
|
{{ $t('views.system.loginFailed') }}
|
||||||
|
</span>
|
||||||
<el-input-number
|
<el-input-number
|
||||||
|
style="margin-left: 8px;"
|
||||||
v-model="form.authentication_value.max_attempts"
|
v-model="form.authentication_value.max_attempts"
|
||||||
:min="-1"
|
:min="-1"
|
||||||
:max="10"
|
:max="10"
|
||||||
:step="1"
|
:step="1"
|
||||||
controls-position="right"
|
controls-position="right"
|
||||||
/>
|
/>
|
||||||
|
<span style="margin-left: 8px; font-size: 13px;">
|
||||||
|
{{ $t('views.system.loginFailedMessage') }}
|
||||||
|
</span>
|
||||||
<span style="margin-left: 8px; color: #909399; font-size: 12px;">
|
<span style="margin-left: 8px; color: #909399; font-size: 12px;">
|
||||||
{{ $t('views.system.display_codeTip') }}
|
({{ $t('views.system.display_codeTip') }})
|
||||||
</span>
|
</span>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
|
@ -220,9 +228,6 @@ const open = (data: any) => {
|
||||||
form.value.authentication_value = data.authentication_value || {
|
form.value.authentication_value = data.authentication_value || {
|
||||||
type: 'password',
|
type: 'password',
|
||||||
}
|
}
|
||||||
if (!form.value.authentication_value.max_attempts) {
|
|
||||||
form.value.authentication_value.max_attempts = 1
|
|
||||||
}
|
|
||||||
if (
|
if (
|
||||||
form.value.authentication_value.type === 'password' &&
|
form.value.authentication_value.type === 'password' &&
|
||||||
!form.value.authentication_value.password_value
|
!form.value.authentication_value.password_value
|
||||||
|
|
@ -279,6 +284,9 @@ function firstGeneration() {
|
||||||
type: 'password',
|
type: 'password',
|
||||||
password_value: generateAuthenticationValue(),
|
password_value: generateAuthenticationValue(),
|
||||||
}
|
}
|
||||||
|
if (!form.value.authentication_value.max_attempts) {
|
||||||
|
form.value.authentication_value.max_attempts = 1
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -40,15 +40,22 @@
|
||||||
]"
|
]"
|
||||||
prop="max_attempts"
|
prop="max_attempts"
|
||||||
>
|
>
|
||||||
|
<span style="font-size: 13px;">
|
||||||
|
{{ $t('views.system.loginFailed') }}
|
||||||
|
</span>
|
||||||
<el-input-number
|
<el-input-number
|
||||||
|
style="margin-left: 8px;"
|
||||||
v-model="form.max_attempts"
|
v-model="form.max_attempts"
|
||||||
:min="-1"
|
:min="-1"
|
||||||
:max="10"
|
:max="10"
|
||||||
:step="1"
|
:step="1"
|
||||||
controls-position="right"
|
controls-position="right"
|
||||||
/>
|
/>
|
||||||
|
<span style="margin-left: 8px; font-size: 13px;">
|
||||||
|
{{ $t('views.system.loginFailedMessage') }}
|
||||||
|
</span>
|
||||||
<span style="margin-left: 8px; color: #909399; font-size: 12px;">
|
<span style="margin-left: 8px; color: #909399; font-size: 12px;">
|
||||||
{{ $t('views.system.display_codeTip') }}
|
({{ $t('views.system.display_codeTip') }})
|
||||||
</span>
|
</span>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue