feat(02-03): TOTP enrollment flow, backup codes, AccountView, ConfirmBlock
- TotpEnrollment.vue: three-step enrollment (setup → verify → backup-codes); emits 'enrolled' - BackupCodesDisplay.vue: 2-column grid, copy-all clipboard, acknowledgment checkbox - ConfirmBlock.vue: reusable inline confirmation block with 'confirmed'/'cancelled' emits - AccountView.vue: TOTP section (enrollment or disable), change-password with breach/wrong-pw error handling, sign-out-all with ConfirmBlock - npm run build exits 0
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
<template>
|
||||
<div class="space-y-3">
|
||||
<p class="text-sm text-gray-700">{{ message }}</p>
|
||||
<div class="flex gap-3 items-center">
|
||||
<button
|
||||
type="button"
|
||||
@click="$emit('cancelled')"
|
||||
class="text-sm text-gray-600 hover:text-gray-800"
|
||||
>
|
||||
{{ cancelLabel }}
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
@click="$emit('confirmed')"
|
||||
class="flex items-center gap-2 px-4 py-2 rounded-lg text-sm font-semibold transition-colors min-h-[44px]"
|
||||
:class="confirmClass || 'bg-red-600 hover:bg-red-700 text-white'"
|
||||
>
|
||||
{{ confirmLabel }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
defineProps({
|
||||
message: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
confirmLabel: {
|
||||
type: String,
|
||||
default: 'Confirm',
|
||||
},
|
||||
cancelLabel: {
|
||||
type: String,
|
||||
default: 'Cancel',
|
||||
},
|
||||
confirmClass: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
})
|
||||
|
||||
defineEmits(['confirmed', 'cancelled'])
|
||||
</script>
|
||||
Reference in New Issue
Block a user