Fix hidden main cowebsite swape
This commit is contained in:
parent
a52ad233d8
commit
06dd2202f6
@ -3,7 +3,7 @@
|
||||
import { streamableCollectionStore } from "../../Stores/StreamableCollectionStore";
|
||||
import MediaBox from "../Video/MediaBox.svelte";
|
||||
|
||||
export let highlightedEmbedScreen: EmbedScreen | null;
|
||||
export let highlightedEmbedScreen: EmbedScreen | undefined;
|
||||
export let full = false;
|
||||
$: clickable = !full;
|
||||
</script>
|
||||
|
@ -73,9 +73,9 @@
|
||||
$mainCoWebsite !== undefined &&
|
||||
$mainCoWebsite.getId() === coWebsite.getId();
|
||||
isHighlight =
|
||||
$highlightedEmbedScreen !== null &&
|
||||
$highlightedEmbedScreen.type === "cowebsite" &&
|
||||
$highlightedEmbedScreen.embed.getId() === coWebsite.getId();
|
||||
$highlightedEmbedScreen !== undefined &&
|
||||
$highlightedEmbedScreen?.type === "cowebsite" &&
|
||||
$highlightedEmbedScreen?.embed.getId() === coWebsite.getId();
|
||||
}
|
||||
</script>
|
||||
|
||||
|
@ -15,7 +15,7 @@ export type EmbedScreen =
|
||||
};
|
||||
|
||||
function createHighlightedEmbedScreenStore() {
|
||||
const { subscribe, set, update } = writable<EmbedScreen | null>(null);
|
||||
const { subscribe, set, update } = writable<EmbedScreen | undefined>(undefined);
|
||||
|
||||
return {
|
||||
subscribe,
|
||||
@ -23,7 +23,7 @@ function createHighlightedEmbedScreenStore() {
|
||||
set(embedScreen);
|
||||
},
|
||||
removeHighlight: () => {
|
||||
set(null);
|
||||
set(undefined);
|
||||
},
|
||||
toggleHighlight: (embedScreen: EmbedScreen) => {
|
||||
update((currentEmbedScreen) =>
|
||||
@ -36,7 +36,7 @@ function createHighlightedEmbedScreenStore() {
|
||||
currentEmbedScreen.type === "streamable" &&
|
||||
embedScreen.embed.uniqueId !== currentEmbedScreen.embed.uniqueId)
|
||||
? embedScreen
|
||||
: null
|
||||
: undefined
|
||||
);
|
||||
},
|
||||
};
|
||||
|
@ -561,6 +561,13 @@ class CoWebsiteManager {
|
||||
coWebsites.remove(coWebsite);
|
||||
coWebsites.add(coWebsite, 0);
|
||||
|
||||
if (mainCoWebsite) {
|
||||
const iframe = mainCoWebsite.getIframe();
|
||||
if (iframe) {
|
||||
iframe.style.display = "block";
|
||||
}
|
||||
}
|
||||
|
||||
if (
|
||||
isMediaBreakpointDown("lg") &&
|
||||
get(embedScreenLayout) === LayoutMode.Presentation &&
|
||||
|
Loading…
Reference in New Issue
Block a user