Unlock everything, add a donation link, credit Last.fm, nudge re-linking

- Every feature is free for everyone (the plan system stays for later);
  remaining limits are abuse guards
- Optional website donation link (NEXT_PUBLIC_DONATION_URL). Not shown in
  the mobile apps, where tips to the developer generally need in-app
  purchase
- Last.fm/ListenBrainz-sourced plays link to the user's profile, as
  Last.fm's API terms require
- Connections track when they last saw activity; a scrobbler silent for
  over a week prompts re-linking Spotify (its link expires every 6 months)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MzFywujuH9TiuXbr9vjoX8
This commit is contained in:
2026-10-04 08:13:54 -04:00
co-authored by Claude Opus 5.5
parent 91a78a8ad4
commit 63d618f0e3
33 changed files with 1277 additions and 38 deletions
@@ -1,5 +1,5 @@
import { router } from 'expo-router';
import { Pressable, StyleSheet, Text, View } from 'react-native';
import { Linking, Pressable, StyleSheet, Text, View } from 'react-native';
import { SERVICE_LABELS, timeAgo, type NowPlayingDTO, type StreamingService } from '@musicshare/shared';
import { colors, space } from '@/lib/theme';
import { Avatar } from './Avatar';
@@ -34,7 +34,12 @@ export function NowPlayingCard({
{np.isPlaying && <View style={styles.dot} />}
<Text style={[styles.status, np.isPlaying && { color: colors.live }]} numberOfLines={1}>
{np.isPlaying ? 'Listening now' : `Played ${timeAgo(np.updatedAt)}`}
<Text style={styles.via}> · {np.sourceApp ?? SERVICE_LABELS[np.source]}</Text>
<Text
style={[styles.via, np.sourceUrl && styles.viaLink]}
onPress={np.sourceUrl ? () => Linking.openURL(np.sourceUrl!) : undefined}>
{' · '}
{np.sourceApp ?? SERVICE_LABELS[np.source]}
</Text>
</Text>
{onTogglePin && (
<Pressable
@@ -61,5 +66,6 @@ const styles = StyleSheet.create({
dot: { width: 8, height: 8, borderRadius: 4, backgroundColor: colors.live },
status: { color: colors.muted, fontSize: 13 },
via: { color: colors.muted },
viaLink: { textDecorationLine: 'underline' },
pin: { color: colors.muted, fontSize: 20, marginLeft: space.xs },
});