feat: Add radio context type to frontend playback context store
This commit is contained in:
1 parent
ed3a9cf8cb
commit
04cd97385a
2 files changed
+8
-2
No files matched your search
@@ -9,7 +9,7 @@ import { invoke } from '@tauri-apps/api/core';
|
||||
|
||||
// ============ Types ============
|
||||
|
||||
export type ContextType = 'album' | 'playlist' | 'artist_top' | 'home_list' | 'favorites' | 'local_library';
|
||||
export type ContextType = 'album' | 'playlist' | 'artist_top' | 'home_list' | 'favorites' | 'local_library' | 'radio';
|
||||
export type ContentSource = 'qobuz' | 'local';
|
||||
|
||||
export interface PlaybackContext {
|
||||
@@ -139,7 +139,8 @@ export function getContextDisplayInfo(): string | null {
|
||||
artist_top: 'Artist Top Songs',
|
||||
home_list: 'Home List',
|
||||
favorites: 'Favorites',
|
||||
local_library: 'Local Library'
|
||||
local_library: 'Local Library',
|
||||
radio: 'Radio'
|
||||
}[currentContext.type];
|
||||
|
||||
return `${typeStr} · ${currentContext.label}`;
|
||||
|
||||
@@ -460,6 +460,11 @@
|
||||
navigateTo('search');
|
||||
break;
|
||||
|
||||
case 'radio':
|
||||
// Radio is dynamic/endless - no specific page to navigate to
|
||||
console.log('[ContextNav] Radio is currently playing');
|
||||
break;
|
||||
|
||||
default:
|
||||
console.warn('[ContextNav] Unknown context type:', context.type);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user