feat(reader): immersive series-read route + route-aware AppShell (suppress TopNav)
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,12 +1,18 @@
|
|||||||
<template>
|
<template>
|
||||||
<TopNav />
|
<slot v-if="route.meta.immersive" />
|
||||||
<main class="fc-content">
|
<template v-else>
|
||||||
<slot />
|
<TopNav />
|
||||||
</main>
|
<main class="fc-content">
|
||||||
|
<slot />
|
||||||
|
</main>
|
||||||
|
</template>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
|
import { useRoute } from 'vue-router'
|
||||||
import TopNav from './TopNav.vue'
|
import TopNav from './TopNav.vue'
|
||||||
|
|
||||||
|
const route = useRoute()
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import ShowcaseView from './views/ShowcaseView.vue'
|
|||||||
import TagsView from './views/TagsView.vue'
|
import TagsView from './views/TagsView.vue'
|
||||||
import ArtistView from './views/ArtistView.vue'
|
import ArtistView from './views/ArtistView.vue'
|
||||||
import SeriesManageView from './views/SeriesManageView.vue'
|
import SeriesManageView from './views/SeriesManageView.vue'
|
||||||
|
import SeriesReaderView from './views/SeriesReaderView.vue'
|
||||||
|
|
||||||
// The application's front door. `/` redirects here. Changing the front door
|
// The application's front door. `/` redirects here. Changing the front door
|
||||||
// is a one-line edit (e.g. '/gallery' or '/tags').
|
// is a one-line edit (e.g. '/gallery' or '/tags').
|
||||||
@@ -23,6 +24,8 @@ const routes = [
|
|||||||
{ path: '/artist/:slug', name: 'artist', component: ArtistView },
|
{ path: '/artist/:slug', name: 'artist', component: ArtistView },
|
||||||
// Series management — no meta.title (reached from a series tag card).
|
// Series management — no meta.title (reached from a series tag card).
|
||||||
{ path: '/series/:tagId', name: 'series-manage', component: SeriesManageView },
|
{ path: '/series/:tagId', name: 'series-manage', component: SeriesManageView },
|
||||||
|
// Series reader — immersive (no top nav, no meta.title).
|
||||||
|
{ path: '/series/:tagId/read', name: 'series-read', component: SeriesReaderView, meta: { immersive: true } },
|
||||||
{ path: '/settings', name: 'settings', component: SettingsView, meta: { title: 'Settings' } },
|
{ path: '/settings', name: 'settings', component: SettingsView, meta: { title: 'Settings' } },
|
||||||
|
|
||||||
// FC-3: subscription backbone
|
// FC-3: subscription backbone
|
||||||
|
|||||||
@@ -23,4 +23,10 @@ describe('router', () => {
|
|||||||
expect(router.resolve('/artist/some-slug').name).toBe('artist')
|
expect(router.resolve('/artist/some-slug').name).toBe('artist')
|
||||||
expect(router.resolve('/artist/some-slug').params.slug).toBe('some-slug')
|
expect(router.resolve('/artist/some-slug').params.slug).toBe('some-slug')
|
||||||
})
|
})
|
||||||
|
|
||||||
|
it('series-read is an immersive route', () => {
|
||||||
|
const r = router.resolve('/series/5/read')
|
||||||
|
expect(r.name).toBe('series-read')
|
||||||
|
expect(r.meta.immersive).toBe(true)
|
||||||
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user