From df403c5a69e9c846ff90e16a20587555f64768fc Mon Sep 17 00:00:00 2001 From: Dorian Date: Wed, 15 Jul 2026 11:23:57 +0100 Subject: [PATCH] fix(cloud): music opens the bottom-bar player, never the lightbox MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit FileCard audio clicks now emit play (global GlobalAudioPlayer bar) — wired through the FileGrid list view, the Cloud My Files list and own search results. Peer Files already used the bottom bar. Co-Authored-By: Claude Fable 5 --- neode-ui/src/components/cloud/FileCard.vue | 7 +++++-- neode-ui/src/components/cloud/FileGrid.vue | 1 + neode-ui/src/views/Cloud.vue | 10 ++++++++++ 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/neode-ui/src/components/cloud/FileCard.vue b/neode-ui/src/components/cloud/FileCard.vue index 5f3ce652..29344559 100644 --- a/neode-ui/src/components/cloud/FileCard.vue +++ b/neode-ui/src/components/cloud/FileCard.vue @@ -103,6 +103,7 @@ const emit = defineEmits<{ delete: [path: string] share: [path: string, name: string, isDir: boolean] preview: [path: string] + play: [path: string, name: string] }>() const cloudStore = useCloudStore() @@ -122,8 +123,10 @@ const downloadHref = computed(() => cloudStore.downloadUrl(props.item.path)) function handleClick() { if (props.item.isDir) { emit('navigate', props.item.path) - } else if (isImage.value || isVideo.value || isAudio.value) { - // MediaLightbox handles all three media kinds. + } else if (isAudio.value) { + // Music goes to the global bottom-bar player, not the lightbox. + emit('play', props.item.path, props.item.name) + } else if (isImage.value || isVideo.value) { emit('preview', props.item.path) } else { // Non-media files open by downloading — a click should always act on the file. diff --git a/neode-ui/src/components/cloud/FileGrid.vue b/neode-ui/src/components/cloud/FileGrid.vue index 6f98f60a..7e032d33 100644 --- a/neode-ui/src/components/cloud/FileGrid.vue +++ b/neode-ui/src/components/cloud/FileGrid.vue @@ -53,6 +53,7 @@ :item="item" @navigate="$emit('navigate', $event)" @delete="$emit('delete', $event)" + @play="(path, name) => $emit('play', path, name)" @share="(path, name, isDir) => $emit('share', path, name, isDir)" @preview="$emit('preview', $event)" /> diff --git a/neode-ui/src/views/Cloud.vue b/neode-ui/src/views/Cloud.vue index d9be21a7..c5bbadc8 100644 --- a/neode-ui/src/views/Cloud.vue +++ b/neode-ui/src/views/Cloud.vue @@ -93,6 +93,7 @@ :item="r.item" @delete="handleDelete" @share="handleShare" + @play="handlePlay" @preview="(p: string) => handlePreview(p, searchMineItems)" />