Improve bootswatch load behavior

This commit is contained in:
Matthias 2023-03-24 20:13:17 +01:00
parent 7e93fb8ab3
commit 8b86322f27

View File

@ -18,8 +18,7 @@
:key="key"
:active="activeTheme === theme.name"
:title="theme.description"
:name="theme.name"
@click="handleClick"
@click="handleClick(theme.name)"
>{{ theme.name }}{{ theme.dark ? ' [dark]' : '' }}</b-dropdown-item-button
>
</b-nav-item-dropdown>
@ -100,8 +99,8 @@ onMounted(() => {
if (settingsStore.currentTheme) setTheme(settingsStore.currentTheme);
});
const handleClick = (e) => {
setTheme(e.target.name.trim());
const handleClick = (name: string) => {
setTheme(name.trim());
};
const toggleNight = () => {
setTheme(activeTheme.value === 'bootstrap' ? 'bootstrap_dark' : 'bootstrap');