diff options
author | ManeraKai <manerakai@protonmail.com> | 2024-08-29 13:36:21 +0300 |
---|---|---|
committer | ManeraKai <manerakai@protonmail.com> | 2024-08-29 13:36:21 +0300 |
commit | 97d390737e7e953fe1e6559e41963c547b31afa0 (patch) | |
tree | fff6e211ba49d82825eb250b4b9507929537e950 /src/pages/popup_src | |
parent | Added Auto Pick Instance https://github.com/libredirect/browser_extension/iss... (diff) | |
download | libredirect-97d390737e7e953fe1e6559e41963c547b31afa0.zip |
Improving popup messages
Diffstat (limited to 'src/pages/popup_src')
-rw-r--r-- | src/pages/popup_src/App.svelte | 42 |
1 files changed, 3 insertions, 39 deletions
diff --git a/src/pages/popup_src/App.svelte b/src/pages/popup_src/App.svelte index 8f958a3e..f6699312 100644 --- a/src/pages/popup_src/App.svelte +++ b/src/pages/popup_src/App.svelte @@ -38,48 +38,12 @@ let _page page.subscribe(val => (_page = val)) - const dark = { - text: "#fff", - bgMain: "#121212", - bgSecondary: "#202020", - active: "#fbc117", - danger: "#f04141", - lightGrey: "#c3c3c3", - } - const light = { - text: "black", - bgMain: "white", - bgSecondary: "#e4e4e4", - active: "#fb9817", - danger: "#f04141", - lightGrey: "#c3c3c3", - } - let cssVariables - $: if (_options) { - if (_options.theme == "dark") { - cssVariables = dark - } else if (_options.theme == "light") { - cssVariables = light - } else if (window.matchMedia("(prefers-color-scheme: dark)").matches) { - cssVariables = dark - } else { - cssVariables = light - } - } + let style + $: if (_options) style = utils.style(_options, window) </script> {#if _options && _config} - <div - class="main" - dir="auto" - style=" - --text: {cssVariables.text}; - --bg-main: {cssVariables.bgMain}; - --bg-secondary: {cssVariables.bgSecondary}; - --active: {cssVariables.active}; - --danger: {cssVariables.danger}; - --light-grey: {cssVariables.lightGrey};" - > + <div class="main" dir="auto" {style}> <Buttons /> </div> {:else} |