diff --git a/.env.local b/.env.local index 2c32e7d..6df3a20 100644 --- a/.env.local +++ b/.env.local @@ -1 +1 @@ -NEXT_PUBLIC_COMMIT_SHA=fccf3c5 +NEXT_PUBLIC_COMMIT_SHA=3a3c065 diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..8e746ed --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,38 @@ +{ + "version": "0.2.0", + "configurations": [ + { + "name": "Debug: Next.js Development", + "type": "node", + "request": "launch", + "program": "${workspaceFolder}/node_modules/.bin/next", + "args": ["dev"], + "console": "integratedTerminal", + "env": { + "NODE_ENV": "development" + }, + "runtimeExecutable": "pnpm", + "runtimeArgs": ["run", "dev"], + "skipFiles": ["/**"], + "resolveSourceMapLocations": [ + "${workspaceFolder}/**", + "!**/node_modules/**" + ] + }, + { + "name": "Debug: Next.js Production", + "type": "node", + "request": "launch", + "program": "${workspaceFolder}/node_modules/.bin/next", + "args": ["start"], + "console": "integratedTerminal", + "env": { + "NODE_ENV": "production" + }, + "preLaunchTask": "Build: Production Build Only", + "runtimeExecutable": "pnpm", + "runtimeArgs": ["run", "start"], + "skipFiles": ["/**"] + } + ] +} diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 0000000..d545e85 --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,114 @@ +{ + "version": "2.0.0", + "tasks": [ + { + "label": "Dev: Start Development Server", + "type": "shell", + "command": "pnpm", + "args": [ + "run", + "dev" + ], + "group": { + "kind": "build", + "isDefault": true + }, + "isBackground": true, + "problemMatcher": [ + "$tsc-watch" + ], + "presentation": { + "echo": true, + "reveal": "always", + "focus": false, + "panel": "new", + "showReuseMessage": true, + "clear": false + }, + "options": { + "env": { + "NODE_ENV": "development" + } + } + }, + { + "label": "Prod: Build and Start Production", + "type": "shell", + "command": "bash", + "args": [ + "-c", + "pnpm run build && pnpm run start" + ], + "group": "build", + "presentation": { + "echo": true, + "reveal": "always", + "focus": true, + "panel": "new", + "showReuseMessage": true, + "clear": true + }, + "options": { + "env": { + "NODE_ENV": "production" + } + }, + "problemMatcher": ["$tsc"], + "dependsOrder": "sequence" + }, + { + "label": "Debug: Development with Debug Info", + "type": "shell", + "command": "pnpm", + "args": [ + "run", + "dev" + ], + "group": { + "kind": "test", + "isDefault": false + }, + "isBackground": true, + "presentation": { + "echo": true, + "reveal": "always", + "focus": false, + "panel": "new", + "showReuseMessage": true, + "clear": false + }, + "options": { + "env": { + "NODE_ENV": "development", + "DEBUG": "*", + "NEXT_TELEMETRY_DISABLED": "1" + } + }, + "problemMatcher": ["$tsc-watch"] + }, + { + "label": "Build: Production Build Only", + "type": "shell", + "command": "pnpm", + "args": [ + "run", + "build" + ], + "group": "build", + "presentation": { + "echo": true, + "reveal": "always", + "focus": true, + "panel": "new", + "showReuseMessage": true, + "clear": true + }, + "options": { + "env": { + "NODE_ENV": "production" + } + }, + "problemMatcher": ["$tsc"] + } + ] +} \ No newline at end of file diff --git a/app/album/[id]/page.tsx b/app/album/[id]/page.tsx index 132e45f..c0b7cf8 100644 --- a/app/album/[id]/page.tsx +++ b/app/album/[id]/page.tsx @@ -13,6 +13,7 @@ import { Separator } from '@/components/ui/separator'; import { ScrollArea } from '@/components/ui/scroll-area'; import { getNavidromeAPI } from '@/lib/navidrome'; import { useFavoriteAlbums } from '@/hooks/use-favorite-albums'; +import { useIsMobile } from '@/hooks/use-mobile'; export default function AlbumPage() { const { id } = useParams(); @@ -24,6 +25,7 @@ export default function AlbumPage() { const { getAlbum, starItem, unstarItem } = useNavidrome(); const { playTrack, addAlbumToQueue, playAlbum, playAlbumFromTrack, currentTrack } = useAudioPlayer(); const { isFavoriteAlbum, toggleFavoriteAlbum } = useFavoriteAlbums(); + const isMobile = useIsMobile(); const api = getNavidromeAPI(); useEffect(() => { @@ -128,34 +130,82 @@ export default function AlbumPage() { <>
-
- {album.name} -
-
-

{album.name}

- + {isMobile ? ( + /* Mobile Layout */ +
+ {/* Album Cover - Centered */} +
+ {album.name}
- -

{album.artist}

- - -
-

{album.genre} • {album.year}

-

{album.songCount} songs, {formatDuration(album.duration)}

+ {/* Album Info and Controls */} +
+ {/* Left side - Album Info */} +
+

{album.name}

+ +

{album.artist}

+ +

{album.genre} • {album.year}

+

{album.songCount} songs, {formatDuration(album.duration)}

+ + {/* Right side - Controls */} +
+ + +
+
-
+ ) : ( + /* Desktop Layout */ +
+ {album.name} +
+
+

{album.name}

+ +
+ +

{album.artist}

+ + +
+

{album.genre} • {album.year}

+

{album.songCount} songs, {formatDuration(album.duration)}

+
+
+
+ )}