From f57fffb41486d46c601fb6d9c9173e1318dd88be Mon Sep 17 00:00:00 2001 From: FliesentischKing Date: Sun, 4 Oct 2026 03:06:32 +0200 Subject: [PATCH] Thread page UX improvements - Skeleton comment cards while the thread loads; comment count only rendered once data arrives - Subscribe button updates optimistically (fixes shallowRef useFetch data not being reactive on in-place mutation) - Add-tag control restyled as a tag chip, tag icon removed; recording indicator bar dropped in favor of the mic button state - Nav arrows and audio controls follow the theme border radius; arrow z-index no longer overlays sticky header/MOTD - Thread notifications are marked read on visit and on live arrival - Audio upload player uses the shared media volume Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- app/components/ThreadSubscriptionButton.vue | 8 ++- app/pages/thread/[id].vue | 72 +++++++++++++-------- 2 files changed, 52 insertions(+), 28 deletions(-) diff --git a/app/components/ThreadSubscriptionButton.vue b/app/components/ThreadSubscriptionButton.vue index 9b0a335..261e61b 100644 --- a/app/components/ThreadSubscriptionButton.vue +++ b/app/components/ThreadSubscriptionButton.vue @@ -15,15 +15,19 @@ async function toggle() { if (busy.value) return busy.value = true const uploadId = props.uploadId + const next = !props.enabled + // Optimistisch umschalten — wie bei den Reactions; der Server korrigiert nur noch + emit('change', uploadId, next) try { const result = await $fetch<{ enabled: boolean }>(`/api/uploads/${uploadId}/subscription`, { method: 'PUT', - body: { enabled: !props.enabled }, + body: { enabled: next }, }) - emit('change', uploadId, result.enabled) + if (result.enabled !== next) emit('change', uploadId, result.enabled) toast.success(result.enabled ? t('thread.subOn') : t('thread.subOff')) } catch { + emit('change', uploadId, !next) toast.error(t('thread.subFailed')) } finally { diff --git a/app/pages/thread/[id].vue b/app/pages/thread/[id].vue index befae6d..cfd1d40 100644 --- a/app/pages/thread/[id].vue +++ b/app/pages/thread/[id].vue @@ -1,5 +1,5 @@