diff --git a/frontend/src/App.vue b/frontend/src/App.vue index 7ade8d11..8f11505f 100644 --- a/frontend/src/App.vue +++ b/frontend/src/App.vue @@ -1,16 +1,13 @@ diff --git a/frontend/src/components/AppHeader.vue b/frontend/src/components/AppHeader.vue new file mode 100644 index 00000000..67d69046 --- /dev/null +++ b/frontend/src/components/AppHeader.vue @@ -0,0 +1,12 @@ + + + diff --git a/frontend/src/components/CallUI.vue b/frontend/src/components/CallUI.vue index 7f27e4d9..7d69c0cf 100644 --- a/frontend/src/components/CallUI.vue +++ b/frontend/src/components/CallUI.vue @@ -1,5 +1,4 @@ @@ -187,7 +184,7 @@ import { Device } from '@twilio/voice-sdk' import { useDraggable, useWindowSize } from '@vueuse/core' import { contactsStore } from '@/stores/contacts' import { Avatar, call } from 'frappe-ui' -import { onMounted, provide, ref, watch } from 'vue' +import { onMounted, ref, watch, getCurrentInstance } from 'vue' import NoteModal from './NoteModal.vue' const { getContact } = contactsStore() @@ -292,15 +289,6 @@ function addDeviceListeners() { }) } -// function update_call_log(conn, status = 'Completed') { -// console.log('connection', conn) -// if (!conn.parameters.CallSid) return -// call('crm.twilio.api.update_call_log', { -// call_sid: conn.parameters.CallSid, -// status: status, -// }) -// } - function toggleMute() { if (_call.value.isMuted()) { _call.value.mute(false) @@ -492,7 +480,8 @@ watch( { immediate: true } ) -provide('makeOutgoingCall', makeOutgoingCall) +const app = getCurrentInstance() +app.appContext.config.globalProperties.makeCall = makeOutgoingCall