mirror of
https://github.com/lingble/chatwoot.git
synced 2025-11-02 03:57:52 +00:00
feat: Use audio tag instead of download file button (#1749)
This commit is contained in:
@@ -9,6 +9,8 @@ module FileTypeHelper
|
||||
'image/bmp'
|
||||
].include?(content_type)
|
||||
|
||||
return :audio if content_type.include?('audio/')
|
||||
|
||||
:file
|
||||
end
|
||||
end
|
||||
|
||||
@@ -21,8 +21,11 @@
|
||||
:url="attachment.data_url"
|
||||
:readable-time="readableTime"
|
||||
/>
|
||||
<audio v-else-if="attachment.file_type === 'audio'" controls>
|
||||
<source :src="attachment.data_url" />
|
||||
</audio>
|
||||
<bubble-file
|
||||
v-if="attachment.file_type !== 'image'"
|
||||
v-else
|
||||
:url="attachment.data_url"
|
||||
:readable-time="readableTime"
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user