feat: theme switcher

This commit is contained in:
2025-04-16 22:50:15 +00:00
parent f3ee0d0068
commit 658a69a1e2
7 changed files with 67 additions and 3 deletions

View File

@ -34,6 +34,15 @@ const verboseModel = computed({
await client.setVerbose(value);
},
});
const themeModel = computed({
get() {
return client.theme;
},
async set(value: 'light' | 'dark' | 'system') {
await client.setTheme(value);
},
});
</script>
<template>
@ -67,5 +76,18 @@ const verboseModel = computed({
>
<ToggleSwitch v-model="verboseModel" />
</OptionRow>
<OptionRow title="Light theme">
<SelectButton
v-model="themeModel"
:options="[
{ title: 'System', value: 'system' },
{ title: 'Light', value: 'light' },
{ title: 'Dark', value: 'dark' },
]"
:allow-empty="false"
option-label="title"
option-value="value"
/>
</OptionRow>
</OptionCategory>
</template>