mirror of
https://github.com/versia-pub/frontend.git
synced 2026-03-13 03:29:16 +01:00
feat: ✨ Add ability to set custom background images
This commit is contained in:
parent
862839bf34
commit
093ae627b9
7 changed files with 58 additions and 6 deletions
|
|
@ -5,6 +5,7 @@
|
|||
|
||||
<SettingCode v-else-if="setting.type === SettingType.Code" :id="id" />
|
||||
<SettingEnum v-else-if="setting.type === SettingType.Enum" :id="id" />
|
||||
<SettingString v-else-if="setting.type === SettingType.String" :id="id" />
|
||||
<SettingOther v-else :id="id" />
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -16,6 +17,7 @@ import SettingBoolean from "./types/Boolean.vue";
|
|||
import SettingCode from "./types/Code.vue";
|
||||
import SettingEnum from "./types/Enum.vue";
|
||||
import SettingOther from "./types/Other.vue";
|
||||
import SettingString from "./types/String.vue";
|
||||
|
||||
const props = defineProps<{
|
||||
id: SettingIds;
|
||||
|
|
|
|||
25
components/settings/types/String.vue
Normal file
25
components/settings/types/String.vue
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
<template>
|
||||
<div class="flex flex-col gap-y-1">
|
||||
<h4 class="row-start-1 select-none text-base/6 sm:text-sm/6 text-white font-semibold">{{ setting.title
|
||||
}}
|
||||
</h4>
|
||||
<TextInput v-model:value="content" class="w-full md:w-auto min-w-72" />
|
||||
<p v-if="setting.description" class="text-xs mt-2 text-gray-400">{{ setting.description }}</p>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import TextInput from "~/components/inputs/text-input.vue";
|
||||
import type { SettingIds } from "~/settings";
|
||||
|
||||
const props = defineProps<{
|
||||
id: SettingIds;
|
||||
}>();
|
||||
|
||||
const setting = useSetting(props.id);
|
||||
const content = ref(setting.value.value as string);
|
||||
|
||||
watch(content, (c) => {
|
||||
setting.value.value = c;
|
||||
});
|
||||
</script>
|
||||
Loading…
Add table
Add a link
Reference in a new issue