feat: enhance authentication handling in XPackLimitDrawer.vue
This commit is contained in:
parent
b4569fc88d
commit
79087a34d1
@ -31,13 +31,12 @@
|
|||||||
:label="$t('views.applicationOverview.appInfo.LimitDialog.authentication')"
|
:label="$t('views.applicationOverview.appInfo.LimitDialog.authentication')"
|
||||||
@click.prevent
|
@click.prevent
|
||||||
>
|
>
|
||||||
<el-switch size="small" v-model="form.authentication"></el-switch>
|
<el-switch size="small" v-model="form.authentication" @change="firstGeneration"></el-switch>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-radio-group
|
<el-radio-group
|
||||||
v-if="form.authentication"
|
v-if="form.authentication"
|
||||||
v-model="form.authentication_value.type"
|
v-model="form.authentication_value.type"
|
||||||
class="card__radio"
|
class="card__radio"
|
||||||
@change="firstGeneration"
|
|
||||||
>
|
>
|
||||||
<el-card
|
<el-card
|
||||||
shadow="never"
|
shadow="never"
|
||||||
@ -249,12 +248,11 @@ function refreshAuthentication() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function firstGeneration() {
|
function firstGeneration() {
|
||||||
if (
|
if (form.value.authentication && !form.value.authentication_value.password_value) {
|
||||||
form.value.authentication &&
|
form.value.authentication_value = {
|
||||||
form.value.authentication_value.type === 'password' &&
|
type: 'password',
|
||||||
!form.value.authentication_value.password_value
|
password_value: generateAuthenticationValue(),
|
||||||
) {
|
}
|
||||||
form.value.authentication_value.password_value = generateAuthenticationValue()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user