chore: clean up

This commit is contained in:
Sojan Jose
2025-07-17 04:53:37 -07:00
parent f8a8679d88
commit 669241801e
15 changed files with 303 additions and 338 deletions

View File

@@ -1528,16 +1528,16 @@ export default {
<div class="flex items-center">
<!-- Left side with inbox avatar and call info -->
<div class="inbox-avatar">
<!-- Use the inbox avatar if available -->
<!-- Use the inbox avatar if available and valid -->
<img
v-if="inboxAvatarUrl"
v-if="inboxAvatarUrl && inboxAvatarUrl.startsWith('http')"
:src="inboxAvatarUrl"
:alt="inboxDisplayName"
class="avatar-image"
@error="handleAvatarError"
/>
<!-- Fallback to initial if no avatar -->
<span v-else>{{ inboxDisplayName.charAt(0).toUpperCase() }}</span>
<!-- Fallback to phone icon for voice channels -->
<i v-else class="i-ri-phone-fill text-white text-lg"></i>
</div>
<div class="header-info">
<div class="voice-label">{{ inboxDisplayName }}</div>
@@ -1707,7 +1707,7 @@ export default {
<span class="inbox-name">
<!-- Add inbox avatar to the header -->
<img
v-if="inboxAvatarUrl"
v-if="inboxAvatarUrl && inboxAvatarUrl.startsWith('http')"
:src="inboxAvatarUrl"
:alt="inboxDisplayName"
class="inline-avatar"
@@ -1718,6 +1718,19 @@ export default {
margin-right: 6px;
"
/>
<!-- Fallback to phone icon for voice channels -->
<i
v-else
class="i-ri-phone-fill text-white mr-1.5"
style="
width: 24px;
height: 24px;
font-size: 16px;
display: flex;
align-items: center;
justify-content: center;
"
></i>
{{ inboxDisplayName }}
</span>
<span class="incoming-call-text">Incoming call</span>

View File

@@ -402,7 +402,10 @@ export default {
return;
}
if (canReply || this.isAWhatsAppChannel) {
// Voice channels only allow private notes
if (this.isAVoiceChannel) {
this.replyType = REPLY_EDITOR_MODES.NOTE;
} else if (canReply || this.isAWhatsAppChannel) {
this.replyType = REPLY_EDITOR_MODES.REPLY;
} else {
this.replyType = REPLY_EDITOR_MODES.NOTE;
@@ -797,7 +800,12 @@ export default {
this.$store.dispatch('draftMessages/setReplyEditorMode', {
mode,
});
if (canReply || this.isAWhatsAppChannel) this.replyType = mode;
// Voice channels are restricted to private notes only
if (this.isAVoiceChannel) {
this.replyType = REPLY_EDITOR_MODES.NOTE;
} else if (canReply || this.isAWhatsAppChannel) {
this.replyType = mode;
}
if (this.showRichContentEditor) {
if (this.isRecordingAudio) {
this.toggleAudioRecorder();
@@ -1225,7 +1233,7 @@ export default {
:recording-audio-state="recordingAudioState"
:send-button-text="replyButtonLabel"
:show-audio-recorder="showAudioRecorder"
:show-editor-toggle="isAPIInbox && !isOnPrivateNote"
:show-editor-toggle="isAPIInbox && !isOnPrivateNote && !isAVoiceChannel"
:show-emoji-picker="showEmojiPicker"
:show-file-upload="showFileUpload"
:toggle-audio-recorder-play-pause="toggleAudioRecorderPlayPause"