40 lines
778 B
TypeScript
40 lines
778 B
TypeScript
import { browser } from '$app/environment';
|
|
import { SvelteSet } from 'svelte/reactivity';
|
|
|
|
export const favoritedStreams = new SvelteSet<string>(
|
|
JSON.parse((browser && localStorage.getItem('favoritedStreams')) || '[]')
|
|
);
|
|
$effect.root(() => {
|
|
$effect(() => {
|
|
localStorage.setItem('favoritedStreams', JSON.stringify(Array.from(favoritedStreams)));
|
|
});
|
|
});
|
|
|
|
export const tagList = [
|
|
'acoustic',
|
|
'electronic',
|
|
'orchestral',
|
|
'rock',
|
|
'pop',
|
|
'metal',
|
|
'aggressive',
|
|
'folk',
|
|
'jazzy',
|
|
'dance.music',
|
|
'untz',
|
|
'breakbeats',
|
|
'electronica',
|
|
'chiptune',
|
|
'left.field',
|
|
'denpa',
|
|
'vocaloid',
|
|
'funky',
|
|
'lush',
|
|
'noisy',
|
|
'psychedelic',
|
|
'dark',
|
|
'calm',
|
|
'moody',
|
|
'uplifting'
|
|
];
|