PageSourceSearch

https://seafoam-tunes-production.up.railway.app/assets/Playlists-DQ8rvCop.js

js seafoam-tunes-production.up.railway.app collected 2026-10-03 12:13:47 UTC 3,268 bytes, 1 lines download raw bytes

1import{a as x,b as u,j as e,x as d,B as l,q as h,M as g}from"./index-Dc78DrGS.js";import{C as j,a as f}from"./card-CyBQusTt.js";import{S as t}from"./skeleton-BetPZc7E.js";import{C as c,P as n}from"./CreatePlaylistDialog-B4ycOayp.js";import"./textarea-iCUwUdTV.js";function w(){const{isAuthenticated:i,isLoading:m}=x(),{data:a,isLoading:o}=u({queryKey:["/api/playlists"],enabled:i});return m?e.jsxs("div",{className:"p-6",children:[e.jsxs("div",{className:"flex items-center justify-between gap-4 mb-6",children:[e.jsx(t,{className:"h-8 w-40"}),e.jsx(t,{className:"h-9 w-32"})]}),e.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 xl:grid-cols-5 gap-4",children:Array.from({length:8}).map((s,r)=>e.jsx(t,{className:"aspect-square rounded-md"},r))})]}):i?e.jsxs("div",{className:"p-6",children:[e.jsxs("div",{className:"flex items-center justify-between gap-4 mb-6 flex-wrap",children:[e.jsx("h1",{className:"text-2xl font-bold","data-testid":"text-playlists-title",children:"Your Playlists"}),e.jsx(c,{children:e.jsxs(l,{"data-testid":"button-create-playlist",children:[e.jsx(n,{className:"h-4 w-4 mr-2"}),"New Playlist"]})})]}),o?e.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 xl:grid-cols-5 gap-4",children:Array.from({length:8}).map((s,r)=>e.jsx(t,{className:"aspect-square rounded-md"},r))}):a&&a.length>0?e.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 xl:grid-cols-5 gap-4",children:a.map(s=>e.jsx(h,{href:`/playlist/${s.id}`,children:e.jsx(j,{className:"group hover-elevate active-elevate-2 cursor-pointer overflow-visible","data-testid":`card-playlist-${s.id}`,children:e.jsxs(f,{className:"p-4",children:[e.jsx("div",{className:"aspect-square rounded-md bg-muted flex items-center justify-center mb-3 overflow-hidden",children:s.coverUrl?e.jsx("img",{src:s.coverUrl,alt:s.name,className:"w-full h-full object-cover"}):e.jsx(g,{className:"h-12 w-12 text-muted-foreground"})}),e.jsx("h3",{className:"font-medium truncate","data-testid":`text-playlist-name-${s.id}`,children:s.name}),e.jsxs("p",{className:"text-sm text-muted-foreground",children:[s.trackIds.length," ",s.trackIds.length===1?"track":"tracks"]})]})})},s.id))}):e.jsxs("div",{className:"flex flex-col items-center justify-center py-16",children:[e.jsx(d,{className:"h-12 w-12 text-muted-foreground mb-4"}),e.jsx("h2",{className:"text-lg font-medium mb-2",children:"No playlists yet"}),e.jsx("p",{className:"text-muted-foreground text-center max-w-md mb-4",children:"Create your first playlist to start organizing your favorite tracks."}),e.jsx(c,{children:e.jsxs(l,{"data-testid":"button-create-first-playlist",children:[e.jsx(n,{className:"h-4 w-4 mr-2"}),"Create Playlist"]})})]})]}):e.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-6",children:[e.jsx(d,{className:"h-16 w-16 text-muted-foreground mb-4"}),e.jsx("h2",{className:"text-xl font-semibold mb-2",children:"Sign in to create playlists"}),e.jsx("p",{className:"text-muted-foreground text-center max-w-md mb-4",children:"Create and manage your personal playlists by signing in with your account."}),e.jsx(l,{asChild:!0,"data-testid":"button-login-playlists",children:e.jsx("a",{href:"/api/login",children:"Sign In"})})]})}export{w as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.