MCPcopy Create free account
hub / github.com/error311/FileRise / applySearchEverywhereTheme

Function applySearchEverywhereTheme

public/js/fileListView.js:5296–5331  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

5294}
5295
5296function applySearchEverywhereTheme() {
5297 if (!searchEverywhereModal) return;
5298 const overlay = searchEverywhereModal;
5299 const card = searchEverywhereCard || overlay.querySelector(".search-everywhere-card");
5300 const isDark = document.body.classList.contains("dark-mode");
5301
5302 overlay.style.background = isDark ? "rgba(0,0,0,0.72)" : "rgba(0,0,0,0.55)";
5303 if (card) {
5304 card.style.background = isDark ? "#141414" : "#ffffff";
5305 card.style.color = isDark ? "#f4f4f4" : "#000000";
5306 card.style.boxShadow = isDark ? "0 18px 45px rgba(0,0,0,0.65)" : "0 12px 35px rgba(0,0,0,0.2)";
5307 card.style.border = isDark ? "1px solid rgba(255,255,255,0.08)" : "1px solid #e0e0e0";
5308 }
5309
5310 if (searchEverywhereResultsEl) {
5311 searchEverywhereResultsEl.style.border = isDark ? "1px solid rgba(255,255,255,0.12)" : "1px solid #e0e0e0";
5312 searchEverywhereResultsEl.style.background = isDark ? "rgba(255,255,255,0.03)" : "rgba(0,0,0,0.02)";
5313 }
5314
5315 const inputs = searchEverywhereModal.querySelectorAll("#searchEverywhereInput, #searchEverywhereLimit, #searchEverywhereSource");
5316 inputs.forEach((inp) => {
5317 if (isDark) {
5318 inp.style.background = "#1f1f1f";
5319 inp.style.color = "#f4f4f4";
5320 inp.style.borderColor = "#444";
5321 } else {
5322 inp.style.background = "";
5323 inp.style.color = "";
5324 inp.style.borderColor = "";
5325 }
5326 });
5327
5328 searchEverywhereModal.querySelectorAll(".text-muted").forEach((el) => {
5329 el.style.color = isDark ? "rgba(255,255,255,0.72)" : "";
5330 });
5331}
5332
5333function openSearchEverywhereModal() {
5334 ensureSearchEverywhereModal();

Callers 2

Calls

no outgoing calls

Tested by

no test coverage detected