@vtechcom/hexcore 2.0.0-beta.1 → 2.0.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (118) hide show
  1. package/CHANGELOG.md +22 -2
  2. package/README.md +6 -3
  3. package/dist/cli/hexcore.js +113 -0
  4. package/dist/cli/hexcore.js.map +1 -1
  5. package/dist/config.js +1 -1
  6. package/dist/hydra/argv.js +10 -0
  7. package/dist/hydra/argv.js.map +1 -1
  8. package/dist/hydra/capabilities.js +3 -0
  9. package/dist/hydra/capabilities.js.map +1 -1
  10. package/node_modules/@hexcore/shared/dist/cjs/hydra-versions.d.ts +12 -6
  11. package/node_modules/@hexcore/shared/dist/cjs/hydra-versions.d.ts.map +1 -1
  12. package/node_modules/@hexcore/shared/dist/cjs/hydra-versions.js +119 -38
  13. package/node_modules/@hexcore/shared/dist/cjs/hydra-versions.js.map +1 -1
  14. package/node_modules/@hexcore/shared/dist/esm/hydra-versions.js +119 -38
  15. package/node_modules/@hexcore/shared/dist/esm/hydra-versions.js.map +1 -1
  16. package/package.json +2 -2
  17. package/web/200.html +20 -18
  18. package/web/404.html +20 -18
  19. package/web/_nuxt/{DgDlQiDU.js → B-lS44p0.js} +1 -1
  20. package/web/_nuxt/{CqsSss-D.js → B1NtJEdQ.js} +1 -1
  21. package/web/_nuxt/B1ZAR7mP.js +1 -0
  22. package/web/_nuxt/BFc_bxHc.js +1 -0
  23. package/web/_nuxt/BGGQYvrr.js +1 -0
  24. package/web/_nuxt/BPQ3VLAy.js +1 -0
  25. package/web/_nuxt/BV_QiRi8.js +1 -0
  26. package/web/_nuxt/BW_3NqYy.js +1 -0
  27. package/web/_nuxt/B_DikKgJ.js +1 -0
  28. package/web/_nuxt/B_Vrwblg.js +1 -0
  29. package/web/_nuxt/Bbbbx_yO.js +1 -0
  30. package/web/_nuxt/BeS-yS0C.js +1 -0
  31. package/web/_nuxt/{Onf26W-r.js → BfFJ09wD.js} +1 -1
  32. package/web/_nuxt/{rhEiP908.js → Bj1gglGt.js} +1 -1
  33. package/web/_nuxt/BkRxDbrA.js +1 -0
  34. package/web/_nuxt/Bmqx7s9K.js +1 -0
  35. package/web/_nuxt/BnZUk6sk.js +1 -0
  36. package/web/_nuxt/BqoV-QnQ.js +3 -0
  37. package/web/_nuxt/Bv47q1hu.js +1 -0
  38. package/web/_nuxt/Bz1eTnxX.js +1 -0
  39. package/web/_nuxt/{CkCrahXt.js → CAfY3dDF.js} +1 -1
  40. package/web/_nuxt/CBchb2Up.js +1 -0
  41. package/web/_nuxt/CEGGvSzA.js +1 -0
  42. package/web/_nuxt/CG6Dc4jp.js +1 -0
  43. package/web/_nuxt/{LGfPBi70.js → CH5xbifj.js} +1 -1
  44. package/web/_nuxt/CZFMOWPc.js +1 -0
  45. package/web/_nuxt/C_n__rkq.js +1 -0
  46. package/web/_nuxt/CaWYVaRD.js +1 -0
  47. package/web/_nuxt/ChS5Np24.js +1 -0
  48. package/web/_nuxt/Cp-IABpG.js +1 -0
  49. package/web/_nuxt/Cuk6v7N8.js +1 -0
  50. package/web/_nuxt/CzTJPvyS.js +1 -0
  51. package/web/_nuxt/D-Stn6KG.js +1 -0
  52. package/web/_nuxt/D7oLnXFd.js +1 -0
  53. package/web/_nuxt/DAHap_t6.js +1 -0
  54. package/web/_nuxt/DBL-cQio.js +1 -0
  55. package/web/_nuxt/DIi866IK.js +7 -0
  56. package/web/_nuxt/DMl_I_aT.js +1 -0
  57. package/web/_nuxt/Dd34_EaM.js +1 -0
  58. package/web/_nuxt/DlAUqK2U.js +1 -0
  59. package/web/_nuxt/DlHvzKYz.js +1 -0
  60. package/web/_nuxt/DmF-LwQa.js +1 -0
  61. package/web/_nuxt/DmPn-vCY.js +1 -0
  62. package/web/_nuxt/DsttYulo.js +1 -0
  63. package/web/_nuxt/{DL9i0ayn.js → DybEwxe5.js} +1 -1
  64. package/web/_nuxt/JXuauuVw.js +41 -0
  65. package/web/_nuxt/Yzrsuije.js +1 -0
  66. package/web/_nuxt/builds/latest.json +1 -1
  67. package/web/_nuxt/builds/meta/5b0a342e-aa78-42e7-89fa-ee280f32f47a.json +1 -0
  68. package/web/_nuxt/dhmyGJu2.js +1 -0
  69. package/web/_nuxt/entry.Q53uGRvC.css +1 -0
  70. package/web/_nuxt/error-404.DL126m4x.css +1 -0
  71. package/web/_nuxt/error-500.BUVIYHmG.css +1 -0
  72. package/web/_nuxt/{YUGC0nt0.js → hza_YA5H.js} +1 -1
  73. package/web/_nuxt/index.D8biniUe.css +1 -0
  74. package/web/_nuxt/vzCX1O3u.js +1 -0
  75. package/web/_nuxt/{CZK6xUH-.js → yhvT770r.js} +1 -1
  76. package/web/heads/index.html +20 -18
  77. package/web/heads/new/index.html +20 -18
  78. package/web/index.html +20 -18
  79. package/web/login/index.html +20 -18
  80. package/web/settings/index.html +20 -18
  81. package/web/setup/index.html +20 -18
  82. package/web/_nuxt/2MxohCD-.js +0 -1
  83. package/web/_nuxt/4pFXjB_u.js +0 -1
  84. package/web/_nuxt/B-v0dEQX.js +0 -1
  85. package/web/_nuxt/B4yE3U25.js +0 -1
  86. package/web/_nuxt/BFh8Ai0L.js +0 -1
  87. package/web/_nuxt/BgPn4NJH.js +0 -1
  88. package/web/_nuxt/Bj1xviSh.js +0 -1
  89. package/web/_nuxt/BnotlrL7.js +0 -1
  90. package/web/_nuxt/C1YRg2ic.js +0 -1
  91. package/web/_nuxt/CGD7MYQH.js +0 -1
  92. package/web/_nuxt/CQcG7Bu4.js +0 -1
  93. package/web/_nuxt/CS3KqpH_.js +0 -1
  94. package/web/_nuxt/CT-yt694.js +0 -1
  95. package/web/_nuxt/CcdyYRYz.js +0 -1
  96. package/web/_nuxt/CePNTU1S.js +0 -1
  97. package/web/_nuxt/CgPLsCeU.js +0 -5
  98. package/web/_nuxt/CnOqDT9k.js +0 -3
  99. package/web/_nuxt/Cr8dL64Q.js +0 -1
  100. package/web/_nuxt/D3CwzwU0.js +0 -1
  101. package/web/_nuxt/DDANn6-H.js +0 -1
  102. package/web/_nuxt/DDl9uKIA.js +0 -1
  103. package/web/_nuxt/DLNoK9BC.js +0 -1
  104. package/web/_nuxt/DLztFeOQ.js +0 -1
  105. package/web/_nuxt/DPihKXdt.js +0 -1
  106. package/web/_nuxt/DXyr6Naa.js +0 -1
  107. package/web/_nuxt/DeDg5p0D.js +0 -1
  108. package/web/_nuxt/DyPI7qJE.js +0 -30
  109. package/web/_nuxt/QZNQe_OX.js +0 -1
  110. package/web/_nuxt/Y8IJM-iz.js +0 -1
  111. package/web/_nuxt/builds/meta/7e461629-93e2-4694-b237-6d5c6a85c97c.json +0 -1
  112. package/web/_nuxt/builds/meta/dev.json +0 -1
  113. package/web/_nuxt/entry.BxsAxZxf.css +0 -1
  114. package/web/_nuxt/error-404.XbtAw-qw.css +0 -1
  115. package/web/_nuxt/error-500.CNHVltWM.css +0 -1
  116. package/web/_nuxt/rS90pPZ_.js +0 -1
  117. package/web/_nuxt/vSj9Ec0g.js +0 -1
  118. package/web/_nuxt/woNjBJMN.js +0 -1
