diff --git a/packages/frontend/src/pages/LastFm.test.tsx b/packages/frontend/src/pages/LastFm.test.tsx index e25aa79bc..8ddfc6c81 100644 --- a/packages/frontend/src/pages/LastFm.test.tsx +++ b/packages/frontend/src/pages/LastFm.test.tsx @@ -23,7 +23,7 @@ describe('LastFmPage', () => { test('shows loading spinner initially', () => { vi.mocked(api.lastfm.status).mockReturnValue(new Promise(() => {})) renderPage() - expect(document.querySelector('.animate-spin')).toBeInTheDocument() + expect(document.querySelector('.animate-pulse')).toBeInTheDocument() }) test('shows not configured when lastfm is not set up', async () => { @@ -66,7 +66,7 @@ describe('LastFmPage', () => { expect(screen.getByText('Connect Your Account')).toBeInTheDocument() }) - expect(screen.getByText('Connect Last.fm')).toBeInTheDocument() + expect(screen.getByText('Connect with Last.fm')).toBeInTheDocument() }) test('shows error on fetch failure', async () => { diff --git a/packages/frontend/src/pages/LastFm.tsx b/packages/frontend/src/pages/LastFm.tsx index daa91c54b..fec23b0ae 100644 --- a/packages/frontend/src/pages/LastFm.tsx +++ b/packages/frontend/src/pages/LastFm.tsx @@ -1,8 +1,7 @@ import { useCallback, useEffect, useState } from 'react' -import { ExternalLink, Link2, Loader2, Music, Unlink } from 'lucide-react' +import { Check, ExternalLink, Link2, Loader2, Music, X } from 'lucide-react' import { api } from '@/services/api' import SectionHeader from '@/components/ui/SectionHeader' -import ActionPanel from '@/components/ui/ActionPanel' interface LastFmStatus { configured: boolean @@ -57,8 +56,18 @@ export default function LastFmPage() { if (isLoading) { return ( -
+ {error} +
+
- Last.fm integration is not configured on this bot. The server owner needs
- to set
-
- LASTFM_API_KEY
-
- and
-
- LASTFM_API_SECRET
-
- .
-
+ Last.fm integration is not configured. Ask the server owner to set: +
+
+ LASTFM_API_KEY
+
+
+ LASTFM_API_SECRET
+
+
- Linked as
+
+
Tracks you request via the bot will be scrobbled to your Last.fm profile
automatically.
- Link your Last.fm account so tracks you play through the bot are
- automatically scrobbled to your profile.
-
+ Link your Last.fm account so tracks you play through the bot are
+ automatically scrobbled to your profile.
+
+ Lucky tracks requested songs and forwards play activity once
+ linked.
+
+ Disconnect anytime without affecting server playback.
+
+ {error}
+
- Spotify integration is not configured on this bot. The server owner needs
- to set
-
+ Spotify integration is not configured. Ask the server owner to set:
+
- Linked as
+
- Lucky can access your library and listening history to provide personalized
- autoplay recommendations.
+
+ Lucky can access your library and listening history to provide
+ personalized autoplay recommendations.
- Link your Spotify account so Lucky can learn your music preferences and
- provide personalized autoplay recommendations.
-
+ Link your Spotify account so Lucky can learn your music preferences
+ and provide personalized autoplay recommendations.
+
+ Lucky learns from your library, top tracks, and recent listening.
+
+ Disconnect anytime without affecting server playback.
+ Connect Your Account
-
+ Connect Your Account
+
+
+ Scrobble coverage
+
+
+ Privacy control
+
+ How it works
-
-
+ How it works
+
+ {[
+ 'Connect your Last.fm account above',
+ 'Play music in a voice channel using the bot',
+ 'Tracks are automatically scrobbled to your profile',
+ 'External music bots (Rythm, Groovy, etc.) are also detected',
+ ].map((step, i) => (
+
Not Configured
-
- SPOTIFY_CLIENT_ID
-
- and
-
- SPOTIFY_CLIENT_SECRET
-
- .
-
+ Not Configured
+
+
+ SPOTIFY_CLIENT_ID
+
+
+ SPOTIFY_CLIENT_SECRET
+
+ Connected
- Connect Your Account
-
+ Connect Your Account
+
+
+ Smarter autoplay
+
+
+ Privacy control
+
+ How it works
-
-
+ How it works
+
+ {[
+ 'Connect your Spotify account above',
+ 'Lucky accesses your library, top tracks, and recent listening',
+ 'When autoplay is active, Lucky recommends similar tracks based on your preferences',
+ 'Your library stays private and is only used for recommendations',
+ ].map((step, i) => (
+