PageSourceSearch

https://herpowerapp.com/assets/Install-Arl2YcSf.js

js herpowerapp.com collected 2026-10-09 22:03:58 UTC 7,648 bytes, 1 lines download raw bytes

1import{b as p,r as t,j as e,C as b,y as j,aH as g,z as f,I as N,a as w,B as l,a5 as y}from"./index-DO0ZNUzu.js";import{C as k}from"./circle-check-big-DrR00IgM.js";const C=()=>{const n=p(),[r,o]=t.useState(null),[i,c]=t.useState(!1),[x,d]=t.useState(!1),[v,a]=t.useState(!1);t.useEffect(()=>{if(window.matchMedia("(display-mode: standalone)").matches){d(!0);return}const s=m=>{console.log("beforeinstallprompt event fired"),m.preventDefault(),o(m),c(!0)};window.addEventListener("beforeinstallprompt",s);const u=setTimeout(()=>{r||(console.log("No install prompt available, showing manual instructions"),a(!0))},2e3);return()=>{clearTimeout(u),window.removeEventListener("beforeinstallprompt",s)}},[r]);const h=async()=>{if(!r){console.log("No deferred prompt available"),a(!0);return}try{console.log("Prompting install"),r.prompt();const{outcome:s}=await r.userChoice;console.log("User choice:",s),s==="accepted"&&d(!0),o(null),c(!1)}catch(s){console.error("Install error:",s),a(!0)}};return e.jsx("div",{className:"min-h-screen bg-background p-4 flex items-center justify-center",children:e.jsxs(b,{className:"max-w-lg w-full",children:[e.jsxs(j,{className:"text-center",children:[e.jsx("div",{className:"w-24 h-24 mx-auto mb-4 rounded-2xl bg-primary/10 flex items-center justify-center animate-pulse shadow-lg shadow-primary/30",children:e.jsx(g,{className:"w-12 h-12 text-primary drop-shadow-[0_0_8px_rgba(219,39,119,0.5)]"})}),e.jsx(f,{className:"text-2xl text-primary",children:"Install HERPower"}),e.jsx(N,{children:"Get quick access to your wellness journey from your home screen"}),i&&e.jsx("div",{className:"mt-3 px-4 py-2 bg-green-100 dark:bg-green-900/30 rounded-lg",children:e.jsx("p",{className:"text-xs text-green-800 dark:text-green-200 font-medium",children:"✓ Your browser supports one-click installation!"})})]}),e.jsx(w,{className:"space-y-6",children:x?e.jsxs("div",{className:"text-center space-y-4",children:[e.jsx(k,{className:"w-16 h-16 text-green-500 mx-auto"}),e.jsx("p",{className:"text-lg font-semibold",children:"Already Installed!"}),e.jsx("p",{className:"text-muted-foreground",children:"You can access HERPower from your home screen"}),e.jsx(l,{onClick:()=>n("/dashboard"),className:"w-full",children:"Go to App"})]}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("div",{className:"w-8 h-8 rounded-full bg-primary/10 flex items-center justify-center flex-shrink-0",children:e.jsx("span",{className:"text-primary font-semibold",children:"1"})}),e.jsxs("div",{children:[e.jsx("h3",{className:"font-semibold",children:"Works Offline"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Access your affirmations and journal even without internet"})]})]}),e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("div",{className:"w-8 h-8 rounded-full bg-primary/10 flex items-center justify-center flex-shrink-0",children:e.jsx("span",{className:"text-primary font-semibold",children:"2"})}),e.jsxs("div",{children:[e.jsx("h3",{className:"font-semibold",children:"Quick Access"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Launch directly from your home screen like any other app"})]})]}),e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("div",{className:"w-8 h-8 rounded-full bg-primary/10 flex items-center justify-center flex-shrink-0",children:e.jsx("span",{className:"text-primary font-semibold",children:"3"})}),e.jsxs("div",{children:[e.jsx("h3",{className:"font-semibold",children:"No App Store Needed"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Install directly from your browser, no downloads required"})]})]})]}),i?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"p-3 bg-green-50 dark:bg-green-900/20 border border-green-200 dark:border-green-800 rounded-lg",children:e.jsxs("p",{className:"text-sm text-green-800 dark:text-green-200",children:[e.jsx("strong",{children:"Good news!"})," Your browser (Chrome or Edge) supports automatic installation. Just click the button below to install HERPower instantly."]})}),e.jsxs(l,{onClick:h,className:"w-full bg-primary hover:bg-primary/90 text-primary-foreground shadow-lg shadow-primary/30 hover:shadow-xl hover:shadow-
1primary/40 transition-all duration-300 text-lg py-6",size:"lg",children:[e.jsx(y,{className:"mr-2 h-6 w-6"}),"Install Now"]})]}):e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"p-4 bg-blue-50 dark:bg-blue-900/20 border border-blue-200 dark:border-blue-800 rounded-lg",children:[e.jsx("p",{className:"text-sm font-semibold mb-2 text-blue-900 dark:text-blue-200",children:"📱 Manual Installation Required"}),e.jsx("p",{className:"text-sm text-blue-800 dark:text-blue-300 mb-3",children:"Your browser (Safari, Firefox, or other) requires manual installation. Follow the steps below for your device:"})]}),e.jsx("div",{className:"p-4 bg-muted rounded-lg border-2 border-primary/20",children:e.jsxs("p",{className:"text-sm space-y-2",children:[e.jsx("strong",{className:"text-foreground text-base",children:"📱 On iPhone/iPad (Safari):"}),e.jsx("br",{}),e.jsx("br",{}),e.jsxs("span",{className:"block",children:[e.jsx("strong",{children:"Step 1:"})," Make sure you're using Safari browser (not Chrome or other browsers)"]}),e.jsx("br",{}),e.jsxs("span",{className:"block",children:[e.jsx("strong",{children:"Step 2:"})," At the bottom of your screen (iPhone) or top of your screen (iPad), look for the ",e.jsx("strong",{children:"Share button"})," - it looks like a square with an arrow pointing up ",e.jsx("span",{className:"inline-block text-lg",children:"📤"})]}),e.jsx("br",{}),e.jsxs("span",{className:"block",children:[e.jsx("strong",{children:"Step 3:"})," Tap the Share button. A menu will slide up from the bottom"]}),e.jsx("br",{}),e.jsxs("span",{className:"block",children:[e.jsx("strong",{children:"Step 4:"})," Scroll down in this menu until you see ",e.jsx("strong",{children:'"Add to Home Screen"'})," with a plus (+) icon. Tap it"]}),e.jsx("br",{}),e.jsxs("span",{className:"block",children:[e.jsx("strong",{children:"Step 5:"}),` You'll see a preview with "HERPower" as the name. Tap the blue `,e.jsx("strong",{children:'"Add"'})," button in the top right corner"]}),e.jsx("br",{}),e.jsxs("span",{className:"block",children:[e.jsx("strong",{children:"Step 6:"})," Look for the HERPower icon on your home screen - it's a pink heart with a crown! ✨"]}),e.jsx("br",{}),e.jsx("br",{}),e.jsx("span",{className:"block text-xs text-muted-foreground italic",children:`💡 Tip: If you don't see "Add to Home Screen", scroll down more in the Share menu - it's usually in the second row of options`})]})}),e.jsx("div",{className:"p-4 bg-muted rounded-lg",children:e.jsxs("p",{className:"text-sm",children:[e.jsx("strong",{className:"text-foreground",children:"On Android:"}),e.jsx("br",{}),"1. Tap the menu button ",e.jsx("span",{className:"inline-block text-lg",children:"⋮"})," in your browser",e.jsx("br",{}),'2. Select "Install app" or "Add to Home screen"',e.jsx("br",{}),'3. Confirm by tapping "Install"']})}),e.jsx("div",{className:"p-4 bg-muted rounded-lg",children:e.jsxs("p",{className:"text-sm",children:[e.jsx("strong",{className:"text-foreground",children:"On Desktop (Chrome/Edge):"}),e.jsx("br",{}),"1. Look for the install icon ",e.jsx("span",{className:"inline-block text-lg",children:"⊕"})," in the address bar",e.jsx("br",{}),'2. Click it and select "Install"']})})]}),e.jsx(l,{onClick:()=>n("/dashboard"),variant:"outline",className:"w-full",children:"Continue in Browser"})]})})]})})};export{C 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.