@@ -0,0 +1 @@
1
+ import{_ as re,a as ue,b as me,c as fe,L as pe}from"./Bj1gglGt.js";import{a as L,c as _e,_ as ge}from"./BV_QiRi8.js";import{e as A,o as c,c as u,z as q,i as e,D as F,f as ve,u as he,g as ke,s as xe,v as ye,a as o,t as n,b as s,w as a,l as U,m as _,n as P,x as be,p as te,A as se,r as we,d as r,F as h,y as Se,q as y}from"./DIi866IK.js";import{a as Ue,b as Ce,c as $e,d as je,e as Ne,_ as Ve}from"./BFc_bxHc.js";import{_ as Be,a as Ie}from"./ChS5Np24.js";import{_ as Pe}from"./BGGQYvrr.js";import{_ as Ae}from"./B_DikKgJ.js";import{_ as De}from"./CAfY3dDF.js";import{_ as He}from"./DmPn-vCY.js";import{u as Te}from"./BnZUk6sk.js";import{u as ze}from"./B1ZAR7mP.js";import{T as Xe}from"./CH5xbifj.js";import"./BqoV-QnQ.js";import"./dhmyGJu2.js";import"./yhvT770r.js";const Ee=A({__name:"CardDescription",props:{class:{type:[Boolean,null,String,Object,Array]}},setup(b){const t=b;return(k,m)=>(c(),u("p",{"data-slot":"card-description",class:q(e(L)("text-muted-foreground text-sm",t.class))},[F(k.$slots,"default")],2))}}),Le=A({__name:"CardHeader",props:{class:{type:[Boolean,null,String,Object,Array]}},setup(b){const t=b;return(k,m)=>(c(),u("div",{"data-slot":"card-header",class:q(e(L)("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",t.class))},[F(k.$slots,"default")],2))}}),qe=A({__name:"CardTitle",props:{class:{type:[Boolean,null,String,Object,Array]}},setup(b){const t=b;return(k,m)=>(c(),u("h3",{"data-slot":"card-title",class:q(e(L)("leading-none font-semibold",t.class))},[F(k.$slots,"default")],2))}});const Fe=_e("LockIcon",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]),Ke={class:"max-w-2xl"},Oe={class:"mb-1 text-xl font-semibold tracking-tight"},Re={class:"grid gap-4 sm:grid-cols-2"},Me={class:"space-y-2"},We={class:"space-y-2"},Ye={key:0,class:"space-y-2"},Ge={key:0,class:"text-xs text-destructive"},Je={key:1,class:"text-xs text-muted-foreground"},Qe={key:1,class:"space-y-2"},Ze={key:0,class:"text-xs text-destructive"},et={class:"space-y-2"},tt={class:"text-xs text-muted-foreground"},st={class:"space-y-2"},ot={class:"flex items-center gap-2"},nt={class:"text-xs text-muted-foreground"},at={class:"divide-y"},it={class:"flex items-center justify-between gap-4 px-5 py-3.5"},lt={class:"text-sm font-medium"},ct={class:"text-sm text-muted-foreground"},dt={class:"flex items-center justify-between gap-4 px-5 py-3.5"},rt={class:"text-sm font-medium"},ut={class:"font-mono text-sm text-muted-foreground"},mt={class:"flex items-center justify-between gap-4 px-5 py-3.5"},ft={class:"text-right"},pt={key:0,class:"mt-1 block text-xs text-destructive"},_t={class:"flex items-center justify-between gap-4 px-5 py-3.5"},gt={class:"text-sm font-medium"},vt={class:"text-sm text-muted-foreground"},ht={class:"flex items-center justify-between gap-4 px-5 py-3.5"},kt={class:"text-sm font-medium"},xt={class:"text-right"},yt={class:"mt-1 block font-mono text-xs text-muted-foreground"},bt={key:0,class:"mt-1 block text-xs text-muted-foreground"},wt={class:"flex items-center justify-between gap-4 px-5 py-3.5"},St={class:"text-sm font-medium"},Ut=["title"],Ct={class:"flex items-center justify-between gap-4 px-5 py-3.5"},$t={class:"text-sm font-medium"},jt={class:"font-mono text-sm text-muted-foreground tabular"},Nt={key:2,class:"space-y-3 px-5 py-4"},Vt={class:"overflow-x-auto"},Bt={class:"w-full text-xs"},It={class:"divide-y"},Pt={class:"py-1.5 pr-3 font-mono whitespace-nowrap"},At=["title"],Dt={class:"py-1.5 text-right whitespace-nowrap text-muted-foreground"},Ht={class:"flex items-start justify-between gap-4"},Tt={class:"min-w-0"},zt={class:"text-sm font-medium"},Xt={class:"text-xs text-muted-foreground"},Et={class:"flex items-start justify-between gap-4"},Lt={class:"min-w-0"},qt={class:"text-sm font-medium"},Ft={class:"text-xs text-muted-foreground"},as=A({__name:"settings",setup(b){const{t,locale:k}=ve();he({title:y(()=>`${t("settings.pageTitle")} · Hexcore`)});const m=Te(),K=ke(),C=xe(),$=ze(),j=P(!1),v=P({}),p=P(null),D=P(!1),d=be({network:"preprod",chainBackend:"offline",blockfrostProjectId:"",cardanoNodeSocket:"",hydraNodeImage:"",adminUsername:""});ye(async()=>{m.fetchHealth().catch(()=>{}),m.fetchSystemConfig().catch(()=>{});try{const f=await C.fetchSettings();Object.assign(d,f.settings,{blockfrostProjectId:""})}catch{}});const x=y(()=>m.health),g=y(()=>m.systemConfig),H=y(()=>C.settings?.provenance??[]),O=y(()=>C.settings?.confirmationPhrase??""),R=y(()=>H.value.filter(f=>f.source==="environment"||f.source==="env-file")),oe=y(()=>d.chainBackend==="blockfrost"&&!m.blockfrostKeyConfigured);async function ne(){v.value={},j.value=!0;try{await C.saveSettings({network:d.network,chainBackend:d.chainBackend,blockfrostProjectId:d.blockfrostProjectId.trim()||void 0,cardanoNodeSocket:d.cardanoNodeSocket.trim()||void 0,hydraNodeImage:d.hydraNodeImage.trim()||void 0,adminUsername:d.adminUsername.trim()||void 0}),d.blockfrostProjectId="",await m.fetchSystemConfig().catch(()=>{}),await m.fetchHealth().catch(()=>{}),$.success(t("settings.toast.saved"),t("settings.toast.savedDetail"))}catch(f){f instanceof se?(v.value=f.fieldErrors,$.error(t("settings.toast.saveFailed"),f.message)):$.error(t("settings.toast.saveFailed"))}finally{j.value=!1}}async function ae(f){if(p.value){D.value=!0;try{const i=await C.clean(p.value,f);if(p.value=null,i.setupRequired){await te("/setup");return}$.success(t("settings.toast.removed",{heads:i.headsRemoved,containers:i.containersRemoved})),await te("/heads")}catch(i){$.error(t("settings.toast.nothingDeleted"),i instanceof se?i.message:void 0)}finally{D.value=!1}}}const ie={environment:"settings.source.environment","env-file":"settings.source.envFile","settings-file":"settings.source.settingsFile",default:"settings.source.default"};return(f,i)=>{const N=we("i18n-t"),T=qe,z=Ee,X=Le,w=me,M=$e,W=Ce,S=Ne,Y=je,G=Ue,V=fe,J=Ie,Q=Be,B=ge,E=ue,I=re,Z=Pe,ee=Ae,le=Ve,ce=De,de=He;return c(),u("div",Ke,[o("h1",Oe,n(e(t)("settings.pageTitle")),1),s(N,{keypath:"settings.intro",tag:"p",scope:"global",class:"mb-5 text-sm text-muted-foreground"},{env:a(()=>[...i[11]||(i[11]=[o("code",{class:"bg-muted text-foreground rounded px-1 py-0.5 font-mono"},".env",-1)])]),_:1}),s(I,null,{default:a(()=>[s(X,null,{default:a(()=>[s(T,{class:"text-base"},{default:a(()=>[r(n(e(t)("settings.chain.title")),1)]),_:1}),s(z,null,{default:a(()=>[r(n(e(t)("settings.chain.description")),1)]),_:1})]),_:1}),s(E,{class:"space-y-4"},{default:a(()=>[o("div",Re,[o("div",Me,[s(w,{for:"network"},{default:a(()=>[r(n(e(t)("settings.chain.network")),1)]),_:1}),s(G,{id:"network",modelValue:e(d).network,"onUpdate:modelValue":i[0]||(i[0]=l=>e(d).network=l)},{default:a(()=>[s(W,{class:"w-full"},{default:a(()=>[s(M)]),_:1}),s(Y,null,{default:a(()=>[s(S,{value:"preprod"},{default:a(()=>[...i[12]||(i[12]=[r("preprod",-1)])]),_:1}),s(S,{value:"preview"},{default:a(()=>[...i[13]||(i[13]=[r("preview",-1)])]),_:1}),s(S,{value:"mainnet"},{default:a(()=>[...i[14]||(i[14]=[r("mainnet",-1)])]),_:1})]),_:1})]),_:1},8,["modelValue"])]),o("div",We,[s(w,{for:"backend"},{default:a(()=>[r(n(e(t)("newHead.backend.label")),1)]),_:1}),(c(),U(G,{id:"backend",key:e(k),modelValue:e(d).chainBackend,"onUpdate:modelValue":i[1]||(i[1]=l=>e(d).chainBackend=l)},{default:a(()=>[s(W,{class:"w-full"},{default:a(()=>[s(M)]),_:1}),s(Y,null,{default:a(()=>[s(S,{value:"offline"},{default:a(()=>[r(n(e(t)("settings.chain.offline")),1)]),_:1}),s(S,{value:"blockfrost"},{default:a(()=>[...i[15]||(i[15]=[r("blockfrost",-1)])]),_:1}),s(S,{value:"cardano-node"},{default:a(()=>[...i[16]||(i[16]=[r("cardano-node",-1)])]),_:1})]),_:1})]),_:1},8,["modelValue"]))])]),e(d).chainBackend==="blockfrost"?(c(),u("div",Ye,[s(w,{for:"blockfrost"},{default:a(()=>[r(n(e(t)("settings.chain.blockfrost")),1)]),_:1}),s(V,{id:"blockfrost",modelValue:e(d).blockfrostProjectId,"onUpdate:modelValue":i[2]||(i[2]=l=>e(d).blockfrostProjectId=l),placeholder:e(m).blockfrostKeyConfigured?e(t)("settings.chain.unchanged"):`${e(d).network}XXXXXXXX`,autocomplete:"off",spellcheck:"false",class:"font-mono","aria-invalid":!!e(v).blockfrostProjectId},null,8,["modelValue","placeholder","aria-invalid"]),e(v).blockfrostProjectId?(c(),u("p",Ge,n(e(v).blockfrostProjectId),1)):(c(),u("p",Je,[e(m).blockfrostKeyConfigured?(c(),u(h,{key:0},[r(n(e(t)("settings.chain.keyStored")),1)],64)):(c(),U(N,{key:1,keypath:"settings.chain.mustStartWith",scope:"global"},{network:a(()=>[o("b",null,n(e(d).network),1)]),_:1}))]))])):_("",!0),e(d).chainBackend==="cardano-node"?(c(),u("div",Qe,[s(w,{for:"socket"},{default:a(()=>[r(n(e(t)("settings.chain.socket")),1)]),_:1}),s(V,{id:"socket",modelValue:e(d).cardanoNodeSocket,"onUpdate:modelValue":i[3]||(i[3]=l=>e(d).cardanoNodeSocket=l),placeholder:"/run/cardano/node.socket",class:"font-mono","aria-invalid":!!e(v).cardanoNodeSocket},null,8,["modelValue","aria-invalid"]),e(v).cardanoNodeSocket?(c(),u("p",Ze,n(e(v).cardanoNodeSocket),1)):_("",!0)])):_("",!0),o("div",et,[s(w,{for:"image"},{default:a(()=>[r(n(e(t)("settings.chain.image")),1)]),_:1}),s(V,{id:"image",modelValue:e(d).hydraNodeImage,"onUpdate:modelValue":i[4]||(i[4]=l=>e(d).hydraNodeImage=l),class:"font-mono",spellcheck:"false"},null,8,["modelValue"]),o("p",tt,n(e(t)("settings.chain.imageHint")),1)]),o("div",st,[s(w,{for:"admin"},{default:a(()=>[r(n(e(t)("settings.adminUsername")),1)]),_:1}),s(V,{id:"admin",modelValue:e(d).adminUsername,"onUpdate:modelValue":i[5]||(i[5]=l=>e(d).adminUsername=l),autocomplete:"username"},null,8,["modelValue"])]),e(oe)&&!e(d).blockfrostProjectId?(c(),U(Q,{key:2},{default:a(()=>[s(J,null,{default:a(()=>[r(n(e(t)("settings.chain.keyRequired")),1)]),_:1})]),_:1})):_("",!0),o("div",ot,[s(B,{disabled:e(j),onClick:ne},{default:a(()=>[e(j)?(c(),U(e(pe),{key:0,class:"size-4 animate-spin"})):_("",!0),r(" "+n(e(t)("settings.save")),1)]),_:1},8,["disabled"]),o("span",nt,n(e(t)("settings.saveHint")),1)])]),_:1})]),_:1}),s(I,{class:"mt-5 py-0"},{default:a(()=>[o("div",at,[o("div",it,[o("span",lt,n(e(t)("settings.facts.signedInAs")),1),o("span",ct,n(e(K).username??"—"),1)]),e(x)?(c(),u(h,{key:0},[o("div",dt,[o("span",rt,n(e(t)("settings.facts.version")),1),o("span",ut,n(e(x).version),1)]),o("div",mt,[i[17]||(i[17]=o("span",{class:"text-sm font-medium"},"Docker",-1)),o("span",ft,[s(Z,{label:e(x).docker.ok?e(t)("settings.facts.healthy"):e(t)("settings.facts.unreachable"),tone:e(x).docker.ok?"success":"danger"},null,8,["label","tone"]),e(x).docker.error?(c(),u("span",pt,n(e(x).docker.error),1)):_("",!0)])]),o("div",_t,[o("span",gt,n(e(t)("settings.facts.auth")),1),o("span",vt,n(e(x).authEnabled?e(t)("settings.facts.enabled"):e(t)("settings.facts.disabled")),1)])],64)):_("",!0),e(g)?(c(),u(h,{key:1},[o("div",ht,[o("span",kt,n(e(t)("settings.chain.socket")),1),o("span",xt,[s(Z,{label:e(g).cardanoNode.available?e(t)("settings.facts.available"):e(t)("settings.facts.notAvailable"),tone:e(g).cardanoNode.available?"success":"warning"},null,8,["label","tone"]),o("span",yt,n(e(g).cardanoNode.socketPath??e(t)("settings.facts.notSet")),1),e(g).cardanoNode.available?_("",!0):(c(),u("span",bt,n(e(g).cardanoNode.reason),1))])]),o("div",wt,[o("span",St,n(e(t)("settings.facts.stateDir")),1),o("span",{class:"max-w-72 truncate font-mono text-sm text-muted-foreground",title:e(g).stateDir},n(e(g).stateDir),9,Ut)]),o("div",Ct,[o("span",$t,n(e(t)("settings.facts.maxNodes")),1),o("span",jt,n(e(g).maxActiveNodes),1)])],64)):(c(),u("div",Nt,[s(ee,{class:"h-4 w-full"}),s(ee,{class:"h-4 w-3/5"})]))])]),_:1}),e(H).length?(c(),U(I,{key:0,class:"mt-5"},{default:a(()=>[s(X,null,{default:a(()=>[s(T,{class:"text-base"},{default:a(()=>[r(n(e(t)("settings.provenance.title")),1)]),_:1}),s(z,null,{default:a(()=>[s(N,{keypath:"settings.provenance.description",scope:"global"},{env:a(()=>[...i[18]||(i[18]=[o("code",{class:"bg-muted text-foreground rounded px-1 py-0.5 font-mono"},".env",-1)])]),_:1})]),_:1})]),_:1}),s(E,null,{default:a(()=>[e(R).length?(c(),U(Q,{key:0,class:"mb-4"},{default:a(()=>[s(le,{class:"flex items-center gap-2"},{default:a(()=>[s(e(Fe),{class:"size-4"}),r(" "+n(e(t)("settings.provenance.pinned")),1)]),_:1}),s(J,null,{default:a(()=>[r(n(e(t)("settings.provenance.pinnedBody",{keys:e(R).map(l=>l.key).join(", ")})),1)]),_:1})]),_:1})):_("",!0),o("div",Vt,[o("table",Bt,[o("tbody",It,[(c(!0),u(h,null,Se(e(H),l=>(c(),u("tr",{key:l.key},[o("td",Pt,n(l.key),1),o("td",{class:"max-w-64 truncate py-1.5 pr-3 font-mono text-muted-foreground",title:l.value??""},[l.secret?(c(),u(h,{key:0},[r(n(l.value?e(t)("settings.provenance.set"):e(t)("settings.provenance.unset")),1)],64)):(c(),u(h,{key:1},[r(n(l.value??"—"),1)],64))],8,At),o("td",Dt,n(e(t)(ie[l.source])),1)]))),128))])])])]),_:1})]),_:1})):_("",!0),s(I,{class:"mt-5 border-destructive/40"},{default:a(()=>[s(X,null,{default:a(()=>[s(T,{class:"text-base text-destructive"},{default:a(()=>[r(n(e(t)("settings.wipe.title")),1)]),_:1}),s(z,null,{default:a(()=>[s(N,{keypath:"settings.wipe.description",scope:"global"},{command:a(()=>[...i[19]||(i[19]=[o("code",{class:"bg-muted text-foreground rounded px-1 py-0.5 font-mono"},"hexcore clean --all",-1)])]),_:1})]),_:1})]),_:1}),s(E,{class:"space-y-3"},{default:a(()=>[o("div",Ht,[o("div",Tt,[o("p",zt,n(e(t)("settings.wipe.config")),1),o("p",Xt,n(e(t)("settings.wipe.configHint")),1)]),s(B,{variant:"outline",size:"sm",class:"shrink-0",onClick:i[6]||(i[6]=l=>p.value="config")},{default:a(()=>[r(n(e(t)("actions.reset")),1)]),_:1})]),s(ce),o("div",Et,[o("div",Lt,[o("p",qt,n(e(t)("settings.wipe.heads")),1),o("p",Ft,n(e(t)("settings.wipe.headsHint")),1)]),s(B,{variant:"outline",size:"sm",class:"shrink-0 text-destructive",onClick:i[7]||(i[7]=l=>p.value="heads")},{default:a(()=>[s(e(Xe),{class:"size-4"}),r(" "+n(e(t)("settings.wipe.deleteAll")),1)]),_:1})])]),_:1})]),_:1}),s(B,{variant:"outline",class:"mt-5",onClick:i[8]||(i[8]=l=>e(K).logout())},{default:a(()=>[r(n(e(t)("layout.signOut")),1)]),_:1}),s(de,{open:e(p)!==null,title:e(p)==="config"?e(t)("settings.wipe.configConfirm"):e(t)("settings.wipe.headsConfirm"),"require-text":e(O),"confirm-label":e(p)==="config"?e(t)("settings.wipe.config"):e(t)("settings.wipe.heads"),loading:e(D),"onUpdate:open":i[9]||(i[9]=l=>!l&&(p.value=null)),onConfirm:i[10]||(i[10]=l=>ae(e(O)))},{default:a(()=>[e(p)==="config"?(c(),u(h,{key:0},[o("p",null,n(e(t)("settings.wipe.configBody")),1),o("p",null,n(e(t)("settings.wipe.configKept")),1)],64)):(c(),u(h,{key:1},[o("p",null,n(e(t)("settings.wipe.headsBody")),1),o("p",null,n(e(t)("settings.wipe.headsKept")),1)],64))]),_:1},8,["open","title","require-text","confirm-label","loading"])])}}});export{as as default};
@@ -0,0 +1 @@
1
+ import{_ as N,a as S,b as q,c as D,L as H}from"./Bj1gglGt.js";import{_ as I,a as L}from"./ChS5Np24.js";import{e as R,f as T,u as z,g as E,h as M,c as j,a as s,t as r,i as e,b as o,w as a,r as O,o as f,j as P,d as m,k as v,l as w,m as y,n as _,p as W,A as F,q as G}from"./DIi866IK.js";import{_ as J}from"./BV_QiRi8.js";import{_ as K}from"./vzCX1O3u.js";const Q={class:"w-full max-w-sm"},X={class:"mb-6 flex flex-col items-center text-center"},Y={class:"text-sm text-muted-foreground"},Z={class:"space-y-2"},ee={class:"space-y-2"},te={class:"mt-4 text-center text-xs text-muted-foreground"},ie=R({__name:"login",setup(se){const{t:n}=T();z({title:G(()=>`${n("login.pageTitle")} · Hexcore`)});const b=E(),V=M(),i=_("admin"),u=_(""),c=_(""),d=_(!1);async function U(){c.value="",d.value=!0;try{await b.login({username:i.value,password:u.value});const l=V.query.redirect;await W(typeof l=="string"?l:"/heads")}catch(l){c.value=l instanceof F?l.message:n("login.failed")}finally{d.value=!1}}return(l,t)=>{const g=q,x=D,k=L,C=I,$=J,h=S,A=N,B=O("i18n-t");return f(),j("div",Q,[s("div",X,[t[2]||(t[2]=s("img",{src:K,alt:"",class:"mb-3 size-14"},null,-1)),t[3]||(t[3]=s("h1",{class:"text-xl font-semibold tracking-tight"},"Hexcore",-1)),s("p",Y,r(e(n)("login.tagline")),1)]),o(A,null,{default:a(()=>[o(h,null,{default:a(()=>[s("form",{class:"space-y-4",onSubmit:P(U,["prevent"])},[s("div",Z,[o(g,{for:"username"},{default:a(()=>[m(r(e(n)("login.username")),1)]),_:1}),o(x,{id:"username",modelValue:e(i),"onUpdate:modelValue":t[0]||(t[0]=p=>v(i)?i.value=p:null),autocomplete:"username",required:""},null,8,["modelValue"])]),s("div",ee,[o(g,{for:"password"},{default:a(()=>[m(r(e(n)("login.password")),1)]),_:1}),o(x,{id:"password",modelValue:e(u),"onUpdate:modelValue":t[1]||(t[1]=p=>v(u)?u.value=p:null),type:"password",autocomplete:"current-password",required:""},null,8,["modelValue"])]),e(c)?(f(),w(C,{key:0,variant:"destructive"},{default:a(()=>[o(k,null,{default:a(()=>[m(r(e(c)),1)]),_:1})]),_:1})):y("",!0),o($,{type:"submit",class:"w-full",disabled:e(d)},{default:a(()=>[e(d)?(f(),w(e(H),{key:0,class:"size-4 animate-spin"})):y("",!0),m(" "+r(e(n)("login.submit")),1)]),_:1},8,["disabled"])],32)]),_:1})]),_:1}),s("p",te,[o(B,{keypath:"login.firstBoot",scope:"global"},{env:a(()=>[...t[4]||(t[4]=[s("code",{class:"bg-muted text-foreground rounded px-1 py-0.5 font-mono"},"ADMIN_PASSWORD",-1)])]),_:1})])])}}});export{ie as default};