From 1d9bcd1dba2473252069b75651854a06be3fe3e0 Mon Sep 17 00:00:00 2001 From: wearrrrr Date: Fri, 29 Mar 2024 12:08:19 -0500 Subject: [PATCH] Fix small CSS inconsistencies --- src/components/Dropdown.astro | 1 + src/components/ProxyRegistrar.astro | 4 +++- src/components/SettingsTablist.astro | 9 ++++++--- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/components/Dropdown.astro b/src/components/Dropdown.astro index 21d92e7..1822249 100644 --- a/src/components/Dropdown.astro +++ b/src/components/Dropdown.astro @@ -57,6 +57,7 @@ const { buttonNameDefault, dropdownList, id, localStorageKey } = Astro.props; background-color: var(--dropdown-background-color); position: absolute; width: 100%; + z-index: 5; } .dropdown-item { border-bottom: 1px solid var(--text-color-accent); diff --git a/src/components/ProxyRegistrar.astro b/src/components/ProxyRegistrar.astro index 2d27b11..b412c6e 100644 --- a/src/components/ProxyRegistrar.astro +++ b/src/components/ProxyRegistrar.astro @@ -113,11 +113,13 @@ iframe.style.opacity = 1; topbar.style.opacity = 1; topbar.style.pointerEvents = "auto"; + document.body.style.overflow = "hidden"; closeButton.onclick = () => { iframe.style.opacity = 0; topbar.style.opacity = 0; iframe.style.pointerEvents = "none"; topbar.style.pointerEvents = "none"; + document.body.style.overflow = "auto"; iframe.removeEventListener("load", boundIFrameLoad); setTimeout(() => { @@ -205,7 +207,7 @@ if (favicon) { proxiedFavicon.src = favicon.href; } else { - if (proxiedFavicon.src != "/favicon.ico") { + if (proxiedFavicon.src != window.location.origin + "/favicon.ico") { proxiedFavicon.src = "/favicon.ico"; } } diff --git a/src/components/SettingsTablist.astro b/src/components/SettingsTablist.astro index 87b7352..aa5f07f 100644 --- a/src/components/SettingsTablist.astro +++ b/src/components/SettingsTablist.astro @@ -334,7 +334,7 @@ const t = useTranslations(lang); applyDropdownEventListeners( searchEngineDropdown, "dropdown__search-engine", - "alu__searchEngine", + "alu__search_engine", checkSearxng ); checkSearxng(); @@ -347,8 +347,9 @@ const t = useTranslations(lang); function checkSearxng() { // This function checks if the "searxng" option was clicked, display an additional option if so. - if (localStorage.getItem("alu__searchEngine")) { - if (JSON.parse(localStorage.getItem("alu__searchEngine")).value.toLowerCase() == "searx") { + let search_engine = JSON.parse(localStorage.getItem("alu__search_engine")); + if (search_engine) { + if (search_engine.value.toLowerCase() == "searx") { document.getElementsByClassName("setting__searxng-url")[0].style.opacity = "1"; } else { document.getElementsByClassName("setting__searxng-url")[0].style.opacity = "0"; @@ -394,6 +395,7 @@ const t = useTranslations(lang); position: relative; z-index: 2; flex-wrap: wrap; + row-gap: 5px; } .content-setting-header { color: var(--text-color); @@ -416,6 +418,7 @@ const t = useTranslations(lang); user-select: none; width: 100%; cursor: auto; + margin-bottom: 5px; } .setting__searxng-url {