idek just need to send off my code dont remember what i did for this

This commit is contained in:
boris committed 2026-05-02 01:03:37 +01:00
1 parent d9881bde01
commit 977603ffab
9 files changed
+118 -8

No files matched your search

+43 -2
View File
@@ -21,7 +21,35 @@ window.addEventListener("load", (e) => {
*************************************************************/
function theme(defaultTheme = "auto") {
return {
openModal: false,
filterOpen: false,
openAllApplications: false,
adminTheme: Alpine.$persist(defaultTheme).as('adminTheme'),
init() {
this.$watch('openModal', (value) => {
if (value) {
document.getElementsByTagName("body")[0].classList.add("overflow-hidden");
} else {
document.getElementsByTagName("body")[0].classList.remove("overflow-hidden");
}
});
this.$watch('filterOpen', (value) => {
if (value) {
document.getElementsByTagName("body")[0].classList.add("overflow-hidden");
} else {
document.getElementsByTagName("body")[0].classList.remove("overflow-hidden");
}
});
this.$watch('openAllApplications', (value) => {
if (value) {
document.getElementsByTagName("body")[0].classList.add("overflow-hidden");
} else {
document.getElementsByTagName("body")[0].classList.remove("overflow-hidden");
}
});
},
switchTheme(theme) {
this.adminTheme = theme;
},
@@ -351,7 +379,7 @@ function searchCommand() {
this.scrollToActiveItem();
}
},
selectItem(addHistory) {
selectItem(addHistory, openInNewTab=false) {
const link = this.items[this.currentIndex - 1].querySelector("a");
const data = {
title: link.dataset.title,
@@ -364,7 +392,11 @@ function searchCommand() {
this.addToHistory(data);
}
window.location = link.href;
if (openInNewTab) {
window.open(link.href, "_blank");
} else {
window.location = link.href;
}
},
addToHistory(data) {
let commandHistory = JSON.parse(
@@ -495,6 +527,15 @@ function dateTimeShortcutsOverlay() {
for (const mutationRecord of mutations) {
const display = mutationRecord.target.style.display;
const overlay = document.getElementById("modal-overlay");
if (!overlay) {
continue;
}
// Unfold uses this overlay for command modal via Alpine state.
// Don't force inline display changes when Alpine is in control.
if (overlay.getAttribute("x-show") === "openModal") {
continue;
}
if (display === "block") {
overlay.style.display = "block";