Fix PWA redirect loop and installation options after uninstalling PWA
This commit is contained in:
@@ -54,7 +54,7 @@ export class SettingsService {
|
||||
public karaokePageScrollMode = signal<boolean>(false);
|
||||
|
||||
/** Vista orizzontale per proiezione: true = attiva layout landscape per proiezione */
|
||||
public landscapeProjectionEnabled = signal<boolean>(true);
|
||||
public landscapeProjectionEnabled = signal<boolean>(false);
|
||||
|
||||
/** Identificativo utente univoco per la gestione delle comunità */
|
||||
public userUuid = signal<string>('');
|
||||
@@ -251,7 +251,7 @@ export class SettingsService {
|
||||
if (savedLandscapeProjectionEnabled !== null) {
|
||||
this.landscapeProjectionEnabled.set(savedLandscapeProjectionEnabled === 'true');
|
||||
} else {
|
||||
this.landscapeProjectionEnabled.set(true);
|
||||
this.landscapeProjectionEnabled.set(false);
|
||||
}
|
||||
|
||||
// Sync browser fullscreen state with listeners (supporting vendor prefixes)
|
||||
@@ -464,10 +464,10 @@ export class SettingsService {
|
||||
localStorage.setItem('user-name', trimmed);
|
||||
}
|
||||
|
||||
async installPwa() {
|
||||
async installPwa(): Promise<string | undefined> {
|
||||
const promptEvent = this.deferredPrompt();
|
||||
if (!promptEvent) {
|
||||
return;
|
||||
return undefined;
|
||||
}
|
||||
// Show the install prompt
|
||||
promptEvent.prompt();
|
||||
@@ -477,5 +477,6 @@ export class SettingsService {
|
||||
// We've used the prompt, and can't use it again, discard it
|
||||
this.deferredPrompt.set(null);
|
||||
this.showInstallButton.set(false);
|
||||
return outcome;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user