diff --git a/apps/web/src/app/playlists/page.tsx b/apps/web/src/app/playlists/page.tsx
index e149524..df52507 100644
--- a/apps/web/src/app/playlists/page.tsx
+++ b/apps/web/src/app/playlists/page.tsx
@@ -189,6 +189,18 @@ function PlaylistCard({
setTimeout(() => setLaunched(false), 2500)
}
+ const playShuffled = () => {
+ const titles = [...(pl.tracks?.map(t => t.title) ?? [])]
+ if (!titles.length) return
+ for (let i = titles.length - 1; i > 0; i--) {
+ const j = Math.floor(Math.random() * (i + 1));
+ [titles[i], titles[j]] = [titles[j], titles[i]]
+ }
+ loadPlaylist(titles)
+ setLaunched(true)
+ setTimeout(() => setLaunched(false), 2500)
+ }
+
return (
@@ -229,6 +241,15 @@ function PlaylistCard({
▶ Play
)}
+ {trackCount > 1 && (
+
+ )}
- {/* Theme color picker */}
-
-
- Цветовая тема
-
-
- {ACCENT_PRESETS.map((preset, i) => (
- setAccent(i)}
- className="flex items-center gap-2 px-3 py-2 rounded-[9px] text-[12px] font-display font-semibold transition-all duration-150 cursor-pointer border"
- style={accentIdx === i
- ? { background: `rgba(${preset.rgb},0.15)`, color: preset.accent, borderColor: `${preset.accent}60` }
- : { background: 'transparent', color: '#555', borderColor: 'rgba(255,255,255,0.07)' }
- }
- >
-
- {preset.name}
-
- ))}
-
-
)
}
diff --git a/apps/web/src/store/bgStore.ts b/apps/web/src/store/bgStore.ts
new file mode 100644
index 0000000..0e03a8e
--- /dev/null
+++ b/apps/web/src/store/bgStore.ts
@@ -0,0 +1,38 @@
+'use client'
+
+import { create } from 'zustand'
+
+export type BgMode = 'orbs' | 'waves' | 'particles' | 'aurora' | 'none'
+
+export interface BgPreset {
+ id: BgMode
+ name: string
+ desc: string
+}
+
+export const BG_PRESETS: BgPreset[] = [
+ { id: 'orbs', name: 'Орбы', desc: 'Мягкие цветовые пятна' },
+ { id: 'waves', name: 'Волны', desc: 'Звуковые волны снизу' },
+ { id: 'particles', name: 'Частицы', desc: 'Плавающая сеть точек' },
+ { id: 'aurora', name: 'Аврора', desc: 'Северное сияние' },
+ { id: 'none', name: 'Нет', desc: 'Чистый фон' },
+]
+
+const KEY = 'pm_bg'
+
+interface BgStore {
+ bgMode: BgMode
+ setBg: (mode: BgMode) => void
+}
+
+export const useBgStore = create
((set) => ({
+ bgMode: (() => {
+ if (typeof window === 'undefined') return 'orbs'
+ const saved = localStorage.getItem(KEY) as BgMode | null
+ return saved && BG_PRESETS.some(p => p.id === saved) ? saved : 'orbs'
+ })(),
+ setBg: (mode) => {
+ if (typeof window !== 'undefined') localStorage.setItem(KEY, mode)
+ set({ bgMode: mode })
+ },
+}))