Move app installation to a prominent header button

This commit is contained in:
syntaxbullet
2026-10-25 14:43:55 +01:00
parent 61001188b7
commit 7be401d105
2 changed files with 3 additions and 3 deletions

View File

@@ -1,4 +1,5 @@
import { useState } from "react";
import { Download } from "lucide-react";
import { applyUpdate, installApp, useOnline, usePwa } from "../pwa/client";
import { Button } from "./design-system/primitives";
import { Modal } from "./design-system/Modal";
@@ -8,7 +9,7 @@ export function InstallApp() {
const [help, setHelp] = useState(false);
if (!enabled || installed) return null;
return <>
<Button variant="text" onClick={() => { if (installPrompt) void installApp(); else setHelp(true); }}>Install app</Button>
<Button variant="primary" onClick={() => { if (installPrompt) void installApp(); else setHelp(true); }}><Download size={16} aria-hidden="true" />Install app</Button>
{help && <Modal id="install-app" size="compact" title="Install app" onClose={() => setHelp(false)}>
<div className="ds-form-stack">
<p><strong>iPhone or iPad:</strong> open the Share menu, then choose Add to Home Screen.</p>