fix: add play mode toggle, wire play history API, add back navigation buttons

- Add play mode cycle button (seq/loop/random/rloop) to Player bar
- Wire GET /api/player/:botId/history to query database instead of returning empty array
- Pass database instance from server.ts to createPlayerRouter
- Add back navigation button to Playlist, Lyrics, History, Search, and Settings views
- SongCard already had dblclick-to-play (no change needed)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
saopig1andClaude Opus 4.6 committed 2026-03-30 02:16:18 +08:00
1 parent 9dce883384
commit ee5a75ab5e
8 files changed
+141 -4

No files matched your search

+1 -1
View File
@@ -46,7 +46,7 @@ export function createWebServer(options: WebServerOptions): WebServer {
"/api/music",
createMusicRouter(options.neteaseProvider, options.qqProvider, logger)
);
app.use("/api/player", createPlayerRouter(options.botManager, logger));
app.use("/api/player", createPlayerRouter(options.botManager, logger, options.database));
app.use(
"/api/auth",
createAuthRouter(options.neteaseProvider, options.qqProvider, logger, options.cookieStore)