feat(ui): add gapless playback toggle button to player bar
Add a toggleable gapless button next to the repeat button in the NowPlayingBar. The setting persists in audio_settings.db and controls whether the audio thread pre-queues the next track for gapless transitions. Includes i18n keys for all 4 locales.
This commit is contained in:
1 parent
a21f7c7a93
commit
71bfb8dc17
9 files changed
+77
-7
No files matched your search
@@ -7,6 +7,7 @@
|
||||
SkipForward,
|
||||
Repeat,
|
||||
Repeat1,
|
||||
Disc3,
|
||||
Heart,
|
||||
Plus,
|
||||
Volume2,
|
||||
@@ -72,6 +73,8 @@
|
||||
normalizationEnabled?: boolean;
|
||||
normalizationGain?: number | null;
|
||||
onToggleNormalization?: () => void;
|
||||
gaplessEnabled?: boolean;
|
||||
onToggleGapless?: () => void;
|
||||
}
|
||||
|
||||
let {
|
||||
@@ -116,7 +119,9 @@
|
||||
queueOpen = false,
|
||||
normalizationEnabled = false,
|
||||
normalizationGain = null,
|
||||
onToggleNormalization
|
||||
onToggleNormalization,
|
||||
gaplessEnabled = false,
|
||||
onToggleGapless
|
||||
}: Props = $props();
|
||||
|
||||
let progressRef: HTMLDivElement;
|
||||
@@ -274,6 +279,15 @@
|
||||
{/if}
|
||||
</button>
|
||||
|
||||
<button
|
||||
class="control-btn"
|
||||
class:active={gaplessEnabled}
|
||||
onclick={onToggleGapless}
|
||||
title={gaplessEnabled ? $t('player.gaplessOn') : $t('player.gaplessOff')}
|
||||
>
|
||||
<Disc3 size={16} />
|
||||
</button>
|
||||
|
||||
<button class="control-btn" onclick={onAddToPlaylist} title={$t('actions.addToPlaylist')}>
|
||||
<Plus size={16} />
|
||||
</button>
|
||||
|
||||
@@ -369,6 +369,8 @@
|
||||
"repeatAll": "Alles wiederholen",
|
||||
"repeatOne": "Einen wiederholen",
|
||||
"repeatOff": "Wiederholung aus",
|
||||
"gaplessOn": "Lückenlos: Ein",
|
||||
"gaplessOff": "Lückenlos: Aus",
|
||||
"previous": "Vorherige",
|
||||
"next": "Nächste",
|
||||
"play": "Abspielen",
|
||||
|
||||
@@ -383,6 +383,8 @@
|
||||
"repeatAll": "Repeat All",
|
||||
"repeatOne": "Repeat One",
|
||||
"repeatOff": "Repeat Off",
|
||||
"gaplessOn": "Gapless: On",
|
||||
"gaplessOff": "Gapless: Off",
|
||||
"previous": "Previous",
|
||||
"next": "Next",
|
||||
"play": "Play",
|
||||
|
||||
@@ -383,6 +383,8 @@
|
||||
"repeatAll": "Repetir Todo",
|
||||
"repeatOne": "Repetir Una",
|
||||
"repeatOff": "No Repetir",
|
||||
"gaplessOn": "Sin pausas: Activado",
|
||||
"gaplessOff": "Sin pausas: Desactivado",
|
||||
"previous": "Anterior",
|
||||
"next": "Siguiente",
|
||||
"play": "Reproducir",
|
||||
|
||||
@@ -369,6 +369,8 @@
|
||||
"repeatAll": "Répéter tout",
|
||||
"repeatOne": "Répéter un",
|
||||
"repeatOff": "Répéter désactivé",
|
||||
"gaplessOn": "Sans coupure : Activé",
|
||||
"gaplessOff": "Sans coupure : Désactivé",
|
||||
"previous": "Précédent",
|
||||
"next": "Suivant",
|
||||
"play": "Lecture",
|
||||
|
||||
Reference in new issue
Block a user