Implement Fluid Emerald app redesign
linter / quality (pull_request) Successful in 1m18s
tests / ci (8.4) (pull_request) Successful in 1m54s

This commit is contained in:
2026-07-18 16:45:54 +02:00
parent 59817ad30f
commit a46695c2eb
62 changed files with 2165 additions and 1434 deletions
@@ -6,36 +6,30 @@ import {
AvatarImage,
} from "@/components/ui/avatar/index";
import { usePage } from "@inertiajs/vue3";
import { computed, PropType } from "vue";
import { UserModel } from "@/types/models/user-model";
import { computed } from "vue";
import type { UserAvatarProps } from "@/types";
const props = defineProps({
user: {
type: Object as PropType<UserModel>,
},
rounded: {
type: Boolean,
default: false,
},
})
const props = withDefaults(defineProps<UserAvatarProps>(), {
rounded: true,
});
const page = usePage();
const auth = computed(() => page.props.auth);
const user = computed(() => props.user ?? auth.value.user)
const user = computed(() => props.user ?? auth.value.user);
</script>
<template>
<Avatar class="size-8 overflow-hidden" :class="rounded ? 'rounded-full' : 'rounded-lg'">
<AvatarImage
v-if="user.avatar"
:src="user.avatar"
:alt="user.name"
/>
<Avatar
class="border-outline-variant bg-surface-container-high size-8 overflow-hidden border"
:class="rounded ? 'rounded-full' : 'rounded-lg'"
>
<AvatarImage v-if="user.avatar" :src="user.avatar" :alt="user.name" />
<AvatarFallback
class="rounded-lg bg-neutral-200 font-semibold text-black dark:bg-neutral-700 dark:text-white"
class="bg-primary/12 text-on-primary-container text-xs font-bold dark:text-primary-fixed"
:class="rounded ? 'rounded-full' : 'rounded-lg'"
>
{{ getInitials(auth.user?.name) }}
{{ getInitials(user.name) }}
</AvatarFallback>
</Avatar>
</template>