Anvil/assets/SettingsAppearance-koWceeQ5.js.map
André Jaenisch 957cae7b79
Updates
2024-08-12 15:09:11 +02:00

1 line
No EOL
4.1 KiB
Text

{"version":3,"file":"SettingsAppearance-koWceeQ5.js","sources":["../../src/lib/components/molecules/SettingsAppearance.svelte"],"sourcesContent":["<!--\nSettingsAppearance molecule.\nCopyright (C) 2024 André Jaenisch\nSPDX-FileCopyrightText: 2024 André Jaenisch\nSPDX-License-Identifier: AGPL-3.0-or-later\n\nThis program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.\n\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.\n\nYou should have received a copy of the GNU Affero General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.\n-->\n\n<script>\n\timport { modeCurrent, getModeOsPrefers, setModeCurrent } from '@skeletonlabs/skeleton';\n\timport { _ } from 'svelte-i18n';\n\n\texport let activeTheme = 'auto';\n\tmodeCurrent.subscribe(function (isLight) {\n\t\tactiveTheme = isLight ? 'light' : 'dark';\n\t});\n\n\tfunction onThemeSwitched({ target }) {\n\t\tconst { value } = target;\n\t\tlet theme = value === 'light';\n\t\tif (value === 'auto') {\n\t\t\ttheme = getModeOsPrefers();\n\t\t}\n\t\tsetModeCurrent(theme);\n\t}\n</script>\n\n<div class=\"flex flex-col flex-1 gap-6 pe-8 pb-8 ps-8 pt-20 bg-surface-100-800-token\">\n\t<div class=\"text-surface-500-400-token text-xl font-semibold\">\n\t\t{$_('settings.appearance.headline')}\n\t</div>\n\t<div class=\"flex flex-col gap-2\">\n\t\t<div class=\"text-surface-500-400-token font-semibold py-1\">\n\t\t\t{$_('settings.appearance.theme.headline')}\n\t\t</div>\n\t\t<div class=\"flex gap-8\">\n\t\t\t<label class=\"label flex items-center space-x-2\">\n\t\t\t\t<input\n\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\tclass=\"me-2\"\n\t\t\t\t\tname=\"theme\"\n\t\t\t\t\tvalue=\"light\"\n\t\t\t\t\tchecked={activeTheme === 'light'}\n\t\t\t\t\ton:change={onThemeSwitched}\n\t\t\t\t/>\n\t\t\t\t{$_('settings.appearance.theme.light')}\n\t\t\t</label>\n\t\t\t<label class=\"label flex items-center space-x-2\">\n\t\t\t\t<input\n\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\tclass=\"me-2\"\n\t\t\t\t\tname=\"theme\"\n\t\t\t\t\tvalue=\"dark\"\n\t\t\t\t\tchecked={activeTheme === 'dark'}\n\t\t\t\t\ton:change={onThemeSwitched}\n\t\t\t\t/>\n\t\t\t\t{$_('settings.appearance.theme.dark')}\n\t\t\t</label>\n\t\t\t<label class=\"label flex items-center space-x-2\">\n\t\t\t\t<input\n\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\tclass=\"me-2\"\n\t\t\t\t\tname=\"theme\"\n\t\t\t\t\tvalue=\"auto\"\n\t\t\t\t\tchecked={activeTheme === 'auto'}\n\t\t\t\t\ton:change={onThemeSwitched}\n\t\t\t\t/>\n\t\t\t\t{$_('settings.appearance.theme.auto')}\n\t\t\t</label>\n\t\t</div>\n\t</div>\n\n\t<div class=\"flex flex-col gap-2\">\n\t\t<div class=\"text-surface-500-400-token font-semibold py-1\">\n\t\t\t{$_('settings.appearance.tab_indent.headline')}\n\t\t</div>\n\t\t<p class=\"text-sm\">{$_('settings.appearance.tab_indent.intro')}</p>\n\t\t<input\n\t\t\ttype=\"text\"\n\t\t\tclass=\"input bg-white dark:bg-black text-center text-surface-500-400-token max-w-16\"\n\t\t\tname=\"tab_indent\"\n\t\t\tvalue=\"4\"\n\t\t/>\n\t</div>\n</div>\n"],"names":["t8","t9","label2","input2","input2_checked_value","t10","t11_value","cov_1u94ehklm2","s","ctx","append_hydration","label0","input0","b","dirty","set_data","t11","theme","getModeOsPrefers","setModeCurrent"],"mappings":"43mCAiFsBA,EAAAC,GAAAC,EAAAC,EAAAC,EAAAC,GAAAC,GAAAC,IAAAC,EAAA,CAAA,IAAAC,EAAA,CAAA,EAAA,gCAAyC,01HA/C5DC,EAAAA,CAAAA,EAAAA,IAAAA,EAAAA,GAAAA,IAAAA,EAAAA,EAAAA,CAAAA,EAAAA,EAAAA,EAAAA,EAAAA,GAAAA,IAAAA,qGAICA,sBAYCC,EAAAC,CAAA,EAAAL,EAAA,EAAAC,EAAA,GAAA,wKAsBAE,i4CASiBH,EAAA,EAAAM,EAAA,EAAA,EAAA,CAAA,IAAAC,EAAA,IAAAP,EAAA,EAAAM,WAAAP,KAAAA,EAAAG,KAAA,gCAAyC,EAAA,MAAAF,IAAAM,WAAAN,EAAA,EAAAC,EAAAO,GAAAA,IAAAA,EAAAC,EAAAV,CAAA,GAAAC,EAAA,EAAAM,EAAAN,EAAAA,EAAAA,CAAAA,IAAAA,EAAA,EAAAC,EAAA,GAAA,02BAnE1CS,EAAAC,GAAA,GAAkCC,EAAAA,EAAAA,EAAAA,EAAAA,EAAAA,CAAAA,IAAAA,EAAAA,EAAAA,EAAAA,GAAAA,IAAAA,GAAAF,CAAA"}