mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-03 09:11:10 +00:00
Keeps media playback running when the themes page is refreshed
This commit is contained in:
1 parent
7e54c990ad
commit
6cd5e1d6d9
1 file changed
+8
-3
@@ -159,6 +159,11 @@
|
|||||||
window.location.reload();
|
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
|
// activates the theme of the clicked row
|
||||||
async function handleActivateClick(event) {
|
async function handleActivateClick(event) {
|
||||||
const button = event.target.closest('.activate-theme-button');
|
const button = event.target.closest('.activate-theme-button');
|
||||||
@@ -175,7 +180,7 @@
|
|||||||
return;
|
return;
|
||||||
if (await dialogService.show('@_localizer["DeleteThemeConfirm"]', jsLocalizedDialogs.confirmation, DialogButtons.YES_NO, DialogIcon.QUESTION) === DialogButton.YES) {
|
if (await dialogService.show('@_localizer["DeleteThemeConfirm"]', jsLocalizedDialogs.confirmation, DialogButtons.YES_NO, DialogIcon.QUESTION) === DialogButton.YES) {
|
||||||
await callApiDeleteAsync(button.dataset.url);
|
await callApiDeleteAsync(button.dataset.url);
|
||||||
reloadPage();
|
refreshPageContent();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -186,7 +191,7 @@
|
|||||||
return;
|
return;
|
||||||
// an empty JSON body is sent so the antiforgery-protected POST request binds the route theme id without a JsonException
|
// 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, {});
|
await callApiPostAsync(button.dataset.url, {});
|
||||||
reloadPage();
|
refreshPageContent();
|
||||||
}
|
}
|
||||||
|
|
||||||
// downloads the archive of the theme of the clicked row
|
// downloads the archive of the theme of the clicked row
|
||||||
@@ -229,7 +234,7 @@
|
|||||||
body: formData
|
body: formData
|
||||||
});
|
});
|
||||||
if (response.ok)
|
if (response.ok)
|
||||||
reloadPage();
|
refreshPageContent();
|
||||||
else
|
else
|
||||||
notificationService.show('@_localizer["UploadFailed"]', NotificationType.ERROR);
|
notificationService.show('@_localizer["UploadFailed"]', NotificationType.ERROR);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user