don't need extra template
This commit is contained in:
parent
75d6d20454
commit
148eb80595
1 changed files with 28 additions and 30 deletions
|
@ -6,41 +6,39 @@
|
||||||
<MkButton @click="unregister">{{ i18n.ts.unregister }}</MkButton>
|
<MkButton @click="unregister">{{ i18n.ts.unregister }}</MkButton>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template>
|
<template v-if="supportsCredentials">
|
||||||
<template v-if="supportsCredentials">
|
<hr class="totp-method-sep">
|
||||||
<hr class="totp-method-sep">
|
|
||||||
|
|
||||||
<h2 class="heading">{{ i18n.ts.securityKey }}</h2>
|
<h2 class="heading">{{ i18n.ts.securityKey }}</h2>
|
||||||
<p>{{ i18n.ts._2fa.securityKeyInfo }}</p>
|
<p>{{ i18n.ts._2fa.securityKeyInfo }}</p>
|
||||||
<div class="key-list">
|
<div class="key-list">
|
||||||
<div v-for="key in $i.securityKeysList" class="key">
|
<div v-for="key in $i.securityKeysList" class="key">
|
||||||
<h3>{{ key.name }}</h3>
|
<h3>{{ key.name }}</h3>
|
||||||
<div class="last-used">{{ i18n.ts.lastUsed }}<MkTime :time="key.lastUsed"/></div>
|
<div class="last-used">{{ i18n.ts.lastUsed }}<MkTime :time="key.lastUsed"/></div>
|
||||||
<MkButton @click="unregisterKey(key)">{{ i18n.ts.unregister }}</MkButton>
|
<MkButton @click="unregisterKey(key)">{{ i18n.ts.unregister }}</MkButton>
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<MkSwitch v-if="$i.securityKeysList.length > 0" v-model="usePasswordLessLogin" @update:modelValue="updatePasswordLessLogin">{{ i18n.ts.passwordLessLogin }}</MkSwitch>
|
<MkSwitch v-if="$i.securityKeysList.length > 0" v-model="usePasswordLessLogin" @update:modelValue="updatePasswordLessLogin">{{ i18n.ts.passwordLessLogin }}</MkSwitch>
|
||||||
|
|
||||||
<MkInfo v-if="registration && registration.error" style="margin-bottom: 1rem;" warn>{{ i18n.ts.error }}: {{ registration.error }}</MkInfo>
|
<MkInfo v-if="registration && registration.error" style="margin-bottom: 1rem;" warn>{{ i18n.ts.error }}: {{ registration.error }}</MkInfo>
|
||||||
<MkButton v-if="!registration || registration.error" @click="addSecurityKey">{{ i18n.ts._2fa.registerKey }}</MkButton>
|
<MkButton v-if="!registration || registration.error" @click="addSecurityKey">{{ i18n.ts._2fa.registerKey }}</MkButton>
|
||||||
|
|
||||||
<ol v-if="registration && !registration.error">
|
<ol v-if="registration && !registration.error">
|
||||||
<li v-if="registration.stage >= 0">
|
<li v-if="registration.stage >= 0">
|
||||||
{{ i18n.ts.tapSecurityKey }}
|
{{ i18n.ts.tapSecurityKey }}
|
||||||
<i v-if="registration.saving && registration.stage == 0" class="ph-circle-notch ph-bold ph-lg fa-pulse ph-fw ph-lg"></i>
|
<i v-if="registration.saving && registration.stage == 0" class="ph-circle-notch ph-bold ph-lg fa-pulse ph-fw ph-lg"></i>
|
||||||
</li>
|
</li>
|
||||||
<li v-if="registration.stage >= 1">
|
<li v-if="registration.stage >= 1">
|
||||||
<MkForm :disabled="registration.stage != 1 || registration.saving">
|
<MkForm :disabled="registration.stage != 1 || registration.saving">
|
||||||
<MkInput v-model="keyName" :max="30">
|
<MkInput v-model="keyName" :max="30">
|
||||||
<template #label>{{ i18n.ts.securityKeyName }}</template>
|
<template #label>{{ i18n.ts.securityKeyName }}</template>
|
||||||
</MkInput>
|
</MkInput>
|
||||||
<MkButton :disabled="keyName.length == 0" @click="registerKey">{{ i18n.ts.registerSecurityKey }}</MkButton>
|
<MkButton :disabled="keyName.length == 0" @click="registerKey">{{ i18n.ts.registerSecurityKey }}</MkButton>
|
||||||
<i v-if="registration.saving && registration.stage == 1" class="ph-circle-notch ph-bold ph-lg fa-pulse ph-fw ph-lg"></i>
|
<i v-if="registration.saving && registration.stage == 1" class="ph-circle-notch ph-bold ph-lg fa-pulse ph-fw ph-lg"></i>
|
||||||
</MkForm>
|
</MkForm>
|
||||||
</li>
|
</li>
|
||||||
</ol>
|
</ol>
|
||||||
</template>
|
|
||||||
</template>
|
</template>
|
||||||
<div v-if="twoFactorData && !$i.twoFactorEnabled">
|
<div v-if="twoFactorData && !$i.twoFactorEnabled">
|
||||||
<ol style="margin: 0; padding: 0 0 0 1em;">
|
<ol style="margin: 0; padding: 0 0 0 1em;">
|
||||||
|
|
Loading…
Reference in a new issue