Adds the routing scaffold for the doc-centric pivot. Each new route renders a placeholder page until E3/E4/E5 implement them; legacy routes (/studio, /documents, /history, /search, /reasoning) keep working in parallel. New routes (Vue Router, history mode): /docs library (placeholder, #211) /docs/new import (placeholder, #214) /docs/:id?mode= workspace (placeholder, #216) /index stores list (placeholder, 0.7.0) /index/:store store detail (placeholder) /index/:store/query RAG playground (placeholder) /runs run history (placeholder) /runs/:id run detail (placeholder) Mode parsing - shared/routing/modes.ts: DocMode union ('ask'|'inspect'|'chunks'), parseMode() returns the default ('ask') for missing or unknown values. #210 will layer feature-flag-aware redirection on top. Route names - shared/routing/names.ts: ROUTES typed const so callers do router.push({ name: ROUTES.DOC_WORKSPACE, ... }) instead of stringly-typed names. Pages - ComingSoonShell shared component: card + back-home link, themed with existing CSS tokens. - 8 thin placeholder pages (one per new route) that compose the shell and forward route params. - i18n keys under comingSoon.* added in fr + en. Tests - shared/routing/modes.test.ts (10 cases): isDocMode + parseMode + ALL_MODES invariants. - app/router/router.test.ts (5 cases): every doc-centric route resolves to a component, legacy routes still work, doc workspace receives id and parsed mode as props, unknown mode falls back to ask, unknown path redirects to home. Routes table extracted to routes.ts so tests build a router with createMemoryHistory() (no window required) instead of needing the production createWebHistory() router. Refs #207
101 lines
2.3 KiB
Vue
101 lines
2.3 KiB
Vue
<template>
|
|
<div class="coming-soon">
|
|
<div class="coming-soon__card">
|
|
<div class="coming-soon__badge">0.6.0</div>
|
|
<h1 class="coming-soon__title">{{ title }}</h1>
|
|
<p class="coming-soon__subtitle">{{ subtitle }}</p>
|
|
<p v-if="hint" class="coming-soon__hint">{{ hint }}</p>
|
|
<RouterLink :to="{ name: ROUTES.HOME }" class="coming-soon__back">
|
|
{{ t('comingSoon.backHome') }}
|
|
</RouterLink>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
|
|
<script setup lang="ts">
|
|
import { useI18n } from '../i18n'
|
|
|
|
import { ROUTES } from '../routing/names'
|
|
|
|
defineProps<{
|
|
/** Page title shown as `<h1>`. Typically the i18n-resolved page name. */
|
|
title: string
|
|
/** One-sentence description of what the page will do once shipped. */
|
|
subtitle: string
|
|
/** Optional secondary hint (e.g. issue link, ETA). */
|
|
hint?: string
|
|
}>()
|
|
|
|
const { t } = useI18n()
|
|
</script>
|
|
|
|
<style scoped>
|
|
.coming-soon {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
min-height: calc(100vh - 48px);
|
|
padding: 2rem;
|
|
}
|
|
|
|
.coming-soon__card {
|
|
max-width: 28rem;
|
|
text-align: center;
|
|
padding: 2.5rem 2rem;
|
|
background: var(--color-surface, #fff);
|
|
border: 1px solid var(--color-border, #e5e7eb);
|
|
border-radius: 12px;
|
|
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
|
|
}
|
|
|
|
.coming-soon__badge {
|
|
display: inline-block;
|
|
margin-bottom: 1rem;
|
|
padding: 0.25rem 0.6rem;
|
|
background: var(--color-accent-soft, #eff6ff);
|
|
color: var(--color-accent, #1d4ed8);
|
|
border-radius: 999px;
|
|
font-size: 0.75rem;
|
|
font-weight: 600;
|
|
letter-spacing: 0.04em;
|
|
}
|
|
|
|
.coming-soon__title {
|
|
margin: 0 0 0.5rem;
|
|
font-size: 1.5rem;
|
|
font-weight: 600;
|
|
color: var(--color-text, #111);
|
|
}
|
|
|
|
.coming-soon__subtitle {
|
|
margin: 0 0 1rem;
|
|
font-size: 1rem;
|
|
color: var(--color-text-muted, #6b7280);
|
|
line-height: 1.5;
|
|
}
|
|
|
|
.coming-soon__hint {
|
|
margin: 0 0 1.5rem;
|
|
font-size: 0.875rem;
|
|
color: var(--color-text-muted, #6b7280);
|
|
}
|
|
|
|
.coming-soon__back {
|
|
display: inline-block;
|
|
padding: 0.5rem 1rem;
|
|
background: transparent;
|
|
color: var(--color-accent, #1d4ed8);
|
|
border: 1px solid var(--color-accent, #1d4ed8);
|
|
border-radius: 6px;
|
|
font-size: 0.875rem;
|
|
text-decoration: none;
|
|
transition:
|
|
background-color 0.15s,
|
|
color 0.15s;
|
|
}
|
|
|
|
.coming-soon__back:hover {
|
|
background: var(--color-accent, #1d4ed8);
|
|
color: #fff;
|
|
}
|
|
</style>
|