feat: Add Enum preference type support

This commit is contained in:
Jesse Wierzbinski 2024-12-04 14:34:09 +01:00
parent ca824a2a1a
commit dca7af4b0e
No known key found for this signature in database
10 changed files with 149 additions and 4 deletions

View file

@ -1,5 +1,5 @@
<template>
<Avatar shape="square">
<Avatar :shape="(shape.value as 'circle' | 'square')">
<AvatarFallback v-if="name">
{{ getInitials(name) }}
</AvatarFallback>
@ -8,6 +8,7 @@
</template>
<script lang="ts" setup>
import { SettingIds } from "~/settings";
import { Avatar, AvatarFallback, AvatarImage } from "../ui/avatar";
const { name } = defineProps<{
@ -28,4 +29,6 @@ const getInitials = (name: string): string => {
return `${firstLetter}${secondLetter}`.toUpperCase();
};
const shape = useSetting(SettingIds.AvatarShape);
</script>