From 6cd5e1d6d956c184e2bb3d32b32fdd7822337692 Mon Sep 17 00:00:00 2001 From: Binary Alley Date: Fri, 21 Aug 2026 11:48:18 -0700 Subject: [PATCH] Keeps media playback running when the themes page is refreshed --- .../Core/Views/Admin/Themes.cshtml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/Lumina.Presentation.Web/Core/Views/Admin/Themes.cshtml b/src/Lumina.Presentation.Web/Core/Views/Admin/Themes.cshtml index 7d2756f8..1b8b1586 100644 --- a/src/Lumina.Presentation.Web/Core/Views/Admin/Themes.cshtml +++ b/src/Lumina.Presentation.Web/Core/Views/Admin/Themes.cshtml @@ -159,6 +159,11 @@ window.location.reload(); } + // refreshes the current page content without reloading the page, so the media player keeps playing + function refreshPageContent() { + updateContentAsync(window.location.href, false); + } + // activates the theme of the clicked row async function handleActivateClick(event) { const button = event.target.closest('.activate-theme-button'); @@ -175,7 +180,7 @@ return; if (await dialogService.show('@_localizer["DeleteThemeConfirm"]', jsLocalizedDialogs.confirmation, DialogButtons.YES_NO, DialogIcon.QUESTION) === DialogButton.YES) { await callApiDeleteAsync(button.dataset.url); - reloadPage(); + refreshPageContent(); } } @@ -186,7 +191,7 @@ return; // an empty JSON body is sent so the antiforgery-protected POST request binds the route theme id without a JsonException await callApiPostAsync(button.dataset.url, {}); - reloadPage(); + refreshPageContent(); } // downloads the archive of the theme of the clicked row @@ -229,7 +234,7 @@ body: formData }); if (response.ok) - reloadPage(); + refreshPageContent(); else notificationService.show('@_localizer["UploadFailed"]', NotificationType.ERROR); }