Убрана кнопка A2HS и ссылка «Как проверить» из футера; ссылка в модалке оформлена карточкой.
devops-tools/wrapped/wrapped-build/pipeline/head This commit looks good
devops-tools/wrapped/wrapped-deploy/pipeline/head This commit looks good

This commit is contained in:
Sergey Antropoff
2026-07-30 00:25:46 +03:00
parent e80b2e1628
commit 81afba2362
5 changed files with 72 additions and 107 deletions
+4 -10
View File
@@ -106,11 +106,8 @@
"verify.s5.title": "Available from",
"verify.s5.body": "If \"available from\" is set, unwrap is rejected until that time. After that, normal open/expiry rules apply.",
"verify.createCta": "Create a wrap",
"about.verifyLink": "How to verify",
"footer.verify": "How to verify",
"install.aria": "Add to Home Screen",
"install.tip": "Install Wrapped",
"install.iosTip": "Share → Add to Home Screen",
"about.verifyLink": "How to verify",
"about.verifyHint": "What the server sees and how the #key works",
"admin.limits.maxOpens": "Max opens per wrap",
"admin.limits.maxOpensHint": "Ceiling for create UI (110). Default: 3.",
"create.ttl.default": "Default ({seconds} s)",
@@ -413,11 +410,8 @@
"verify.s5.title": "Доступно с",
"verify.s5.body": "Если задано «доступно с», unwrap отклоняется до этого момента. Дальше действуют обычные правила открытий и срока.",
"verify.createCta": "Создать wrap",
"about.verifyLink": "Как проверить",
"footer.verify": "Как проверить",
"install.aria": "На экран «Домой»",
"install.tip": "Установить Wrapped",
"install.iosTip": "Поделиться → На экран «Домой»",
"about.verifyLink": "Как проверить",
"about.verifyHint": "Что видит сервер и как работает ключ в #…",
"admin.limits.maxOpens": "Макс. открытий на wrap",
"admin.limits.maxOpensHint": "Потолок для UI создания (1–10). По умолчанию: 3.",
"create.ttl.default": "По умолчанию ({seconds} с)",
-60
View File
@@ -1,60 +0,0 @@
(() => {
const t = (k, vars) => window.WrappedI18n?.t(k, vars) || k;
const btn = document.getElementById("install-app");
if (!btn) return;
let deferredPrompt = null;
const isIos =
/iphone|ipad|ipod/i.test(navigator.userAgent) ||
(navigator.platform === "MacIntel" && navigator.maxTouchPoints > 1);
const isStandalone =
window.matchMedia("(display-mode: standalone)").matches ||
window.navigator.standalone === true;
function syncLabels() {
btn.setAttribute("aria-label", t("install.aria"));
const tip = btn.querySelector(".ui-tooltip");
if (tip) tip.textContent = t(isIos ? "install.iosTip" : "install.tip");
}
function showBtn() {
if (isStandalone) {
btn.classList.add("hidden");
return;
}
btn.classList.remove("hidden");
}
window.addEventListener("beforeinstallprompt", (e) => {
e.preventDefault();
deferredPrompt = e;
showBtn();
syncLabels();
});
if (isIos && !isStandalone) {
showBtn();
}
btn.addEventListener("click", async () => {
if (deferredPrompt) {
deferredPrompt.prompt();
try {
await deferredPrompt.userChoice;
} catch {
/* ignore */
}
deferredPrompt = null;
return;
}
if (isIos) {
window.WrappedUI?.showBusy?.(t("install.iosTip"));
setTimeout(() => window.WrappedUI?.hideBusy?.(), 2200);
}
});
if (window.WrappedI18n?.onChange) {
window.WrappedI18n.onChange(syncLabels);
}
syncLabels();
})();