mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-11-08 13:52:58 +00:00
Merge pull request #674 from PR0M3TH3AN/codex/add-notification-for-unauthenticated-users-uxlfqu
Ensure zap controls notify logged-out users to log in
This commit is contained in:
4 files changed
+51
-24
No files matched your search
@@ -7351,6 +7351,29 @@ class Application {
|
||||
return;
|
||||
}
|
||||
|
||||
const { autoHideMs, showSpinner } =
|
||||
options && typeof options === "object" ? options : Object.create(null);
|
||||
|
||||
const shouldShowSpinner = showSpinner !== false;
|
||||
const existingSpinner = container.querySelector(".status-spinner");
|
||||
|
||||
if (shouldShowSpinner) {
|
||||
if (!(existingSpinner instanceof HTMLElementCtor)) {
|
||||
const spinner = ownerDocument?.createElement?.("span") || null;
|
||||
if (spinner) {
|
||||
spinner.className = "status-spinner";
|
||||
spinner.setAttribute("aria-hidden", "true");
|
||||
if (messageTarget && container.contains(messageTarget)) {
|
||||
container.insertBefore(spinner, messageTarget);
|
||||
} else {
|
||||
container.insertBefore(spinner, container.firstChild);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (existingSpinner instanceof HTMLElementCtor) {
|
||||
existingSpinner.remove();
|
||||
}
|
||||
|
||||
if (!msg) {
|
||||
if (messageTarget && messageTarget instanceof HTMLElementCtor) {
|
||||
messageTarget.textContent = "";
|
||||
@@ -7360,9 +7383,6 @@ class Application {
|
||||
return;
|
||||
}
|
||||
|
||||
const { autoHideMs } =
|
||||
options && typeof options === "object" ? options : Object.create(null);
|
||||
|
||||
if (messageTarget && messageTarget instanceof HTMLElementCtor) {
|
||||
messageTarget.textContent = msg;
|
||||
} else {
|
||||
|
||||
Reference in new issue
Block a user