fix(core): update
This commit is contained in:
12
ts/webdetector.classes.pwa.ts
Normal file
12
ts/webdetector.classes.pwa.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
export class Pwa {
|
||||
public isInstalled(): boolean {
|
||||
let isInstalled: boolean;
|
||||
if (globalThis?.matchMedia?.('(display-mode: standalone)').matches) {
|
||||
isInstalled = true;
|
||||
console.log('PWA installed');
|
||||
} else {
|
||||
isInstalled = false;
|
||||
}
|
||||
return isInstalled;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user