From 8a1980a08874982aa413c19dd3a11eeead1909e8 Mon Sep 17 00:00:00 2001 From: AkiraFukushima Date: Sat, 12 Feb 2022 16:04:30 +0900 Subject: [PATCH] refs #2954 Support sound file as media attachment --- src/renderer/components/TimelineSpace/Modals/Media.vue | 6 +++++- src/renderer/components/organisms/Toot.vue | 7 ++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/renderer/components/TimelineSpace/Modals/Media.vue b/src/renderer/components/TimelineSpace/Modals/Media.vue index e8adb3a0..e7c77147 100644 --- a/src/renderer/components/TimelineSpace/Modals/Media.vue +++ b/src/renderer/components/TimelineSpace/Modals/Media.vue @@ -2,6 +2,7 @@
+
@@ -27,7 +28,7 @@ export default { } }, watch: { - src: async function(newSrc, _oldSrc) { + src: async function (newSrc, _oldSrc) { this.imageSrc = newSrc if (newSrc && !this.isMovieFile() && !this.isGIF()) { try { @@ -51,6 +52,9 @@ export default { isGIF() { return ['gifv'].includes(this.type) }, + isAudio() { + return ['audio'].includes(this.type) + }, async loaded() { this.$store.dispatch('TimelineSpace/Modals/ImageViewer/loaded') } diff --git a/src/renderer/components/organisms/Toot.vue b/src/renderer/components/organisms/Toot.vue index a66f0441..b7f3c5cd 100644 --- a/src/renderer/components/organisms/Toot.vue +++ b/src/renderer/components/organisms/Toot.vue @@ -95,13 +95,14 @@
- GIF - VIDEO + GIF + VIDEO + AUDIO