PageSourceSearch

https://simpleflightplanner.com/assets/Install-Dz202nmZ.js

js simpleflightplanner.com collected 2026-10-09 22:03:46 UTC 7,440 bytes, 11 lines download raw bytes

1import{q as j,r as d,s as v,j as e,S as b,L as u,P as x,C as a,f as t,aN as w,B as f,a7 as y,d as I,e as S,ac as k,aO as P,W as A,au as D}from"./index-FGpVx5RF.js";import{A as C}from"./arrow-left-D4A3Ci2E.js";/**
2 * @license lucide-react v0.462.0 - ISC
3 *
4 * This source code is licensed under the ISC license.
5 * See the LICENSE file in the root directory of this source tree.
6 */const O=j("Share",[["path",{d:"M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8",key:"1b2hhj"}],["polyline",{points:"16 6 12 2 8 6",key:"m901s6"}],["line",{x1:"12",x2:"12",y1:"2",y2:"15",key:"1p0rca"}]]);/**
7 * @license lucide-react v0.462.0 - ISC
8 *
9 * This source code is licensed under the ISC license.
10 * See the LICENSE file in the root directory of this source tree.
11 */const E=j("SquarePlus",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M8 12h8",key:"1wcyev"}],["path",{d:"M12 8v8",key:"napkw2"}]]);function L(){const[n,r]=d.useState(null),[m,i]=d.useState(!1),[s,c]=d.useState(!1),[N,g]=d.useState(!1);return d.useEffect(()=>{if(window.matchMedia("(display-mode: standalone)").matches){c(!0);return}const l=/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream;g(l);const o=p=>{p.preventDefault(),r(p),i(!0)};window.addEventListener("beforeinstallprompt",o);const h=()=>{c(!0),i(!1),r(null)};return window.addEventListener("appinstalled",h),()=>{window.removeEventListener("beforeinstallprompt",o),window.removeEventListener("appinstalled",h)}},[]),{isInstallable:m,isInstalled:s,isIOS:N,promptInstall:async()=>{if(!n)return!1;try{await n.prompt();const{outcome:l}=await n.userChoice;return l==="accepted"&&(c(!0),i(!1)),r(null),l==="accepted"}catch(l){return console.error("Error prompting install:",l),!1}}}}function q(){const{isInstallable:n,isInstalled:r,isIOS:m,promptInstall:i}=L(),{t:s}=v(),c=async()=>{await i()};return e.jsxs(e.Fragment,{children:[e.jsx(b,{title:"Install PWA",description:"Install Simple Flight Planner as a Progressive Web App for offline access. Plan your MSFS flights without an internet connection.",canonicalPath:"/install"}),e.jsxs("div",{className:"min-h-screen bg-background",children:[e.jsx("header",{className:"border-b border-border bg-card/50 backdrop-blur-sm sticky top-0 z-50",children:e.jsx("div",{className:"container mx-auto px-4 py-4",children:e.jsx("div",{className:"flex items-center gap-4",children:e.jsxs(u,{to:"/",className:"flex items-center gap-2 text-muted-foreground hover:text-foreground transition-colors",children:[e.jsx(C,{className:"h-4 w-4"}),e.jsx("span",{className:"text-sm",children:s("common.backToHome")})]})})})}),e.jsxs("main",{className:"container mx-auto px-4 py-12 max-w-2xl",children:[e.jsxs("div",{className:"text-center mb-12",children:[e.jsx("div",{className:"inline-flex items-center justify-center w-20 h-20 rounded-2xl bg-primary/10 mb-6",children:e.jsx(x,{className:"h-10 w-10 text-primary"})}),e.jsx("h1",{className:"text-3xl font-bold mb-4",children:s("install.title")}),e.jsx("p",{className:"text-muted-foreground text-lg",children:s("install.subtitle")})]}),r?e.jsx(a,{className:"mb-8 border-success/50 bg-success/5",children:e.jsx(t,{className:"pt-6",children:e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx(w,{className:"h-8 w-8 text-success"}),e.jsxs("div",{children:[e.jsx("h3",{className:"font-semibold text-lg",children:s("install.alreadyInstalled")}),e.jsx("p",{className:"text-muted-foreground",children:s("install.alreadyInstalledDesc")})]})]})})}):n?e.jsx(a,{className:"mb-8",children:e.jsx(t,{className:"pt-6",children:e.jsxs("div",{className:"flex flex-col items-center gap-4",children:[e.jsxs(f,{size:"lg",onClick:c,className:"gap-2",children:[e.jsx(y,{className:"h-5 w-5"}),s("install.installApp")]}),e.jsx("p",{className:"text-sm text-muted-foreground text-center",children:s("install.installClick")})]})})}):m?e.jsxs(a,{className:"mb-8",children:[e.jsxs(I,{children:[e.jsx(S,{className:"text-lg",children:s("install.installIOS")}),e.jsx(k,{children:s("install.installIOSDesc")})]}),e.jsxs(t,{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-start gap-4",children:[e.jsx("div",{className:"flex items-center justify-center w-8 h-8 rounded-full bg-primary/10 text-primary font-semibold text-sm",children:"1"}),e.jsxs("div",{className:"flex-1",children:[e.jsxs("p",{className:"font-medium flex items-center gap-2",children:[s("install.ta
11pShare")," ",e.jsx(O,{className:"h-4 w-4"})]}),e.jsx("p",{className:"text-sm text-muted-foreground",children:s("install.tapShareDesc")})]})]}),e.jsxs("div",{className:"flex items-start gap-4",children:[e.jsx("div",{className:"flex items-center justify-center w-8 h-8 rounded-full bg-primary/10 text-primary font-semibold text-sm",children:"2"}),e.jsxs("div",{className:"flex-1",children:[e.jsxs("p",{className:"font-medium flex items-center gap-2",children:[s("install.tapAdd")," ",e.jsx(E,{className:"h-4 w-4"})]}),e.jsx("p",{className:"text-sm text-muted-foreground",children:s("install.tapAddDesc")})]})]}),e.jsxs("div",{className:"flex items-start gap-4",children:[e.jsx("div",{className:"flex items-center justify-center w-8 h-8 rounded-full bg-primary/10 text-primary font-semibold text-sm",children:"3"}),e.jsxs("div",{className:"flex-1",children:[e.jsx("p",{className:"font-medium",children:s("install.tapAddBtn")}),e.jsx("p",{className:"text-sm text-muted-foreground",children:s("install.tapAddBtnDesc")})]})]})]})]}):e.jsx(a,{className:"mb-8",children:e.jsx(t,{className:"pt-6",children:e.jsx("p",{className:"text-center text-muted-foreground",children:s("install.openInBrowser")})})}),e.jsx("h2",{className:"text-xl font-semibold mb-6",children:s("install.whyInstall")}),e.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[e.jsx(a,{children:e.jsx(t,{className:"pt-6",children:e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx(P,{className:"h-5 w-5 text-primary mt-0.5"}),e.jsxs("div",{children:[e.jsx("h3",{className:"font-medium mb-1",children:s("install.quickAccess")}),e.jsx("p",{className:"text-sm text-muted-foreground",children:s("install.quickAccessDesc")})]})]})})}),e.jsx(a,{children:e.jsx(t,{className:"pt-6",children:e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx(A,{className:"h-5 w-5 text-primary mt-0.5"}),e.jsxs("div",{children:[e.jsx("h3",{className:"font-medium mb-1",children:s("install.worksOffline")}),e.jsx("p",{className:"text-sm text-muted-foreground",children:s("install.worksOfflineDesc")})]})]})})}),e.jsx(a,{children:e.jsx(t,{className:"pt-6",children:e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx(D,{className:"h-5 w-5 text-primary mt-0.5"}),e.jsxs("div",{children:[e.jsx("h3",{className:"font-medium mb-1",children:s("install.autoUpdates")}),e.jsx("p",{className:"text-sm text-muted-foreground",children:s("install.autoUpdatesDesc")})]})]})})}),e.jsx(a,{children:e.jsx(t,{className:"pt-6",children:e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx(x,{className:"h-5 w-5 text-primary mt-0.5"}),e.jsxs("div",{children:[e.jsx("h3",{className:"font-medium mb-1",children:s("install.fullScreen")}),e.jsx("p",{className:"text-sm text-muted-foreground",children:s("install.fullScreenDesc")})]})]})})})]}),e.jsx("div",{className:"mt-12 text-center",children:e.jsx(u,{to:"/planner",children:e.jsxs(f,{variant:"outline",className:"gap-2",children:[e.jsx(x,{className:"h-4 w-4"}),s("common.goToPlanner")]})})})]})]})]})}export{q as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.