849bc73290
BillingView 416→114 (+ BalanceCard 155 + TransactionsTable 113 + InvoicesTable 90 + billingFormatters 51 composable: formatPlain/formatCost/statusChipColor/ statusLabel/formatLabel/formatIcon/txAmountClass). SecurityTab 354→39 (+ ChangePasswordCard 17 + TwoFactorCard 218 + RecoveryCodesCard 104 + SessionsTable 66; auth-store читается напрямую в каждом sub-component). RemindersView 345→183 (+ RemindersFilters 51 + RemindersList 173; ReminderDialog уже отдельный с прошлой фазы — служит как ReminderForm). State (`activeTab`, `editingReminder`, `deletingReminderId` в RemindersView) остаётся в parent ради единого reload-flow + confirm-dialog'ов. Auth-store читается напрямую в TwoFactorCard/RecoveryCodesCard через useAuthStore() — без prop-drilling. Reminders-store читается напрямую в RemindersFilters/ RemindersList. Все sub-components <250 строк (acceptance threshold). 3 view-shells: 114/39/183. Регрессия: ESLint 0 + vue-tsc 0 + Vitest 416/416 + build OK 968 ms. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
40 lines
1.6 KiB
Vue
40 lines
1.6 KiB
Vue
<script setup lang="ts">
|
||
/**
|
||
* Settings → Безопасность. Тонкая shell: 4 sub-component'а.
|
||
*
|
||
* Источник дизайна: liderra_v8_handoff/concepts/v8_settings.html секция #security.
|
||
* Логика по ТЗ §1.6/Прил. Г.4.2: TOTP 6 цифр, recovery-codes 8 шт., session 1 час.
|
||
*
|
||
* Sprint 4 Phase B/2 — split на shell + 4 sub-components (audit O-refactor-04 хвост):
|
||
* - ChangePasswordCard — пароль (placeholder MVP).
|
||
* - TwoFactorCard — включить/отключить 2FA + setup wizard + disable dialog.
|
||
* - RecoveryCodesCard — перегенерировать recovery-codes (видна только при 2FA).
|
||
* - SessionsTable — активные сессии.
|
||
*
|
||
* State (auth-store) читается напрямую в каждом sub-component через useAuthStore() —
|
||
* без prop-drilling.
|
||
*/
|
||
import ChangePasswordCard from '../../components/settings/security/ChangePasswordCard.vue';
|
||
import TwoFactorCard from '../../components/settings/security/TwoFactorCard.vue';
|
||
import RecoveryCodesCard from '../../components/settings/security/RecoveryCodesCard.vue';
|
||
import SessionsTable from '../../components/settings/security/SessionsTable.vue';
|
||
</script>
|
||
|
||
<template>
|
||
<div class="tab-content">
|
||
<h2 class="tab-title text-h6 mb-4">Безопасность</h2>
|
||
|
||
<ChangePasswordCard />
|
||
<TwoFactorCard />
|
||
<RecoveryCodesCard />
|
||
<SessionsTable />
|
||
</div>
|
||
</template>
|
||
|
||
<style scoped>
|
||
.tab-title {
|
||
font-variation-settings: 'opsz' 18;
|
||
letter-spacing: -0.005em;
|
||
}
|
||
</style>
|