mirror of
https://github.com/versia-pub/frontend.git
synced 2026-03-13 03:29:16 +01:00
feat: ✨ Add Enum preference type support
This commit is contained in:
parent
ca824a2a1a
commit
dca7af4b0e
10 changed files with 149 additions and 4 deletions
|
|
@ -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>
|
||||
Loading…
Add table
Add a link
Reference in a new issue