code refactor

This commit is contained in:
MaysWind
2020-12-19 23:11:19 +08:00
parent b9e244d84a
commit 5615111dce
9 changed files with 131 additions and 131 deletions
+33 -33
View File
@@ -30,47 +30,47 @@
</f7-card-content>
</f7-card>
<PasscodeInputSheet :title="$t('Passcode')"
:hint="$t('Please use two factor authentication app scan the below qrcode and input current passcode')"
:show.sync="showInputPasscodeSheetForEnable"
:confirm-disabled="enableConfirming"
:cancel-disabled="enableConfirming"
v-model="currentPasscodeForEnable"
@passcode:confirm="enableConfirm">
<passcode-input-sheet :title="$t('Passcode')"
:hint="$t('Please use two factor authentication app scan the below qrcode and input current passcode')"
:show.sync="showInputPasscodeSheetForEnable"
:confirm-disabled="enableConfirming"
:cancel-disabled="enableConfirming"
v-model="currentPasscodeForEnable"
@passcode:confirm="enableConfirm">
<div class="row">
<div class="col-100 text-align-center">
<img alt="qrcode" width="240px" height="240px" :src="new2FAQRCode" />
</div>
</div>
</PasscodeInputSheet>
</passcode-input-sheet>
<PasswordInputSheet :title="$t('Current Password')"
:hint="$t('Please enter your current password when disable two factor authentication')"
:show.sync="showInputPasswordSheetForDisable"
:confirm-disabled="disabling"
:cancel-disabled="disabling"
v-model="currentPasswordForDisable"
@password:confirm="disable">
</PasswordInputSheet>
<password-input-sheet :title="$t('Current Password')"
:hint="$t('Please enter your current password when disable two factor authentication')"
:show.sync="showInputPasswordSheetForDisable"
:confirm-disabled="disabling"
:cancel-disabled="disabling"
v-model="currentPasswordForDisable"
@password:confirm="disable">
</password-input-sheet>
<PasswordInputSheet :title="$t('Current Password')"
:hint="$t('Please enter your current password when regenerate two factor authentication backup codes. If you regenerate backup codes, the old codes will be invalidated.')"
:show.sync="showInputPasswordSheetForRegenerate"
:confirm-disabled="regenerating"
:cancel-disabled="regenerating"
v-model="currentPasswordForRegenerate"
@password:confirm="regenerateBackupCode">
</PasswordInputSheet>
<password-input-sheet :title="$t('Current Password')"
:hint="$t('Please enter your current password when regenerate two factor authentication backup codes. If you regenerate backup codes, the old codes will be invalidated.')"
:show.sync="showInputPasswordSheetForRegenerate"
:confirm-disabled="regenerating"
:cancel-disabled="regenerating"
v-model="currentPasswordForRegenerate"
@password:confirm="regenerateBackupCode">
</password-input-sheet>
<InformationSheet class="backup-code-sheet"
:title="$t('Backup Code')"
:hint="$t('Please copy these backup codes to safe place, the below codes can only be shown once. If these codes were lost, you can regenerate backup codes at any time.')"
:information="currentBackupCode"
:row-count="10"
:enable-copy="true"
:show.sync="showBackupCodeSheet"
@info:copied="onBackupCodeCopied">
</InformationSheet>
<information-sheet class="backup-code-sheet"
:title="$t('Backup Code')"
:hint="$t('Please copy these backup codes to safe place, the below codes can only be shown once. If these codes were lost, you can regenerate backup codes at any time.')"
:information="currentBackupCode"
:row-count="10"
:enable-copy="true"
:show.sync="showBackupCodeSheet"
@info:copied="onBackupCodeCopied">
</information-sheet>
</f7-page>
</template>
+8 -8
View File
@@ -79,14 +79,14 @@
</f7-card-content>
</f7-card>
<PasswordInputSheet :title="$t('Current Password')"
:hint="$t('Please enter your current password when modifying your password')"
:show.sync="showInputPasswordSheet"
:confirm-disabled="saving"
:cancel-disabled="saving"
v-model="currentPassword"
@password:confirm="save()">
</PasswordInputSheet>
<password-input-sheet :title="$t('Current Password')"
:hint="$t('Please enter your current password when modifying your password')"
:show.sync="showInputPasswordSheet"
:confirm-disabled="saving"
:cancel-disabled="saving"
v-model="currentPassword"
@password:confirm="save()">
</password-input-sheet>
</f7-page>
</template>