From 869ca7d7282fe6f620ab3af6d25a1f2bc44db666 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucas=20T=C3=A4kker?= Date: Mon, 5 Oct 2026 02:49:24 +0200 Subject: [PATCH] Added track navigation menu items --- app/components/Track/ImageRow.vue | 29 ++++++++++++++++++++++++++++- app/components/Track/Row.vue | 29 ++++++++++++++++++++++++++++- 2 files changed, 56 insertions(+), 2 deletions(-) diff --git a/app/components/Track/ImageRow.vue b/app/components/Track/ImageRow.vue index 7505ae8..b3d338f 100644 --- a/app/components/Track/ImageRow.vue +++ b/app/components/Track/ImageRow.vue @@ -7,6 +7,7 @@ interface TrackRowProps { const { track } = defineProps() const emit = defineEmits<{ (e: "playAlbumAtIndex"): void }>() +const route = useRoute() const hovering = ref(false) @@ -34,7 +35,33 @@ const dropdownMenuItems: DropdownMenuItem[][] = [ }, }, ], + [ + { + label: "Go to artist", + icon: "lucide:user-round", + onSelect() { + const artist = track.artists[0] + if (artist) navigateTo(`/artist/${artist._id}`) + }, + }, + { + label: "Go to album", + icon: "lucide:disc-3", + onSelect() { + navigateTo(`/album/${track.album._id}`) + }, + }, + ], ] + +const visibleDropdownMenuItems = computed(() => + dropdownMenuItems.map((group) => + group.filter( + (item) => + !(item.label === "Go to album" && route.path.startsWith("/album/")), + ), + ), +)