feat: Nord themes, Wayland compatibility, and stability fixes (v1.0.6)

This commit is contained in:
Psychotoxical
2026-03-13 18:59:18 +01:00
parent e36a81f847
commit 85823ff4c4
20 changed files with 454 additions and 85 deletions
+9 -1
View File
@@ -74,6 +74,7 @@ interface PlayerState {
}
let progressInterval: ReturnType<typeof setInterval> | null = null;
let seekDebounce: ReturnType<typeof setTimeout> | null = null;
function clearProgress() {
if (progressInterval) {
@@ -243,8 +244,15 @@ export const usePlayerStore = create<PlayerState>()(
const { howl, currentTrack } = get();
if (!howl || !currentTrack) return;
const time = progress * (howl.duration() || currentTrack.duration);
howl.seek(time);
// Update UI immediately for responsiveness
set({ progress, currentTime: time });
// Debounce the actual seek — GStreamer on Linux stalls if two seeks arrive
// before the first one completes (reproducible after the 2nd seek)
if (seekDebounce) clearTimeout(seekDebounce);
seekDebounce = setTimeout(() => {
get().howl?.seek(time);
seekDebounce = null;
}, 100);
},
setVolume: (v) => {
+1 -1
View File
@@ -1,7 +1,7 @@
import { create } from 'zustand';
import { persist } from 'zustand/middleware';
type Theme = 'mocha' | 'latte';
type Theme = 'mocha' | 'macchiato' | 'frappe' | 'latte' | 'nord' | 'nord-snowstorm' | 'nord-frost' | 'nord-aurora';
interface ThemeState {
theme: Theme;