From 23faffc25156b51879a5a367a7c55d0ec600bf67 Mon Sep 17 00:00:00 2001 From: chris Date: Sat, 3 Oct 2026 17:37:30 -0400 Subject: [PATCH] Add pause controls and app attribution to the web app Settings gets a Sharing card (pause 1 hour / until tomorrow / until turned back on); the feed shows a resume banner while paused. Now-playing cards say which app a phone reported, e.g. "via Spotify". Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01MzFywujuH9TiuXbr9vjoX8 --- apps/web/src/app/page.tsx | 2 + apps/web/src/app/settings/page.tsx | 2 + apps/web/src/components/NowPlayingCard.tsx | 2 +- apps/web/src/components/SharingControls.tsx | 62 +++++++++++++++++++++ 4 files changed, 67 insertions(+), 1 deletion(-) create mode 100644 apps/web/src/components/SharingControls.tsx diff --git a/apps/web/src/app/page.tsx b/apps/web/src/app/page.tsx index d507eec..17b6975 100644 --- a/apps/web/src/app/page.tsx +++ b/apps/web/src/app/page.tsx @@ -4,6 +4,7 @@ import Link from 'next/link'; import useSWR from 'swr'; import { sortFeed, type FeedItemDTO, type ProfileDTO } from '@musicshare/shared'; import { NowPlayingCard } from '@/components/NowPlayingCard'; +import { SharingControls } from '@/components/SharingControls'; import { UserSearch } from '@/components/UserSearch'; import { api, fetcher, useMe } from '@/lib/api'; import { useRealtime } from '@/lib/useRealtime'; @@ -53,6 +54,7 @@ function Feed() { return (
+ {mine?.nowPlaying && (

You

diff --git a/apps/web/src/app/settings/page.tsx b/apps/web/src/app/settings/page.tsx index f09f253..78e1c8c 100644 --- a/apps/web/src/app/settings/page.tsx +++ b/apps/web/src/app/settings/page.tsx @@ -11,6 +11,7 @@ import { type NowPlayingProvider, type TrackSearchResultDTO, } from '@musicshare/shared'; +import { SharingControls } from '@/components/SharingControls'; import { api, fetcher, useMe } from '@/lib/api'; import { timeAgo } from '@musicshare/shared'; import { useDebounced } from '@/lib/useDebounced'; @@ -32,6 +33,7 @@ function Settings() {

Settings

+ diff --git a/apps/web/src/components/NowPlayingCard.tsx b/apps/web/src/components/NowPlayingCard.tsx index 497375d..ed56487 100644 --- a/apps/web/src/components/NowPlayingCard.tsx +++ b/apps/web/src/components/NowPlayingCard.tsx @@ -31,7 +31,7 @@ export function NowPlayingCard({ {np.isPlaying ? 'Listening now' : `Played ${timeAgo(np.updatedAt)}`} - via {SERVICE_LABELS[np.source]} + via {np.sourceApp ?? SERVICE_LABELS[np.source]} {onTogglePin && ( +

+ ); + } + + return ( +
+

Sharing

+ {me.sharingPausedUntil ? ( + <> +

Paused {pausedUntilLabel(me.sharingPausedUntil)}. Friends don’t see what you play, and nothing is added to your history.

+ + + ) : ( + <> +

Friends see what you’re playing. Pause any time.

+
+ + + +
+ + )} +
+ ); +}