chore: new call button

This commit is contained in:
Sojan
2025-05-11 00:35:32 -07:00
parent aa4ef28e0e
commit ccdbc2c7f9
7 changed files with 406 additions and 10 deletions
@@ -8,6 +8,7 @@ import { useStore } from 'vuex';
import { useI18n } from 'vue-i18n';
import { useStorage } from '@vueuse/core';
import { useSidebarKeyboardShortcuts } from './useSidebarKeyboardShortcuts';
import { INBOX_TYPES } from 'dashboard/helper/inbox';
import Button from 'dashboard/components-next/button/Button.vue';
import SidebarGroup from './SidebarGroup.vue';
@@ -16,6 +17,7 @@ import ChannelLeaf from './ChannelLeaf.vue';
import SidebarAccountSwitcher from './SidebarAccountSwitcher.vue';
import Logo from 'next/icon/Logo.vue';
import ComposeConversation from 'dashboard/components-next/NewConversation/ComposeConversation.vue';
import CallButton from 'dashboard/components-next/CallModal/CallButton.vue';
const emit = defineEmits([
'closeKeyShortcutModal',
@@ -63,6 +65,11 @@ const conversationCustomViews = useMapGetter(
'customViews/getConversationCustomViews'
);
// Check if there are any voice inboxes
const hasVoiceInbox = computed(() =>
inboxes.value.some(inbox => inbox.channel_type === INBOX_TYPES.VOICE)
);
onMounted(() => {
store.dispatch('labels/get');
store.dispatch('inboxes/get');
@@ -510,6 +517,7 @@ const menuItems = computed(() => {
{{ searchShortcut }}
</span>
</RouterLink>
<CallButton v-if="hasVoiceInbox" class="flex-shrink-0" />
<ComposeConversation align-position="right">
<template #trigger="{ toggle }">
<Button
@@ -540,4 +548,4 @@ const menuItems = computed(() => {
/>
</section>
</aside>
</template>
</template>