CI / build-and-test (push) Successful in 14m55s
Nouvelle liste dans la section Vous de la barre latérale, avec un bouton horloge a cote du coeur sur toutes les cartes (accueil, themes, provider- themes, recherche). - db : les 4 fonctions de listes (like/unlike/isLiked/list) prennent un paramètre `tag` — la table `tags` sert déjà de mot-clés génériques, donc zéro migration. - api : les 4 routes likes sont générées par registerVideoTagRoutes(prefix, tagName) ; /api/user/watch-later = même fabrique, même enrichissement yt-dlp, même middleware cookie-aware. Entrée OpenAPI ajoutée. - front : LikesService prend un VideoTag, like-button un @Input() list (icône horloge, ambre quand enregistré, libellés a11y dédiés) — un seul composant pour les deux boutons, pas de copie. - cartes de recherche : la grille partagée n'avait AUCUN bouton ; cœur + horloge ajoutés, masqués sur les lives et cartes chaîne (coin bas-gauche déjà occupé par le compteur de spectateurs / pas des vidéos). - route /library/watch-later = LikedComponent via data.list (titre, icône, placeholder et état vide pilotés par la route), clés nav.watchLater FR/EN. Tests : npm run test:api 41/41 (nouveau test watch-later : ajout, statut, indépendance vis-à-vis des likes, liste, retrait, 400, 401) + 21 autres suites vertes. Build OK, instance locale 4200 rebuildée. Sondage Playwright desktop+mobile : 12/14 (2 faux positifs du sondage : accordéon replié sur une route hors /library, 3×401 console pendant la phase déconnectée).
141 lines
4.8 KiB
TypeScript
141 lines
4.8 KiB
TypeScript
import { Routes } from '@angular/router';
|
|
|
|
export const APP_ROUTES: Routes = [
|
|
{ path: '', pathMatch: 'full', redirectTo: 't/trending' },
|
|
// Theme pages
|
|
{
|
|
path: 't/:theme',
|
|
loadComponent: () => import('./components/themes/theme-page.component').then(m => m.ThemePageComponent),
|
|
title: 'NewTube - Theme'
|
|
},
|
|
{
|
|
path: 'p/:provider/t/:theme',
|
|
loadComponent: () => import('./components/themes/provider-theme-page.component').then(m => m.ProviderThemePageComponent),
|
|
title: 'NewTube - Provider Theme'
|
|
},
|
|
{
|
|
path: 'search',
|
|
loadComponent: () => import('./components/search/search.component').then(m => m.SearchComponent),
|
|
title: 'NewTube - Search'
|
|
},
|
|
{
|
|
path: 'shorts',
|
|
loadComponent: () => import('./components/shorts/watch-short.component').then(m => m.WatchShortComponent),
|
|
title: 'NewTube - Shorts'
|
|
},
|
|
// Alias de deep-link produits par `routeForVideo` (mêmes pages Watch).
|
|
{
|
|
path: 'shorts/:id',
|
|
loadComponent: () => import('./components/watch/watch.component').then(m => m.WatchComponent),
|
|
title: 'NewTube - Short'
|
|
},
|
|
{
|
|
path: 'live/:id',
|
|
loadComponent: () => import('./components/watch/watch.component').then(m => m.WatchComponent),
|
|
title: 'NewTube - Live'
|
|
},
|
|
{
|
|
path: 'channel/:provider/:externalId',
|
|
loadComponent: () => import('./components/channel/channel-page.component').then(m => m.ChannelPageComponent),
|
|
title: 'NewTube - Channel'
|
|
},
|
|
{
|
|
path: 'watch/:id',
|
|
loadComponent: () => import('./components/watch/watch.component').then(m => m.WatchComponent),
|
|
title: 'NewTube - Watch'
|
|
},
|
|
// Alias supporting provider in path: /watch/:provider/:id
|
|
{
|
|
path: 'watch/:provider/:id',
|
|
loadComponent: () => import('./components/watch/watch.component').then(m => m.WatchComponent),
|
|
title: 'NewTube - Watch'
|
|
},
|
|
{
|
|
path: 'library',
|
|
pathMatch: 'full',
|
|
redirectTo: 'library/playlists'
|
|
},
|
|
{
|
|
path: 'library/playlists',
|
|
loadComponent: () => import('./components/library/playlists/playlists.component').then(m => m.PlaylistsComponent),
|
|
title: 'NewTube - Playlists'
|
|
},
|
|
{
|
|
path: 'library/playlists/:id',
|
|
loadComponent: () => import('./components/library/playlists/playlist-detail.component').then(m => m.PlaylistDetailComponent),
|
|
title: 'NewTube - Playlist'
|
|
},
|
|
{
|
|
path: 'library/liked',
|
|
loadComponent: () => import('./components/library/liked/liked.component').then(m => m.LikedComponent),
|
|
title: 'NewTube - Liked'
|
|
},
|
|
{
|
|
path: 'library/watch-later',
|
|
loadComponent: () => import('./components/library/liked/liked.component').then(m => m.LikedComponent),
|
|
data: { list: 'watch-later' },
|
|
title: 'NewTube - Watch later'
|
|
},
|
|
{
|
|
path: 'library/subscriptions',
|
|
loadComponent: () => import('./components/library/subscriptions/subscriptions.component').then(m => m.SubscriptionsComponent),
|
|
title: 'NewTube - Subscriptions'
|
|
},
|
|
{
|
|
path: 'library/import',
|
|
loadComponent: () => import('./components/library/import/import.component').then(m => m.ImportComponent),
|
|
title: 'NewTube - Import'
|
|
},
|
|
{
|
|
path: 'library/downloads/:id',
|
|
loadComponent: () => import('./components/library/downloads/download-play.component').then(m => m.DownloadPlayComponent),
|
|
title: 'NewTube - Play download'
|
|
},
|
|
{
|
|
path: 'library/downloads',
|
|
loadComponent: () => import('./components/library/downloads/downloads.component').then(m => m.DownloadsComponent),
|
|
title: 'NewTube - Downloads'
|
|
},
|
|
{
|
|
path: 'account',
|
|
pathMatch: 'full',
|
|
redirectTo: 'account/preferences'
|
|
},
|
|
{
|
|
path: 'account/preferences',
|
|
loadComponent: () => import('./components/account/preferences/preferences.component').then(m => m.PreferencesComponent),
|
|
title: 'NewTube - Preferences'
|
|
},
|
|
{
|
|
path: 'account/history',
|
|
loadComponent: () => import('./components/account/history/history.component').then(m => m.HistoryComponent),
|
|
title: 'NewTube - History'
|
|
},
|
|
{
|
|
path: 'account/sessions',
|
|
loadComponent: () => import('./components/account/sessions/sessions.component').then(m => m.SessionsComponent),
|
|
title: 'NewTube - Sessions'
|
|
},
|
|
{
|
|
path: 'auth/login',
|
|
loadComponent: () => import('./components/auth/login/login.component').then(m => m.LoginComponent),
|
|
title: 'NewTube - Login'
|
|
},
|
|
{
|
|
path: 'auth/register',
|
|
loadComponent: () => import('./components/auth/register/register.component').then(m => m.RegisterComponent),
|
|
title: 'NewTube - Register'
|
|
},
|
|
{
|
|
path: 'auth/google/callback',
|
|
loadComponent: () => import('./components/auth/google-callback/google-callback.component').then(m => m.GoogleCallbackComponent),
|
|
title: 'NewTube - Google login'
|
|
},
|
|
{
|
|
path: 'info/utilisation',
|
|
loadComponent: () => import('./components/info/utilisation/utilisation.component').then(m => m.UtilisationComponent),
|
|
title: 'NewTube - Utilisation'
|
|
},
|
|
{ path: '**', redirectTo: '' }
|
|
];
|