feat(playlists): Wire PlaylistManagerView to main page
Add 'playlist-manager' to ViewType and connect it to Sidebar navigation
This commit is contained in:
1 parent
5033befa1d
commit
b18bd2eac2
2 files changed
+8
-1
No files matched your search
@@ -6,7 +6,7 @@
|
|||||||
* fetched data, but selectedPlaylistId is managed here as it's just an ID.
|
* fetched data, but selectedPlaylistId is managed here as it's just an ID.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
export type ViewType = 'home' | 'search' | 'library' | 'settings' | 'album' | 'artist' | 'playlist' | 'favorites';
|
export type ViewType = 'home' | 'search' | 'library' | 'settings' | 'album' | 'artist' | 'playlist' | 'playlist-manager' | 'favorites';
|
||||||
|
|
||||||
// Navigation state
|
// Navigation state
|
||||||
let activeView: ViewType = 'home';
|
let activeView: ViewType = 'home';
|
||||||
|
|||||||
@@ -215,6 +215,7 @@
|
|||||||
import PlaylistDetailView from '$lib/components/views/PlaylistDetailView.svelte';
|
import PlaylistDetailView from '$lib/components/views/PlaylistDetailView.svelte';
|
||||||
import FavoritesView from '$lib/components/views/FavoritesView.svelte';
|
import FavoritesView from '$lib/components/views/FavoritesView.svelte';
|
||||||
import LocalLibraryView from '$lib/components/views/LocalLibraryView.svelte';
|
import LocalLibraryView from '$lib/components/views/LocalLibraryView.svelte';
|
||||||
|
import PlaylistManagerView from '$lib/components/views/PlaylistManagerView.svelte';
|
||||||
|
|
||||||
// Overlays
|
// Overlays
|
||||||
import QueuePanel from '$lib/components/QueuePanel.svelte';
|
import QueuePanel from '$lib/components/QueuePanel.svelte';
|
||||||
@@ -1242,6 +1243,7 @@
|
|||||||
onPlaylistSelect={selectPlaylist}
|
onPlaylistSelect={selectPlaylist}
|
||||||
onCreatePlaylist={openCreatePlaylist}
|
onCreatePlaylist={openCreatePlaylist}
|
||||||
onImportPlaylist={openImportPlaylist}
|
onImportPlaylist={openImportPlaylist}
|
||||||
|
onPlaylistManagerClick={() => navigateTo('playlist-manager')}
|
||||||
onSettingsClick={() => navigateTo('settings')}
|
onSettingsClick={() => navigateTo('settings')}
|
||||||
onAboutClick={() => isAboutModalOpen = true}
|
onAboutClick={() => isAboutModalOpen = true}
|
||||||
onLogout={handleLogout}
|
onLogout={handleLogout}
|
||||||
@@ -1368,6 +1370,11 @@
|
|||||||
getTrackDownloadStatus={getTrackDownloadStatus}
|
getTrackDownloadStatus={getTrackDownloadStatus}
|
||||||
{downloadStateVersion}
|
{downloadStateVersion}
|
||||||
/>
|
/>
|
||||||
|
{:else if activeView === 'playlist-manager'}
|
||||||
|
<PlaylistManagerView
|
||||||
|
onBack={navGoBack}
|
||||||
|
onPlaylistSelect={selectPlaylist}
|
||||||
|
/>
|
||||||
{/if}
|
{/if}
|
||||||
</main>
|
</main>
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user