Als App auf dem PC installierbar — mit gut sichtbarem Installations-Button

Die Icons/Manifeste waren schon vorbereitet, aber es gab keinen echten
Weg, die Installation auch zu STARTEN, ohne das kleine, leicht zu
übersehende Icon im Browser selbst zu suchen. Jetzt:

- Ein Service Worker (public/sw.js) ist Voraussetzung dafür, dass
  Browser die Seite überhaupt als "installierbare App" erkennen. Bewusst
  minimal gehalten: strikt "network-first" — bei bestehender Verbindung
  wird IMMER zuerst das echte Netzwerk gefragt, der Cache dient nur als
  Rückfalllösung, wenn wirklich keine Verbindung besteht. Dadurch besteht
  KEIN Risiko, dass der Adminbereich veraltete Inhalte zeigt, während man
  online ist — als Bonus funktionieren bereits besuchte Seiten aber auch
  kurz offline (mit echtem Offline-Test geprüft).
- Neuer "Installieren"-Button direkt in der Kopfzeile (Hauptseite) bzw.
  unten rechts (Adminbereich) — erscheint automatisch, sobald der
  Browser eine Installation wirklich anbietet, verschwindet danach
  wieder bzw. bleibt komplett versteckt, wenn schon als App installiert.
  Ein Klick reicht, kein Suchen im Browser-Menü mehr nötig.
- Beide Bereiche (Hauptseite + Admin) nutzen dieselben, bereits
  vorhandenen Logo-Icons/Manifeste — landet also mit dem echten
  VanVan-Logo auf dem Startbildschirm/Desktop.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
This commit is contained in:
qcigano
2026-08-03 00:16:23 +02:00
co-authored by Claude Sonnet 5
parent 0ff6412e1e
commit 4aee6c7b98
4 changed files with 169 additions and 0 deletions
+4
View File
@@ -23,6 +23,7 @@ export const ui = {
onlyXLeft: (n: string) => `Nur noch ${n} auf Lager`, maxInCart: "Maximale verfügbare Menge ist bereits im Warenkorb", maxInCartShort: "Bereits im Warenkorb",
browseShop: "Jetzt stöbern", viewAll: "Alle ansehen →", viewAllSale: "Alle Angebote →",
toShop: "Zum Shop →", moreAboutMe: "Mehr über mich →", discoverNow: "Jetzt entdecken",
installApp: "App installieren", installAppShort: "Installieren",
vatNote: "Gemäß §19 UStG wird keine Umsatzsteuer berechnet und ausgewiesen.",
allPricesPlusShipping: "Alle Preise zzgl. Versand.", plusShipping: "zzgl. Versand",
quantity: "Anzahl", photoSoon: "Produktfoto folgt", portraitSoon: "Porträtfoto von VanVan folgt",
@@ -210,6 +211,7 @@ export const ui = {
onlyXLeft: (n: string) => `Only ${n} left in stock`, maxInCart: "The maximum available quantity is already in your cart", maxInCartShort: "Already in cart",
browseShop: "Browse now", viewAll: "View all →", viewAllSale: "View all offers →",
toShop: "To the shop →", moreAboutMe: "More about me →", discoverNow: "Discover now",
installApp: "Install app", installAppShort: "Install",
vatNote: "Under §19 UStG (German small-business rule) no VAT is charged or shown.",
allPricesPlusShipping: "All prices plus shipping.", plusShipping: "plus shipping",
quantity: "Quantity", photoSoon: "Product photo coming soon", portraitSoon: "VanVan's portrait photo coming soon",
@@ -397,6 +399,7 @@ export const ui = {
onlyXLeft: (n: string) => `Nume no ${n} a Lager`, maxInCart: "D'maximal verfügbari Mengi isch scho im Warenchorb", maxInCartShort: "Scho im Warenchorb",
browseShop: "Jetzt use luege", viewAll: "Alles aluege →", viewAllSale: "Alli Aktione →",
toShop: "Zum Shop →", moreAboutMe: "Meh über mich →", discoverNow: "Jetzt aluege",
installApp: "App installiere", installAppShort: "Installiere",
vatNote: "Gemäss §19 UStG (dütsches Rächt) wird kei Umsatzsteuer berechnet und usgwiese.",
allPricesPlusShipping: "Alli Pryse zzgl. Versand.", plusShipping: "zzgl. Versand",
quantity: "Aazahl", photoSoon: "Produktfoto chunnt bald", portraitSoon: "Porträtfoto vo VanVan chunnt bald",
@@ -584,6 +587,7 @@ export const ui = {
onlyXLeft: (n: string) => `Plus que ${n} en stock`, maxInCart: "La quantité maximale disponible est déjà dans votre panier", maxInCartShort: "Déjà dans le panier",
browseShop: "Découvrir la boutique", viewAll: "Tout voir →", viewAllSale: "Toutes les offres →",
toShop: "Vers la boutique →", moreAboutMe: "En savoir plus sur moi →", discoverNow: "Découvrir maintenant",
installApp: "Installer l'app", installAppShort: "Installer",
vatNote: "Conformément à l'§19 UStG (droit allemand), aucune TVA n'est calculée ni indiquée.",
allPricesPlusShipping: "Tous les prix hors frais de port.", plusShipping: "hors frais de port",
quantity: "Quantité", photoSoon: "Photo du produit à venir", portraitSoon: "Photo de VanVan à venir",