## Summary Frontend for WhatsApp Cloud Calling: header / contact-panel call buttons, ringing widget, accept/reject/hangup, mute, in-bubble audio player + transcript, recording-on-hangup upload, mid-call reload warning. WebRTC is browser-direct to Meta — no media server bridge. ## Closes - https://linear.app/chatwoot/issue/PLA-150 ## How to test Requires backend support — the controller, services, model changes, and routes ship in **#14334** (`feature/pla-150`). Merge / deploy that first (or simultaneously); the FE alone won't function without those endpoints. Then on staging, for a WhatsApp Cloud + embedded-signup inbox with the new \`Configuration → Enable voice calling\` toggle ON and webhook registered: 1. **Outbound** — open a conversation, click the phone icon in the conversation header (or contact panel), grant mic, your phone rings, answer, audio both ways, hang up. Recording + transcript land in the bubble within ~10s. 2. **Inbound** — call the business number from your phone. The FloatingCallWidget appears bottom-right with caller name. Click accept, audio both ways, hang up. Recording + transcript appear. 3. **Mute** — during an active WhatsApp call, click the mic icon next to hangup. Speech stops reaching Meta until you click again. 4. **Mid-call reload guard** — try `Cmd-R` during an active call; browser shows a confirm prompt. --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Co-authored-by: iamsivin <iamsivin@gmail.com> Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com>
55 lines
1.3 KiB
Vue
55 lines
1.3 KiB
Vue
<script setup>
|
|
import ToggleSwitch from 'dashboard/components-next/switch/Switch.vue';
|
|
|
|
defineProps({
|
|
header: {
|
|
type: String,
|
|
required: true,
|
|
},
|
|
description: {
|
|
type: String,
|
|
default: '',
|
|
},
|
|
compact: {
|
|
type: Boolean,
|
|
default: false,
|
|
},
|
|
hideToggle: {
|
|
type: Boolean,
|
|
default: false,
|
|
},
|
|
});
|
|
|
|
const modelValue = defineModel({ type: Boolean, default: false });
|
|
</script>
|
|
|
|
<template>
|
|
<div
|
|
class="flex flex-col items-start outline outline-1 -outline-offset-1 outline-n-weak rounded-xl [interpolate-size:allow-keywords]"
|
|
>
|
|
<div class="flex flex-col gap-1 items-start w-full px-4 py-3">
|
|
<div class="flex items-center gap-3 w-full justify-between">
|
|
<span class="text-heading-3 text-n-slate-12">
|
|
{{ header }}
|
|
</span>
|
|
<template v-if="hideToggle">
|
|
<slot name="hiddenToggle">
|
|
<div class="size-2" />
|
|
</slot>
|
|
</template>
|
|
<ToggleSwitch v-else v-model="modelValue" />
|
|
</div>
|
|
<span v-if="description" class="text-body-main text-n-slate-11">
|
|
{{ description }}
|
|
</span>
|
|
</div>
|
|
<div
|
|
v-if="$slots.editor"
|
|
class="w-full border-t border-n-weak"
|
|
:class="{ 'p-0': compact, 'px-4 pb-4 pt-2': !compact }"
|
|
>
|
|
<slot name="editor" />
|
|
</div>
|
|
</div>
|
|
</template>
|