fix(mobile): anchor install tooltip to viewport right edge
This commit is contained in:
parent
6d53625579
commit
de5130e31f
|
|
@ -1,8 +1,8 @@
|
||||||
const isLocalhost = self.location.hostname === "localhost" || self.location.hostname === "127.0.0.1";
|
const isLocalhost = self.location.hostname === "localhost" || self.location.hostname === "127.0.0.1";
|
||||||
|
|
||||||
if (!isLocalhost) {
|
if (!isLocalhost) {
|
||||||
const STATIC_CACHE = "construction-delivery-static-v102";
|
const STATIC_CACHE = "construction-delivery-static-v103";
|
||||||
const RUNTIME_CACHE = "construction-delivery-runtime-v102";
|
const RUNTIME_CACHE = "construction-delivery-runtime-v103";
|
||||||
const APP_SHELL_URLS = ["/", "/index.html", "/manifest.webmanifest", "/icons/icon-192.png", "/icons/icon-512.png"];
|
const APP_SHELL_URLS = ["/", "/index.html", "/manifest.webmanifest", "/icons/icon-192.png", "/icons/icon-512.png"];
|
||||||
|
|
||||||
self.addEventListener("install", (event) => {
|
self.addEventListener("install", (event) => {
|
||||||
|
|
|
||||||
|
|
@ -51,7 +51,7 @@ export const PwaInstallButton = ({ onInstall, isInstalled, isInstallAvailable })
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
{showTip && (
|
{showTip && (
|
||||||
<div className="absolute right-0 top-full z-50 mt-2 w-60 rounded-xl border border-[var(--color-border)] bg-[var(--color-surface)] p-3 text-sm shadow-lg">
|
<div className="fixed right-3 top-14 z-[100] mt-2 w-64 rounded-xl border border-[var(--color-border)] bg-[var(--color-surface)] p-3 text-sm shadow-2xl sm:absolute sm:right-0 sm:top-full sm:w-60 sm:mt-2 sm:shadow-lg">
|
||||||
{isIOS ? (
|
{isIOS ? (
|
||||||
<>
|
<>
|
||||||
<p className="font-medium">Установка на iOS</p>
|
<p className="font-medium">Установка на iOS</p>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue