From 1bbb7e0250727ac8a2934b440eaf536224d7cd35 Mon Sep 17 00:00:00 2001 From: Michael Winter Date: Fri, 6 Mar 2026 18:36:40 +0100 Subject: [PATCH] Fix mobile handling for score and document icons - Score icon: mobile downloads PDF, desktop opens modal - Document icon: reverts to same behavior on mobile and desktop (opens modal) - Remove console.log from isMobile - Remove documentLink computed property --- components/IconButton.vue | 22 +++++++++++----------- pages/works/[slug].vue | 15 ++++++++++----- 2 files changed, 21 insertions(+), 16 deletions(-) diff --git a/components/IconButton.vue b/components/IconButton.vue index f2085b1..2572744 100644 --- a/components/IconButton.vue +++ b/components/IconButton.vue @@ -3,24 +3,19 @@
- + - - - - - - - -
@@ -27,7 +27,7 @@ - @@ -82,6 +82,11 @@ const itemCount = computed(() => { return count }) +const isMobile = () => { + if (typeof window === 'undefined') return false + return window.innerWidth < 768 +} + onMounted(() => { if (work.value?.soundcloud_trackid) { audioPlayerStore.setSoundCloudTrackID(work.value.soundcloud_trackid)