diff --git a/packages/frontend/src/components/MkMediaAudio.vue b/packages/frontend/src/components/MkMediaAudio.vue index b23ef9b72..5e97f8a90 100644 --- a/packages/frontend/src/components/MkMediaAudio.vue +++ b/packages/frontend/src/components/MkMediaAudio.vue @@ -35,40 +35,43 @@ SPDX-License-Identifier: AGPL-3.0-only -
- -
- -
-
- -
-
{{ hms(elapsedTimeMs) }}
-
- +
+ +
+ +
+ +
+
+ +
+
{{ hms(elapsedTimeMs) }}
+
+ + +
-
@@ -83,11 +86,13 @@ import * as os from '@/os.js'; import bytes from '@/filters/bytes.js'; import { hms } from '@/filters/hms.js'; import MkMediaRange from '@/components/MkMediaRange.vue'; +import MkUserRippleEffect from '@/components/MkUserRippleEffect.vue'; import { pleaseLogin } from '@/scripts/please-login.js'; import { $i, iAmModerator } from '@/account.js'; const props = defineProps<{ audio: Misskey.entities.DriveFile; + user?: Misskey.entities.UserLite; }>(); const keymap = { @@ -126,6 +131,7 @@ function hasFocus() { const playerEl = shallowRef(); const audioEl = shallowRef(); +const userRippleEffect = ref>(); // eslint-disable-next-line vue/no-setup-props-destructure const hide = ref((defaultStore.state.nsfw === 'force' || defaultStore.state.dataSaver.media) ? true : (props.audio.isSensitive && defaultStore.state.nsfw !== 'ignore')); @@ -264,9 +270,11 @@ function togglePlayPause() { if (isPlaying.value) { audioEl.value.pause(); + userRippleEffect.value?.pauseAnimation(); isPlaying.value = false; } else { audioEl.value.play(); + userRippleEffect.value?.resumeAnimation(); isPlaying.value = true; oncePlayed.value = true; } diff --git a/packages/frontend/src/components/MkMediaBanner.vue b/packages/frontend/src/components/MkMediaBanner.vue index 7a128fbad..7eeab073c 100644 --- a/packages/frontend/src/components/MkMediaBanner.vue +++ b/packages/frontend/src/components/MkMediaBanner.vue @@ -5,12 +5,12 @@ SPDX-License-Identifier: AGPL-3.0-only