UNPKG

manifest

Version:

Self-hosted Manifest LLM router with embedded server, SQLite database, and dashboard

2 lines (1 loc) 6.37 kB
import{b as H,a as b,e as R,i as c,g as h,T as V,M as W,h as d,m as Z,s as F,S as L,t as r,d as G}from"./vendor-C-Y5oNOq.js";import{s as J,u as K,v as O,d as E,w as D}from"./index-C4Qw7vZo.js";import"./auth-CU91cd7V.js";var Q=r("<h3 class=settings-section__title>Profile information"),X=r('<div class=settings-card><div class=settings-card__row><div class=settings-card__label><span class=settings-card__label-title>Display name</span><span class=settings-card__label-desc>Name shown throughout the dashboard.</span></div><div class=settings-card__control><input class=settings-card__input type=text aria-label="Display name"readonly></div></div><div class=settings-card__row><div class=settings-card__label><span class=settings-card__label-title>Email</span><span class=settings-card__label-desc>Used for account notifications and limit alerts.</span></div><div class=settings-card__control><input class=settings-card__input type=email aria-label=Email readonly></div></div><div class=settings-card__footer><span style=font-size:var(--font-size-xs);color:hsl(var(--muted-foreground))>Profile information is managed through your authentication provider.'),ee=r("<h3 class=settings-section__title>Workspace"),te=r("<div class=settings-card><div class=settings-card__body><p class=settings-card__desc>Your unique workspace identifier. You may need this for support requests or advanced integrations.</p><div class=settings-card__id-row><code class=settings-card__id-value></code><button class=settings-card__copy-btn title=Copy>"),se=r("<h3 class=settings-section__title>Profile"),ie=r('<div class=settings-card><div class=settings-card__row><div class=settings-card__label><span class=settings-card__label-title>Display name</span><span class=settings-card__label-desc>Name shown throughout the dashboard.</span></div><div class=settings-card__control><input class=settings-card__input type=text aria-label="Display name"placeholder="Local User">'),ae=r('<div class=account-modal><div class=account-modal__inner><button class=account-modal__back><svg width=16 height=16 viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round aria-hidden=true><path d="m15 18-6-6 6-6"></path></svg>Back</button><div class=page-header><div><h1>Account Preferences</h1><span class=breadcrumb>Your profile, workspace details, and display preferences</span></div></div><h3 class=settings-section__title>Appearance</h3><div class=settings-card><div class=settings-card__body><p class=settings-card__desc>Choose how Manifest looks for you.</p><div class=theme-picker><button class=theme-picker__option><svg width=18 height=18 viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round aria-hidden=true><circle cx=12 cy=12 r=4></circle><path d="M12 2v2"></path><path d="M12 20v2"></path><path d="m4.93 4.93 1.41 1.41"></path><path d="m17.66 17.66 1.41 1.41"></path><path d="M2 12h2"></path><path d="M20 12h2"></path><path d="m6.34 17.66-1.41 1.41"></path><path d="m19.07 4.93-1.41 1.41"></path></svg>Light</button><button class=theme-picker__option><svg width=18 height=18 viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round aria-hidden=true><path d="M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z"></path></svg>Dark</button><button class=theme-picker__option><svg width=18 height=18 viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round aria-hidden=true><rect x=2 y=3 width=20 height=14 rx=2></rect><path d="M8 21h8"></path><path d="M12 17v4"></path></svg>System'),re=r('<svg width=14 height=14 viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round aria-hidden=true><polyline points="20 6 9 17 4 12">'),le=r('<svg width=14 height=14 viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round aria-hidden=true><rect x=9 y=9 width=13 height=13 rx=2></rect><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1">');const de=()=>{const N=H(),p=J.useSession(),[w,y]=b(!1),[_,g]=b("system"),[u,C]=b(""),T=()=>p()?.data?.user?.name??"",B=()=>p()?.data?.user?.email??"",x=()=>p()?.data?.user?.id??"";R(()=>{K(),C(O()||"Local User");const t=localStorage.getItem("theme");g(t==="dark"||t==="light"?t:"system")});const m=t=>{if(g(t),t==="system"){localStorage.removeItem("theme");const o=window.matchMedia("(prefers-color-scheme: dark)").matches;document.documentElement.classList.toggle("dark",o)}else localStorage.setItem("theme",t),document.documentElement.classList.toggle("dark",t==="dark")},j=()=>{navigator.clipboard.writeText(x()),y(!0),setTimeout(()=>y(!1),2e3)};return(()=>{var t=ae(),o=t.firstChild,S=o.firstChild,I=S.nextSibling,v=I.nextSibling,A=v.nextSibling,P=A.firstChild,U=P.firstChild,Y=U.nextSibling,k=Y.firstChild,f=k.nextSibling,M=f.nextSibling;return c(t,h(V,{children:"Account Preferences - Manifest"}),o),c(t,h(W,{name:"description",content:"Manage your profile, workspace, and theme preferences."}),o),S.$$click=()=>N(-1),c(o,h(L,{get when(){return!E()},get children(){return[Q(),(()=>{var e=X(),i=e.firstChild,l=i.firstChild,n=l.nextSibling,a=n.firstChild,s=i.nextSibling,$=s.firstChild,q=$.nextSibling,z=q.firstChild;return d(()=>a.value=T()),d(()=>z.value=B()),e})(),ee(),(()=>{var e=te(),i=e.firstChild,l=i.firstChild,n=l.nextSibling,a=n.firstChild,s=a.nextSibling;return c(a,x),s.$$click=j,c(s,(()=>{var $=Z(()=>!!w());return()=>$()?re():le()})()),d(()=>F(s,"aria-label",w()?"Copied":"Copy workspace ID")),e})()]}}),v),c(o,h(L,{get when(){return E()},get children(){return[se(),(()=>{var e=ie(),i=e.firstChild,l=i.firstChild,n=l.nextSibling,a=n.firstChild;return a.$$keydown=s=>{s.key==="Enter"&&(D(u()),s.currentTarget.blur())},a.addEventListener("blur",()=>D(u())),a.$$input=s=>C(s.currentTarget.value),d(()=>a.value=u()),e})()]}}),v),k.$$click=()=>m("light"),f.$$click=()=>m("dark"),M.$$click=()=>m("system"),d(e=>{var i=_()==="light",l=_()==="dark",n=_()==="system";return i!==e.e&&k.classList.toggle("theme-picker__option--active",e.e=i),l!==e.t&&f.classList.toggle("theme-picker__option--active",e.t=l),n!==e.a&&M.classList.toggle("theme-picker__option--active",e.a=n),e},{e:void 0,t:void 0,a:void 0}),t})()};G(["click","input","keydown"]);export{de as default};