diff --git a/app/javascript/dashboard/components-next/message/Message.vue b/app/javascript/dashboard/components-next/message/Message.vue
index df0602a49..9d6b30f81 100644
--- a/app/javascript/dashboard/components-next/message/Message.vue
+++ b/app/javascript/dashboard/components-next/message/Message.vue
@@ -414,6 +414,11 @@ const avatarInfo = computed(() => {
};
});
+const avatarTooltip = computed(() => {
+ if (avatarInfo.value.name === '') return '';
+ return `${t('CONVERSATION.SENT_BY')} ${avatarInfo.value.name}`;
+});
+
const setupHighlightTimer = () => {
if (Number(route.query.messageId) !== Number(props.id)) {
return;
@@ -472,6 +477,7 @@ provideMessageContext({
>
diff --git a/app/javascript/dashboard/components-next/message/chips/Audio.vue b/app/javascript/dashboard/components-next/message/chips/Audio.vue
index 0d91fb84c..680584048 100644
--- a/app/javascript/dashboard/components-next/message/chips/Audio.vue
+++ b/app/javascript/dashboard/components-next/message/chips/Audio.vue
@@ -25,16 +25,22 @@ const isPlaying = ref(false);
const isMuted = ref(false);
const currentTime = ref(0);
const duration = ref(0);
+const playbackSpeed = ref(1);
const onLoadedMetadata = () => {
duration.value = audioPlayer.value?.duration;
};
+const playbackSpeedLabel = computed(() => {
+ return `${playbackSpeed.value}x`;
+});
+
// There maybe a chance that the audioPlayer ref is not available
// When the onLoadMetadata is called, so we need to set the duration
// value when the component is mounted
onMounted(() => {
duration.value = audioPlayer.value?.duration;
+ audioPlayer.value.playbackRate = playbackSpeed.value;
});
const formatTime = time => {
@@ -72,6 +78,16 @@ const playOrPause = () => {
const onEnd = () => {
isPlaying.value = false;
currentTime.value = 0;
+ playbackSpeed.value = 1;
+ audioPlayer.value.playbackRate = 1;
+};
+
+const changePlaybackSpeed = () => {
+ const speeds = [1, 1.5, 2];
+ const currentIndex = speeds.indexOf(playbackSpeed.value);
+ const nextIndex = (currentIndex + 1) % speeds.length;
+ playbackSpeed.value = speeds[nextIndex];
+ audioPlayer.value.playbackRate = playbackSpeed.value;
};
const downloadAudio = async () => {
@@ -106,7 +122,7 @@ const downloadAudio = async () => {
{{ formatTime(currentTime) }} / {{ formatTime(duration) }}
-
+
{
@input="seek"
/>
+