diff --git a/src-angular/app/app-routing.module.ts b/src-angular/app/app-routing.module.ts index c33b5cf..a687006 100644 --- a/src-angular/app/app-routing.module.ts +++ b/src-angular/app/app-routing.module.ts @@ -3,12 +3,16 @@ import { RouteReuseStrategy, RouterModule, Routes } from '@angular/router' import { BrowseComponent } from './components/browse/browse.component' import { SettingsComponent } from './components/settings/settings.component' +import { SongListsComponent } from './components/songlists/songlists.component' +import { SongListDetailComponent } from './components/songlists/songlist-detail/songlist-detail.component' import { ToolsComponent } from './components/tools/tools.component' import { TabPersistStrategy } from './core/tab-persist.strategy' const routes: Routes = [ { path: 'browse', component: BrowseComponent, data: { shouldReuse: true } }, { path: 'library', redirectTo: '/browse' }, + { path: 'lists', component: SongListsComponent, data: { shouldReuse: true } }, + { path: 'lists/:id', component: SongListDetailComponent }, { path: 'tools', component: ToolsComponent, data: { shouldReuse: true } }, { path: 'settings', component: SettingsComponent, data: { shouldReuse: true } }, { path: 'about', redirectTo: '/browse' }, diff --git a/src-angular/app/app.component.ts b/src-angular/app/app.component.ts index 4cec7c2..497757f 100644 --- a/src-angular/app/app.component.ts +++ b/src-angular/app/app.component.ts @@ -1,6 +1,7 @@ import { Component } from '@angular/core' import { SettingsService } from './core/services/settings.service' +import { SongListService } from './core/services/songlist.service' @Component({ selector: 'app-root', @@ -12,9 +13,11 @@ export class AppComponent { settingsLoaded = false - constructor(settingsService: SettingsService) { + constructor(settingsService: SettingsService, songListService: SongListService) { // Ensure settings are loaded before rendering the application settingsService.loadSettings().then(() => this.settingsLoaded = true) + // Load song lists in the background (not critical for initial render) + songListService.loadLists() document.addEventListener('keydown', event => { if (event.ctrlKey && (event.key === '+' || event.key === '-' || event.key === '=' || event.key === '0')) { diff --git a/src-angular/app/app.module.ts b/src-angular/app/app.module.ts index 8511388..fca8442 100644 --- a/src-angular/app/app.module.ts +++ b/src-angular/app/app.module.ts @@ -16,7 +16,11 @@ import { SearchBarComponent } from './components/browse/search-bar/search-bar.co import { DownloadsModalComponent } from './components/browse/status-bar/downloads-modal/downloads-modal.component' import { StatusBarComponent } from './components/browse/status-bar/status-bar.component' import { SettingsComponent } from './components/settings/settings.component' +import { SongListsComponent } from './components/songlists/songlists.component' +import { SongListDetailComponent } from './components/songlists/songlist-detail/songlist-detail.component' +import { AddToListModalComponent } from './components/songlists/add-to-list-modal/add-to-list-modal.component' import { ToolbarComponent } from './components/toolbar/toolbar.component' +import { ToolsComponent } from './components/tools/tools.component' import { RemoveStyleTagsPipe } from './core/pipes/remove-style-tags.pipe' @NgModule({ @@ -35,6 +39,10 @@ import { RemoveStyleTagsPipe } from './core/pipes/remove-style-tags.pipe' DownloadsModalComponent, RemoveStyleTagsPipe, SettingsComponent, + SongListsComponent, + SongListDetailComponent, + AddToListModalComponent, + ToolsComponent, ], bootstrap: [AppComponent], imports: [ BrowserModule, diff --git a/src-angular/app/components/browse/chart-sidebar/chart-sidebar.component.html b/src-angular/app/components/browse/chart-sidebar/chart-sidebar.component.html index 84f0118..779860b 100644 --- a/src-angular/app/components/browse/chart-sidebar/chart-sidebar.component.html +++ b/src-angular/app/components/browse/chart-sidebar/chart-sidebar.component.html @@ -143,6 +143,12 @@
{{ chartDescription }}
No song lists yet
Create your first list to get started
{{ list.name }}
{{ list.entries.length }} songs
Song list not found
{{ list.description || 'No description' }}
+ {{ list.entries.length }} songs | Created {{ formatDate(list.createdAt) }} +
This list is empty
Add songs from the Browse tab to get started
Remove "{{ entryToRemove.cache.name || 'Unknown' }}" from this list?
The song won't be deleted from your library.
Create a new list or import one to get started
{{ importedList.name }}
{{ importedList.description || 'No description' }}
{{ importedList.entries.length }} songs
Are you sure you want to delete "{{ listToDelete.name }}"?
This action cannot be undone.