Line data Source code
1 16 : <template>
2 23 : <div
3 : :class="
4 : cn(
5 : 'flex aspect-square',
6 : large ? 'size-12' : 'size-8',
7 : 'items-center justify-center rounded-md bg-secondary text-base font-semibold text-foreground'
8 : )
9 : "
10 : :style="workspaceAvatarStyle(workspaceName, subscriptionTier)"
11 : >
12 : {{ letter }}
13 : </div>
14 : </template>
15 :
16 : <script setup lang="ts">
17 : import { workspaceAvatarStyle } from '@comfyorg/design-system/workspaceAvatar'
18 : import type { SubscriptionTier } from '@comfyorg/ingest-types'
19 : import { cn } from '@comfyorg/tailwind-utils'
20 : import { computed } from 'vue'
21 :
22 : const {
23 : workspaceName,
24 : subscriptionTier,
25 : large = false
26 : } = defineProps<{
27 : workspaceName: string
28 : subscriptionTier?: SubscriptionTier | null
29 : large?: boolean
30 : }>()
31 :
32 21 : const letter = computed(() => [...workspaceName][0]?.toUpperCase() ?? '?')
33 : </script>
|