mirror of
https://github.com/versia-pub/frontend.git
synced 2026-03-13 11:39:16 +01:00
feat: ✨ Add string preferences and custom background images
This commit is contained in:
parent
57fafbd1a8
commit
aa61f28004
5 changed files with 59 additions and 11 deletions
31
components/preferences/string.vue
Normal file
31
components/preferences/string.vue
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
<template>
|
||||
<Card class="grid grid-rows-[1fr,auto] xl:grid-rows-none xl:grid-cols-[1fr,auto] items-center p-6 gap-4">
|
||||
<CardHeader class="space-y-0.5 p-0">
|
||||
<CardTitle class="text-base">
|
||||
{{ setting.title() }}
|
||||
</CardTitle>
|
||||
<CardDescription>
|
||||
{{ setting.description() }}
|
||||
</CardDescription>
|
||||
</CardHeader>
|
||||
<CardFooter class="p-0">
|
||||
<Input :model-value="setting.value" @update:model-value="v => { setting.value = String(v) }" />
|
||||
</CardFooter>
|
||||
</Card>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import {
|
||||
Card,
|
||||
CardDescription,
|
||||
CardFooter,
|
||||
CardHeader,
|
||||
CardTitle,
|
||||
} from "~/components/ui/card";
|
||||
import { Input } from "~/components/ui/input";
|
||||
import type { StringSetting } from "~/settings.ts";
|
||||
|
||||
defineModel<StringSetting>("setting", {
|
||||
required: true,
|
||||
});
|
||||
</script>
|
||||
Loading…
Add table
Add a link
Reference in a new issue