Skip to content

Commit

Permalink
Implemented apple detection
Browse files Browse the repository at this point in the history
  • Loading branch information
jirkapok committed Oct 6, 2024
1 parent a4feb2f commit 43a439c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion projects/planner/src/app/shared/startUp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,10 @@ export class DashboardStartUp {
}

public get showAppleInstall(): boolean {
return true;
const userAgent = window.navigator.userAgent.toLowerCase();
const isIOs = /iphone|ipad|ipod/.test(userAgent);
const isInStandaloneMode = ('standalone' in window.navigator) && (window.navigator.standalone);
return isIOs && !isInStandaloneMode;
}

public onDashboard(): void {
Expand Down

0 comments on commit 43a439c

Please sign in to comment.