feat: custom brand logo & name

This commit is contained in:
Shariq Ansari 2024-12-27 21:52:00 +05:30
parent d1220c0c6f
commit 7e949ea78b
2 changed files with 16 additions and 4 deletions

View File

@ -0,0 +1,12 @@
<template>
<div v-if="brand?.logo">
<img :src="brand.logo" class="h-full w-full object-cover" />
</div>
<CRMLogo v-else class="size-8 shrink-0 rounded" />
</template>
<script setup>
import CRMLogo from '@/components/Icons/CRMLogo.vue'
const brand = defineModel()
</script>

View File

@ -11,7 +11,7 @@
: 'w-52 px-2 hover:bg-surface-gray-3' : 'w-52 px-2 hover:bg-surface-gray-3'
" "
> >
<CRMLogo class="size-8 flex-shrink-0 rounded" /> <BrandLogo v-model="brand" class="size-8 flex-shrink-0" />
<div <div
class="flex flex-1 flex-col text-left duration-300 ease-in-out" class="flex flex-1 flex-col text-left duration-300 ease-in-out"
:class=" :class="
@ -21,7 +21,7 @@
" "
> >
<div class="text-base font-medium leading-none text-ink-gray-9"> <div class="text-base font-medium leading-none text-ink-gray-9">
{{ __('CRM') }} {{ __(brand.name || 'CRM') }}
</div> </div>
<div class="mt-1 text-sm leading-none text-ink-gray-7"> <div class="mt-1 text-sm leading-none text-ink-gray-7">
{{ user.full_name }} {{ user.full_name }}
@ -47,7 +47,7 @@
</template> </template>
<script setup> <script setup>
import CRMLogo from '@/components/Icons/CRMLogo.vue' import BrandLogo from '@/components/BrandLogo.vue'
import Apps from '@/components/Apps.vue' import Apps from '@/components/Apps.vue'
import { sessionStore } from '@/stores/session' import { sessionStore } from '@/stores/session'
import { usersStore } from '@/stores/users' import { usersStore } from '@/stores/users'
@ -64,7 +64,7 @@ const props = defineProps({
}, },
}) })
const { settings } = getSettings() const { settings, brand } = getSettings()
const { logout } = sessionStore() const { logout } = sessionStore()
const { getUser } = usersStore() const { getUser } = usersStore()