feat: custom favicon

This commit is contained in:
Shariq Ansari 2024-12-27 21:59:41 +05:30
parent ced40e5182
commit 16c3e25c83
9 changed files with 41 additions and 0 deletions

View File

@ -224,6 +224,7 @@ import GroupBy from '@/components/GroupBy.vue'
import FadedScrollableDiv from '@/components/FadedScrollableDiv.vue'
import ColumnSettings from '@/components/ColumnSettings.vue'
import KanbanSettings from '@/components/Kanban/KanbanSettings.vue'
import { getSettings } from '@/stores/settings'
import { globalStore } from '@/stores/global'
import { viewsStore } from '@/stores/views'
import { usersStore } from '@/stores/users'
@ -260,6 +261,7 @@ const props = defineProps({
},
})
const { brand } = getSettings()
const { $dialog } = globalStore()
const { reload: reloadView, getView } = viewsStore()
const { isManager } = usersStore()
@ -320,6 +322,7 @@ usePageMeta(() => {
return {
title: label,
emoji: isEmoji(currentView.value.icon) ? currentView.value.icon : '',
icon: brand.favicon,
}
})

View File

@ -214,6 +214,7 @@ import SidePanelModal from '@/components/Modals/SidePanelModal.vue'
import AddressModal from '@/components/Modals/AddressModal.vue'
import { formatDate, timeAgo, createToast } from '@/utils'
import { getView } from '@/utils/view'
import { getSettings } from '@/stores/settings'
import { getMeta } from '@/stores/meta'
import { globalStore } from '@/stores/global.js'
import { usersStore } from '@/stores/users.js'
@ -233,6 +234,7 @@ import {
import { ref, computed, h } from 'vue'
import { useRoute, useRouter } from 'vue-router'
const { brand } = getSettings()
const { $dialog, makeCall } = globalStore()
const { getUser, isManager } = usersStore()
@ -298,6 +300,7 @@ const breadcrumbs = computed(() => {
usePageMeta(() => {
return {
title: contact.data?.full_name || contact.data?.name,
icon: brand.favicon,
}
})

View File

@ -363,6 +363,7 @@ import {
copyToClipboard,
} from '@/utils'
import { getView } from '@/utils/view'
import { getSettings } from '@/stores/settings'
import { globalStore } from '@/stores/global'
import { statusesStore } from '@/stores/statuses'
import { usersStore } from '@/stores/users'
@ -381,6 +382,7 @@ import { ref, computed, h, onMounted, onBeforeUnmount } from 'vue'
import { useRoute, useRouter } from 'vue-router'
import { useActiveTabManager } from '@/composables/useActiveTabManager'
const { brand } = getSettings()
const { $dialog, $socket, makeCall } = globalStore()
const { statusOptions, getDealStatus } = statusesStore()
const { isManager } = usersStore()
@ -540,6 +542,7 @@ const breadcrumbs = computed(() => {
usePageMeta(() => {
return {
title: organization.data?.name || deal.data?.name,
icon: brand.favicon,
}
})

View File

@ -333,6 +333,7 @@ import {
copyToClipboard,
} from '@/utils'
import { getView } from '@/utils/view'
import { getSettings } from '@/stores/settings'
import { globalStore } from '@/stores/global'
import { contactsStore } from '@/stores/contacts'
import { statusesStore } from '@/stores/statuses'
@ -355,6 +356,7 @@ import { ref, computed, onMounted, watch } from 'vue'
import { useRouter, useRoute } from 'vue-router'
import { useActiveTabManager } from '@/composables/useActiveTabManager'
const { brand } = getSettings()
const { $dialog, $socket, makeCall } = globalStore()
const { getContactByName, contacts } = contactsStore()
const { statusOptions, getLeadStatus } = statusesStore()
@ -485,6 +487,7 @@ const breadcrumbs = computed(() => {
usePageMeta(() => {
return {
title: lead.data?.lead_name || lead.data?.name,
icon: brand.favicon,
}
})

View File

@ -189,6 +189,7 @@ import DealsListView from '@/components/ListViews/DealsListView.vue'
import AddressModal from '@/components/Modals/AddressModal.vue'
import { formatDate, timeAgo, createToast } from '@/utils'
import { getView } from '@/utils/view'
import { getSettings } from '@/stores/settings'
import { getMeta } from '@/stores/meta'
import { globalStore } from '@/stores/global.js'
import { usersStore } from '@/stores/users.js'
@ -208,6 +209,7 @@ import {
import { ref, computed, h } from 'vue'
import { useRoute, useRouter } from 'vue-router'
const { brand } = getSettings()
const { $dialog, makeCall } = globalStore()
const { getUser } = usersStore()
@ -272,6 +274,7 @@ const breadcrumbs = computed(() => {
usePageMeta(() => {
return {
title: contact.data?.full_name || contact.data?.name,
icon: brand.favicon,
}
})

View File

@ -273,6 +273,7 @@ import SLASection from '@/components/SLASection.vue'
import CustomActions from '@/components/CustomActions.vue'
import { createToast, setupAssignees, setupCustomizations } from '@/utils'
import { getView } from '@/utils/view'
import { getSettings } from '@/stores/settings'
import { globalStore } from '@/stores/global'
import { statusesStore } from '@/stores/statuses'
import {
@ -288,10 +289,12 @@ import {
Tabs,
Breadcrumbs,
call,
usePageMeta
} from 'frappe-ui'
import { ref, computed, h, onMounted } from 'vue'
import { useRoute, useRouter } from 'vue-router'
const { brand } = getSettings()
const { $dialog, $socket } = globalStore()
const { statusOptions, getDealStatus } = statusesStore()
const route = useRoute()
@ -430,6 +433,13 @@ const breadcrumbs = computed(() => {
return items
})
usePageMeta(() => {
return {
title: organization.data?.name || deal.data?.name,
icon: brand.favicon,
}
})
const tabs = computed(() => {
let tabOptions = [
{

View File

@ -195,6 +195,7 @@ import SLASection from '@/components/SLASection.vue'
import CustomActions from '@/components/CustomActions.vue'
import { createToast, setupAssignees, setupCustomizations } from '@/utils'
import { getView } from '@/utils/view'
import { getSettings } from '@/stores/settings'
import { globalStore } from '@/stores/global'
import { contactsStore } from '@/stores/contacts'
import { statusesStore } from '@/stores/statuses'
@ -211,10 +212,12 @@ import {
Switch,
Breadcrumbs,
call,
usePageMeta,
} from 'frappe-ui'
import { ref, computed, onMounted, watch } from 'vue'
import { useRouter, useRoute } from 'vue-router'
const { brand } = getSettings()
const { $dialog, $socket } = globalStore()
const { getContactByName, contacts } = contactsStore()
const { statusOptions, getLeadStatus } = statusesStore()
@ -339,6 +342,13 @@ const breadcrumbs = computed(() => {
return items
})
usePageMeta(() => {
return {
title: lead.data?.lead_name || lead.data?.name,
icon: brand.favicon,
}
})
const tabs = computed(() => {
let tabOptions = [
{

View File

@ -177,6 +177,7 @@ import DetailsIcon from '@/components/Icons/DetailsIcon.vue'
import CameraIcon from '@/components/Icons/CameraIcon.vue'
import DealsIcon from '@/components/Icons/DealsIcon.vue'
import ContactsIcon from '@/components/Icons/ContactsIcon.vue'
import { getSettings } from '@/stores/settings'
import { getMeta } from '@/stores/meta'
import { globalStore } from '@/stores/global'
import { usersStore } from '@/stores/users'
@ -205,6 +206,7 @@ const props = defineProps({
},
})
const { brand } = getSettings()
const { getUser } = usersStore()
const { $dialog } = globalStore()
const { getDealStatus } = statusesStore()
@ -266,6 +268,7 @@ const breadcrumbs = computed(() => {
usePageMeta(() => {
return {
title: props.organizationId,
icon: brand.favicon,
}
})

View File

@ -212,6 +212,7 @@ import EditIcon from '@/components/Icons/EditIcon.vue'
import CameraIcon from '@/components/Icons/CameraIcon.vue'
import DealsIcon from '@/components/Icons/DealsIcon.vue'
import ContactsIcon from '@/components/Icons/ContactsIcon.vue'
import { getSettings } from '@/stores/settings'
import { getMeta } from '@/stores/meta'
import { globalStore } from '@/stores/global'
import { usersStore } from '@/stores/users'
@ -241,6 +242,7 @@ const props = defineProps({
},
})
const { brand } = getSettings()
const { getUser, isManager } = usersStore()
const { $dialog } = globalStore()
const { getDealStatus } = statusesStore()
@ -304,6 +306,7 @@ const breadcrumbs = computed(() => {
usePageMeta(() => {
return {
title: props.organizationId,
icon: brand.favicon,
}
})