- Extends GET /api/v1/tags with sort=count_desc and min_count query params - New TagsComponent at /tags (public, no auth guard) shows all tags sorted by image count - Clicking a tag navigates to /?tags=<name> for a pre-filtered library view - LibraryComponent reads ?tags= query param on init to support deep-linking from tag browser - Library header gains a "Browse tags" link to /tags for discoverability - All 15 TDD tasks complete; ruff, ng lint, and ng build clean Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
37 lines
916 B
TypeScript
37 lines
916 B
TypeScript
import { Routes } from '@angular/router';
|
|
import { authGuard } from './auth/auth.guard';
|
|
|
|
export const routes: Routes = [
|
|
{
|
|
path: '',
|
|
loadComponent: () =>
|
|
import('./library/library.component').then((m) => m.LibraryComponent),
|
|
},
|
|
{
|
|
path: 'login',
|
|
loadComponent: () =>
|
|
import('./login/login.component').then((m) => m.LoginComponent),
|
|
},
|
|
{
|
|
path: 'upload',
|
|
canActivate: [authGuard],
|
|
loadComponent: () =>
|
|
import('./upload/upload.component').then((m) => m.UploadComponent),
|
|
},
|
|
{
|
|
path: 'tags',
|
|
loadComponent: () =>
|
|
import('./tags/tags.component').then((m) => m.TagsComponent),
|
|
},
|
|
{
|
|
path: 'images/:id',
|
|
loadComponent: () =>
|
|
import('./detail/detail.component').then((m) => m.DetailComponent),
|
|
},
|
|
{
|
|
path: '**',
|
|
loadComponent: () =>
|
|
import('./not-found/not-found.component').then((m) => m.NotFoundComponent),
|
|
},
|
|
];
|