2019-06-12 20:16:55 +00:00
|
|
|
<template>
|
2019-07-05 07:17:44 +00:00
|
|
|
<div>
|
|
|
|
<div class="method-item">
|
|
|
|
<strong>{{ $t('settings.mfa.otp') }}</strong>
|
|
|
|
<button
|
|
|
|
v-if="!isActivated"
|
|
|
|
class="btn btn-default"
|
|
|
|
@click="doActivate"
|
|
|
|
>
|
|
|
|
{{ $t('general.enable') }}
|
|
|
|
</button>
|
2019-06-12 20:16:55 +00:00
|
|
|
|
2019-07-05 07:17:44 +00:00
|
|
|
<button
|
|
|
|
v-if="isActivated"
|
|
|
|
class="btn btn-default"
|
|
|
|
:disabled="deactivate"
|
|
|
|
@click="doDeactivate"
|
|
|
|
>
|
|
|
|
{{ $t('general.disable') }}
|
|
|
|
</button>
|
|
|
|
</div>
|
2019-06-12 20:16:55 +00:00
|
|
|
|
2019-07-05 07:17:44 +00:00
|
|
|
<confirm
|
|
|
|
v-if="deactivate"
|
|
|
|
:disabled="inProgress"
|
|
|
|
@confirm="confirmDeactivate"
|
|
|
|
@cancel="cancelDeactivate"
|
|
|
|
>
|
|
|
|
{{ $t('settings.enter_current_password_to_confirm') }}:
|
|
|
|
<input
|
|
|
|
v-model="currentPassword"
|
|
|
|
type="password"
|
|
|
|
>
|
|
|
|
</confirm>
|
|
|
|
<div
|
|
|
|
v-if="error"
|
|
|
|
class="alert error"
|
|
|
|
>
|
|
|
|
{{ error }}
|
|
|
|
</div>
|
|
|
|
</div>
|
2019-06-12 20:16:55 +00:00
|
|
|
</template>
|
|
|
|
<script src="./mfa_totp.js"></script>
|