mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-11-06 04:42:57 +00:00
Ensure VideoModal applies design system mode
This commit is contained in:
1 parent
e0140d35a0
commit
d372a0a694
2 files changed
+63
-6
No files matched your search
@@ -1,5 +1,6 @@
|
||||
import { createModalAccessibility } from "./modalAccessibility.js";
|
||||
import positionFloatingPanel from "../utils/positionFloatingPanel.js";
|
||||
import { applyDesignSystemAttributes } from "../../designSystem.js";
|
||||
|
||||
export class VideoModal {
|
||||
constructor({
|
||||
@@ -163,6 +164,9 @@ export class VideoModal {
|
||||
|
||||
const existing = this.document.getElementById("playerModal");
|
||||
if (existing) {
|
||||
if (this.playerModal === existing && this.loaded) {
|
||||
return this.playerModal;
|
||||
}
|
||||
this.hydrate(existing);
|
||||
this.loaded = true;
|
||||
return this.playerModal;
|
||||
@@ -194,6 +198,8 @@ export class VideoModal {
|
||||
throw new Error("Player modal root not found in markup.");
|
||||
}
|
||||
|
||||
applyDesignSystemAttributes(playerModal);
|
||||
|
||||
this.hydrate(playerModal);
|
||||
this.loaded = true;
|
||||
return this.playerModal;
|
||||
|
||||
Reference in new issue
Block a user