diff --git a/src/pages/options_src/Services/Services.svelte b/src/pages/options_src/Services/Services.svelte index 93afcded..481afb83 100644 --- a/src/pages/options_src/Services/Services.svelte +++ b/src/pages/options_src/Services/Services.svelte @@ -24,6 +24,8 @@ unsubscribeConfig() }) let selectedService = $url.hash.startsWith("#services:") ? $url.hash.split(":")[1] : "youtube" + let hideServiceSelection = false + let hideFrontendSelection = false $: serviceConf = _config.services[selectedService] $: serviceOptions = _options[selectedService] $: frontendWebsite = serviceConf.frontends[serviceOptions.frontend].url @@ -38,7 +40,7 @@ {browser.i18n.getMessage("service") || "Service"} -
+
(hideServiceSelection = true)} on:keydown={null}> { selectedService = e.detail.value window.location.hash = `services:${e.detail.value}` + hideServiceSelection = false }} + on:focus={() => (hideServiceSelection = true)} + on:blur={() => (hideServiceSelection = false)} items={[ ...servicesEntries.map(([serviceKey, service]) => { return { value: serviceKey, label: service.name } @@ -58,9 +63,17 @@ {item.label}
-
- - {selection.label} +
+ {#if !hideServiceSelection} + + {selection.label} + {:else} + {browser.i18n.getMessage("search_service") || "Search Service"} + {/if}
🮦
@@ -103,7 +116,7 @@ {browser.i18n.getMessage("frontend") || "Frontend"} -
+
(hideFrontendSelection = true)} on:keydown={null}> { serviceOptions.frontend = e.detail.value options.set(_options) + hideFrontendSelection = false }} + on:focus={() => (hideFrontendSelection = true)} + on:blur={() => (hideFrontendSelection = false)} items={[ ...frontendEntries.map(([frontendId, frontend]) => ({ value: frontendId, @@ -126,8 +142,12 @@ {item.label}
- - {selection.label} + {#if !hideFrontendSelection} + + {selection.label} + {:else} + {browser.i18n.getMessage("search_frontend") || "Search Frontend"} + {/if}
🮦