feat: allinea lo swipe e lo scroll con l'avanzamento karaoke, aggiungi frecce di navigazione canti nel titolo

This commit is contained in:
David Frassi
2026-06-04 19:09:46 +02:00
parent 960c73fbd0
commit 92e955915e
12 changed files with 820 additions and 151 deletions
+20
View File
@@ -50,6 +50,9 @@ export class SettingsService {
/** Preferenza notazione accordi: diesis o bemolle */
public chordNotationPreference = signal<'diesis' | 'bemolle'>('diesis');
/** Avanzamento a pagine del karaoke manuale: true = i tasti next/prev voltano la pagina */
public karaokePageScrollMode = signal<boolean>(false);
private wakeLock: any = null;
// PWA installation signals
@@ -198,6 +201,13 @@ export class SettingsService {
this.chordNotationPreference.set('diesis');
}
const savedKaraokePageScrollMode = localStorage.getItem('karaoke-page-scroll-mode');
if (savedKaraokePageScrollMode !== null) {
this.karaokePageScrollMode.set(savedKaraokePageScrollMode === 'true');
} else {
this.karaokePageScrollMode.set(false);
}
// Sync browser fullscreen state with listeners (supporting vendor prefixes)
const updateFullscreenState = () => {
const isFs = !!(
@@ -270,6 +280,10 @@ export class SettingsService {
localStorage.setItem('chord-notation-preference', this.chordNotationPreference());
});
effect(() => {
localStorage.setItem('karaoke-page-scroll-mode', this.karaokePageScrollMode().toString());
});
effect(() => {
const active = this.keepScreenOn();
localStorage.setItem('keep-screen-on', active.toString());
@@ -396,6 +410,12 @@ export class SettingsService {
localStorage.setItem('enable-acoustic-autoscroll', newValue.toString());
}
toggleKaraokePageScrollMode() {
const newValue = !this.karaokePageScrollMode();
this.karaokePageScrollMode.set(newValue);
localStorage.setItem('karaoke-page-scroll-mode', newValue.toString());
}
setChordNotationPreference(val: 'diesis' | 'bemolle') {
this.chordNotationPreference.set(val);
}