Skip to content

Commit

Permalink
fix(ui): Update InstallBanner to hide on mobile devices (#903)
Browse files Browse the repository at this point in the history
  • Loading branch information
lgmarchi authored Dec 2, 2024
1 parent 000fdc8 commit a086f60
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/lib/components/ui/InstallBanner.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,11 @@
return localStorage.getItem("install-banner-dismissed") === "true"
}
let showBanner = !(isElectron() || isTauri() || isCapacitor() || isBannerClosed())
function isMobile(): boolean {
return /Android|iPhone|iPad|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)
}
let showBanner = !(isElectron() || isTauri() || isMobile() || isBannerClosed())
let platform = detectPlatform()
function closeBanner() {
Expand Down

0 comments on commit a086f60

Please sign in to comment.