Files
MusicPlayer/web/src/composables/searchManager.ts
T
janishutz 8a3dd7a583 feat: loading local songs, basic association
association used to load existing playlists with local files
2026-09-02 14:23:16 +02:00

26 lines
538 B
TypeScript

import {
type Ref,
ref
} from 'vue';
import type {
CloudImport
} from './importTypePicker';
import type {
Song
} from '@/ts/dtype/playlist';
export const isShowingSearchView = ref( false );
export const searchOpts: Ref<CloudImport | null> = ref( null );
export const results: Ref<Song[]> = ref( [] );
export const query = ref( '' );
export const openSearchInterface = ( options: CloudImport ) => {
searchOpts.value = options;
isShowingSearchView.value = true;
results.value = [];
query.value = '';
};