mirror of
https://github.com/versia-pub/frontend.git
synced 2026-03-13 03:29:16 +01:00
feat: ✨ Add preferences page
This commit is contained in:
parent
a6635bc888
commit
5203f47409
7 changed files with 135 additions and 7 deletions
31
components/preferences/switch.vue
Normal file
31
components/preferences/switch.vue
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
<template>
|
||||
<Card class="grid grid-cols-[1fr,auto] items-center p-6">
|
||||
<CardHeader class="space-y-0.5 p-0">
|
||||
<CardTitle class="text-base">
|
||||
{{ setting.title }}
|
||||
</CardTitle>
|
||||
<CardDescription>
|
||||
{{ setting.description }}
|
||||
</CardDescription>
|
||||
</CardHeader>
|
||||
<CardFooter class="p-0">
|
||||
<Switch :disabled="setting.notImplemented" :checked="setting.value" @update:checked="v => { setting.value = v }" />
|
||||
</CardFooter>
|
||||
</Card>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import {
|
||||
Card,
|
||||
CardDescription,
|
||||
CardFooter,
|
||||
CardHeader,
|
||||
CardTitle,
|
||||
} from "~/components/ui/card";
|
||||
import { Switch } from "~/components/ui/switch";
|
||||
import type { BooleanSetting } from "~/settings.ts";
|
||||
|
||||
defineModel<BooleanSetting>("setting", {
|
||||
required: true,
|
||||
});
|
||||
</script>
|
||||
Loading…
Add table
Add a link
Reference in a new issue