All checks were successful
Deploy / deploy (push) Successful in 3m32s
- Route `/` now serves the Vue SPA directly (catch-all `/{req}`)
- Legacy Twig interface moved to `/legacy`
- Vue Router base changed from `/vue/` to `/`
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
174 lines
5.6 KiB
JavaScript
174 lines
5.6 KiB
JavaScript
import { createRouter, createWebHistory } from 'vue-router';
|
|
import ActivityPage from '../domain/activity/presentation/pages/ActivityPage.vue';
|
|
import ConversionPage from '../domain/conversion/presentation/pages/ConversionPage.vue';
|
|
import NewImportPage from '../domain/import/presentation/pages/NewImportPage.vue';
|
|
import AddManga from '../domain/manga/presentation/pages/AddManga.vue';
|
|
import HomePage from '../domain/manga/presentation/pages/HomePage.vue';
|
|
import MangaDetails from '../domain/manga/presentation/pages/MangaDetails.vue';
|
|
import ChapterPage from '../domain/reader/presentation/pages/ChapterPage.vue';
|
|
import ScrapperConfigurations from '../domain/setting/presentation/pages/ScrapperConfigurations.vue';
|
|
import ScrapperEdit from '../domain/setting/presentation/pages/ScrapperEdit.vue';
|
|
import Layout from '../shared/components/layout/Layout.vue';
|
|
|
|
// Placeholder component for new routes
|
|
const PlaceholderComponent = {
|
|
props: {
|
|
title: {
|
|
type: String,
|
|
required: true
|
|
}
|
|
},
|
|
template: `
|
|
<div class="container mx-auto px-4 py-8">
|
|
<h1 class="text-2xl font-bold mb-4">{{ title }}</h1>
|
|
<p class="text-gray-600">Cette fonctionnalité sera bientôt disponible.</p>
|
|
</div>
|
|
`
|
|
};
|
|
|
|
const routes = [
|
|
{
|
|
path: '/',
|
|
component: Layout,
|
|
children: [
|
|
{
|
|
path: '',
|
|
name: 'home',
|
|
redirect: '/manga'
|
|
},
|
|
{
|
|
path: '/manga',
|
|
name: 'manga',
|
|
component: HomePage
|
|
},
|
|
{
|
|
path: '/manga/details/:id',
|
|
name: 'manga-details',
|
|
component: MangaDetails
|
|
},
|
|
{
|
|
path: '/manga/add',
|
|
name: 'add-manga',
|
|
component: AddManga
|
|
},
|
|
{
|
|
path: '/manga/reader/:chapterId',
|
|
name: 'reader',
|
|
component: ChapterPage,
|
|
props: { title: 'Lecteur' }
|
|
},
|
|
// Import routes
|
|
{
|
|
path: '/import',
|
|
name: 'import',
|
|
component: NewImportPage
|
|
},
|
|
// Pages placeholder avec chargement différé
|
|
{
|
|
path: '/manga/import',
|
|
name: 'manga-import',
|
|
component: PlaceholderComponent,
|
|
props: { title: 'Import de bibliothèque' }
|
|
},
|
|
{
|
|
path: '/manga/discover',
|
|
name: 'discover',
|
|
component: PlaceholderComponent,
|
|
props: { title: 'Découvrir' }
|
|
},
|
|
{
|
|
path: '/convert',
|
|
name: 'convert',
|
|
component: ConversionPage
|
|
},
|
|
{
|
|
path: '/calendar',
|
|
name: 'calendar',
|
|
component: PlaceholderComponent,
|
|
props: { title: 'Calendrier' }
|
|
},
|
|
{
|
|
path: '/activity',
|
|
name: 'activity',
|
|
component: ActivityPage
|
|
},
|
|
// Paramètres
|
|
{
|
|
path: '/settings',
|
|
name: 'settings',
|
|
component: PlaceholderComponent,
|
|
props: { title: 'Paramètres' }
|
|
},
|
|
{
|
|
path: '/settings/general',
|
|
name: 'settings-general',
|
|
component: PlaceholderComponent,
|
|
props: { title: 'Paramètres généraux' }
|
|
},
|
|
{
|
|
path: '/settings/folders',
|
|
name: 'settings-folders',
|
|
component: PlaceholderComponent,
|
|
props: { title: 'Gestion des dossiers' }
|
|
},
|
|
{
|
|
path: '/settings/scrappers',
|
|
name: 'scrapper-configurations',
|
|
component: ScrapperConfigurations
|
|
},
|
|
{
|
|
path: '/settings/scrappers/new',
|
|
name: 'scrapper-new',
|
|
component: ScrapperEdit
|
|
},
|
|
{
|
|
path: '/settings/scrappers/edit/:id',
|
|
name: 'scrapper-edit',
|
|
component: ScrapperEdit
|
|
},
|
|
{
|
|
path: '/settings/ui',
|
|
name: 'settings-ui',
|
|
component: PlaceholderComponent,
|
|
props: { title: "Paramètres de l'interface" }
|
|
},
|
|
// Système
|
|
{
|
|
path: '/system',
|
|
name: 'system',
|
|
component: PlaceholderComponent,
|
|
props: { title: 'Système' }
|
|
},
|
|
{
|
|
path: '/system/status',
|
|
name: 'system-status',
|
|
component: PlaceholderComponent,
|
|
props: { title: 'Status du système' }
|
|
},
|
|
{
|
|
path: '/system/backup',
|
|
name: 'system-backup',
|
|
component: PlaceholderComponent,
|
|
props: { title: 'Sauvegarde' }
|
|
},
|
|
{
|
|
path: '/system/logs',
|
|
name: 'system-logs',
|
|
component: PlaceholderComponent,
|
|
props: { title: 'Journaux système' }
|
|
},
|
|
{
|
|
path: '/system/updates',
|
|
name: 'system-updates',
|
|
component: PlaceholderComponent,
|
|
props: { title: 'Mises à jour' }
|
|
}
|
|
]
|
|
}
|
|
];
|
|
|
|
export const router = createRouter({
|
|
history: createWebHistory('/'),
|
|
routes
|
|
});
|