1e233a70c8
- AppLayout: v-navigation-drawer (теало-нуар sidebar 240px) + brand-block + nav-tree из 8 пунктов в 3 группах (Работа/Финансы/Команда), v-app-bar с crumb «Рабочая область → currentPage» + search ⌘K + bell + user-chip. Mobile (md<): drawer toggleable. - DashboardView: page-head «Доброе утро, Иван» + page-meta + range-toggle 4 опции (Сегодня/7д/30д/Период). KPI-row из 4 cards: 3 outlined (получено лидов/конверсия/активные проекты) + 1 hero balance с runway-bar 4/7 заполненных сегментов teal #32C8A9. - AppShell упрощён до layout-mapper (route.meta.layout 'app'/'auth'). - Маршрут /dashboard (meta.layout='app') в router + web.php. - histoire.setup расширен 8 app-stub-маршрутами для AppLayout. - Vitest +11 тестов: AppLayout 6 (brand+3 группы+8 пунктов+счётчики+crumb), DashboardView 5, AppShell.spec.ts переписан под layout-mapper. - cspell-words.txt: JBM. Регресс: lint+type-check+format OK; vitest 35/35 за 4.92s; vite build DashboardView lazy-chunk 14.9KB; story:build 8/8 за 28.97s; Pest 48/48 за 4.88s. CLAUDE.md v1.20->v1.21, реестр Открытых_вопросов v1.29->v1.30. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
39 lines
2.0 KiB
TypeScript
39 lines
2.0 KiB
TypeScript
import { defineSetupVue3 } from '@histoire/plugin-vue';
|
||
import { createMemoryHistory, createRouter } from 'vue-router';
|
||
import { vuetify } from './plugins/vuetify';
|
||
|
||
/**
|
||
* Histoire setup — регистрирует Vuetify + Vue Router (memory-history) для каждой story.
|
||
*
|
||
* - Vuetify: без него VApp/VBtn/VCard не рендерятся (требует createVuetify-инстанс).
|
||
* - vue-router: компоненты используют RouterLink/useRoute. В Histoire-iframe
|
||
* нет HTML5 history API — используем memory-history с минимальным набором
|
||
* stub-маршрутов (story-context, не реальные пути).
|
||
*
|
||
* vuetify/styles импортируется внутри plugins/vuetify.ts — повторно
|
||
* импортировать здесь не нужно (TS 6 strict не видит side-effect d.ts).
|
||
*/
|
||
export const setupVue3 = defineSetupVue3(({ app }) => {
|
||
const router = createRouter({
|
||
history: createMemoryHistory(),
|
||
routes: [
|
||
{ path: '/', component: { template: '<div />' } },
|
||
{ path: '/login', component: { template: '<div />' } },
|
||
{ path: '/register', component: { template: '<div />' } },
|
||
{ path: '/forgot', component: { template: '<div />' } },
|
||
{ path: '/2fa', component: { template: '<div />' } },
|
||
{ path: '/recovery', component: { template: '<div />' } },
|
||
{ path: '/dashboard', component: { template: '<div />' } },
|
||
{ path: '/deals', component: { template: '<div />' } },
|
||
{ path: '/kanban', component: { template: '<div />' } },
|
||
{ path: '/reminders', component: { template: '<div />' } },
|
||
{ path: '/billing', component: { template: '<div />' } },
|
||
{ path: '/reports', component: { template: '<div />' } },
|
||
{ path: '/managers', component: { template: '<div />' } },
|
||
{ path: '/settings', component: { template: '<div />' } },
|
||
],
|
||
});
|
||
app.use(vuetify);
|
||
app.use(router);
|
||
});
|