mirror of
https://github.com/versia-pub/frontend.git
synced 2026-03-13 03:29:16 +01:00
refactor: ♻️ Rewrite settings backend
This commit is contained in:
parent
80b1fc87f7
commit
78e4fa0f04
6 changed files with 133 additions and 126 deletions
|
|
@ -36,14 +36,14 @@
|
|||
|
||||
<script lang="ts" setup>
|
||||
import { Switch } from "@ark-ui/vue";
|
||||
import { type Setting, type SettingIds, SettingType } from "~/settings";
|
||||
import { type SettingIds, SettingType } from "~/settings";
|
||||
|
||||
const props = defineProps<{
|
||||
setting: Setting;
|
||||
id: SettingIds;
|
||||
}>();
|
||||
const checked = ref(!!props.setting.value);
|
||||
|
||||
const setting = useSetting(props.setting.id as SettingIds);
|
||||
const setting = useSetting(props.id);
|
||||
const checked = ref(setting.value.value as boolean);
|
||||
|
||||
watch(checked, (c) => {
|
||||
setting.value.value = c;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue