Refactor video menus to overlay popovers

This commit is contained in:
thePR0M3TH3AN committed 2025-10-16 11:33:31 -04:00
1 parent 5928ede539
commit 7ef16cd004
6 files changed
+975 -529

No files matched your search

+30
View File
@@ -2074,6 +2074,36 @@ function renderChannelVideosFromList({
}
};
videoCard.onRequestMoreMenu = (detail = {}) => {
if (typeof app?.requestMoreMenu === "function") {
app.requestMoreMenu({
...detail,
video: detail.video || video,
pointerInfo: detail.pointerInfo || pointerInfo,
});
}
};
videoCard.onCloseMoreMenu = (detail = {}) => {
if (typeof app?.closeMoreMenu === "function") {
return app.closeMoreMenu(detail);
}
return false;
};
videoCard.onRequestSettingsMenu = (detail = {}) => {
if (typeof app?.requestVideoSettingsMenu === "function") {
app.requestVideoSettingsMenu(detail);
}
};
videoCard.onCloseSettingsMenu = (detail = {}) => {
if (typeof app?.closeVideoSettingsMenu === "function") {
return app.closeVideoSettingsMenu(detail);
}
return false;
};
const cardEl = videoCard.getRoot();
if (cardEl) {
fragment.appendChild(cardEl);