mirror of
https://github.com/GMWalletApp/epusdt.git
synced 2026-07-07 02:06:16 +00:00
09514a6946
- skip SPA fallback for `/install` and `/install/*` in main server - keep install wizard accessible only during `RunInstallServer` phase - prevent post-install access to install UI
1 line
3.7 KiB
JavaScript
1 line
3.7 KiB
JavaScript
import{Ds as e,Es as t,Eu as n,Ns as r,Tu as i,_u as a,ku as o,n as s,vu as c,xu as l}from"./messages-xqHXgrWc.js";import{i as u}from"./auth-store-Cp1Qr8YS.js";import{t as d}from"./link-CKQegE2A.js";import{B as f,I as p,R as m,d as h,f as g,h as _,j as v,l as y,n as b,o as x,p as S,u as C,z as w}from"./search-provider-udckA1q-.js";import{i as T,t as E}from"./button-BQECWbag.js";import{a as D,i as O,l as k,o as A,r as j,s as M,t as N}from"./dropdown-menu-DmhEvuLR.js";import{t as P}from"./separator-DnDg5F8J.js";import{_ as F}from"./command-Kxl1kgbj.js";var I=o(n(),1),L=i();function R(){let[n,i]=y(),[o,l]=(0,I.useState)(!1),{user:v}=u(),b=v?.username?.trim()||s(),T=b.charAt(0).toUpperCase()||`U`,P=v?.last_login_at?e({time:x(v.last_login_at)}):t();return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(p,{onOpenChange:l,open:o,children:(0,L.jsx)(_,{})}),(0,L.jsxs)(N,{modal:!1,children:[(0,L.jsx)(k,{asChild:!0,children:(0,L.jsx)(E,{className:`relative h-8 w-8 rounded-full`,variant:`ghost`,children:(0,L.jsxs)(C,{className:`h-8 w-8`,children:[(0,L.jsx)(g,{alt:b,src:`/avatars/01.png`}),(0,L.jsx)(h,{children:T})]})})}),(0,L.jsxs)(j,{align:`end`,className:`w-56`,forceMount:!0,children:[(0,L.jsx)(A,{className:`p-0 font-normal`,children:(0,L.jsxs)(`div`,{className:`flex items-center gap-2 px-1 py-1.5 text-start text-sm`,children:[(0,L.jsxs)(C,{className:`h-8 w-8 rounded-lg`,children:[(0,L.jsx)(g,{alt:b,src:`/avatars/01.png`}),(0,L.jsx)(h,{className:`rounded-lg`,children:T})]}),(0,L.jsxs)(`div`,{className:`grid flex-1 text-start text-sm leading-tight`,children:[(0,L.jsx)(`span`,{className:`truncate font-semibold`,children:b}),(0,L.jsx)(`span`,{className:`truncate text-muted-foreground text-xs`,children:P})]})]})}),(0,L.jsx)(M,{}),(0,L.jsxs)(O,{children:[(0,L.jsx)(D,{asChild:!0,children:(0,L.jsxs)(d,{to:`/account/password`,children:[(0,L.jsx)(f,{className:`mr-2 size-4`}),c()]})}),(0,L.jsxs)(D,{onClick:()=>l(!0),onSelect:e=>e.preventDefault(),children:[(0,L.jsx)(m,{className:`mr-2 size-4`}),r()]})]}),(0,L.jsx)(M,{}),(0,L.jsxs)(D,{onClick:()=>i(!0),variant:`destructive`,children:[(0,L.jsx)(w,{className:`mr-2 size-4`}),a()]})]})]}),(0,L.jsx)(S,{onOpenChange:i,open:!!n})]})}function z({className:e=``,placeholder:t}){let{setOpen:n}=b();return(0,L.jsxs)(E,{className:T(`group relative h-8 w-full flex-1 justify-start rounded-md bg-muted/25 font-normal text-muted-foreground text-sm shadow-none hover:bg-accent sm:w-40 sm:pe-12 md:flex-none lg:w-52 xl:w-64`,e),onClick:()=>n(!0),variant:`outline`,children:[(0,L.jsx)(F,{"aria-hidden":`true`,className:`absolute inset-s-1.5 top-1/2 -translate-y-1/2`,size:16}),(0,L.jsx)(`span`,{className:`ms-4`,children:t??l()}),(0,L.jsxs)(`kbd`,{className:`pointer-events-none absolute inset-e-[0.3rem] top-[0.3rem] hidden h-5 select-none items-center gap-1 rounded border bg-muted px-1.5 font-medium font-mono text-[10px] opacity-100 group-hover:bg-accent sm:flex`,children:[(0,L.jsx)(`span`,{className:`text-xs`,children:`⌘`}),`K`]})]})}function B({className:e,fixed:t,children:n,...r}){let[i,a]=(0,I.useState)(0);return(0,I.useEffect)(()=>{let e=()=>{a(document.body.scrollTop||document.documentElement.scrollTop)};return document.addEventListener(`scroll`,e,{passive:!0}),()=>document.removeEventListener(`scroll`,e)},[]),(0,L.jsx)(`header`,{className:T(`z-50 h-16`,t&&`header-fixed peer/header sticky top-0 w-[inherit]`,i>10&&t?`shadow`:`shadow-none`,e),...r,children:(0,L.jsxs)(`div`,{className:T(`relative flex h-full items-center gap-3 p-4 sm:gap-4`,i>10&&t&&`after:absolute after:inset-0 after:-z-10 after:bg-background/20 after:backdrop-blur-lg`),children:[(0,L.jsx)(v,{className:`max-md:scale-125`,variant:`outline`}),(0,L.jsx)(P,{className:`h-6`,orientation:`vertical`}),n]})})}export{z as n,R as r,B as t}; |