Added "Dynamic modals"; fixed title modals not allowing child modals

This commit is contained in:
Aleksi Lassila
2023-08-09 23:08:46 +03:00
parent a52e96e0e1
commit 25c018174d
24 changed files with 507 additions and 558 deletions

View File

@@ -1,5 +1,7 @@
import { library } from '$lib/stores/library.store';
import { writable } from 'svelte/store';
import { modalStack } from '../Modal/Modal';
import VideoPlayer from './VideoPlayer.svelte';
const initialValue = { visible: false, jellyfinId: '' };
export type PlayerStateValue = typeof initialValue;
@@ -11,6 +13,7 @@ function createPlayerState() {
...store,
streamJellyfinId: (id: string) => {
store.set({ visible: true, jellyfinId: id });
modalStack.create(VideoPlayer, {}); // FIXME
},
close: () => {
store.set({ visible: false, jellyfinId: '' });