@samyx/preview-stacks-ui 0.39.1 → 0.40.0

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 (103) hide show
  1. package/dist/assets/{ActionButton-OewKsFrK.js → ActionButton-BaGfzZKv.js} +2 -2
  2. package/dist/assets/{ActionButton-OewKsFrK.js.map → ActionButton-BaGfzZKv.js.map} +1 -1
  3. package/dist/assets/{AxesTab-DSzgRhgG.js → AxesTab-8px21p5I.js} +2 -2
  4. package/dist/assets/{AxesTab-DSzgRhgG.js.map → AxesTab-8px21p5I.js.map} +1 -1
  5. package/dist/assets/{ConfigTab-DhtUF0Dh.js → ConfigTab-XMpNHvgd.js} +2 -2
  6. package/dist/assets/{ConfigTab-DhtUF0Dh.js.map → ConfigTab-XMpNHvgd.js.map} +1 -1
  7. package/dist/assets/{ConfigView-wXO4j8H7.js → ConfigView-Ed9sCukp.js} +2 -2
  8. package/dist/assets/{ConfigView-wXO4j8H7.js.map → ConfigView-Ed9sCukp.js.map} +1 -1
  9. package/dist/assets/{ConflictNote.vue_vue_type_script_setup_true_lang-B2fgJAmK.js → ConflictNote.vue_vue_type_script_setup_true_lang-B4a9DxS8.js} +2 -2
  10. package/dist/assets/{ConflictNote.vue_vue_type_script_setup_true_lang-B2fgJAmK.js.map → ConflictNote.vue_vue_type_script_setup_true_lang-B4a9DxS8.js.map} +1 -1
  11. package/dist/assets/ControlView-B-gr_xQ3.css +1 -0
  12. package/dist/assets/ControlView-C4R1joVF.js +2 -0
  13. package/dist/assets/ControlView-C4R1joVF.js.map +1 -0
  14. package/dist/assets/{DangerTab-D2dFrj4t.js → DangerTab-CMIMyWEv.js} +2 -2
  15. package/dist/assets/{DangerTab-D2dFrj4t.js.map → DangerTab-CMIMyWEv.js.map} +1 -1
  16. package/dist/assets/{DashboardView-FpEFhaCl.js → DashboardView-gTjtsiF-.js} +2 -2
  17. package/dist/assets/{DashboardView-FpEFhaCl.js.map → DashboardView-gTjtsiF-.js.map} +1 -1
  18. package/dist/assets/{DeploymentDetailView-B1dKUzvp.js → DeploymentDetailView-Dg-9p6_v.js} +2 -2
  19. package/dist/assets/{DeploymentDetailView-B1dKUzvp.js.map → DeploymentDetailView-Dg-9p6_v.js.map} +1 -1
  20. package/dist/assets/{DeploymentsView-_V93UC6F.js → DeploymentsView-CNzMaxE7.js} +2 -2
  21. package/dist/assets/{DeploymentsView-_V93UC6F.js.map → DeploymentsView-CNzMaxE7.js.map} +1 -1
  22. package/dist/assets/{EquivalentCommand-D-mkbReY.js → EquivalentCommand-CAhOGrAR.js} +2 -2
  23. package/dist/assets/{EquivalentCommand-D-mkbReY.js.map → EquivalentCommand-CAhOGrAR.js.map} +1 -1
  24. package/dist/assets/{ErrorNote.vue_vue_type_script_setup_true_lang-FEOV8vdM.js → ErrorNote.vue_vue_type_script_setup_true_lang-DU01Dqor.js} +2 -2
  25. package/dist/assets/{ErrorNote.vue_vue_type_script_setup_true_lang-FEOV8vdM.js.map → ErrorNote.vue_vue_type_script_setup_true_lang-DU01Dqor.js.map} +1 -1
  26. package/dist/assets/{JobDetailView-RD5MxdA7.js → JobDetailView-ChKP7xeI.js} +2 -2
  27. package/dist/assets/{JobDetailView-RD5MxdA7.js.map → JobDetailView-ChKP7xeI.js.map} +1 -1
  28. package/dist/assets/{JobsView-BJrH9ViP.js → JobsView-DndjCwKL.js} +2 -2
  29. package/dist/assets/{JobsView-BJrH9ViP.js.map → JobsView-DndjCwKL.js.map} +1 -1
  30. package/dist/assets/{LogViewer.vue_vue_type_script_setup_true_lang-BRSt9Exf.js → LogViewer.vue_vue_type_script_setup_true_lang-D2yEiI2n.js} +2 -2
  31. package/dist/assets/{LogViewer.vue_vue_type_script_setup_true_lang-BRSt9Exf.js.map → LogViewer.vue_vue_type_script_setup_true_lang-D2yEiI2n.js.map} +1 -1
  32. package/dist/assets/LoginView-B9aLjuvQ.css +1 -0
  33. package/dist/assets/LoginView-C2Yny6iz.js +2 -0
  34. package/dist/assets/LoginView-C2Yny6iz.js.map +1 -0
  35. package/dist/assets/{LogsTab--Q-KHeWj.js → LogsTab-B6R6j6Uv.js} +2 -2
  36. package/dist/assets/{LogsTab--Q-KHeWj.js.map → LogsTab-B6R6j6Uv.js.map} +1 -1
  37. package/dist/assets/{NotFoundView-1lI66Xt-.js → NotFoundView-CvHMcInC.js} +2 -2
  38. package/dist/assets/{NotFoundView-1lI66Xt-.js.map → NotFoundView-CvHMcInC.js.map} +1 -1
  39. package/dist/assets/{NotifiersView-BfWfRzg4.js → NotifiersView-9rwo6wXV.js} +2 -2
  40. package/dist/assets/{NotifiersView-BfWfRzg4.js.map → NotifiersView-9rwo6wXV.js.map} +1 -1
  41. package/dist/assets/{OverviewTab-P3htOnPs.js → OverviewTab-BO8-8pTB.js} +2 -2
  42. package/dist/assets/{OverviewTab-P3htOnPs.js.map → OverviewTab-BO8-8pTB.js.map} +1 -1
  43. package/dist/assets/{PublicLogsView-DcDQMivg.js → PublicLogsView-BA7ao_jC.js} +2 -2
  44. package/dist/assets/{PublicLogsView-DcDQMivg.js.map → PublicLogsView-BA7ao_jC.js.map} +1 -1
  45. package/dist/assets/{RefreshButton.vue_vue_type_script_setup_true_lang-CQvD4Out.js → RefreshButton.vue_vue_type_script_setup_true_lang-Dk-lSii3.js} +2 -2
  46. package/dist/assets/{RefreshButton.vue_vue_type_script_setup_true_lang-CQvD4Out.js.map → RefreshButton.vue_vue_type_script_setup_true_lang-Dk-lSii3.js.map} +1 -1
  47. package/dist/assets/{RegistriesView-9hPjVsOW.js → RegistriesView-y9nKbmQz.js} +2 -2
  48. package/dist/assets/{RegistriesView-9hPjVsOW.js.map → RegistriesView-y9nKbmQz.js.map} +1 -1
  49. package/dist/assets/{RelativeTime.vue_vue_type_script_setup_true_lang-BxIqRu_b.js → RelativeTime.vue_vue_type_script_setup_true_lang-B1_l0Vtf.js} +2 -2
  50. package/dist/assets/{RelativeTime.vue_vue_type_script_setup_true_lang-BxIqRu_b.js.map → RelativeTime.vue_vue_type_script_setup_true_lang-B1_l0Vtf.js.map} +1 -1
  51. package/dist/assets/{RequiresTab--C-3QPQB.js → RequiresTab-DJZagYBh.js} +2 -2
  52. package/dist/assets/{RequiresTab--C-3QPQB.js.map → RequiresTab-DJZagYBh.js.map} +1 -1
  53. package/dist/assets/{RouteTarget.vue_vue_type_script_setup_true_lang-D3FLq6Mt.js → RouteTarget.vue_vue_type_script_setup_true_lang-Ct40NR9a.js} +2 -2
  54. package/dist/assets/{RouteTarget.vue_vue_type_script_setup_true_lang-D3FLq6Mt.js.map → RouteTarget.vue_vue_type_script_setup_true_lang-Ct40NR9a.js.map} +1 -1
  55. package/dist/assets/{RoutingView-CC8xPrcT.js → RoutingView-DzE98-qV.js} +2 -2
  56. package/dist/assets/{RoutingView-CC8xPrcT.js.map → RoutingView-DzE98-qV.js.map} +1 -1
  57. package/dist/assets/{RuntimeTab-Do1xfTp8.js → RuntimeTab-Cp6CxBJG.js} +2 -2
  58. package/dist/assets/{RuntimeTab-Do1xfTp8.js.map → RuntimeTab-Cp6CxBJG.js.map} +1 -1
  59. package/dist/assets/{SelectMenu.vue_vue_type_script_setup_true_lang-CMLYr7A7.js → SelectMenu.vue_vue_type_script_setup_true_lang-PIaLSNsk.js} +2 -2
  60. package/dist/assets/{SelectMenu.vue_vue_type_script_setup_true_lang-CMLYr7A7.js.map → SelectMenu.vue_vue_type_script_setup_true_lang-PIaLSNsk.js.map} +1 -1
  61. package/dist/assets/{SettingsView-Dxbl6HZA.js → SettingsView-iWRluEj5.js} +2 -2
  62. package/dist/assets/{SettingsView-Dxbl6HZA.js.map → SettingsView-iWRluEj5.js.map} +1 -1
  63. package/dist/assets/{SkeletonList.vue_vue_type_script_setup_true_lang-D4pkKZAr.js → SkeletonList.vue_vue_type_script_setup_true_lang-7pKEuaEM.js} +2 -2
  64. package/dist/assets/{SkeletonList.vue_vue_type_script_setup_true_lang-D4pkKZAr.js.map → SkeletonList.vue_vue_type_script_setup_true_lang-7pKEuaEM.js.map} +1 -1
  65. package/dist/assets/{SpecDetailView-DyFAAMfr.js → SpecDetailView-Ca4WXLH1.js} +2 -2
  66. package/dist/assets/{SpecDetailView-DyFAAMfr.js.map → SpecDetailView-Ca4WXLH1.js.map} +1 -1
  67. package/dist/assets/{SpecsView-CfV1_GDx.js → SpecsView-DN6EIbcC.js} +2 -2
  68. package/dist/assets/{SpecsView-CfV1_GDx.js.map → SpecsView-DN6EIbcC.js.map} +1 -1
  69. package/dist/assets/{SsoMark.vue_vue_type_script_setup_true_lang-BU6ThRhq.js → SsoMark.vue_vue_type_script_setup_true_lang-rMP20d_u.js} +2 -2
  70. package/dist/assets/{SsoMark.vue_vue_type_script_setup_true_lang-BU6ThRhq.js.map → SsoMark.vue_vue_type_script_setup_true_lang-rMP20d_u.js.map} +1 -1
  71. package/dist/assets/{SsoView-CxFylJ9d.js → SsoView-wGpab5Q8.js} +2 -2
  72. package/dist/assets/{SsoView-CxFylJ9d.js.map → SsoView-wGpab5Q8.js.map} +1 -1
  73. package/dist/assets/{StateBadge.vue_vue_type_script_setup_true_lang-CfjzlWSc.js → StateBadge.vue_vue_type_script_setup_true_lang-aK93ZMhG.js} +2 -2
  74. package/dist/assets/{StateBadge.vue_vue_type_script_setup_true_lang-CfjzlWSc.js.map → StateBadge.vue_vue_type_script_setup_true_lang-aK93ZMhG.js.map} +1 -1
  75. package/dist/assets/{SubmitView-BcAcTlwC.js → SubmitView-BTK9zNDd.js} +2 -2
  76. package/dist/assets/{SubmitView-BcAcTlwC.js.map → SubmitView-BTK9zNDd.js.map} +1 -1
  77. package/dist/assets/SwarmView-DXLQlbD0.css +1 -0
  78. package/dist/assets/SwarmView-m2XvvAfR.js +2 -0
  79. package/dist/assets/SwarmView-m2XvvAfR.js.map +1 -0
  80. package/dist/assets/{TerminalTab-DF8cSjcg.js → TerminalTab-CFKfVx8D.js} +2 -2
  81. package/dist/assets/{TerminalTab-DF8cSjcg.js.map → TerminalTab-CFKfVx8D.js.map} +1 -1
  82. package/dist/assets/{UsersView-CbPtmnP6.js → UsersView-BnN_hvh2.js} +2 -2
  83. package/dist/assets/{UsersView-CbPtmnP6.js.map → UsersView-BnN_hvh2.js.map} +1 -1
  84. package/dist/assets/{VarEditor.vue_vue_type_script_setup_true_lang-BNQTEru_.js → VarEditor.vue_vue_type_script_setup_true_lang-Dg_ORvZN.js} +2 -2
  85. package/dist/assets/{VarEditor.vue_vue_type_script_setup_true_lang-BNQTEru_.js.map → VarEditor.vue_vue_type_script_setup_true_lang-Dg_ORvZN.js.map} +1 -1
  86. package/dist/assets/{VarIO-BFBaI8oU.js → VarIO-CNugbzeb.js} +2 -2
  87. package/dist/assets/{VarIO-BFBaI8oU.js.map → VarIO-CNugbzeb.js.map} +1 -1
  88. package/dist/assets/{VariablesView-BEcI8Bi0.js → VariablesView-qrqDNseI.js} +2 -2
  89. package/dist/assets/{VariablesView-BEcI8Bi0.js.map → VariablesView-qrqDNseI.js.map} +1 -1
  90. package/dist/assets/{index-D_Ks6aQi.js → index-DlhYSSKq.js} +25 -20
  91. package/dist/assets/index-DlhYSSKq.js.map +1 -0
  92. package/dist/assets/{useDeployment-DFuBcVnK.js → useDeployment-BJuUhf9K.js} +2 -2
  93. package/dist/assets/{useDeployment-DFuBcVnK.js.map → useDeployment-BJuUhf9K.js.map} +1 -1
  94. package/dist/index.html +1 -1
  95. package/package.json +1 -1
  96. package/dist/assets/ControlView-ninZ6BIV.js +0 -2
  97. package/dist/assets/ControlView-ninZ6BIV.js.map +0 -1
  98. package/dist/assets/LoginView-wAfA0Ozk.css +0 -1
  99. package/dist/assets/LoginView-zWd9FvKS.js +0 -2
  100. package/dist/assets/LoginView-zWd9FvKS.js.map +0 -1
  101. package/dist/assets/SwarmView-BHtmW4QF.js +0 -2
  102. package/dist/assets/SwarmView-BHtmW4QF.js.map +0 -1
  103. package/dist/assets/index-D_Ks6aQi.js.map +0 -1
@@ -1,2 +1,2 @@
1
- import{d as ee,K as te,ak as M,M as se,c as u,a as s,g as D,v as O,u as a,ac as o,al as le,t as n,f as m,z as F,h as _,n as d,F as z,A as v,e as w,_ as ae,D as oe,i as b,j as p,an as ne,a6 as H,p as P,C as W,af as ie,o as i}from"./index-D_Ks6aQi.js";import{c as re}from"./useJobQueue-JaWoydCt.js";import{A as E}from"./ActionButton-OewKsFrK.js";import{_ as ue}from"./ErrorNote.vue_vue_type_script_setup_true_lang-FEOV8vdM.js";import{_ as $}from"./SelectMenu.vue_vue_type_script_setup_true_lang-CMLYr7A7.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";const de={class:"panel settings-form"},ve={class:"field"},me={class:"field"},pe=["type"],fe={class:"row",style:{"margin-top":"var(--s2)"}},be={key:2,class:"mute",style:{"font-size":"var(--t-xs)"}},he={class:"mute hint"},ce={class:"row",style:{gap:"8px","margin-top":"4px"}},ye=["disabled"],ge={key:0,class:"mute"},ke={key:1,class:"bad"},we={class:"panel settings-form"},xe={class:"field"},Se={class:"row"},Ce=["disabled","title"],Ve={class:"mute",style:{"font-size":"var(--t-xs)"}},_e={key:0,class:"mute hint"},Re={class:"field"},De={class:"row"},Ee={key:0,class:"mute hint"},$e={key:2,class:"mute hint"},Ne={class:"panel"},Be={class:"field"},Ae={class:"field"},Fe=ee({__name:"SettingsView",setup(Te){const C=b(!1),V=b(!1),K=p(()=>{const t=o.token;return t.startsWith("pstack_pat_")?"Personal token.":/^[0-9a-f]{40,}$/i.test(t)?"Machine token.":`${t.length} characters — not a pstack token.`}),q=p(()=>{var t;return((t=v.health)==null?void 0:t.authEnforced)??null});async function I(){C.value=!0;try{await ne(),H(v.healthError?"error":"ok",v.healthError||"Control plane reachable")}finally{C.value=!1}}const h=b(null),c=b(""),N=b(!1),y=b(""),x=b("viewer"),g=b(null),B=t=>{var e;return((e=h.value)==null?void 0:e.settings.find(l=>l.key===t))??null},r=p(()=>B("max_jobs")),f=p(()=>B("default_role"));function A(){var t,e;y.value=String(((t=r.value)==null?void 0:t.value)??""),x.value=String(((e=f.value)==null?void 0:e.value)??"viewer")}async function G(){const t=await P.get("/api/settings");if(N.value=!0,!t.ok){c.value=W(t,"read the host settings");return}c.value="",h.value=t.body,A()}G(),te();async function T(t,e){g.value=t;const l=await P.put(`/api/settings/${t}`,{value:e});if(g.value=null,!l.ok){c.value=W(l,`save ${t}`);return}c.value="",h.value&&(h.value.settings=h.value.settings.map(R=>R.key===t?{key:R.key,value:l.body.value,source:l.body.source,minRole:l.body.minRole}:R)),A(),H("ok","Saved.")}function k(t){return t?ie(M.includes(t.minRole)?t.minRole:"admin"):!1}function S(t){return!t||k(t)?"":`Needs the ${t.minRole} role.`}const j={db:"Set here",env:"From the environment",default:"The shipped default"},Q=p(()=>v.jobs.filter(t=>t.state==="running").length),X=p(()=>v.jobs.filter(t=>t.state==="queued").length),L=p(()=>re(y.value)),U=p(()=>{var t;return Number(y.value)!==Number((t=r.value)==null?void 0:t.value)}),J=p(()=>{var t;return x.value!==String(((t=f.value)==null?void 0:t.value)??"")}),Y={viewer:"reads everything",developer:"deploys and tears down",maintainer:"host configuration",admin:"accounts and sign-on"},Z=M.map(t=>({value:t,label:se(t),hint:Y[t]}));return(t,e)=>(i(),u("div",null,[e[30]||(e[30]=s("div",{class:"page-head"},[s("div",null,[s("h1",null,"Settings")])],-1)),s("section",de,[e[16]||(e[16]=s("h2",{class:"phead-title"},"Connection",-1)),e[17]||(e[17]=s("p",{class:"mute hint"},"Stored in this browser. Nothing here is sent anywhere.",-1)),s("div",ve,[e[10]||(e[10]=s("label",{for:"apiBase"},"API base URL",-1)),D(s("input",{id:"apiBase","onUpdate:modelValue":e[0]||(e[0]=l=>a(o).apiBase=l),type:"url",spellcheck:"false",placeholder:"(same origin)"},null,512),[[O,a(o).apiBase,void 0,{trim:!0}]]),e[11]||(e[11]=s("div",{class:"mute hint"},"Empty means same origin.",-1))]),s("div",me,[e[14]||(e[14]=s("label",{for:"token"},"Access token",-1)),D(s("input",{id:"token","onUpdate:modelValue":e[1]||(e[1]=l=>a(o).token=l),type:V.value||!a(o).token?"text":"password",name:"pstack-access-token",autocomplete:"off","data-1p-ignore":"","data-lpignore":"true","data-bwignore":"","data-form-type":"other",spellcheck:"false",placeholder:"paste the token from pstack init"},null,8,pe),[[le,a(o).token,void 0,{trim:!0}]]),s("div",fe,[a(o).token?(i(),u("button",{key:0,class:"ghost sm",onClick:e[2]||(e[2]=l=>V.value=!V.value)},n(V.value?"Hide":"Show"),1)):m("",!0),a(o).token?(i(),F(E,{key:1,variant:"ghost",class:"sm",confirm:"Clear it?",onRun:e[3]||(e[3]=l=>a(o).token="")},{default:_(()=>[...e[12]||(e[12]=[d(" Clear ",-1)])]),_:1})):m("",!0),a(o).token?(i(),u("span",be,n(K.value),1)):m("",!0)]),s("div",he,[e[13]||(e[13]=d(" Only needed for token-based access; signing in does the same job. ",-1)),q.value===!1?(i(),u(z,{key:0},[d("This server is not asking for one.")],64)):m("",!0)])]),s("div",ce,[s("button",{class:"btn",disabled:C.value,onClick:I},n(C.value?"Checking…":"Test connection"),9,ye),a(v).health?(i(),u("span",ge,[d(" Connected to pstack "+n(a(v).health.version)+" ",1),w(ae,{label:"where data is stored"},{default:_(()=>[e[15]||(e[15]=d(" Data directory: ",-1)),s("code",null,n(a(v).health.dataDir),1)]),_:1})])):a(v).healthError?(i(),u("span",ke,n(a(v).healthError),1)):m("",!0)])]),s("section",we,[e[24]||(e[24]=s("h2",{class:"phead-title"},"This host",-1)),e[25]||(e[25]=s("p",{class:"mute hint"},"Stored on the server, in force for everybody.",-1)),c.value?(i(),F(ue,{key:0,text:c.value,title:"Could not read the host settings."},null,8,["text"])):m("",!0),h.value?(i(),u(z,{key:1},[s("div",xe,[e[19]||(e[19]=s("label",{for:"maxJobs"},"Concurrency limit",-1)),s("div",Se,[D(s("input",{id:"maxJobs","onUpdate:modelValue":e[4]||(e[4]=l=>y.value=l),type:"number",min:"1",step:"1",inputmode:"numeric",disabled:!k(r.value),title:S(r.value)||void 0,style:oe(`width: 8rem${k(r.value)?"":"; opacity: 0.45; cursor: not-allowed"}`)},null,12,Ce),[[O,y.value]]),w(E,{variant:"primary",pending:g.value==="max_jobs",disabled:!k(r.value)||!U.value||!!L.value||g.value!==null,title:S(r.value)||L.value||(U.value?void 0:"this is already the stored value"),onClick:e[5]||(e[5]=l=>T("max_jobs",Number(y.value)))},{default:_(()=>[...e[18]||(e[18]=[d(" Save ",-1)])]),_:1},8,["pending","disabled","title"]),s("span",Ve,n(Q.value)+" running · "+n(X.value)+" waiting ",1)]),e[20]||(e[20]=s("div",{class:"mute hint"},[d(" Most jobs at once, across every stack. "),s("b",null,"Lowering it cancels nothing.")],-1)),r.value?(i(),u("div",_e,[s("b",null,n(j[r.value.source])+".",1),d(" "+n(S(r.value)),1)])):m("",!0)]),s("div",Re,[e[22]||(e[22]=s("label",{for:"defaultRole"},"Default role for new accounts",-1)),s("div",De,[w($,{id:"defaultRole",modelValue:x.value,"onUpdate:modelValue":e[6]||(e[6]=l=>x.value=l),label:"Default role for new accounts",options:a(Z),disabled:!k(f.value)},null,8,["modelValue","options","disabled"]),w(E,{variant:"primary",pending:g.value==="default_role",disabled:!k(f.value)||!J.value||g.value!==null,title:S(f.value)||(J.value?void 0:"this is already the stored value"),onClick:e[7]||(e[7]=l=>T("default_role",x.value))},{default:_(()=>[...e[21]||(e[21]=[d(" Save ",-1)])]),_:1},8,["pending","disabled","title"])]),e[23]||(e[23]=s("div",{class:"mute hint"},"New accounts only; existing ones keep their role.",-1)),f.value?(i(),u("div",Ee,[s("b",null,n(j[f.value.source])+".",1),d(" "+n(S(f.value)),1)])):m("",!0)])],64)):N.value?m("",!0):(i(),u("p",$e,"Reading…"))]),s("section",Ne,[e[28]||(e[28]=s("h2",{class:"phead-title"},"Appearance",-1)),e[29]||(e[29]=s("p",{class:"mute hint"},"Stored in this browser.",-1)),s("div",Be,[e[26]||(e[26]=s("label",{for:"theme"},"Theme",-1)),w($,{modelValue:a(o).theme,"onUpdate:modelValue":e[8]||(e[8]=l=>a(o).theme=l),id:"theme",label:"Theme",options:[{value:"system",label:"Follow the system"},{value:"dark",label:"Dark"},{value:"light",label:"Light"}]},null,8,["modelValue"])]),s("div",Ae,[e[27]||(e[27]=s("label",{for:"motion"},"Motion",-1)),w($,{modelValue:a(o).motion,"onUpdate:modelValue":e[9]||(e[9]=l=>a(o).motion=l),id:"motion",label:"Motion",options:[{value:"system",label:"Follow the system"},{value:"full",label:"Always animate"},{value:"none",label:"No animation"}]},null,8,["modelValue"])])])]))}});export{Fe as default};
2
- //# sourceMappingURL=SettingsView-Dxbl6HZA.js.map
1
+ import{d as ee,K as te,ak as M,M as se,c as u,a as s,g as D,v as O,u as a,ac as o,al as le,t as n,f as m,z as F,h as _,n as d,F as z,A as v,e as w,_ as ae,D as oe,i as b,j as p,an as ne,a6 as H,p as P,C as W,af as ie,o as i}from"./index-DlhYSSKq.js";import{c as re}from"./useJobQueue-JaWoydCt.js";import{A as E}from"./ActionButton-BaGfzZKv.js";import{_ as ue}from"./ErrorNote.vue_vue_type_script_setup_true_lang-DU01Dqor.js";import{_ as $}from"./SelectMenu.vue_vue_type_script_setup_true_lang-PIaLSNsk.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";const de={class:"panel settings-form"},ve={class:"field"},me={class:"field"},pe=["type"],fe={class:"row",style:{"margin-top":"var(--s2)"}},be={key:2,class:"mute",style:{"font-size":"var(--t-xs)"}},he={class:"mute hint"},ce={class:"row",style:{gap:"8px","margin-top":"4px"}},ye=["disabled"],ge={key:0,class:"mute"},ke={key:1,class:"bad"},we={class:"panel settings-form"},xe={class:"field"},Se={class:"row"},Ce=["disabled","title"],Ve={class:"mute",style:{"font-size":"var(--t-xs)"}},_e={key:0,class:"mute hint"},Re={class:"field"},De={class:"row"},Ee={key:0,class:"mute hint"},$e={key:2,class:"mute hint"},Ne={class:"panel"},Be={class:"field"},Ae={class:"field"},Fe=ee({__name:"SettingsView",setup(Te){const C=b(!1),V=b(!1),K=p(()=>{const t=o.token;return t.startsWith("pstack_pat_")?"Personal token.":/^[0-9a-f]{40,}$/i.test(t)?"Machine token.":`${t.length} characters — not a pstack token.`}),q=p(()=>{var t;return((t=v.health)==null?void 0:t.authEnforced)??null});async function I(){C.value=!0;try{await ne(),H(v.healthError?"error":"ok",v.healthError||"Control plane reachable")}finally{C.value=!1}}const h=b(null),c=b(""),N=b(!1),y=b(""),x=b("viewer"),g=b(null),B=t=>{var e;return((e=h.value)==null?void 0:e.settings.find(l=>l.key===t))??null},r=p(()=>B("max_jobs")),f=p(()=>B("default_role"));function A(){var t,e;y.value=String(((t=r.value)==null?void 0:t.value)??""),x.value=String(((e=f.value)==null?void 0:e.value)??"viewer")}async function G(){const t=await P.get("/api/settings");if(N.value=!0,!t.ok){c.value=W(t,"read the host settings");return}c.value="",h.value=t.body,A()}G(),te();async function T(t,e){g.value=t;const l=await P.put(`/api/settings/${t}`,{value:e});if(g.value=null,!l.ok){c.value=W(l,`save ${t}`);return}c.value="",h.value&&(h.value.settings=h.value.settings.map(R=>R.key===t?{key:R.key,value:l.body.value,source:l.body.source,minRole:l.body.minRole}:R)),A(),H("ok","Saved.")}function k(t){return t?ie(M.includes(t.minRole)?t.minRole:"admin"):!1}function S(t){return!t||k(t)?"":`Needs the ${t.minRole} role.`}const j={db:"Set here",env:"From the environment",default:"The shipped default"},Q=p(()=>v.jobs.filter(t=>t.state==="running").length),X=p(()=>v.jobs.filter(t=>t.state==="queued").length),L=p(()=>re(y.value)),U=p(()=>{var t;return Number(y.value)!==Number((t=r.value)==null?void 0:t.value)}),J=p(()=>{var t;return x.value!==String(((t=f.value)==null?void 0:t.value)??"")}),Y={viewer:"reads everything",developer:"deploys and tears down",maintainer:"host configuration",admin:"accounts and sign-on"},Z=M.map(t=>({value:t,label:se(t),hint:Y[t]}));return(t,e)=>(i(),u("div",null,[e[30]||(e[30]=s("div",{class:"page-head"},[s("div",null,[s("h1",null,"Settings")])],-1)),s("section",de,[e[16]||(e[16]=s("h2",{class:"phead-title"},"Connection",-1)),e[17]||(e[17]=s("p",{class:"mute hint"},"Stored in this browser. Nothing here is sent anywhere.",-1)),s("div",ve,[e[10]||(e[10]=s("label",{for:"apiBase"},"API base URL",-1)),D(s("input",{id:"apiBase","onUpdate:modelValue":e[0]||(e[0]=l=>a(o).apiBase=l),type:"url",spellcheck:"false",placeholder:"(same origin)"},null,512),[[O,a(o).apiBase,void 0,{trim:!0}]]),e[11]||(e[11]=s("div",{class:"mute hint"},"Empty means same origin.",-1))]),s("div",me,[e[14]||(e[14]=s("label",{for:"token"},"Access token",-1)),D(s("input",{id:"token","onUpdate:modelValue":e[1]||(e[1]=l=>a(o).token=l),type:V.value||!a(o).token?"text":"password",name:"pstack-access-token",autocomplete:"off","data-1p-ignore":"","data-lpignore":"true","data-bwignore":"","data-form-type":"other",spellcheck:"false",placeholder:"paste the token from pstack init"},null,8,pe),[[le,a(o).token,void 0,{trim:!0}]]),s("div",fe,[a(o).token?(i(),u("button",{key:0,class:"ghost sm",onClick:e[2]||(e[2]=l=>V.value=!V.value)},n(V.value?"Hide":"Show"),1)):m("",!0),a(o).token?(i(),F(E,{key:1,variant:"ghost",class:"sm",confirm:"Clear it?",onRun:e[3]||(e[3]=l=>a(o).token="")},{default:_(()=>[...e[12]||(e[12]=[d(" Clear ",-1)])]),_:1})):m("",!0),a(o).token?(i(),u("span",be,n(K.value),1)):m("",!0)]),s("div",he,[e[13]||(e[13]=d(" Only needed for token-based access; signing in does the same job. ",-1)),q.value===!1?(i(),u(z,{key:0},[d("This server is not asking for one.")],64)):m("",!0)])]),s("div",ce,[s("button",{class:"btn",disabled:C.value,onClick:I},n(C.value?"Checking…":"Test connection"),9,ye),a(v).health?(i(),u("span",ge,[d(" Connected to pstack "+n(a(v).health.version)+" ",1),w(ae,{label:"where data is stored"},{default:_(()=>[e[15]||(e[15]=d(" Data directory: ",-1)),s("code",null,n(a(v).health.dataDir),1)]),_:1})])):a(v).healthError?(i(),u("span",ke,n(a(v).healthError),1)):m("",!0)])]),s("section",we,[e[24]||(e[24]=s("h2",{class:"phead-title"},"This host",-1)),e[25]||(e[25]=s("p",{class:"mute hint"},"Stored on the server, in force for everybody.",-1)),c.value?(i(),F(ue,{key:0,text:c.value,title:"Could not read the host settings."},null,8,["text"])):m("",!0),h.value?(i(),u(z,{key:1},[s("div",xe,[e[19]||(e[19]=s("label",{for:"maxJobs"},"Concurrency limit",-1)),s("div",Se,[D(s("input",{id:"maxJobs","onUpdate:modelValue":e[4]||(e[4]=l=>y.value=l),type:"number",min:"1",step:"1",inputmode:"numeric",disabled:!k(r.value),title:S(r.value)||void 0,style:oe(`width: 8rem${k(r.value)?"":"; opacity: 0.45; cursor: not-allowed"}`)},null,12,Ce),[[O,y.value]]),w(E,{variant:"primary",pending:g.value==="max_jobs",disabled:!k(r.value)||!U.value||!!L.value||g.value!==null,title:S(r.value)||L.value||(U.value?void 0:"this is already the stored value"),onClick:e[5]||(e[5]=l=>T("max_jobs",Number(y.value)))},{default:_(()=>[...e[18]||(e[18]=[d(" Save ",-1)])]),_:1},8,["pending","disabled","title"]),s("span",Ve,n(Q.value)+" running · "+n(X.value)+" waiting ",1)]),e[20]||(e[20]=s("div",{class:"mute hint"},[d(" Most jobs at once, across every stack. "),s("b",null,"Lowering it cancels nothing.")],-1)),r.value?(i(),u("div",_e,[s("b",null,n(j[r.value.source])+".",1),d(" "+n(S(r.value)),1)])):m("",!0)]),s("div",Re,[e[22]||(e[22]=s("label",{for:"defaultRole"},"Default role for new accounts",-1)),s("div",De,[w($,{id:"defaultRole",modelValue:x.value,"onUpdate:modelValue":e[6]||(e[6]=l=>x.value=l),label:"Default role for new accounts",options:a(Z),disabled:!k(f.value)},null,8,["modelValue","options","disabled"]),w(E,{variant:"primary",pending:g.value==="default_role",disabled:!k(f.value)||!J.value||g.value!==null,title:S(f.value)||(J.value?void 0:"this is already the stored value"),onClick:e[7]||(e[7]=l=>T("default_role",x.value))},{default:_(()=>[...e[21]||(e[21]=[d(" Save ",-1)])]),_:1},8,["pending","disabled","title"])]),e[23]||(e[23]=s("div",{class:"mute hint"},"New accounts only; existing ones keep their role.",-1)),f.value?(i(),u("div",Ee,[s("b",null,n(j[f.value.source])+".",1),d(" "+n(S(f.value)),1)])):m("",!0)])],64)):N.value?m("",!0):(i(),u("p",$e,"Reading…"))]),s("section",Ne,[e[28]||(e[28]=s("h2",{class:"phead-title"},"Appearance",-1)),e[29]||(e[29]=s("p",{class:"mute hint"},"Stored in this browser.",-1)),s("div",Be,[e[26]||(e[26]=s("label",{for:"theme"},"Theme",-1)),w($,{modelValue:a(o).theme,"onUpdate:modelValue":e[8]||(e[8]=l=>a(o).theme=l),id:"theme",label:"Theme",options:[{value:"system",label:"Follow the system"},{value:"dark",label:"Dark"},{value:"light",label:"Light"}]},null,8,["modelValue"])]),s("div",Ae,[e[27]||(e[27]=s("label",{for:"motion"},"Motion",-1)),w($,{modelValue:a(o).motion,"onUpdate:modelValue":e[9]||(e[9]=l=>a(o).motion=l),id:"motion",label:"Motion",options:[{value:"system",label:"Follow the system"},{value:"full",label:"Always animate"},{value:"none",label:"No animation"}]},null,8,["modelValue"])])])]))}});export{Fe as default};
2
+ //# sourceMappingURL=SettingsView-iWRluEj5.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SettingsView-Dxbl6HZA.js","sources":["../../src/views/SettingsView.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * Settings: where the API is, how to authenticate to it, how the app looks — and the two settings\n * that live on the HOST.\n *\n * ── TWO KINDS OF CONTROL ON ONE PAGE ─────────────────────────────────────────────────────────────\n *\n * Nobody should have to guess which is which, so each panel says so in its own subtitle rather than\n * the page making one claim at the top: \"nothing here is sent to the server\" was true of this page\n * for eight versions, and a sentence like that outlives its truth in people's memory.\n *\n * - THIS BROWSER — Connection and Appearance. `useSettings` writes them straight to localStorage;\n * nothing is sent anywhere, nobody else sees them, and there is nothing to save because the\n * bindings write through immediately. That is why those panels have no Save button.\n * - THIS HOST — the concurrency limit and the default role for new accounts. Stored in the\n * server's database, in force for everybody, and saved EXPLICITLY: a number box that wrote\n * through on every keystroke would set the cap to 1 on the way to typing 12.\n *\n * ── WHERE THE VALUE CAME FROM, ALWAYS ────────────────────────────────────────────────────────────\n *\n * Both host settings render their `source`, because \"I changed it and it did not stick\" is\n * otherwise unanswerable: a box saying 4 cannot tell a refused write from a stale page from an\n * environment variable overriding it. Precedence is database > environment > built-in default — so\n * `PSTACK_MAX_JOBS` is now the DEFAULT rather than the authority, and a value set here is not\n * silently reverted by the next restart. A save flips the row's source to \"db\", so the write's own\n * response is what the page re-renders from; keeping the old row and patching just the number would\n * leave the line still crediting the environment.\n *\n * ── LOWERING THE CAP CANCELS NOTHING ─────────────────────────────────────────────────────────────\n *\n * Said beside the field, where it stays true; the toast only says it saved. Jobs already running\n * the cap applies to the next dispatch. Someone typing 1 while four jobs run must not read the\n * confirmation as \"three were just killed\" — which is also why the running and waiting counts sit\n * next to the input rather than a page away in Jobs.\n *\n * ── A VIEWER READS BOTH AND WRITES NEITHER ───────────────────────────────────────────────────────\n *\n * Disabled, not hidden, with the reason in text under the control: a page that hides what your tier\n * cannot reach looks broken rather than restricted, and the reason cannot live only in a `title`\n * because a disabled `SelectMenu` has no element of its own to hang one on. The threshold comes\n * from the server's own permission table (`minRole`, per key — maintainer for the cap, admin for\n * the role) and is never re-derived here. An unrecognised name is read as ADMIN: `rank()` scores a\n * role it has never heard of as 0, so passing one through unguarded would enable the control for\n * everyone. Hiding is courtesy either way — the server's 403 is the enforcement, and it lands in\n * `hostError`.\n */\nimport { computed, ref } from 'vue';\nimport { api, problem } from '../api/client';\nimport { ROLES, type HostSettings, type Role, type SettingKey, type SettingRow, type SettingWritten } from '../api/types';\nimport { can } from '../composables/useAuth';\nimport { capProblem } from '../composables/useJobQueue';\nimport { settings } from '../composables/useSettings';\nimport { state, loadHealth, loadJobs } from '../composables/useControlPlane';\nimport { sentence } from '../composables/useFormat';\nimport { toast } from '../composables/useToasts';\nimport ActionButton from '../components/ActionButton.vue';\nimport ErrorNote from '../components/ErrorNote.vue';\nimport InfoHint from '../components/InfoHint.vue';\nimport SelectMenu from '../components/SelectMenu.vue';\n\nconst checking = ref(false);\nconst reveal = ref(false);\n\n/**\n * What is in the token box, described without printing it.\n *\n * The point is to make a WRONG value visible at a glance. A password autofilled into this field is\n * short and matches neither shape, and \"12 characters, not a pstack token\" is the sentence that\n * ends the mystery — before this, the only symptom was every page 401ing.\n */\nconst tokenShape = computed(() => {\n const t = settings.token;\n if (t.startsWith('pstack_pat_')) return 'Personal token.';\n if (/^[0-9a-f]{40,}$/i.test(t)) return 'Machine token.';\n return `${t.length} characters — not a pstack token.`;\n});\n\n/**\n * The server tells us whether it enforces auth. When it does not, it is bound to loopback and a\n * token would be pointless — worth saying, so nobody hunts for one that was never issued.\n */\nconst authEnforced = computed(() => state.health?.authEnforced ?? null);\n\nasync function recheck(): Promise<void> {\n checking.value = true;\n try {\n await loadHealth();\n toast(state.healthError ? 'error' : 'ok', state.healthError || 'Control plane reachable');\n } finally {\n checking.value = false;\n }\n}\n\n// ── the host's settings ──────────────────────────────────────────────────────────────────────────\n\nconst host = ref<HostSettings | null>(null);\nconst hostError = ref('');\nconst hostLoaded = ref(false);\n/**\n * What the boxes hold, kept apart from the server's copy so \"changed\" is a comparison, not a flag.\n *\n * `string | number` is not laziness about the type: `v-model` on `<input type=\"number\">` REPLACES\n * the string with a number as soon as the value parses, so this ref genuinely holds both — a string\n * when it is empty or freshly reset from the server, a number after a keystroke.\n */\nconst maxJobsDraft = ref<string | number>('');\nconst roleDraft = ref('viewer');\n/** Which key is in flight — one at a time, so a save cannot be racing its own re-read. */\nconst savingKey = ref<SettingKey | null>(null);\n\nconst row = (key: SettingKey): SettingRow | null => host.value?.settings.find((s) => s.key === key) ?? null;\nconst maxJobs = computed(() => row('max_jobs'));\nconst defaultRole = computed(() => row('default_role'));\n\n/** Both drafts back to what the server just said. Called after every read and every write. */\nfunction resetDrafts(): void {\n maxJobsDraft.value = String(maxJobs.value?.value ?? '');\n roleDraft.value = String(defaultRole.value?.value ?? 'viewer');\n}\n\nasync function loadHost(): Promise<void> {\n const r = await api.get<HostSettings>('/api/settings');\n hostLoaded.value = true;\n if (!r.ok) {\n // Includes the honest 404: a server older than these settings has no such route, and `problem`\n // says exactly that rather than inventing a reason.\n hostError.value = problem(r, 'read the host settings');\n return;\n }\n hostError.value = '';\n host.value = r.body;\n resetDrafts();\n}\nvoid loadHost();\n// The shell polls the job list every seven seconds once signed in; this is only so the counts\n// beside the cap are right on arrival rather than up to a poll later.\nvoid loadJobs();\n\nasync function save(key: SettingKey, value: number | string): Promise<void> {\n savingKey.value = key;\n const r = await api.put<SettingWritten>(`/api/settings/${key}`, { value });\n savingKey.value = null;\n if (!r.ok) {\n hostError.value = problem(r, `save ${key}`);\n return;\n }\n hostError.value = '';\n // The WHOLE row from the response, not just the number: a stored value's source is now \"db\", and\n // a line still saying \"from the environment\" is the precise lie this display exists to prevent.\n if (host.value) {\n host.value.settings = host.value.settings.map((s) =>\n s.key === key ? { key: s.key, value: r.body.value, source: r.body.source, minRole: r.body.minRole } : s,\n );\n }\n resetDrafts();\n // The server's `note` says what a cap change did and did not do; that fact is on the page beside\n // the field, so the toast stays a toast.\n toast('ok', 'Saved.');\n}\n\n/**\n * May this account write this key — for rendering only.\n *\n * FAILS CLOSED on a `minRole` this build does not know: `rank()` scores an unfamiliar role 0, so\n * handing one to `can()` unchecked would answer true for every signed-in account, and the least\n * privileged person on the host would be shown a control the server refuses.\n */\nfunction mayWrite(r: SettingRow | null): boolean {\n if (!r) return false;\n return can((ROLES as readonly string[]).includes(r.minRole) ? (r.minRole as Role) : 'admin');\n}\n\n/** Empty when they may write it; otherwise the sentence rendered under the disabled control. */\nfunction whyReadOnly(r: SettingRow | null): string {\n if (!r || mayWrite(r)) return '';\n return `Needs the ${r.minRole} role.`;\n}\n\n// Where the value came from — a fact about the host, never an instruction: a viewer reads this line\n// too, and whoever set it may not be the person looking. Precedence itself lives in docs/usage.md.\nconst SOURCE_LABEL: Record<SettingRow['source'], string> = {\n db: 'Set here',\n env: 'From the environment',\n default: 'The shipped default',\n};\n\nconst running = computed(() => state.jobs.filter((j) => j.state === 'running').length);\nconst waiting = computed(() => state.jobs.filter((j) => j.state === 'queued').length);\n\n/**\n * Why the cap cannot be saved as typed — shown as the button's title, per the disabled rule.\n *\n * The rule itself lives in `useJobQueue` because this app has no component harness: logic that\n * would sit inline in a `.vue` is untestable there, and this one shipped broken.\n */\nconst maxJobsProblem = computed(() => capProblem(maxJobsDraft.value));\n/** `Number` on both sides: the input hands back a string, so `'4' !== 4` would leave Save lit forever. */\nconst maxJobsDirty = computed(() => Number(maxJobsDraft.value) !== Number(maxJobs.value?.value));\nconst roleDirty = computed(() => roleDraft.value !== String(defaultRole.value?.value ?? ''));\n\n/** One line each, in the picker itself — a role name alone does not say what it costs to grant. */\nconst ROLE_WHAT: Record<Role, string> = {\n viewer: 'reads everything',\n developer: 'deploys and tears down',\n maintainer: 'host configuration',\n admin: 'accounts and sign-on',\n};\nconst roleOptions = ROLES.map((r) => ({ value: r, label: sentence(r), hint: ROLE_WHAT[r] }));\n</script>\n\n<template>\n <div>\n <div class=\"page-head\">\n <div>\n <h1>Settings</h1>\n <!-- No page-level subtitle: two panels are this browser's and one is the host's, so each\n says which in its own line — a claim at the top would be a lie about one of them. -->\n </div>\n </div>\n\n <!-- `settings-form` caps the field widths: a URL input stretched to the panel's full 1500px\n reads as a text editor, not a form — see the rule in app.css. -->\n <section class=\"panel settings-form\">\n <h2 class=\"phead-title\">Connection</h2>\n <p class=\"mute hint\">Stored in this browser. Nothing here is sent anywhere.</p>\n\n <div class=\"field\">\n <label for=\"apiBase\">API base URL</label>\n <input\n id=\"apiBase\"\n v-model.trim=\"settings.apiBase\"\n type=\"url\"\n spellcheck=\"false\"\n placeholder=\"(same origin)\"\n />\n <div class=\"mute hint\">Empty means same origin.</div>\n </div>\n\n <div class=\"field\">\n <label for=\"token\">Access token</label>\n <!--\n NOT `type=\"password\"`, and none of these attributes are decorative.\n\n This field is why \"opening Settings signs me out\" was a real bug. A password input is an\n autofill magnet: Chrome and every password manager fill one on sight and ignore\n `autocomplete=\"off\"` while doing it. The filled value went straight through `v-model` into\n localStorage and onto every request as `Authorization: Bearer <someone's password>` — and\n the server used to treat a bad bearer as a hard refusal rather than falling back to the\n session cookie, so a perfectly good login 401'd on every route until site data was cleared.\n\n The server now falls through (that is the real fix), and this field stops inviting the\n fill: a text input that masks itself only while it holds a value, named nothing like a\n password, with the ignore hints the managers respect.\n -->\n <input\n id=\"token\"\n v-model.trim=\"settings.token\"\n :type=\"reveal || !settings.token ? 'text' : 'password'\"\n name=\"pstack-access-token\"\n autocomplete=\"off\"\n data-1p-ignore\n data-lpignore=\"true\"\n data-bwignore\n data-form-type=\"other\"\n spellcheck=\"false\"\n placeholder=\"paste the token from pstack init\"\n />\n <div class=\"row\" style=\"margin-top: var(--s2)\">\n <button v-if=\"settings.token\" class=\"ghost sm\" @click=\"reveal = !reveal\">\n {{ reveal ? 'Hide' : 'Show' }}\n </button>\n <ActionButton\n v-if=\"settings.token\"\n variant=\"ghost\"\n class=\"sm\"\n confirm=\"Clear it?\"\n @run=\"settings.token = ''\"\n >\n Clear\n </ActionButton>\n <span v-if=\"settings.token\" class=\"mute\" style=\"font-size: var(--t-xs)\">\n {{ tokenShape }}\n </span>\n </div>\n <div class=\"mute hint\">\n Only needed for token-based access; signing in does the same job.\n <template v-if=\"authEnforced === false\">This server is not asking for one.</template>\n </div>\n </div>\n\n <div class=\"row\" style=\"gap: 8px; margin-top: 4px\">\n <button class=\"btn\" :disabled=\"checking\" @click=\"recheck\">\n {{ checking ? 'Checking…' : 'Test connection' }}\n </button>\n <span v-if=\"state.health\" class=\"mute\">\n Connected to pstack {{ state.health.version }}\n <InfoHint label=\"where data is stored\">\n Data directory: <code>{{ state.health.dataDir }}</code>\n </InfoHint>\n </span>\n <span v-else-if=\"state.healthError\" class=\"bad\">{{ state.healthError }}</span>\n </div>\n </section>\n\n <!-- ===================== the host's own settings — everyone sees these ===================== -->\n <section class=\"panel settings-form\">\n <h2 class=\"phead-title\">This host</h2>\n <p class=\"mute hint\">Stored on the server, in force for everybody.</p>\n\n <ErrorNote v-if=\"hostError\" :text=\"hostError\" title=\"Could not read the host settings.\" />\n\n <template v-if=\"host\">\n <div class=\"field\">\n <!-- The dimming is inline because app.css has no `input:disabled` rule — `button:disabled`\n exists (which is what fades the role picker, a real <button> under the hood) and\n checkboxes have one, but this is the app's first disabled TEXT-shaped input, and\n without it a viewer gets a box that looks live, takes no focus and explains nothing.\n It matches the button rule's 0.45; the honest home for it is app.css, which is not\n this agent's to edit. -->\n <label for=\"maxJobs\">Concurrency limit</label>\n <div class=\"row\">\n <input\n id=\"maxJobs\"\n v-model=\"maxJobsDraft\"\n type=\"number\"\n min=\"1\"\n step=\"1\"\n inputmode=\"numeric\"\n :disabled=\"!mayWrite(maxJobs)\"\n :title=\"whyReadOnly(maxJobs) || undefined\"\n :style=\"`width: 8rem${mayWrite(maxJobs) ? '' : '; opacity: 0.45; cursor: not-allowed'}`\"\n />\n <ActionButton\n variant=\"primary\"\n :pending=\"savingKey === 'max_jobs'\"\n :disabled=\"!mayWrite(maxJobs) || !maxJobsDirty || !!maxJobsProblem || savingKey !== null\"\n :title=\"whyReadOnly(maxJobs) || maxJobsProblem || (maxJobsDirty ? undefined : 'this is already the stored value')\"\n @click=\"save('max_jobs', Number(maxJobsDraft))\"\n >\n Save\n </ActionButton>\n <span class=\"mute\" style=\"font-size: var(--t-xs)\">\n {{ running }} running · {{ waiting }} waiting\n </span>\n </div>\n <div class=\"mute hint\">\n Most jobs at once, across every stack. <b>Lowering it cancels nothing.</b>\n </div>\n <div v-if=\"maxJobs\" class=\"mute hint\">\n <b>{{ SOURCE_LABEL[maxJobs.source] }}.</b> {{ whyReadOnly(maxJobs) }}\n </div>\n </div>\n\n <div class=\"field\">\n <label for=\"defaultRole\">Default role for new accounts</label>\n <div class=\"row\">\n <SelectMenu\n id=\"defaultRole\"\n v-model=\"roleDraft\"\n label=\"Default role for new accounts\"\n :options=\"roleOptions\"\n :disabled=\"!mayWrite(defaultRole)\"\n />\n <ActionButton\n variant=\"primary\"\n :pending=\"savingKey === 'default_role'\"\n :disabled=\"!mayWrite(defaultRole) || !roleDirty || savingKey !== null\"\n :title=\"whyReadOnly(defaultRole) || (roleDirty ? undefined : 'this is already the stored value')\"\n @click=\"save('default_role', roleDraft)\"\n >\n Save\n </ActionButton>\n </div>\n <div class=\"mute hint\">New accounts only; existing ones keep their role.</div>\n <div v-if=\"defaultRole\" class=\"mute hint\">\n <b>{{ SOURCE_LABEL[defaultRole.source] }}.</b> {{ whyReadOnly(defaultRole) }}\n </div>\n </div>\n </template>\n <p v-else-if=\"!hostLoaded\" class=\"mute hint\">Reading…</p>\n </section>\n\n <section class=\"panel\">\n <h2 class=\"phead-title\">Appearance</h2>\n <p class=\"mute hint\">Stored in this browser.</p>\n\n <div class=\"field\">\n <label for=\"theme\">Theme</label>\n <SelectMenu\n v-model=\"settings.theme\" id=\"theme\"\n label=\"Theme\"\n :options=\"[\n { value: 'system', label: 'Follow the system' },\n { value: 'dark', label: 'Dark' },\n { value: 'light', label: 'Light' },\n ]\"\n />\n </div>\n\n <div class=\"field\">\n <label for=\"motion\">Motion</label>\n <SelectMenu\n v-model=\"settings.motion\" id=\"motion\"\n label=\"Motion\"\n :options=\"[\n { value: 'system', label: 'Follow the system' },\n { value: 'full', label: 'Always animate' },\n { value: 'none', label: 'No animation' },\n ]\"\n />\n </div>\n </section>\n </div>\n</template>\n"],"names":["checking","ref","reveal","tokenShape","computed","settings","authEnforced","_a","state","recheck","loadHealth","toast","host","hostError","hostLoaded","maxJobsDraft","roleDraft","savingKey","row","key","s","maxJobs","defaultRole","resetDrafts","_b","loadHost","r","api","problem","loadJobs","save","value","mayWrite","can","ROLES","whyReadOnly","SOURCE_LABEL","running","j","waiting","maxJobsProblem","capProblem","maxJobsDirty","roleDirty","ROLE_WHAT","roleOptions","sentence","_createElementBlock","_createElementVNode","_hoisted_1","_cache","_hoisted_2","$event","_unref","_hoisted_3","_hoisted_5","_createBlock","ActionButton","_hoisted_6","_toDisplayString","_hoisted_7","_Fragment","_hoisted_8","_hoisted_9","_openBlock","_hoisted_10","_createTextVNode","_createVNode","InfoHint","_hoisted_11","_hoisted_12","ErrorNote","_hoisted_13","_hoisted_14","_normalizeStyle","_hoisted_16","_hoisted_17","_hoisted_18","_hoisted_19","SelectMenu","_hoisted_20","_hoisted_21","_hoisted_22","_hoisted_23","_hoisted_24"],"mappings":"uuCA4DA,MAAMA,EAAWC,EAAI,EAAK,EACpBC,EAASD,EAAI,EAAK,EASlBE,EAAaC,EAAS,IAAM,CAChC,MAAM,EAAIC,EAAS,MACnB,OAAI,EAAE,WAAW,aAAa,EAAU,kBACpC,mBAAmB,KAAK,CAAC,EAAU,iBAChC,GAAG,EAAE,MAAM,mCACpB,CAAC,EAMKC,EAAeF,EAAS,IAAA,OAAM,QAAAG,EAAAC,EAAM,SAAN,YAAAD,EAAc,eAAgB,KAAI,EAEtE,eAAeE,GAAyB,CACtCT,EAAS,MAAQ,GACjB,GAAI,CACF,MAAMU,GAAA,EACNC,EAAMH,EAAM,YAAc,QAAU,KAAMA,EAAM,aAAe,yBAAyB,CAC1F,QAAA,CACER,EAAS,MAAQ,EACnB,CACF,CAIA,MAAMY,EAAOX,EAAyB,IAAI,EACpCY,EAAYZ,EAAI,EAAE,EAClBa,EAAab,EAAI,EAAK,EAQtBc,EAAed,EAAqB,EAAE,EACtCe,EAAYf,EAAI,QAAQ,EAExBgB,EAAYhB,EAAuB,IAAI,EAEvCiB,EAAOC,UAAuC,QAAAZ,EAAAK,EAAK,QAAL,YAAAL,EAAY,SAAS,KAAMa,GAAMA,EAAE,MAAQD,KAAQ,MACjGE,EAAUjB,EAAS,IAAMc,EAAI,UAAU,CAAC,EACxCI,EAAclB,EAAS,IAAMc,EAAI,cAAc,CAAC,EAGtD,SAASK,GAAoB,SAC3BR,EAAa,MAAQ,SAAOR,EAAAc,EAAQ,QAAR,YAAAd,EAAe,QAAS,EAAE,EACtDS,EAA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WAAA1B,EAAAhD,CAAA,EAAS,MAAT,sBAAA6C,EAAA,CAAA,IAAAA,EAAA,CAAA,EAAAE,GAAAC,EAAAhD,CAAA,EAAS,MAAK+C,GAAE,GAAG,QAC5B,MAAM,QACL,QAAS,sGAIT,2BAIPJ,EAWM,MAXNoC,GAWM,CAVJlC,EAAA,EAAA,IAAAA,EAAA,EAAA,EAAAF,EAAkC,QAAA,CAA3B,IAAI,QAAA,EAAS,SAAM,EAAA,GAC1BmB,EAQIY,EAAA,CAPS,WAAA1B,EAAAhD,CAAA,EAAS,OAAT,sBAAA6C,EAAA,CAAA,IAAAA,EAAA,CAAA,EAAAE,GAAAC,EAAAhD,CAAA,EAAS,OAAM+C,GAAE,GAAG,SAC7B,MAAM,SACL,QAAS,sHAIT"}
1
+ {"version":3,"file":"SettingsView-iWRluEj5.js","sources":["../../src/views/SettingsView.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * Settings: where the API is, how to authenticate to it, how the app looks — and the two settings\n * that live on the HOST.\n *\n * ── TWO KINDS OF CONTROL ON ONE PAGE ─────────────────────────────────────────────────────────────\n *\n * Nobody should have to guess which is which, so each panel says so in its own subtitle rather than\n * the page making one claim at the top: \"nothing here is sent to the server\" was true of this page\n * for eight versions, and a sentence like that outlives its truth in people's memory.\n *\n * - THIS BROWSER — Connection and Appearance. `useSettings` writes them straight to localStorage;\n * nothing is sent anywhere, nobody else sees them, and there is nothing to save because the\n * bindings write through immediately. That is why those panels have no Save button.\n * - THIS HOST — the concurrency limit and the default role for new accounts. Stored in the\n * server's database, in force for everybody, and saved EXPLICITLY: a number box that wrote\n * through on every keystroke would set the cap to 1 on the way to typing 12.\n *\n * ── WHERE THE VALUE CAME FROM, ALWAYS ────────────────────────────────────────────────────────────\n *\n * Both host settings render their `source`, because \"I changed it and it did not stick\" is\n * otherwise unanswerable: a box saying 4 cannot tell a refused write from a stale page from an\n * environment variable overriding it. Precedence is database > environment > built-in default — so\n * `PSTACK_MAX_JOBS` is now the DEFAULT rather than the authority, and a value set here is not\n * silently reverted by the next restart. A save flips the row's source to \"db\", so the write's own\n * response is what the page re-renders from; keeping the old row and patching just the number would\n * leave the line still crediting the environment.\n *\n * ── LOWERING THE CAP CANCELS NOTHING ─────────────────────────────────────────────────────────────\n *\n * Said beside the field, where it stays true; the toast only says it saved. Jobs already running\n * the cap applies to the next dispatch. Someone typing 1 while four jobs run must not read the\n * confirmation as \"three were just killed\" — which is also why the running and waiting counts sit\n * next to the input rather than a page away in Jobs.\n *\n * ── A VIEWER READS BOTH AND WRITES NEITHER ───────────────────────────────────────────────────────\n *\n * Disabled, not hidden, with the reason in text under the control: a page that hides what your tier\n * cannot reach looks broken rather than restricted, and the reason cannot live only in a `title`\n * because a disabled `SelectMenu` has no element of its own to hang one on. The threshold comes\n * from the server's own permission table (`minRole`, per key — maintainer for the cap, admin for\n * the role) and is never re-derived here. An unrecognised name is read as ADMIN: `rank()` scores a\n * role it has never heard of as 0, so passing one through unguarded would enable the control for\n * everyone. Hiding is courtesy either way — the server's 403 is the enforcement, and it lands in\n * `hostError`.\n */\nimport { computed, ref } from 'vue';\nimport { api, problem } from '../api/client';\nimport { ROLES, type HostSettings, type Role, type SettingKey, type SettingRow, type SettingWritten } from '../api/types';\nimport { can } from '../composables/useAuth';\nimport { capProblem } from '../composables/useJobQueue';\nimport { settings } from '../composables/useSettings';\nimport { state, loadHealth, loadJobs } from '../composables/useControlPlane';\nimport { sentence } from '../composables/useFormat';\nimport { toast } from '../composables/useToasts';\nimport ActionButton from '../components/ActionButton.vue';\nimport ErrorNote from '../components/ErrorNote.vue';\nimport InfoHint from '../components/InfoHint.vue';\nimport SelectMenu from '../components/SelectMenu.vue';\n\nconst checking = ref(false);\nconst reveal = ref(false);\n\n/**\n * What is in the token box, described without printing it.\n *\n * The point is to make a WRONG value visible at a glance. A password autofilled into this field is\n * short and matches neither shape, and \"12 characters, not a pstack token\" is the sentence that\n * ends the mystery — before this, the only symptom was every page 401ing.\n */\nconst tokenShape = computed(() => {\n const t = settings.token;\n if (t.startsWith('pstack_pat_')) return 'Personal token.';\n if (/^[0-9a-f]{40,}$/i.test(t)) return 'Machine token.';\n return `${t.length} characters — not a pstack token.`;\n});\n\n/**\n * The server tells us whether it enforces auth. When it does not, it is bound to loopback and a\n * token would be pointless — worth saying, so nobody hunts for one that was never issued.\n */\nconst authEnforced = computed(() => state.health?.authEnforced ?? null);\n\nasync function recheck(): Promise<void> {\n checking.value = true;\n try {\n await loadHealth();\n toast(state.healthError ? 'error' : 'ok', state.healthError || 'Control plane reachable');\n } finally {\n checking.value = false;\n }\n}\n\n// ── the host's settings ──────────────────────────────────────────────────────────────────────────\n\nconst host = ref<HostSettings | null>(null);\nconst hostError = ref('');\nconst hostLoaded = ref(false);\n/**\n * What the boxes hold, kept apart from the server's copy so \"changed\" is a comparison, not a flag.\n *\n * `string | number` is not laziness about the type: `v-model` on `<input type=\"number\">` REPLACES\n * the string with a number as soon as the value parses, so this ref genuinely holds both — a string\n * when it is empty or freshly reset from the server, a number after a keystroke.\n */\nconst maxJobsDraft = ref<string | number>('');\nconst roleDraft = ref('viewer');\n/** Which key is in flight — one at a time, so a save cannot be racing its own re-read. */\nconst savingKey = ref<SettingKey | null>(null);\n\nconst row = (key: SettingKey): SettingRow | null => host.value?.settings.find((s) => s.key === key) ?? null;\nconst maxJobs = computed(() => row('max_jobs'));\nconst defaultRole = computed(() => row('default_role'));\n\n/** Both drafts back to what the server just said. Called after every read and every write. */\nfunction resetDrafts(): void {\n maxJobsDraft.value = String(maxJobs.value?.value ?? '');\n roleDraft.value = String(defaultRole.value?.value ?? 'viewer');\n}\n\nasync function loadHost(): Promise<void> {\n const r = await api.get<HostSettings>('/api/settings');\n hostLoaded.value = true;\n if (!r.ok) {\n // Includes the honest 404: a server older than these settings has no such route, and `problem`\n // says exactly that rather than inventing a reason.\n hostError.value = problem(r, 'read the host settings');\n return;\n }\n hostError.value = '';\n host.value = r.body;\n resetDrafts();\n}\nvoid loadHost();\n// The shell polls the job list every seven seconds once signed in; this is only so the counts\n// beside the cap are right on arrival rather than up to a poll later.\nvoid loadJobs();\n\nasync function save(key: SettingKey, value: number | string): Promise<void> {\n savingKey.value = key;\n const r = await api.put<SettingWritten>(`/api/settings/${key}`, { value });\n savingKey.value = null;\n if (!r.ok) {\n hostError.value = problem(r, `save ${key}`);\n return;\n }\n hostError.value = '';\n // The WHOLE row from the response, not just the number: a stored value's source is now \"db\", and\n // a line still saying \"from the environment\" is the precise lie this display exists to prevent.\n if (host.value) {\n host.value.settings = host.value.settings.map((s) =>\n s.key === key ? { key: s.key, value: r.body.value, source: r.body.source, minRole: r.body.minRole } : s,\n );\n }\n resetDrafts();\n // The server's `note` says what a cap change did and did not do; that fact is on the page beside\n // the field, so the toast stays a toast.\n toast('ok', 'Saved.');\n}\n\n/**\n * May this account write this key — for rendering only.\n *\n * FAILS CLOSED on a `minRole` this build does not know: `rank()` scores an unfamiliar role 0, so\n * handing one to `can()` unchecked would answer true for every signed-in account, and the least\n * privileged person on the host would be shown a control the server refuses.\n */\nfunction mayWrite(r: SettingRow | null): boolean {\n if (!r) return false;\n return can((ROLES as readonly string[]).includes(r.minRole) ? (r.minRole as Role) : 'admin');\n}\n\n/** Empty when they may write it; otherwise the sentence rendered under the disabled control. */\nfunction whyReadOnly(r: SettingRow | null): string {\n if (!r || mayWrite(r)) return '';\n return `Needs the ${r.minRole} role.`;\n}\n\n// Where the value came from — a fact about the host, never an instruction: a viewer reads this line\n// too, and whoever set it may not be the person looking. Precedence itself lives in docs/usage.md.\nconst SOURCE_LABEL: Record<SettingRow['source'], string> = {\n db: 'Set here',\n env: 'From the environment',\n default: 'The shipped default',\n};\n\nconst running = computed(() => state.jobs.filter((j) => j.state === 'running').length);\nconst waiting = computed(() => state.jobs.filter((j) => j.state === 'queued').length);\n\n/**\n * Why the cap cannot be saved as typed — shown as the button's title, per the disabled rule.\n *\n * The rule itself lives in `useJobQueue` because this app has no component harness: logic that\n * would sit inline in a `.vue` is untestable there, and this one shipped broken.\n */\nconst maxJobsProblem = computed(() => capProblem(maxJobsDraft.value));\n/** `Number` on both sides: the input hands back a string, so `'4' !== 4` would leave Save lit forever. */\nconst maxJobsDirty = computed(() => Number(maxJobsDraft.value) !== Number(maxJobs.value?.value));\nconst roleDirty = computed(() => roleDraft.value !== String(defaultRole.value?.value ?? ''));\n\n/** One line each, in the picker itself — a role name alone does not say what it costs to grant. */\nconst ROLE_WHAT: Record<Role, string> = {\n viewer: 'reads everything',\n developer: 'deploys and tears down',\n maintainer: 'host configuration',\n admin: 'accounts and sign-on',\n};\nconst roleOptions = ROLES.map((r) => ({ value: r, label: sentence(r), hint: ROLE_WHAT[r] }));\n</script>\n\n<template>\n <div>\n <div class=\"page-head\">\n <div>\n <h1>Settings</h1>\n <!-- No page-level subtitle: two panels are this browser's and one is the host's, so each\n says which in its own line — a claim at the top would be a lie about one of them. -->\n </div>\n </div>\n\n <!-- `settings-form` caps the field widths: a URL input stretched to the panel's full 1500px\n reads as a text editor, not a form — see the rule in app.css. -->\n <section class=\"panel settings-form\">\n <h2 class=\"phead-title\">Connection</h2>\n <p class=\"mute hint\">Stored in this browser. Nothing here is sent anywhere.</p>\n\n <div class=\"field\">\n <label for=\"apiBase\">API base URL</label>\n <input\n id=\"apiBase\"\n v-model.trim=\"settings.apiBase\"\n type=\"url\"\n spellcheck=\"false\"\n placeholder=\"(same origin)\"\n />\n <div class=\"mute hint\">Empty means same origin.</div>\n </div>\n\n <div class=\"field\">\n <label for=\"token\">Access token</label>\n <!--\n NOT `type=\"password\"`, and none of these attributes are decorative.\n\n This field is why \"opening Settings signs me out\" was a real bug. A password input is an\n autofill magnet: Chrome and every password manager fill one on sight and ignore\n `autocomplete=\"off\"` while doing it. The filled value went straight through `v-model` into\n localStorage and onto every request as `Authorization: Bearer <someone's password>` — and\n the server used to treat a bad bearer as a hard refusal rather than falling back to the\n session cookie, so a perfectly good login 401'd on every route until site data was cleared.\n\n The server now falls through (that is the real fix), and this field stops inviting the\n fill: a text input that masks itself only while it holds a value, named nothing like a\n password, with the ignore hints the managers respect.\n -->\n <input\n id=\"token\"\n v-model.trim=\"settings.token\"\n :type=\"reveal || !settings.token ? 'text' : 'password'\"\n name=\"pstack-access-token\"\n autocomplete=\"off\"\n data-1p-ignore\n data-lpignore=\"true\"\n data-bwignore\n data-form-type=\"other\"\n spellcheck=\"false\"\n placeholder=\"paste the token from pstack init\"\n />\n <div class=\"row\" style=\"margin-top: var(--s2)\">\n <button v-if=\"settings.token\" class=\"ghost sm\" @click=\"reveal = !reveal\">\n {{ reveal ? 'Hide' : 'Show' }}\n </button>\n <ActionButton\n v-if=\"settings.token\"\n variant=\"ghost\"\n class=\"sm\"\n confirm=\"Clear it?\"\n @run=\"settings.token = ''\"\n >\n Clear\n </ActionButton>\n <span v-if=\"settings.token\" class=\"mute\" style=\"font-size: var(--t-xs)\">\n {{ tokenShape }}\n </span>\n </div>\n <div class=\"mute hint\">\n Only needed for token-based access; signing in does the same job.\n <template v-if=\"authEnforced === false\">This server is not asking for one.</template>\n </div>\n </div>\n\n <div class=\"row\" style=\"gap: 8px; margin-top: 4px\">\n <button class=\"btn\" :disabled=\"checking\" @click=\"recheck\">\n {{ checking ? 'Checking…' : 'Test connection' }}\n </button>\n <span v-if=\"state.health\" class=\"mute\">\n Connected to pstack {{ state.health.version }}\n <InfoHint label=\"where data is stored\">\n Data directory: <code>{{ state.health.dataDir }}</code>\n </InfoHint>\n </span>\n <span v-else-if=\"state.healthError\" class=\"bad\">{{ state.healthError }}</span>\n </div>\n </section>\n\n <!-- ===================== the host's own settings — everyone sees these ===================== -->\n <section class=\"panel settings-form\">\n <h2 class=\"phead-title\">This host</h2>\n <p class=\"mute hint\">Stored on the server, in force for everybody.</p>\n\n <ErrorNote v-if=\"hostError\" :text=\"hostError\" title=\"Could not read the host settings.\" />\n\n <template v-if=\"host\">\n <div class=\"field\">\n <!-- The dimming is inline because app.css has no `input:disabled` rule — `button:disabled`\n exists (which is what fades the role picker, a real <button> under the hood) and\n checkboxes have one, but this is the app's first disabled TEXT-shaped input, and\n without it a viewer gets a box that looks live, takes no focus and explains nothing.\n It matches the button rule's 0.45; the honest home for it is app.css, which is not\n this agent's to edit. -->\n <label for=\"maxJobs\">Concurrency limit</label>\n <div class=\"row\">\n <input\n id=\"maxJobs\"\n v-model=\"maxJobsDraft\"\n type=\"number\"\n min=\"1\"\n step=\"1\"\n inputmode=\"numeric\"\n :disabled=\"!mayWrite(maxJobs)\"\n :title=\"whyReadOnly(maxJobs) || undefined\"\n :style=\"`width: 8rem${mayWrite(maxJobs) ? '' : '; opacity: 0.45; cursor: not-allowed'}`\"\n />\n <ActionButton\n variant=\"primary\"\n :pending=\"savingKey === 'max_jobs'\"\n :disabled=\"!mayWrite(maxJobs) || !maxJobsDirty || !!maxJobsProblem || savingKey !== null\"\n :title=\"whyReadOnly(maxJobs) || maxJobsProblem || (maxJobsDirty ? undefined : 'this is already the stored value')\"\n @click=\"save('max_jobs', Number(maxJobsDraft))\"\n >\n Save\n </ActionButton>\n <span class=\"mute\" style=\"font-size: var(--t-xs)\">\n {{ running }} running · {{ waiting }} waiting\n </span>\n </div>\n <div class=\"mute hint\">\n Most jobs at once, across every stack. <b>Lowering it cancels nothing.</b>\n </div>\n <div v-if=\"maxJobs\" class=\"mute hint\">\n <b>{{ SOURCE_LABEL[maxJobs.source] }}.</b> {{ whyReadOnly(maxJobs) }}\n </div>\n </div>\n\n <div class=\"field\">\n <label for=\"defaultRole\">Default role for new accounts</label>\n <div class=\"row\">\n <SelectMenu\n id=\"defaultRole\"\n v-model=\"roleDraft\"\n label=\"Default role for new accounts\"\n :options=\"roleOptions\"\n :disabled=\"!mayWrite(defaultRole)\"\n />\n <ActionButton\n variant=\"primary\"\n :pending=\"savingKey === 'default_role'\"\n :disabled=\"!mayWrite(defaultRole) || !roleDirty || savingKey !== null\"\n :title=\"whyReadOnly(defaultRole) || (roleDirty ? undefined : 'this is already the stored value')\"\n @click=\"save('default_role', roleDraft)\"\n >\n Save\n </ActionButton>\n </div>\n <div class=\"mute hint\">New accounts only; existing ones keep their role.</div>\n <div v-if=\"defaultRole\" class=\"mute hint\">\n <b>{{ SOURCE_LABEL[defaultRole.source] }}.</b> {{ whyReadOnly(defaultRole) }}\n </div>\n </div>\n </template>\n <p v-else-if=\"!hostLoaded\" class=\"mute hint\">Reading…</p>\n </section>\n\n <section class=\"panel\">\n <h2 class=\"phead-title\">Appearance</h2>\n <p class=\"mute hint\">Stored in this browser.</p>\n\n <div class=\"field\">\n <label for=\"theme\">Theme</label>\n <SelectMenu\n v-model=\"settings.theme\" id=\"theme\"\n label=\"Theme\"\n :options=\"[\n { value: 'system', label: 'Follow the system' },\n { value: 'dark', label: 'Dark' },\n { value: 'light', label: 'Light' },\n ]\"\n />\n </div>\n\n <div class=\"field\">\n <label for=\"motion\">Motion</label>\n <SelectMenu\n v-model=\"settings.motion\" id=\"motion\"\n label=\"Motion\"\n :options=\"[\n { value: 'system', label: 'Follow the system' },\n { value: 'full', label: 'Always animate' },\n { value: 'none', label: 'No animation' },\n ]\"\n />\n </div>\n </section>\n </div>\n</template>\n"],"names":["checking","ref","reveal","tokenShape","computed","settings","authEnforced","_a","state","recheck","loadHealth","toast","host","hostError","hostLoaded","maxJobsDraft","roleDraft","savingKey","row","key","s","maxJobs","defaultRole","resetDrafts","_b","loadHost","r","api","problem","loadJobs","save","value","mayWrite","can","ROLES","whyReadOnly","SOURCE_LABEL","running","j","waiting","maxJobsProblem","capProblem","maxJobsDirty","roleDirty","ROLE_WHAT","roleOptions","sentence","_createElementBlock","_createElementVNode","_hoisted_1","_cache","_hoisted_2","$event","_unref","_hoisted_3","_hoisted_5","_createBlock","ActionButton","_hoisted_6","_toDisplayString","_hoisted_7","_Fragment","_hoisted_8","_hoisted_9","_openBlock","_hoisted_10","_createTextVNode","_createVNode","InfoHint","_hoisted_11","_hoisted_12","ErrorNote","_hoisted_13","_hoisted_14","_normalizeStyle","_hoisted_16","_hoisted_17","_hoisted_18","_hoisted_19","SelectMenu","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,EAAA,EAAA,EAAAF,EAAkC,QAAA,CAA3B,IAAI,QAAA,EAAS,SAAM,EAAA,GAC1BmB,EAQIY,EAAA,CAPS,WAAA1B,EAAAhD,CAAA,EAAS,OAAT,sBAAA6C,EAAA,CAAA,IAAAA,EAAA,CAAA,EAAAE,GAAAC,EAAAhD,CAAA,EAAS,OAAM+C,GAAE,GAAG,SAC7B,MAAM,SACL,QAAS,sHAIT"}
@@ -1,2 +1,2 @@
1
- import{d as s,o as e,c as a,F as o,r,D as n,E as i}from"./index-D_Ks6aQi.js";const c={role:"status","aria-live":"polite","aria-label":"loading"},p=s({__name:"SkeletonList",props:{rows:{default:3},tall:{type:Boolean,default:!1}},setup(l){return(d,u)=>(e(),a("div",c,[(e(!0),a(o,null,r(l.rows,t=>(e(),a("div",{key:t,class:i(["skel",{tall:l.tall}]),style:n({width:`${100-t*7}%`})},null,6))),128))]))}});export{p as _};
2
- //# sourceMappingURL=SkeletonList.vue_vue_type_script_setup_true_lang-D4pkKZAr.js.map
1
+ import{d as s,o as e,c as a,F as o,r,D as n,E as i}from"./index-DlhYSSKq.js";const c={role:"status","aria-live":"polite","aria-label":"loading"},p=s({__name:"SkeletonList",props:{rows:{default:3},tall:{type:Boolean,default:!1}},setup(l){return(d,u)=>(e(),a("div",c,[(e(!0),a(o,null,r(l.rows,t=>(e(),a("div",{key:t,class:i(["skel",{tall:l.tall}]),style:n({width:`${100-t*7}%`})},null,6))),128))]))}});export{p as _};
2
+ //# sourceMappingURL=SkeletonList.vue_vue_type_script_setup_true_lang-7pKEuaEM.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SkeletonList.vue_vue_type_script_setup_true_lang-D4pkKZAr.js","sources":["../../src/components/SkeletonList.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * A loading placeholder shaped like the thing that is coming.\n *\n * Deliberately not a spinner on an empty page: a spinner says \"wait\" and nothing else, while a\n * skeleton says what will be there and stops the layout jumping when it arrives. It also makes an\n * empty result visibly different from a slow one, which on this page is the difference between\n * \"nothing is deployed\" and \"the API is not answering\".\n */\nwithDefaults(defineProps<{ rows?: number; tall?: boolean }>(), { rows: 3, tall: false });\n</script>\n\n<template>\n <div role=\"status\" aria-live=\"polite\" aria-label=\"loading\">\n <div v-for=\"n in rows\" :key=\"n\" class=\"skel\" :class=\"{ tall }\" :style=\"{ width: `${100 - n * 7}%` }\" />\n </div>\n</template>\n"],"names":["_openBlock","_createElementBlock","_hoisted_1","_Fragment","_renderList","__props","n","_normalizeClass"],"mappings":"2PAaEA,EAAA,EAAAC,EAEM,MAFNC,EAEM,QADJD,EAAuGE,EAAA,KAAAC,EAAtFC,EAAA,KAALC,QAAZL,EAAuG,MAAA,CAA/E,IAAKK,EAAG,MAAKC,EAAA,CAAC,OAAM,CAAA,KAAWF,EAAA,IAAA,CAAI,CAAA,EAAK,sBAAyBC,EAAC,CAAA,GAAA,CAAA,CAAA"}
1
+ {"version":3,"file":"SkeletonList.vue_vue_type_script_setup_true_lang-7pKEuaEM.js","sources":["../../src/components/SkeletonList.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * A loading placeholder shaped like the thing that is coming.\n *\n * Deliberately not a spinner on an empty page: a spinner says \"wait\" and nothing else, while a\n * skeleton says what will be there and stops the layout jumping when it arrives. It also makes an\n * empty result visibly different from a slow one, which on this page is the difference between\n * \"nothing is deployed\" and \"the API is not answering\".\n */\nwithDefaults(defineProps<{ rows?: number; tall?: boolean }>(), { rows: 3, tall: false });\n</script>\n\n<template>\n <div role=\"status\" aria-live=\"polite\" aria-label=\"loading\">\n <div v-for=\"n in rows\" :key=\"n\" class=\"skel\" :class=\"{ tall }\" :style=\"{ width: `${100 - n * 7}%` }\" />\n </div>\n</template>\n"],"names":["_openBlock","_createElementBlock","_hoisted_1","_Fragment","_renderList","__props","n","_normalizeClass"],"mappings":"2PAaEA,EAAA,EAAAC,EAEM,MAFNC,EAEM,QADJD,EAAuGE,EAAA,KAAAC,EAAtFC,EAAA,KAALC,QAAZL,EAAuG,MAAA,CAA/E,IAAKK,EAAG,MAAKC,EAAA,CAAC,OAAM,CAAA,KAAWF,EAAA,IAAA,CAAI,CAAA,EAAK,sBAAyBC,EAAC,CAAA,GAAA,CAAA,CAAA"}
@@ -1,2 +1,2 @@
1
- import{d as R,N,A as V,J as $,c as a,a as e,e as f,h as c,t as o,E as z,u as h,M as B,f as p,z as g,F as x,n as i,_ as L,r as U,R as A,i as m,j as D,k as S,o as t,ac as j,p as q,C as E}from"./index-D_Ks6aQi.js";import{_ as F}from"./SkeletonList.vue_vue_type_script_setup_true_lang-D4pkKZAr.js";import{_ as I}from"./ErrorNote.vue_vue_type_script_setup_true_lang-FEOV8vdM.js";const H={class:"page-head"},J={class:"mute",style:{"font-size":"var(--t-sm)"}},M={style:{"font-size":"var(--t-xl)"}},T={class:"sub"},W={key:0},G={key:1},K={key:2},O={key:3,class:"mute"},P={key:1,class:"panel"},Q={class:"banner failed"},X={class:"panel"},Y={key:1,class:"kvlist"},Z={class:"k"},ee={class:"v"},se={key:0},te={key:1,class:"mute"},ae={class:"v row"},ne={key:1,class:"mute"},oe={class:"v"},le={class:"v"},ie={key:0,class:"panel"},de={key:0,class:"banner plain"},ue={key:1,class:"code"},re={key:2,class:"mute"},ve=R({__name:"SpecDetailView",props:{name:{}},setup(v){const _=v,n=m(null),d=m(!0),u=m(""),r=m(!1);async function b(){d.value=!0,r.value=!1;const l=await q.getAuthed(`/api/specs/${encodeURIComponent(_.name)}`);if(d.value=!1,l.status===404){r.value=!0;return}if(!l.ok){u.value=E(l,"load this spec");return}u.value="",n.value=l.body}N(()=>_.name,b,{immediate:!0}),N(()=>j.token,b),V.deploymentsLoaded||$();const C=D(()=>V.deployments.filter(l=>l.specName===_.name));return(l,s)=>{var w;const k=S("RouterLink");return t(),a("div",null,[e("div",H,[e("div",null,[e("div",J,[f(k,{to:"/specs"},{default:c(()=>[...s[0]||(s[0]=[i("← specs",-1)])]),_:1})]),e("h1",M,o(v.name),1),e("div",T,[(w=n.value)!=null&&w.description?(t(),a("span",W,o(n.value.description),1)):r.value?(t(),a("span",G,"not found")):d.value?(t(),a("span",K,"loading…")):(t(),a("span",O,"no description"))])]),s[1]||(s[1]=e("span",{class:"grow"},null,-1)),n.value?(t(),a("span",{key:0,class:z(["badge",n.value.kind])},o(h(B)(n.value.kind)),3)):p("",!0)]),u.value?(t(),g(I,{key:0,text:u.value,title:"Could not load this spec."},null,8,["text"])):p("",!0),r.value?(t(),a("section",P,[e("div",Q,[e("b",null,"No spec named “"+o(v.name)+"”.",1)])])):(t(),a(x,{key:2},[e("section",X,[d.value?(t(),g(F,{key:0,rows:4})):n.value?(t(),a("ul",Y,[e("li",null,[e("span",Z,[s[3]||(s[3]=i(" Needs ",-1)),f(L,{label:"what needs means"},{default:c(()=>[...s[2]||(s[2]=[i(" Variables the spec uses but does not set. ",-1)])]),_:1})]),e("span",ee,[n.value.requiredVars.length?(t(),a("b",se,o(n.value.requiredVars.join(", ")),1)):(t(),a("span",te,"nothing"))])]),e("li",null,[s[4]||(s[4]=e("span",{class:"k"},"Used by",-1)),e("span",ae,[C.value.length?(t(!0),a(x,{key:0},U(C.value,y=>(t(),g(k,{key:y.id,to:`/deployments/${encodeURIComponent(y.id)}`},{default:c(()=>[i(o(y.id),1)]),_:2},1032,["to"]))),128)):(t(),a("span",ne,"none"))])]),e("li",null,[s[5]||(s[5]=e("span",{class:"k"},"Created",-1)),e("span",oe,o(h(A)(n.value.createdAt)),1)]),e("li",null,[s[6]||(s[6]=e("span",{class:"k"},"Updated",-1)),e("span",le,o(h(A)(n.value.updatedAt)),1)])])):p("",!0)]),n.value?(t(),a("section",ie,[s[10]||(s[10]=e("div",{class:"phead"},[e("h2",{class:"section"},"Source")],-1)),n.value.sourceWithheld?(t(),a("div",de,[s[9]||(s[9]=e("b",null,"Hidden without an access token.",-1)),e("p",null,[f(k,{to:"/settings"},{default:c(()=>[...s[7]||(s[7]=[i("Add your token",-1)])]),_:1}),s[8]||(s[8]=i(" to see it.",-1))])])):n.value.source?(t(),a("pre",ue,o(n.value.source),1)):(t(),a("p",re,"No source."))])):p("",!0)],64))])}}});export{ve as default};
2
- //# sourceMappingURL=SpecDetailView-DyFAAMfr.js.map
1
+ import{d as R,N,A as V,J as $,c as a,a as e,e as f,h as c,t as o,E as z,u as h,M as B,f as p,z as g,F as x,n as i,_ as L,r as U,R as A,i as m,j as D,k as S,o as t,ac as j,p as q,C as E}from"./index-DlhYSSKq.js";import{_ as F}from"./SkeletonList.vue_vue_type_script_setup_true_lang-7pKEuaEM.js";import{_ as I}from"./ErrorNote.vue_vue_type_script_setup_true_lang-DU01Dqor.js";const H={class:"page-head"},J={class:"mute",style:{"font-size":"var(--t-sm)"}},M={style:{"font-size":"var(--t-xl)"}},T={class:"sub"},W={key:0},G={key:1},K={key:2},O={key:3,class:"mute"},P={key:1,class:"panel"},Q={class:"banner failed"},X={class:"panel"},Y={key:1,class:"kvlist"},Z={class:"k"},ee={class:"v"},se={key:0},te={key:1,class:"mute"},ae={class:"v row"},ne={key:1,class:"mute"},oe={class:"v"},le={class:"v"},ie={key:0,class:"panel"},de={key:0,class:"banner plain"},ue={key:1,class:"code"},re={key:2,class:"mute"},ve=R({__name:"SpecDetailView",props:{name:{}},setup(v){const _=v,n=m(null),d=m(!0),u=m(""),r=m(!1);async function b(){d.value=!0,r.value=!1;const l=await q.getAuthed(`/api/specs/${encodeURIComponent(_.name)}`);if(d.value=!1,l.status===404){r.value=!0;return}if(!l.ok){u.value=E(l,"load this spec");return}u.value="",n.value=l.body}N(()=>_.name,b,{immediate:!0}),N(()=>j.token,b),V.deploymentsLoaded||$();const C=D(()=>V.deployments.filter(l=>l.specName===_.name));return(l,s)=>{var w;const k=S("RouterLink");return t(),a("div",null,[e("div",H,[e("div",null,[e("div",J,[f(k,{to:"/specs"},{default:c(()=>[...s[0]||(s[0]=[i("← specs",-1)])]),_:1})]),e("h1",M,o(v.name),1),e("div",T,[(w=n.value)!=null&&w.description?(t(),a("span",W,o(n.value.description),1)):r.value?(t(),a("span",G,"not found")):d.value?(t(),a("span",K,"loading…")):(t(),a("span",O,"no description"))])]),s[1]||(s[1]=e("span",{class:"grow"},null,-1)),n.value?(t(),a("span",{key:0,class:z(["badge",n.value.kind])},o(h(B)(n.value.kind)),3)):p("",!0)]),u.value?(t(),g(I,{key:0,text:u.value,title:"Could not load this spec."},null,8,["text"])):p("",!0),r.value?(t(),a("section",P,[e("div",Q,[e("b",null,"No spec named “"+o(v.name)+"”.",1)])])):(t(),a(x,{key:2},[e("section",X,[d.value?(t(),g(F,{key:0,rows:4})):n.value?(t(),a("ul",Y,[e("li",null,[e("span",Z,[s[3]||(s[3]=i(" Needs ",-1)),f(L,{label:"what needs means"},{default:c(()=>[...s[2]||(s[2]=[i(" Variables the spec uses but does not set. ",-1)])]),_:1})]),e("span",ee,[n.value.requiredVars.length?(t(),a("b",se,o(n.value.requiredVars.join(", ")),1)):(t(),a("span",te,"nothing"))])]),e("li",null,[s[4]||(s[4]=e("span",{class:"k"},"Used by",-1)),e("span",ae,[C.value.length?(t(!0),a(x,{key:0},U(C.value,y=>(t(),g(k,{key:y.id,to:`/deployments/${encodeURIComponent(y.id)}`},{default:c(()=>[i(o(y.id),1)]),_:2},1032,["to"]))),128)):(t(),a("span",ne,"none"))])]),e("li",null,[s[5]||(s[5]=e("span",{class:"k"},"Created",-1)),e("span",oe,o(h(A)(n.value.createdAt)),1)]),e("li",null,[s[6]||(s[6]=e("span",{class:"k"},"Updated",-1)),e("span",le,o(h(A)(n.value.updatedAt)),1)])])):p("",!0)]),n.value?(t(),a("section",ie,[s[10]||(s[10]=e("div",{class:"phead"},[e("h2",{class:"section"},"Source")],-1)),n.value.sourceWithheld?(t(),a("div",de,[s[9]||(s[9]=e("b",null,"Hidden without an access token.",-1)),e("p",null,[f(k,{to:"/settings"},{default:c(()=>[...s[7]||(s[7]=[i("Add your token",-1)])]),_:1}),s[8]||(s[8]=i(" to see it.",-1))])])):n.value.source?(t(),a("pre",ue,o(n.value.source),1)):(t(),a("p",re,"No source."))])):p("",!0)],64))])}}});export{ve as default};
2
+ //# sourceMappingURL=SpecDetailView-Ca4WXLH1.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SpecDetailView-DyFAAMfr.js","sources":["../../src/views/SpecDetailView.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * One stored spec: what it needs, who uses it, and its source.\n *\n * THE SOURCE IS A RESTRICTED READ. Everything else on this API can be read without a token, but a\n * spec's hook bodies are shell strings that routinely carry a credential inline, so the server sends\n * `source` only to an authenticated request and sets `sourceWithheld` otherwise. That is why this\n * one view uses `getAuthed`, and why \"no token\" renders a named banner rather than an empty editor —\n * a blank box would read as an empty spec, which is a different and much more alarming fact.\n */\nimport { computed, ref, watch } from 'vue';\nimport { api, problem } from '../api/client';\nimport type { SpecDetail } from '../api/types';\nimport { state, loadDeployments } from '../composables/useControlPlane';\nimport { settings } from '../composables/useSettings';\nimport { sentence, stamp } from '../composables/useFormat';\nimport SkeletonList from '../components/SkeletonList.vue';\nimport ErrorNote from '../components/ErrorNote.vue';\nimport InfoHint from '../components/InfoHint.vue';\n\nconst props = defineProps<{ name: string }>();\n\nconst spec = ref<SpecDetail | null>(null);\nconst loading = ref(true);\nconst error = ref('');\nconst missing = ref(false);\n\nasync function load(): Promise<void> {\n loading.value = true;\n missing.value = false;\n const r = await api.getAuthed<SpecDetail>(`/api/specs/${encodeURIComponent(props.name)}`);\n loading.value = false;\n if (r.status === 404) {\n missing.value = true;\n return;\n }\n if (!r.ok) {\n error.value = problem(r, 'load this spec');\n return;\n }\n error.value = '';\n spec.value = r.body;\n}\n\nwatch(() => props.name, load, { immediate: true });\n// Re-fetch when a token is pasted: the same URL returns strictly more with one.\nwatch(() => settings.token, load);\n\nif (!state.deploymentsLoaded) void loadDeployments();\n\n/** Deployments that would become unresolvable if this spec were deleted. */\nconst users = computed(() => state.deployments.filter((d) => d.specName === props.name));\n</script>\n\n<template>\n <div>\n <div class=\"page-head\">\n <div>\n <div class=\"mute\" style=\"font-size: var(--t-sm)\">\n <RouterLink to=\"/specs\">← specs</RouterLink>\n </div>\n <h1 style=\"font-size: var(--t-xl)\">{{ name }}</h1>\n <div class=\"sub\">\n <span v-if=\"spec?.description\">{{ spec.description }}</span>\n <span v-else-if=\"missing\">not found</span>\n <span v-else-if=\"loading\">loading…</span>\n <span v-else class=\"mute\">no description</span>\n </div>\n </div>\n <span class=\"grow\" />\n <span v-if=\"spec\" class=\"badge\" :class=\"spec.kind\">{{ sentence(spec.kind) }}</span>\n </div>\n\n <ErrorNote v-if=\"error\" :text=\"error\" title=\"Could not load this spec.\" />\n\n <section v-if=\"missing\" class=\"panel\">\n <div class=\"banner failed\">\n <b>No spec named “{{ name }}”.</b>\n </div>\n </section>\n\n <template v-else>\n <section class=\"panel\">\n <SkeletonList v-if=\"loading\" :rows=\"4\" />\n <ul v-else-if=\"spec\" class=\"kvlist\">\n <li>\n <span class=\"k\">\n Needs\n <InfoHint label=\"what needs means\">\n Variables the spec uses but does not set.\n </InfoHint>\n </span>\n <span class=\"v\">\n <b v-if=\"spec.requiredVars.length\">{{ spec.requiredVars.join(', ') }}</b>\n <span v-else class=\"mute\">nothing</span>\n </span>\n </li>\n <li>\n <span class=\"k\">Used by</span>\n <span class=\"v row\">\n <template v-if=\"users.length\">\n <RouterLink\n v-for=\"d in users\"\n :key=\"d.id\"\n :to=\"`/deployments/${encodeURIComponent(d.id)}`\"\n >{{ d.id }}</RouterLink\n >\n </template>\n <span v-else class=\"mute\">none</span>\n </span>\n </li>\n <li><span class=\"k\">Created</span><span class=\"v\">{{ stamp(spec.createdAt) }}</span></li>\n <li><span class=\"k\">Updated</span><span class=\"v\">{{ stamp(spec.updatedAt) }}</span></li>\n </ul>\n </section>\n\n <section v-if=\"spec\" class=\"panel\">\n <div class=\"phead\">\n <h2 class=\"section\">Source</h2>\n </div>\n\n <!--\n Withheld, not empty. The server never sent the source, so there is nothing here to reveal —\n the same reasoning as the masked variables: an affordance that promises plaintext the page\n does not have would be a lie.\n -->\n <div v-if=\"spec.sourceWithheld\" class=\"banner plain\">\n <b>Hidden without an access token.</b>\n <p><RouterLink to=\"/settings\">Add your token</RouterLink> to see it.</p>\n </div>\n <pre v-else-if=\"spec.source\" class=\"code\">{{ spec.source }}</pre>\n <!-- Withheld above, genuinely empty here — the two must not read the same. -->\n <p v-else class=\"mute\">No source.</p>\n </section>\n </template>\n </div>\n</template>\n"],"names":["props","__props","spec","ref","loading","error","missing","load","r","api","problem","watch","settings","state","loadDeployments","users","computed","d","_createElementBlock","_createElementVNode","_hoisted_1","_hoisted_2","_createVNode","_component_RouterLink","_cache","_hoisted_3","_toDisplayString","_hoisted_4","_a","_hoisted_5","_openBlock","_hoisted_8","_normalizeClass","_unref","sentence","_createBlock","ErrorNote","_hoisted_9","_hoisted_10","_Fragment","_hoisted_11","SkeletonList","_hoisted_12","_hoisted_13","InfoHint","_hoisted_14","_hoisted_15","_hoisted_16","_hoisted_17","_renderList","_createTextVNode","_hoisted_18","_hoisted_19","_hoisted_20","_hoisted_21","_hoisted_22","_hoisted_23","_hoisted_24"],"mappings":"s7BAoBA,MAAMA,EAAQC,EAERC,EAAOC,EAAuB,IAAI,EAClCC,EAAUD,EAAI,EAAI,EAClBE,EAAQF,EAAI,EAAE,EACdG,EAAUH,EAAI,EAAK,EAEzB,eAAeI,GAAsB,CACnCH,EAAQ,MAAQ,GAChBE,EAAQ,MAAQ,GAChB,MAAME,EAAI,MAAMC,EAAI,UAAsB,cAAc,mBAAmBT,EAAM,IAAI,CAAC,EAAE,EAExF,GADAI,EAAQ,MAAQ,GACZI,EAAE,SAAW,IAAK,CACpBF,EAAQ,MAAQ,GAChB,MACF,CACA,GAAI,CAACE,EAAE,GAAI,CACTH,EAAM,MAAQK,EAAQF,EAAG,gBAAgB,EACzC,MACF,CACAH,EAAM,MAAQ,GACdH,EAAK,MAAQM,EAAE,IACjB,CAEAG,EAAM,IAAMX,EAAM,KAAMO,EAAM,CAAE,UAAW,GAAM,EAEjDI,EAAM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,CAAA,GACzEiB,EAAyF,KAAA,KAAA,CAArFK,EAAA,CAAA,IAAAA,EAAA,CAAA,EAAAL,EAA8B,OAAA,CAAxB,MAAM,GAAA,EAAI,UAAO,EAAA,GAAOA,EAAkD,OAAlDkC,GAAkD3B,EAA/BO,KAAM/B,EAAA,MAAK,SAAS,CAAA,EAAA,CAAA,CAAA,iBAI9DA,EAAA,OAAf4B,EAAA,EAAAZ,EAiBU,UAjBVoC,GAiBU,eAhBRnC,EAEM,MAAA,CAFD,MAAM,SAAO,CAChBA,EAA+B,KAAA,CAA3B,MAAM,SAAA,EAAU,QAAM,CAAA,OAQjBjB,EAAA,MAAK,gBAAhB4B,IAAAZ,EAGM,MAHNqC,GAGM,CAFJ/B,EAAA,CAAA,IAAAA,EAAA,CAAA,EAAAL,EAAsC,SAAnC,kCAA+B,EAAA,GAClCA,EAAwE,IAAA,KAAA,CAArEG,EAAsDC,EAAA,CAA1C,GAAG,aAAW,WAAC,IAAc,CAAA,GAAAC,EAAA,CAAA,IAAAA,EAAA,CAAA,EAAA,GAAd,iBAAc,EAAA,CAAA,yBAAa,cAAW,EAAA,EAAA,MAEtDtB,EAAA,MAAK,QAArB4B,EAAA,EAAAZ,EAAiE,MAAjEsC,GAAiE9B,EAApBxB,EAAA,MAAK,MAAM,EAAA,CAAA,QAExDgB,EAAqC,IAArCuC,GAAuB,YAAU,EAAA"}
1
+ {"version":3,"file":"SpecDetailView-Ca4WXLH1.js","sources":["../../src/views/SpecDetailView.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * One stored spec: what it needs, who uses it, and its source.\n *\n * THE SOURCE IS A RESTRICTED READ. Everything else on this API can be read without a token, but a\n * spec's hook bodies are shell strings that routinely carry a credential inline, so the server sends\n * `source` only to an authenticated request and sets `sourceWithheld` otherwise. That is why this\n * one view uses `getAuthed`, and why \"no token\" renders a named banner rather than an empty editor —\n * a blank box would read as an empty spec, which is a different and much more alarming fact.\n */\nimport { computed, ref, watch } from 'vue';\nimport { api, problem } from '../api/client';\nimport type { SpecDetail } from '../api/types';\nimport { state, loadDeployments } from '../composables/useControlPlane';\nimport { settings } from '../composables/useSettings';\nimport { sentence, stamp } from '../composables/useFormat';\nimport SkeletonList from '../components/SkeletonList.vue';\nimport ErrorNote from '../components/ErrorNote.vue';\nimport InfoHint from '../components/InfoHint.vue';\n\nconst props = defineProps<{ name: string }>();\n\nconst spec = ref<SpecDetail | null>(null);\nconst loading = ref(true);\nconst error = ref('');\nconst missing = ref(false);\n\nasync function load(): Promise<void> {\n loading.value = true;\n missing.value = false;\n const r = await api.getAuthed<SpecDetail>(`/api/specs/${encodeURIComponent(props.name)}`);\n loading.value = false;\n if (r.status === 404) {\n missing.value = true;\n return;\n }\n if (!r.ok) {\n error.value = problem(r, 'load this spec');\n return;\n }\n error.value = '';\n spec.value = r.body;\n}\n\nwatch(() => props.name, load, { immediate: true });\n// Re-fetch when a token is pasted: the same URL returns strictly more with one.\nwatch(() => settings.token, load);\n\nif (!state.deploymentsLoaded) void loadDeployments();\n\n/** Deployments that would become unresolvable if this spec were deleted. */\nconst users = computed(() => state.deployments.filter((d) => d.specName === props.name));\n</script>\n\n<template>\n <div>\n <div class=\"page-head\">\n <div>\n <div class=\"mute\" style=\"font-size: var(--t-sm)\">\n <RouterLink to=\"/specs\">← specs</RouterLink>\n </div>\n <h1 style=\"font-size: var(--t-xl)\">{{ name }}</h1>\n <div class=\"sub\">\n <span v-if=\"spec?.description\">{{ spec.description }}</span>\n <span v-else-if=\"missing\">not found</span>\n <span v-else-if=\"loading\">loading…</span>\n <span v-else class=\"mute\">no description</span>\n </div>\n </div>\n <span class=\"grow\" />\n <span v-if=\"spec\" class=\"badge\" :class=\"spec.kind\">{{ sentence(spec.kind) }}</span>\n </div>\n\n <ErrorNote v-if=\"error\" :text=\"error\" title=\"Could not load this spec.\" />\n\n <section v-if=\"missing\" class=\"panel\">\n <div class=\"banner failed\">\n <b>No spec named “{{ name }}”.</b>\n </div>\n </section>\n\n <template v-else>\n <section class=\"panel\">\n <SkeletonList v-if=\"loading\" :rows=\"4\" />\n <ul v-else-if=\"spec\" class=\"kvlist\">\n <li>\n <span class=\"k\">\n Needs\n <InfoHint label=\"what needs means\">\n Variables the spec uses but does not set.\n </InfoHint>\n </span>\n <span class=\"v\">\n <b v-if=\"spec.requiredVars.length\">{{ spec.requiredVars.join(', ') }}</b>\n <span v-else class=\"mute\">nothing</span>\n </span>\n </li>\n <li>\n <span class=\"k\">Used by</span>\n <span class=\"v row\">\n <template v-if=\"users.length\">\n <RouterLink\n v-for=\"d in users\"\n :key=\"d.id\"\n :to=\"`/deployments/${encodeURIComponent(d.id)}`\"\n >{{ d.id }}</RouterLink\n >\n </template>\n <span v-else class=\"mute\">none</span>\n </span>\n </li>\n <li><span class=\"k\">Created</span><span class=\"v\">{{ stamp(spec.createdAt) }}</span></li>\n <li><span class=\"k\">Updated</span><span class=\"v\">{{ stamp(spec.updatedAt) }}</span></li>\n </ul>\n </section>\n\n <section v-if=\"spec\" class=\"panel\">\n <div class=\"phead\">\n <h2 class=\"section\">Source</h2>\n </div>\n\n <!--\n Withheld, not empty. The server never sent the source, so there is nothing here to reveal —\n the same reasoning as the masked variables: an affordance that promises plaintext the page\n does not have would be a lie.\n -->\n <div v-if=\"spec.sourceWithheld\" class=\"banner plain\">\n <b>Hidden without an access token.</b>\n <p><RouterLink to=\"/settings\">Add your token</RouterLink> to see it.</p>\n </div>\n <pre v-else-if=\"spec.source\" class=\"code\">{{ spec.source }}</pre>\n <!-- Withheld above, genuinely empty here — the two must not read the same. -->\n <p v-else class=\"mute\">No source.</p>\n </section>\n </template>\n </div>\n</template>\n"],"names":["props","__props","spec","ref","loading","error","missing","load","r","api","problem","watch","settings","state","loadDeployments","users","computed","d","_createElementBlock","_createElementVNode","_hoisted_1","_hoisted_2","_createVNode","_component_RouterLink","_cache","_hoisted_3","_toDisplayString","_hoisted_4","_a","_hoisted_5","_openBlock","_hoisted_8","_normalizeClass","_unref","sentence","_createBlock","ErrorNote","_hoisted_9","_hoisted_10","_Fragment","_hoisted_11","SkeletonList","_hoisted_12","_hoisted_13","InfoHint","_hoisted_14","_hoisted_15","_hoisted_16","_hoisted_17","_renderList","_createTextVNode","_hoisted_18","_hoisted_19","_hoisted_20","_hoisted_21","_hoisted_22","_hoisted_23","_hoisted_24"],"mappings":"s7BAoBA,MAAMA,EAAQC,EAERC,EAAOC,EAAuB,IAAI,EAClCC,EAAUD,EAAI,EAAI,EAClBE,EAAQF,EAAI,EAAE,EACdG,EAAUH,EAAI,EAAK,EAEzB,eAAeI,GAAsB,CACnCH,EAAQ,MAAQ,GAChBE,EAAQ,MAAQ,GAChB,MAAME,EAAI,MAAMC,EAAI,UAAsB,cAAc,mBAAmBT,EAAM,IAAI,CAAC,EAAE,EAExF,GADAI,EAAQ,MAAQ,GACZI,EAAE,SAAW,IAAK,CACpBF,EAAQ,MAAQ,GAChB,MACF,CACA,GAAI,CAACE,EAAE,GAAI,CACTH,EAAM,MAAQK,EAAQF,EAAG,gBAAgB,EACzC,MACF,CACAH,EAAM,MAAQ,GACdH,EAAK,MAAQM,EAAE,IACjB,CAEAG,EAAM,IAAMX,EAAM,KAAMO,EAAM,CAAE,UAAW,GAAM,EAEjDI,EAAM,IAAMC,EAAS,MAAOL,CAAI,EAE3BM,EAAM,mBAAwBC,EAAA,EAGnC,MAAMC,EAAQC,EAAS,IAAMH,EAAM,YAAY,OAAQI,GAAMA,EAAE,WAAajB,EAAM,IAAI,CAAC,yDAIrFkB,EAgFM,MAAA,KAAA,CA/EJC,EAeM,MAfNC,EAeM,CAdJD,EAWM,MAAA,KAAA,CAVJA,EAEM,MAFNE,EAEM,CADJC,EAA4CC,EAAA,CAAhC,GAAG,UAAQ,WAAC,IAAO,CAAA,GAAAC,EAAA,CAAA,IAAAA,EAAA,CAAA,EAAA,GAAP,UAAO,EAAA,CAAA,aAEjCL,EAAkD,KAAlDM,EAAkDC,EAAZzB,EAAA,IAAI,EAAA,CAAA,EAC1CkB,EAKM,MALNQ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EAAA,CAAA,EAAAL,EAAsC,SAAnC,kCAA+B,EAAA,GAClCA,EAAwE,IAAA,KAAA,CAArEG,EAAsDC,EAAA,CAA1C,GAAG,aAAW,WAAC,IAAc,CAAA,GAAAC,EAAA,CAAA,IAAAA,EAAA,CAAA,EAAA,GAAd,iBAAc,EAAA,CAAA,yBAAa,cAAW,EAAA,EAAA,MAEtDtB,EAAA,MAAK,QAArB4B,EAAA,EAAAZ,EAAiE,MAAjEsC,GAAiE9B,EAApBxB,EAAA,MAAK,MAAM,EAAA,CAAA,QAExDgB,EAAqC,IAArCuC,GAAuB,YAAU,EAAA"}
@@ -1,2 +1,2 @@
1
- import{d as L,A as w,J as $,c as l,a as t,e as d,z as g,f as _,F as C,g as q,v as S,n as m,h as N,_ as U,r as T,t as n,i,p as z,C as B,j as x,o,D,E,u as M,M as R,k as j}from"./index-D_Ks6aQi.js";import{_ as A}from"./SkeletonList.vue_vue_type_script_setup_true_lang-D4pkKZAr.js";import{_ as F}from"./ErrorNote.vue_vue_type_script_setup_true_lang-FEOV8vdM.js";import{_ as P}from"./RelativeTime.vue_vue_type_script_setup_true_lang-BxIqRu_b.js";import{E as I}from"./EquivalentCommand-D-mkbReY.js";import{_ as J}from"./RefreshButton.vue_vue_type_script_setup_true_lang-CQvD4Out.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";const K={class:"page-head"},G={key:1,class:"panel"},H={key:2,class:"panel"},O={class:"field",style:{"max-width":"320px","margin-bottom":"var(--s4)"}},Q={role:"table",class:"cards","data-testid":"specs.list"},W={role:"rowgroup"},X={role:"row"},Y={role:"columnheader"},Z={role:"rowgroup",class:"stagger"},ee={role:"cell",class:"name","data-label":"name"},te={key:0,class:"mute",style:{"font-size":"var(--t-sm)"}},se={role:"cell","data-label":"kind"},oe={role:"cell","data-label":"needs"},ae={key:0},le={key:1,class:"mute"},ne={role:"cell","data-label":"used by"},re={key:0},de={key:1,class:"mute"},ie={role:"cell",class:"dim nowrap","data-label":"updated"},ue={key:0,role:"row"},pe={role:"cell",colspan:"5",class:"mute"},ce={key:2,class:"banner plain"},we=L({__name:"SpecsView",setup(me){const u=i([]),v=i(!1),p=i(""),h=i(!1),r=i("");async function f(){const a=await z.get("/api/specs");if(v.value=!0,a.status===404){h.value=!0;return}if(!a.ok){p.value=B(a,"load specs");return}p.value="",u.value=a.body.specs??[]}f(),w.deploymentsLoaded||$();const y=x(()=>{const a=new Map;for(const e of w.deployments){if(!e.specName)continue;const c=a.get(e.specName)??[];c.push(e.id),a.set(e.specName,c)}return a}),b=x(()=>{const a=r.value.trim().toLowerCase();return a?u.value.filter(e=>e.name.toLowerCase().includes(a)||(e.description??"").toLowerCase().includes(a)):u.value});return(a,e)=>{const c=j("RouterLink");return o(),l("div",null,[t("div",K,[e[2]||(e[2]=t("div",null,[t("h1",null,"Specs"),t("div",{class:"sub"},"Stored once, used by any number of deployments")],-1)),e[3]||(e[3]=t("span",{class:"grow"},null,-1)),d(J,{run:f})]),p.value?(o(),g(F,{key:0,text:p.value,title:"Could not load the specs."},null,8,["text"])):_("",!0),h.value?(o(),l("section",G,[...e[4]||(e[4]=[t("div",{class:"banner plain"},[t("b",null,"This host is too old to store specs.")],-1)])])):(o(),l("section",H,[v.value?u.value.length?(o(),l(C,{key:1},[t("div",O,[e[5]||(e[5]=t("label",{for:"q"},"Search",-1)),q(t("input",{id:"q","onUpdate:modelValue":e[0]||(e[0]=s=>r.value=s),type:"search",placeholder:"name or description"},null,512),[[S,r.value]])]),t("table",Q,[t("thead",W,[t("tr",X,[e[8]||(e[8]=t("th",{role:"columnheader"},"Name",-1)),e[9]||(e[9]=t("th",{role:"columnheader"},"Kind",-1)),t("th",Y,[e[7]||(e[7]=m(" needs ",-1)),d(U,{label:"what needs means"},{default:N(()=>[...e[6]||(e[6]=[m(" Variables the spec uses but does not set. ",-1)])]),_:1})]),e[10]||(e[10]=t("th",{role:"columnheader"},"Used by",-1)),e[11]||(e[11]=t("th",{role:"columnheader"},"Updated",-1))])]),t("tbody",Z,[(o(!0),l(C,null,T(b.value,(s,V)=>{var k;return o(),l("tr",{key:s.name,role:"row",style:D({"--i":V})},[t("td",ee,[d(c,{to:`/specs/${encodeURIComponent(s.name)}`},{default:N(()=>[m(n(s.name),1)]),_:2},1032,["to"]),s.description?(o(),l("div",te,n(s.description),1)):_("",!0)]),t("td",se,[t("span",{class:E(["badge",s.kind])},n(M(R)(s.kind)),3)]),t("td",oe,[s.requiredVars.length?(o(),l("span",ae,n(s.requiredVars.join(", ")),1)):(o(),l("span",le,"none"))]),t("td",ne,[(k=y.value.get(s.name))!=null&&k.length?(o(),l("span",re,n(y.value.get(s.name).length),1)):(o(),l("span",de,"none"))]),t("td",ie,[d(P,{at:s.updatedAt},null,8,["at"])])],4)}),128)),b.value.length?_("",!0):(o(),l("tr",ue,[t("td",pe,[m(" No spec matches “"+n(r.value)+"”. ",1),t("button",{class:"ghost sm",onClick:e[1]||(e[1]=s=>r.value="")},"Clear search")])]))])])],64)):(o(),l("div",ce,[e[12]||(e[12]=t("b",null,"No specs yet — store one below.",-1)),d(I,{what:"storing a spec",method:"PUT",path:"/api/specs/my-spec",body:{spec:"…the contents of your preview.yml…"},cli:"pstack validate -f preview.yml # then PUT it with the curl above"})])):(o(),g(A,{key:0,rows:3,tall:""}))]))])}}});export{we as default};
2
- //# sourceMappingURL=SpecsView-CfV1_GDx.js.map
1
+ import{d as L,A as w,J as $,c as l,a as t,e as d,z as g,f as _,F as C,g as q,v as S,n as m,h as N,_ as U,r as T,t as n,i,p as z,C as B,j as x,o,D,E,u as M,M as R,k as j}from"./index-DlhYSSKq.js";import{_ as A}from"./SkeletonList.vue_vue_type_script_setup_true_lang-7pKEuaEM.js";import{_ as F}from"./ErrorNote.vue_vue_type_script_setup_true_lang-DU01Dqor.js";import{_ as P}from"./RelativeTime.vue_vue_type_script_setup_true_lang-B1_l0Vtf.js";import{E as I}from"./EquivalentCommand-CAhOGrAR.js";import{_ as J}from"./RefreshButton.vue_vue_type_script_setup_true_lang-Dk-lSii3.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";const K={class:"page-head"},G={key:1,class:"panel"},H={key:2,class:"panel"},O={class:"field",style:{"max-width":"320px","margin-bottom":"var(--s4)"}},Q={role:"table",class:"cards","data-testid":"specs.list"},W={role:"rowgroup"},X={role:"row"},Y={role:"columnheader"},Z={role:"rowgroup",class:"stagger"},ee={role:"cell",class:"name","data-label":"name"},te={key:0,class:"mute",style:{"font-size":"var(--t-sm)"}},se={role:"cell","data-label":"kind"},oe={role:"cell","data-label":"needs"},ae={key:0},le={key:1,class:"mute"},ne={role:"cell","data-label":"used by"},re={key:0},de={key:1,class:"mute"},ie={role:"cell",class:"dim nowrap","data-label":"updated"},ue={key:0,role:"row"},pe={role:"cell",colspan:"5",class:"mute"},ce={key:2,class:"banner plain"},we=L({__name:"SpecsView",setup(me){const u=i([]),v=i(!1),p=i(""),h=i(!1),r=i("");async function f(){const a=await z.get("/api/specs");if(v.value=!0,a.status===404){h.value=!0;return}if(!a.ok){p.value=B(a,"load specs");return}p.value="",u.value=a.body.specs??[]}f(),w.deploymentsLoaded||$();const y=x(()=>{const a=new Map;for(const e of w.deployments){if(!e.specName)continue;const c=a.get(e.specName)??[];c.push(e.id),a.set(e.specName,c)}return a}),b=x(()=>{const a=r.value.trim().toLowerCase();return a?u.value.filter(e=>e.name.toLowerCase().includes(a)||(e.description??"").toLowerCase().includes(a)):u.value});return(a,e)=>{const c=j("RouterLink");return o(),l("div",null,[t("div",K,[e[2]||(e[2]=t("div",null,[t("h1",null,"Specs"),t("div",{class:"sub"},"Stored once, used by any number of deployments")],-1)),e[3]||(e[3]=t("span",{class:"grow"},null,-1)),d(J,{run:f})]),p.value?(o(),g(F,{key:0,text:p.value,title:"Could not load the specs."},null,8,["text"])):_("",!0),h.value?(o(),l("section",G,[...e[4]||(e[4]=[t("div",{class:"banner plain"},[t("b",null,"This host is too old to store specs.")],-1)])])):(o(),l("section",H,[v.value?u.value.length?(o(),l(C,{key:1},[t("div",O,[e[5]||(e[5]=t("label",{for:"q"},"Search",-1)),q(t("input",{id:"q","onUpdate:modelValue":e[0]||(e[0]=s=>r.value=s),type:"search",placeholder:"name or description"},null,512),[[S,r.value]])]),t("table",Q,[t("thead",W,[t("tr",X,[e[8]||(e[8]=t("th",{role:"columnheader"},"Name",-1)),e[9]||(e[9]=t("th",{role:"columnheader"},"Kind",-1)),t("th",Y,[e[7]||(e[7]=m(" needs ",-1)),d(U,{label:"what needs means"},{default:N(()=>[...e[6]||(e[6]=[m(" Variables the spec uses but does not set. ",-1)])]),_:1})]),e[10]||(e[10]=t("th",{role:"columnheader"},"Used by",-1)),e[11]||(e[11]=t("th",{role:"columnheader"},"Updated",-1))])]),t("tbody",Z,[(o(!0),l(C,null,T(b.value,(s,V)=>{var k;return o(),l("tr",{key:s.name,role:"row",style:D({"--i":V})},[t("td",ee,[d(c,{to:`/specs/${encodeURIComponent(s.name)}`},{default:N(()=>[m(n(s.name),1)]),_:2},1032,["to"]),s.description?(o(),l("div",te,n(s.description),1)):_("",!0)]),t("td",se,[t("span",{class:E(["badge",s.kind])},n(M(R)(s.kind)),3)]),t("td",oe,[s.requiredVars.length?(o(),l("span",ae,n(s.requiredVars.join(", ")),1)):(o(),l("span",le,"none"))]),t("td",ne,[(k=y.value.get(s.name))!=null&&k.length?(o(),l("span",re,n(y.value.get(s.name).length),1)):(o(),l("span",de,"none"))]),t("td",ie,[d(P,{at:s.updatedAt},null,8,["at"])])],4)}),128)),b.value.length?_("",!0):(o(),l("tr",ue,[t("td",pe,[m(" No spec matches “"+n(r.value)+"”. ",1),t("button",{class:"ghost sm",onClick:e[1]||(e[1]=s=>r.value="")},"Clear search")])]))])])],64)):(o(),l("div",ce,[e[12]||(e[12]=t("b",null,"No specs yet — store one below.",-1)),d(I,{what:"storing a spec",method:"PUT",path:"/api/specs/my-spec",body:{spec:"…the contents of your preview.yml…"},cli:"pstack validate -f preview.yml # then PUT it with the curl above"})])):(o(),g(A,{key:0,rows:3,tall:""}))]))])}}});export{we as default};
2
+ //# sourceMappingURL=SpecsView-DN6EIbcC.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SpecsView-CfV1_GDx.js","sources":["../../src/views/SpecsView.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * Stored specs: what is on this host, and who is using each one.\n *\n * The \"used by\" count is computed from the deployments already in shared state rather than asked\n * for: every row carries `specName`, so the join is free. It matters because deleting a spec that\n * deployments still reference is refused — a deployment that cannot resolve its spec can never be\n * torn down — so knowing the count before you try is the difference between a plan and a 409.\n *\n * A server built before named specs answers 404 here. That is a capability difference, not an\n * error, so it gets its own plain banner instead of a red one.\n */\nimport { computed, ref } from 'vue';\nimport { sentence } from '../composables/useFormat';\nimport { api, problem } from '../api/client';\nimport type { SpecMeta, SpecsResponse } from '../api/types';\nimport { state, loadDeployments } from '../composables/useControlPlane';\n\nimport SkeletonList from '../components/SkeletonList.vue';\nimport ErrorNote from '../components/ErrorNote.vue';\nimport InfoHint from '../components/InfoHint.vue';\nimport RelativeTime from '../components/RelativeTime.vue';\nimport EquivalentCommand from '../components/EquivalentCommand.vue';\nimport RefreshButton from '../components/RefreshButton.vue';\n\nconst specs = ref<SpecMeta[]>([]);\nconst loaded = ref(false);\nconst error = ref('');\nconst unsupported = ref(false);\nconst needle = ref('');\n\nasync function load(): Promise<void> {\n const r = await api.get<SpecsResponse>('/api/specs');\n loaded.value = true;\n if (r.status === 404) {\n unsupported.value = true;\n return;\n }\n if (!r.ok) {\n error.value = problem(r, 'load specs');\n return;\n }\n error.value = '';\n specs.value = r.body.specs ?? [];\n}\n\nvoid load();\n// The deployment list is what the \"used by\" column joins against; a deep link straight here may\n// arrive before the shell's poll has filled it.\nif (!state.deploymentsLoaded) void loadDeployments();\n\n/** Deployment ids referencing each spec, by spec name. */\nconst users = computed(() => {\n const m = new Map<string, string[]>();\n for (const d of state.deployments) {\n if (!d.specName) continue;\n const list = m.get(d.specName) ?? [];\n list.push(d.id);\n m.set(d.specName, list);\n }\n return m;\n});\n\nconst shown = computed(() => {\n const q = needle.value.trim().toLowerCase();\n if (!q) return specs.value;\n return specs.value.filter(\n (s) => s.name.toLowerCase().includes(q) || (s.description ?? '').toLowerCase().includes(q),\n );\n});\n</script>\n\n<template>\n <div>\n <div class=\"page-head\">\n <div>\n <h1>Specs</h1>\n <div class=\"sub\">Stored once, used by any number of deployments</div>\n </div>\n <span class=\"grow\" />\n <RefreshButton :run=\"load\" />\n </div>\n\n <ErrorNote v-if=\"error\" :text=\"error\" title=\"Could not load the specs.\" />\n\n <!-- Not an empty list: this host cannot store specs at all (404, an older build). The two\n states have to stay tellable apart, so this banner is not the empty state below. -->\n <section v-if=\"unsupported\" class=\"panel\">\n <div class=\"banner plain\">\n <b>This host is too old to store specs.</b>\n </div>\n </section>\n\n <section v-else class=\"panel\">\n <SkeletonList v-if=\"!loaded\" :rows=\"3\" tall />\n\n <template v-else-if=\"specs.length\">\n <div class=\"field\" style=\"max-width: 320px; margin-bottom: var(--s4)\">\n <label for=\"q\">Search</label>\n <input id=\"q\" v-model=\"needle\" type=\"search\" placeholder=\"name or description\" />\n </div>\n\n <table role=\"table\" class=\"cards\" data-testid=\"specs.list\">\n <thead role=\"rowgroup\">\n <tr role=\"row\">\n <th role=\"columnheader\">Name</th>\n <th role=\"columnheader\">Kind</th>\n <th role=\"columnheader\">\n needs\n <InfoHint label=\"what needs means\">\n Variables the spec uses but does not set.\n </InfoHint>\n </th>\n <th role=\"columnheader\">Used by</th>\n <th role=\"columnheader\">Updated</th>\n </tr>\n </thead>\n <tbody role=\"rowgroup\" class=\"stagger\">\n <tr v-for=\"(s, i) in shown\" :key=\"s.name\" role=\"row\" :style=\"{ '--i': i }\">\n <td role=\"cell\" class=\"name\" data-label=\"name\">\n <RouterLink :to=\"`/specs/${encodeURIComponent(s.name)}`\">{{ s.name }}</RouterLink>\n <div v-if=\"s.description\" class=\"mute\" style=\"font-size: var(--t-sm)\">\n {{ s.description }}\n </div>\n </td>\n <td role=\"cell\" data-label=\"kind\">\n <span class=\"badge\" :class=\"s.kind\">{{ sentence(s.kind) }}</span>\n </td>\n <td role=\"cell\" data-label=\"needs\">\n <span v-if=\"s.requiredVars.length\">{{ s.requiredVars.join(', ') }}</span>\n <span v-else class=\"mute\">none</span>\n </td>\n <td role=\"cell\" data-label=\"used by\">\n <span v-if=\"users.get(s.name)?.length\">{{ users.get(s.name)!.length }}</span>\n <span v-else class=\"mute\">none</span>\n </td>\n <td role=\"cell\" class=\"dim nowrap\" data-label=\"updated\"><RelativeTime :at=\"s.updatedAt\" /></td>\n </tr>\n <tr v-if=\"!shown.length\" role=\"row\">\n <td role=\"cell\" colspan=\"5\" class=\"mute\">\n No spec matches “{{ needle }}”.\n <button class=\"ghost sm\" @click=\"needle = ''\">Clear search</button>\n </td>\n </tr>\n </tbody>\n </table>\n </template>\n\n <!--\n Honest empty state. This page cannot create a spec yet, so pointing at \"New spec\" would be a\n dead end — the generated command below is the way that does work.\n -->\n <div v-else class=\"banner plain\">\n <b>No specs yet — store one below.</b>\n <EquivalentCommand\n what=\"storing a spec\"\n method=\"PUT\"\n path=\"/api/specs/my-spec\"\n :body=\"{ spec: '…the contents of your preview.yml…' }\"\n cli=\"pstack validate -f preview.yml # then PUT it with the curl above\"\n />\n </div>\n </section>\n </div>\n</template>\n"],"names":["specs","ref","loaded","error","unsupported","needle","load","r","api","problem","state","loadDeployments","users","computed","m","d","list","shown","q","s","_createElementBlock","_createElementVNode","_hoisted_1","_createVNode","RefreshButton","_createBlock","ErrorNote","_openBlock","_hoisted_2","_cache","_hoisted_3","_Fragment","_hoisted_4","$event","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","InfoHint","_hoisted_9","_renderList","i","_hoisted_10","_component_RouterLink","_createTextVNode","_toDisplayString","_hoisted_11","_hoisted_12","_normalizeClass","_unref","sentence","_hoisted_13","_hoisted_14","_hoisted_15","_hoisted_16","_a","_hoisted_17","_hoisted_18","_hoisted_19","RelativeTime","_hoisted_20","_hoisted_21","_hoisted_22","Equiv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,+BAEpE1C,EAAA,MAAM,iBAAjBU,IAAAP,EAKK,KALLwC,GAKK,CAJHvC,EAGK,KAHLwC,GAGK,GAHoC,qBACtBhB,EAAGxC,EAAA,KAAM,EAAG,MAC7B,CAAA,EAAAgB,EAAmE,SAAA,CAA3D,MAAM,WAAY,uBAAOhB,EAAA,MAAM,GAAA,EAAO,cAAY,CAAA,iBAWpEsB,IAAAP,EASM,MATN0C,GASM,CARJjC,EAAA,EAAA,IAAAA,EAAA,EAAA,EAAAR,EAAsC,SAAnC,kCAA+B,EAAA,GAClCE,EAMEwC,EAAA,CALA,KAAK,iBACL,OAAO,MACP,KAAK,qBACJ,KAAM,CAAA,KAAA,oCAAA,EACP,IAAI,oEAAA,WAjERtC,EAA8CuC,EAAA,OAAhB,KAAM,EAAG,KAAA,EAAA"}
1
+ {"version":3,"file":"SpecsView-DN6EIbcC.js","sources":["../../src/views/SpecsView.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * Stored specs: what is on this host, and who is using each one.\n *\n * The \"used by\" count is computed from the deployments already in shared state rather than asked\n * for: every row carries `specName`, so the join is free. It matters because deleting a spec that\n * deployments still reference is refused — a deployment that cannot resolve its spec can never be\n * torn down — so knowing the count before you try is the difference between a plan and a 409.\n *\n * A server built before named specs answers 404 here. That is a capability difference, not an\n * error, so it gets its own plain banner instead of a red one.\n */\nimport { computed, ref } from 'vue';\nimport { sentence } from '../composables/useFormat';\nimport { api, problem } from '../api/client';\nimport type { SpecMeta, SpecsResponse } from '../api/types';\nimport { state, loadDeployments } from '../composables/useControlPlane';\n\nimport SkeletonList from '../components/SkeletonList.vue';\nimport ErrorNote from '../components/ErrorNote.vue';\nimport InfoHint from '../components/InfoHint.vue';\nimport RelativeTime from '../components/RelativeTime.vue';\nimport EquivalentCommand from '../components/EquivalentCommand.vue';\nimport RefreshButton from '../components/RefreshButton.vue';\n\nconst specs = ref<SpecMeta[]>([]);\nconst loaded = ref(false);\nconst error = ref('');\nconst unsupported = ref(false);\nconst needle = ref('');\n\nasync function load(): Promise<void> {\n const r = await api.get<SpecsResponse>('/api/specs');\n loaded.value = true;\n if (r.status === 404) {\n unsupported.value = true;\n return;\n }\n if (!r.ok) {\n error.value = problem(r, 'load specs');\n return;\n }\n error.value = '';\n specs.value = r.body.specs ?? [];\n}\n\nvoid load();\n// The deployment list is what the \"used by\" column joins against; a deep link straight here may\n// arrive before the shell's poll has filled it.\nif (!state.deploymentsLoaded) void loadDeployments();\n\n/** Deployment ids referencing each spec, by spec name. */\nconst users = computed(() => {\n const m = new Map<string, string[]>();\n for (const d of state.deployments) {\n if (!d.specName) continue;\n const list = m.get(d.specName) ?? [];\n list.push(d.id);\n m.set(d.specName, list);\n }\n return m;\n});\n\nconst shown = computed(() => {\n const q = needle.value.trim().toLowerCase();\n if (!q) return specs.value;\n return specs.value.filter(\n (s) => s.name.toLowerCase().includes(q) || (s.description ?? '').toLowerCase().includes(q),\n );\n});\n</script>\n\n<template>\n <div>\n <div class=\"page-head\">\n <div>\n <h1>Specs</h1>\n <div class=\"sub\">Stored once, used by any number of deployments</div>\n </div>\n <span class=\"grow\" />\n <RefreshButton :run=\"load\" />\n </div>\n\n <ErrorNote v-if=\"error\" :text=\"error\" title=\"Could not load the specs.\" />\n\n <!-- Not an empty list: this host cannot store specs at all (404, an older build). The two\n states have to stay tellable apart, so this banner is not the empty state below. -->\n <section v-if=\"unsupported\" class=\"panel\">\n <div class=\"banner plain\">\n <b>This host is too old to store specs.</b>\n </div>\n </section>\n\n <section v-else class=\"panel\">\n <SkeletonList v-if=\"!loaded\" :rows=\"3\" tall />\n\n <template v-else-if=\"specs.length\">\n <div class=\"field\" style=\"max-width: 320px; margin-bottom: var(--s4)\">\n <label for=\"q\">Search</label>\n <input id=\"q\" v-model=\"needle\" type=\"search\" placeholder=\"name or description\" />\n </div>\n\n <table role=\"table\" class=\"cards\" data-testid=\"specs.list\">\n <thead role=\"rowgroup\">\n <tr role=\"row\">\n <th role=\"columnheader\">Name</th>\n <th role=\"columnheader\">Kind</th>\n <th role=\"columnheader\">\n needs\n <InfoHint label=\"what needs means\">\n Variables the spec uses but does not set.\n </InfoHint>\n </th>\n <th role=\"columnheader\">Used by</th>\n <th role=\"columnheader\">Updated</th>\n </tr>\n </thead>\n <tbody role=\"rowgroup\" class=\"stagger\">\n <tr v-for=\"(s, i) in shown\" :key=\"s.name\" role=\"row\" :style=\"{ '--i': i }\">\n <td role=\"cell\" class=\"name\" data-label=\"name\">\n <RouterLink :to=\"`/specs/${encodeURIComponent(s.name)}`\">{{ s.name }}</RouterLink>\n <div v-if=\"s.description\" class=\"mute\" style=\"font-size: var(--t-sm)\">\n {{ s.description }}\n </div>\n </td>\n <td role=\"cell\" data-label=\"kind\">\n <span class=\"badge\" :class=\"s.kind\">{{ sentence(s.kind) }}</span>\n </td>\n <td role=\"cell\" data-label=\"needs\">\n <span v-if=\"s.requiredVars.length\">{{ s.requiredVars.join(', ') }}</span>\n <span v-else class=\"mute\">none</span>\n </td>\n <td role=\"cell\" data-label=\"used by\">\n <span v-if=\"users.get(s.name)?.length\">{{ users.get(s.name)!.length }}</span>\n <span v-else class=\"mute\">none</span>\n </td>\n <td role=\"cell\" class=\"dim nowrap\" data-label=\"updated\"><RelativeTime :at=\"s.updatedAt\" /></td>\n </tr>\n <tr v-if=\"!shown.length\" role=\"row\">\n <td role=\"cell\" colspan=\"5\" class=\"mute\">\n No spec matches “{{ needle }}”.\n <button class=\"ghost sm\" @click=\"needle = ''\">Clear search</button>\n </td>\n </tr>\n </tbody>\n </table>\n </template>\n\n <!--\n Honest empty state. This page cannot create a spec yet, so pointing at \"New spec\" would be a\n dead end — the generated command below is the way that does work.\n -->\n <div v-else class=\"banner plain\">\n <b>No specs yet — store one below.</b>\n <EquivalentCommand\n what=\"storing a spec\"\n method=\"PUT\"\n path=\"/api/specs/my-spec\"\n :body=\"{ spec: '…the contents of your preview.yml…' }\"\n cli=\"pstack validate -f preview.yml # then PUT it with the curl above\"\n />\n </div>\n </section>\n </div>\n</template>\n"],"names":["specs","ref","loaded","error","unsupported","needle","load","r","api","problem","state","loadDeployments","users","computed","m","d","list","shown","q","s","_createElementBlock","_createElementVNode","_hoisted_1","_createVNode","RefreshButton","_createBlock","ErrorNote","_openBlock","_hoisted_2","_cache","_hoisted_3","_Fragment","_hoisted_4","$event","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","InfoHint","_hoisted_9","_renderList","i","_hoisted_10","_component_RouterLink","_createTextVNode","_toDisplayString","_hoisted_11","_hoisted_12","_normalizeClass","_unref","sentence","_hoisted_13","_hoisted_14","_hoisted_15","_hoisted_16","_a","_hoisted_17","_hoisted_18","_hoisted_19","RelativeTime","_hoisted_20","_hoisted_21","_hoisted_22","EquivalentCommand","SkeletonList"],"mappings":"m4CAyBA,MAAMA,EAAQC,EAAgB,EAAE,EAC1BC,EAASD,EAAI,EAAK,EAClBE,EAAQF,EAAI,EAAE,EACdG,EAAcH,EAAI,EAAK,EACvBI,EAASJ,EAAI,EAAE,EAErB,eAAeK,GAAsB,CACnC,MAAMC,EAAI,MAAMC,EAAI,IAAmB,YAAY,EAEnD,GADAN,EAAO,MAAQ,GACXK,EAAE,SAAW,IAAK,CACpBH,EAAY,MAAQ,GACpB,MACF,CACA,GAAI,CAACG,EAAE,GAAI,CACTJ,EAAM,MAAQM,EAAQF,EAAG,YAAY,EACrC,MACF,CACAJ,EAAM,MAAQ,GACdH,EAAM,MAAQO,EAAE,KAAK,OAAS,CAAA,CAChC,CAEKD,EAAA,EAGAI,EAAM,mBAAwBC,EAAA,EAGnC,MAAMC,EAAQC,EAAS,IAAM,CAC3B,MAAMC,MAAQ,IACd,UAAWC,KAAKL,EAAM,YAAa,CACjC,GAAI,CAACK,EAAE,SAAU,SACjB,MAAMC,EAAOF,EAAE,IAAIC,EAAE,QAAQ,GAAK,CAAA,EAClCC,EAAK,KAAKD,EAAE,EAAE,EACdD,EAAE,IAAIC,EAAE,SAAUC,CAAI,CACxB,CACA,OAAOF,CACT,CAAC,EAEKG,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,EAAA,EAAAP,EAAyE,OAAAgC,GAAAP,EAAnC,EAAE,aAAa,KAAI,IAAA,CAAA,EAAA,CAAA,QACzDzB,EAAqC,OAArCiC,GAA0B,MAAI,EAAA,GAEhChC,EAGK,KAHLiC,GAGK,EAFSC,EAAA3C,EAAA,MAAM,IAAI,EAAE,IAAI,IAAhB,MAAA2C,EAAmB,YAA/BnC,EAA6E,OAAAoC,GAAAX,EAAnCjC,QAAM,IAAI,EAAE,IAAI,EAAG,MAAM,EAAA,CAAA,QACnEQ,EAAqC,OAArCqC,GAA0B,MAAI,EAAA,GAEhCpC,EAA+F,KAA/FqC,GAA+F,CAAvCnC,EAAkCoC,EAAA,CAAnB,GAAI,EAAE,SAAA,+BAEpE1C,EAAA,MAAM,iBAAjBU,IAAAP,EAKK,KALLwC,GAKK,CAJHvC,EAGK,KAHLwC,GAGK,GAHoC,qBACtBhB,EAAGxC,EAAA,KAAM,EAAG,MAC7B,CAAA,EAAAgB,EAAmE,SAAA,CAA3D,MAAM,WAAY,uBAAOhB,EAAA,MAAM,GAAA,EAAO,cAAY,CAAA,iBAWpEsB,IAAAP,EASM,MATN0C,GASM,CARJjC,EAAA,EAAA,IAAAA,EAAA,EAAA,EAAAR,EAAsC,SAAnC,kCAA+B,EAAA,GAClCE,EAMEwC,EAAA,CALA,KAAK,iBACL,OAAO,MACP,KAAK,qBACJ,KAAM,CAAA,KAAA,oCAAA,EACP,IAAI,oEAAA,WAjERtC,EAA8CuC,EAAA,OAAhB,KAAM,EAAG,KAAA,EAAA"}
@@ -1,2 +1,2 @@
1
- import{d,c as l,a as t,o as h}from"./index-D_Ks6aQi.js";const n=["width","height"],s=["width","height"],a=["width","height"],o=["width","height"],u=["width","height"],r=["width","height"],g=["width","height"],w=["width","height"],z=["width","height"],f=d({__name:"SsoMark",props:{preset:{},size:{default:18}},setup(e){return(k,i)=>e.preset==="github"?(h(),l("svg",{key:0,width:e.size,height:e.size,viewBox:"0 0 16 16","aria-hidden":"true"},[...i[0]||(i[0]=[t("path",{fill:"currentColor",d:"M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.01 8.01 0 0 0 16 8c0-4.42-3.58-8-8-8z"},null,-1)])],8,n)):e.preset==="google"?(h(),l("svg",{key:1,width:e.size,height:e.size,viewBox:"0 0 18 18","aria-hidden":"true"},[...i[1]||(i[1]=[t("path",{fill:"#4285F4",d:"M17.64 9.2c0-.64-.06-1.25-.16-1.84H9v3.48h4.84c-.21 1.13-.84 2.08-1.8 2.72v2.26h2.92c1.7-1.57 2.68-3.88 2.68-6.62z"},null,-1),t("path",{fill:"#34A853",d:"M9 18c2.43 0 4.47-.8 5.96-2.18l-2.92-2.26c-.8.54-1.84.86-3.04.86-2.34 0-4.32-1.58-5.03-3.71H.96v2.33A8.997 8.997 0 0 0 9 18z"},null,-1),t("path",{fill:"#FBBC05",d:"M3.97 10.71A5.41 5.41 0 0 1 3.68 9c0-.59.1-1.17.28-1.71V4.96H.96A8.996 8.996 0 0 0 0 9c0 1.45.35 2.82.96 4.04l3.01-2.33z"},null,-1),t("path",{fill:"#EA4335",d:"M9 3.58c1.32 0 2.5.45 3.44 1.35l2.58-2.58C13.46.89 11.43 0 9 0A8.997 8.997 0 0 0 .96 4.96l3.01 2.33C4.68 5.16 6.66 3.58 9 3.58z"},null,-1)])],8,s)):e.preset==="gitlab"?(h(),l("svg",{key:2,width:e.size,height:e.size,viewBox:"0 0 24 24","aria-hidden":"true"},[...i[2]||(i[2]=[t("path",{fill:"#FC6D26",d:"m23.6 9.593-.033-.086L20.3.98a.851.851 0 0 0-.336-.405.875.875 0 0 0-1 .054.875.875 0 0 0-.29.44l-2.207 6.748H7.537L5.33 1.07a.858.858 0 0 0-.29-.441.875.875 0 0 0-1-.054.86.86 0 0 0-.336.405L.437 9.502l-.032.086a6.066 6.066 0 0 0 2.012 7.01l.01.009.03.021 4.977 3.727 2.462 1.863 1.5 1.132a1.009 1.009 0 0 0 1.22 0l1.499-1.132 2.461-1.863 5.006-3.75.013-.01a6.068 6.068 0 0 0 2.005-7.002Z"},null,-1)])],8,a)):e.preset==="bitbucket"?(h(),l("svg",{key:3,width:e.size,height:e.size,viewBox:"0 0 24 24","aria-hidden":"true"},[...i[3]||(i[3]=[t("path",{fill:"#2684FF",d:"M.778 1.213a.768.768 0 0 0-.768.892l3.263 19.81c.084.5.515.868 1.022.873H19.95a.772.772 0 0 0 .77-.646l3.27-20.03a.768.768 0 0 0-.768-.891zM14.52 15.53H9.522L8.17 8.466h7.561z"},null,-1)])],8,o)):e.preset==="microsoft"?(h(),l("svg",{key:4,width:e.size,height:e.size,viewBox:"0 0 21 21","aria-hidden":"true"},[...i[4]||(i[4]=[t("rect",{x:"1",y:"1",width:"9",height:"9",fill:"#F25022"},null,-1),t("rect",{x:"11",y:"1",width:"9",height:"9",fill:"#7FBA00"},null,-1),t("rect",{x:"1",y:"11",width:"9",height:"9",fill:"#00A4EF"},null,-1),t("rect",{x:"11",y:"11",width:"9",height:"9",fill:"#FFB900"},null,-1)])],8,u)):e.preset==="okta"?(h(),l("svg",{key:5,width:e.size,height:e.size,viewBox:"0 0 24 24","aria-hidden":"true"},[...i[5]||(i[5]=[t("path",{fill:"#007DC1",d:"M12 0C5.389 0 0 5.35 0 12s5.35 12 12 12 12-5.35 12-12S18.611 0 12 0zm0 18c-3.325 0-6-2.675-6-6s2.675-6 6-6 6 2.675 6 6-2.675 6-6 6z"},null,-1)])],8,r)):e.preset==="auth0"?(h(),l("svg",{key:6,width:e.size,height:e.size,viewBox:"0 0 24 24","aria-hidden":"true"},[...i[6]||(i[6]=[t("path",{fill:"#EB5424",d:"M21.98 7.448 19.62 0H4.347L2.02 7.448c-1.352 4.312.03 9.206 3.815 12.015L12.007 24l6.157-4.552c3.755-2.81 5.182-7.688 3.815-12.015l-6.16 4.58 2.343 7.45-6.157-4.597-6.158 4.58 2.358-7.433-6.188-4.55 7.63-.045L12.008 0l2.356 7.404 7.615.044z"},null,-1)])],8,g)):e.preset==="keycloak"?(h(),l("svg",{key:7,width:e.size,height:e.size,viewBox:"0 0 24 24",fill:"none",stroke:"#00B8E3","stroke-width":"1.8","stroke-linejoin":"round","aria-hidden":"true"},[...i[7]||(i[7]=[t("path",{d:"M7 3.2h10l5 8.8-5 8.8H7L2 12z"},null,-1),t("path",{d:"M10.6 8 8.2 12l2.4 4M15 8l-2.4 4L15 16","stroke-linecap":"square"},null,-1)])],8,w)):(h(),l("svg",{key:8,width:e.size,height:e.size,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},[...i[8]||(i[8]=[t("path",{d:"m21 2-9.6 9.6"},null,-1),t("circle",{cx:"7.5",cy:"15.5",r:"5.5"},null,-1),t("path",{d:"m15.5 7.5 3 3L22 7l-3-3"},null,-1)])],8,z))}});export{f as _};
2
- //# sourceMappingURL=SsoMark.vue_vue_type_script_setup_true_lang-BU6ThRhq.js.map
1
+ import{d,c as l,a as t,o as h}from"./index-DlhYSSKq.js";const n=["width","height"],s=["width","height"],a=["width","height"],o=["width","height"],u=["width","height"],r=["width","height"],g=["width","height"],w=["width","height"],z=["width","height"],f=d({__name:"SsoMark",props:{preset:{},size:{default:18}},setup(e){return(k,i)=>e.preset==="github"?(h(),l("svg",{key:0,width:e.size,height:e.size,viewBox:"0 0 16 16","aria-hidden":"true"},[...i[0]||(i[0]=[t("path",{fill:"currentColor",d:"M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.01 8.01 0 0 0 16 8c0-4.42-3.58-8-8-8z"},null,-1)])],8,n)):e.preset==="google"?(h(),l("svg",{key:1,width:e.size,height:e.size,viewBox:"0 0 18 18","aria-hidden":"true"},[...i[1]||(i[1]=[t("path",{fill:"#4285F4",d:"M17.64 9.2c0-.64-.06-1.25-.16-1.84H9v3.48h4.84c-.21 1.13-.84 2.08-1.8 2.72v2.26h2.92c1.7-1.57 2.68-3.88 2.68-6.62z"},null,-1),t("path",{fill:"#34A853",d:"M9 18c2.43 0 4.47-.8 5.96-2.18l-2.92-2.26c-.8.54-1.84.86-3.04.86-2.34 0-4.32-1.58-5.03-3.71H.96v2.33A8.997 8.997 0 0 0 9 18z"},null,-1),t("path",{fill:"#FBBC05",d:"M3.97 10.71A5.41 5.41 0 0 1 3.68 9c0-.59.1-1.17.28-1.71V4.96H.96A8.996 8.996 0 0 0 0 9c0 1.45.35 2.82.96 4.04l3.01-2.33z"},null,-1),t("path",{fill:"#EA4335",d:"M9 3.58c1.32 0 2.5.45 3.44 1.35l2.58-2.58C13.46.89 11.43 0 9 0A8.997 8.997 0 0 0 .96 4.96l3.01 2.33C4.68 5.16 6.66 3.58 9 3.58z"},null,-1)])],8,s)):e.preset==="gitlab"?(h(),l("svg",{key:2,width:e.size,height:e.size,viewBox:"0 0 24 24","aria-hidden":"true"},[...i[2]||(i[2]=[t("path",{fill:"#FC6D26",d:"m23.6 9.593-.033-.086L20.3.98a.851.851 0 0 0-.336-.405.875.875 0 0 0-1 .054.875.875 0 0 0-.29.44l-2.207 6.748H7.537L5.33 1.07a.858.858 0 0 0-.29-.441.875.875 0 0 0-1-.054.86.86 0 0 0-.336.405L.437 9.502l-.032.086a6.066 6.066 0 0 0 2.012 7.01l.01.009.03.021 4.977 3.727 2.462 1.863 1.5 1.132a1.009 1.009 0 0 0 1.22 0l1.499-1.132 2.461-1.863 5.006-3.75.013-.01a6.068 6.068 0 0 0 2.005-7.002Z"},null,-1)])],8,a)):e.preset==="bitbucket"?(h(),l("svg",{key:3,width:e.size,height:e.size,viewBox:"0 0 24 24","aria-hidden":"true"},[...i[3]||(i[3]=[t("path",{fill:"#2684FF",d:"M.778 1.213a.768.768 0 0 0-.768.892l3.263 19.81c.084.5.515.868 1.022.873H19.95a.772.772 0 0 0 .77-.646l3.27-20.03a.768.768 0 0 0-.768-.891zM14.52 15.53H9.522L8.17 8.466h7.561z"},null,-1)])],8,o)):e.preset==="microsoft"?(h(),l("svg",{key:4,width:e.size,height:e.size,viewBox:"0 0 21 21","aria-hidden":"true"},[...i[4]||(i[4]=[t("rect",{x:"1",y:"1",width:"9",height:"9",fill:"#F25022"},null,-1),t("rect",{x:"11",y:"1",width:"9",height:"9",fill:"#7FBA00"},null,-1),t("rect",{x:"1",y:"11",width:"9",height:"9",fill:"#00A4EF"},null,-1),t("rect",{x:"11",y:"11",width:"9",height:"9",fill:"#FFB900"},null,-1)])],8,u)):e.preset==="okta"?(h(),l("svg",{key:5,width:e.size,height:e.size,viewBox:"0 0 24 24","aria-hidden":"true"},[...i[5]||(i[5]=[t("path",{fill:"#007DC1",d:"M12 0C5.389 0 0 5.35 0 12s5.35 12 12 12 12-5.35 12-12S18.611 0 12 0zm0 18c-3.325 0-6-2.675-6-6s2.675-6 6-6 6 2.675 6 6-2.675 6-6 6z"},null,-1)])],8,r)):e.preset==="auth0"?(h(),l("svg",{key:6,width:e.size,height:e.size,viewBox:"0 0 24 24","aria-hidden":"true"},[...i[6]||(i[6]=[t("path",{fill:"#EB5424",d:"M21.98 7.448 19.62 0H4.347L2.02 7.448c-1.352 4.312.03 9.206 3.815 12.015L12.007 24l6.157-4.552c3.755-2.81 5.182-7.688 3.815-12.015l-6.16 4.58 2.343 7.45-6.157-4.597-6.158 4.58 2.358-7.433-6.188-4.55 7.63-.045L12.008 0l2.356 7.404 7.615.044z"},null,-1)])],8,g)):e.preset==="keycloak"?(h(),l("svg",{key:7,width:e.size,height:e.size,viewBox:"0 0 24 24",fill:"none",stroke:"#00B8E3","stroke-width":"1.8","stroke-linejoin":"round","aria-hidden":"true"},[...i[7]||(i[7]=[t("path",{d:"M7 3.2h10l5 8.8-5 8.8H7L2 12z"},null,-1),t("path",{d:"M10.6 8 8.2 12l2.4 4M15 8l-2.4 4L15 16","stroke-linecap":"square"},null,-1)])],8,w)):(h(),l("svg",{key:8,width:e.size,height:e.size,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},[...i[8]||(i[8]=[t("path",{d:"m21 2-9.6 9.6"},null,-1),t("circle",{cx:"7.5",cy:"15.5",r:"5.5"},null,-1),t("path",{d:"m15.5 7.5 3 3L22 7l-3-3"},null,-1)])],8,z))}});export{f as _};
2
+ //# sourceMappingURL=SsoMark.vue_vue_type_script_setup_true_lang-rMP20d_u.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SsoMark.vue_vue_type_script_setup_true_lang-BU6ThRhq.js","sources":["../../src/components/SsoMark.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * The identity-provider brand marks, drawn inline.\n *\n * Inline and bundled ON PURPOSE: the login page is the first thing a browser loads on a fresh\n * host, and fetching marks from a brand CDN would make signing in depend on a third party (and\n * tell that third party about every visit). So each mark is an SVG in this file, in its brand\n * colour — except GitHub and the generic key, whose marks are drawn in black-or-white and\n * therefore use `currentColor` to follow the theme.\n *\n * `preset` is the preset key the API reports (`config.provider`, or `preset` in the health\n * summary). Anything unrecognised — `custom`, a bare OIDC issuer's `''` — gets the generic key,\n * so a provider nobody drew a mark for still renders as *a* provider rather than as a gap.\n *\n * The Keycloak mark is a simplification (their hexagon-and-chevrons icon rebuilt from basic\n * shapes), not traced brand art; the rest follow the providers' published marks.\n */\nwithDefaults(defineProps<{ preset: string; size?: number }>(), { size: 18 });\n</script>\n\n<template>\n <!-- GitHub: the octocat mark ships in black or white only, so it follows the text colour. -->\n <svg v-if=\"preset === 'github'\" :width=\"size\" :height=\"size\" viewBox=\"0 0 16 16\" aria-hidden=\"true\">\n <path\n fill=\"currentColor\"\n d=\"M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.01 8.01 0 0 0 16 8c0-4.42-3.58-8-8-8z\"\n />\n </svg>\n\n <!-- Google: the 'G', four colours, per the sign-in branding assets. -->\n <svg v-else-if=\"preset === 'google'\" :width=\"size\" :height=\"size\" viewBox=\"0 0 18 18\" aria-hidden=\"true\">\n <path fill=\"#4285F4\" d=\"M17.64 9.2c0-.64-.06-1.25-.16-1.84H9v3.48h4.84c-.21 1.13-.84 2.08-1.8 2.72v2.26h2.92c1.7-1.57 2.68-3.88 2.68-6.62z\" />\n <path fill=\"#34A853\" d=\"M9 18c2.43 0 4.47-.8 5.96-2.18l-2.92-2.26c-.8.54-1.84.86-3.04.86-2.34 0-4.32-1.58-5.03-3.71H.96v2.33A8.997 8.997 0 0 0 9 18z\" />\n <path fill=\"#FBBC05\" d=\"M3.97 10.71A5.41 5.41 0 0 1 3.68 9c0-.59.1-1.17.28-1.71V4.96H.96A8.996 8.996 0 0 0 0 9c0 1.45.35 2.82.96 4.04l3.01-2.33z\" />\n <path fill=\"#EA4335\" d=\"M9 3.58c1.32 0 2.5.45 3.44 1.35l2.58-2.58C13.46.89 11.43 0 9 0A8.997 8.997 0 0 0 .96 4.96l3.01 2.33C4.68 5.16 6.66 3.58 9 3.58z\" />\n </svg>\n\n <!-- GitLab: the single-colour tanuki. -->\n <svg v-else-if=\"preset === 'gitlab'\" :width=\"size\" :height=\"size\" viewBox=\"0 0 24 24\" aria-hidden=\"true\">\n <path\n fill=\"#FC6D26\"\n d=\"m23.6 9.593-.033-.086L20.3.98a.851.851 0 0 0-.336-.405.875.875 0 0 0-1 .054.875.875 0 0 0-.29.44l-2.207 6.748H7.537L5.33 1.07a.858.858 0 0 0-.29-.441.875.875 0 0 0-1-.054.86.86 0 0 0-.336.405L.437 9.502l-.032.086a6.066 6.066 0 0 0 2.012 7.01l.01.009.03.021 4.977 3.727 2.462 1.863 1.5 1.132a1.009 1.009 0 0 0 1.22 0l1.499-1.132 2.461-1.863 5.006-3.75.013-.01a6.068 6.068 0 0 0 2.005-7.002Z\"\n />\n </svg>\n\n <!-- Bitbucket. -->\n <svg v-else-if=\"preset === 'bitbucket'\" :width=\"size\" :height=\"size\" viewBox=\"0 0 24 24\" aria-hidden=\"true\">\n <path\n fill=\"#2684FF\"\n d=\"M.778 1.213a.768.768 0 0 0-.768.892l3.263 19.81c.084.5.515.868 1.022.873H19.95a.772.772 0 0 0 .77-.646l3.27-20.03a.768.768 0 0 0-.768-.891zM14.52 15.53H9.522L8.17 8.466h7.561z\"\n />\n </svg>\n\n <!-- Microsoft: the four squares. -->\n <svg v-else-if=\"preset === 'microsoft'\" :width=\"size\" :height=\"size\" viewBox=\"0 0 21 21\" aria-hidden=\"true\">\n <rect x=\"1\" y=\"1\" width=\"9\" height=\"9\" fill=\"#F25022\" />\n <rect x=\"11\" y=\"1\" width=\"9\" height=\"9\" fill=\"#7FBA00\" />\n <rect x=\"1\" y=\"11\" width=\"9\" height=\"9\" fill=\"#00A4EF\" />\n <rect x=\"11\" y=\"11\" width=\"9\" height=\"9\" fill=\"#FFB900\" />\n </svg>\n\n <!-- Okta: the circle mark. -->\n <svg v-else-if=\"preset === 'okta'\" :width=\"size\" :height=\"size\" viewBox=\"0 0 24 24\" aria-hidden=\"true\">\n <path\n fill=\"#007DC1\"\n d=\"M12 0C5.389 0 0 5.35 0 12s5.35 12 12 12 12-5.35 12-12S18.611 0 12 0zm0 18c-3.325 0-6-2.675-6-6s2.675-6 6-6 6 2.675 6 6-2.675 6-6 6z\"\n />\n </svg>\n\n <!-- Auth0: the shield. -->\n <svg v-else-if=\"preset === 'auth0'\" :width=\"size\" :height=\"size\" viewBox=\"0 0 24 24\" aria-hidden=\"true\">\n <path\n fill=\"#EB5424\"\n d=\"M21.98 7.448 19.62 0H4.347L2.02 7.448c-1.352 4.312.03 9.206 3.815 12.015L12.007 24l6.157-4.552c3.755-2.81 5.182-7.688 3.815-12.015l-6.16 4.58 2.343 7.45-6.157-4.597-6.158 4.58 2.358-7.433-6.188-4.55 7.63-.045L12.008 0l2.356 7.404 7.615.044z\"\n />\n </svg>\n\n <!-- Keycloak: hexagon and double chevron, simplified — see the header. -->\n <svg\n v-else-if=\"preset === 'keycloak'\"\n :width=\"size\"\n :height=\"size\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"#00B8E3\"\n stroke-width=\"1.8\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"M7 3.2h10l5 8.8-5 8.8H7L2 12z\" />\n <path d=\"M10.6 8 8.2 12l2.4 4M15 8l-2.4 4L15 16\" stroke-linecap=\"square\" />\n </svg>\n\n <!-- Everything else — custom OAuth2, a bare OIDC issuer, a preset this build has no mark for. -->\n <svg\n v-else\n :width=\"size\"\n :height=\"size\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"m21 2-9.6 9.6\" />\n <circle cx=\"7.5\" cy=\"15.5\" r=\"5.5\" />\n <path d=\"m15.5 7.5 3 3L22 7l-3-3\" />\n </svg>\n</template>\n"],"names":["__props","_createElementBlock","_createElementVNode"],"mappings":"2UAsBaA,EAAA,SAAM,cAAjBC,EAKM,MAAA,OAL2B,MAAOD,EAAA,KAAO,OAAQA,EAAA,KAAM,QAAQ,YAAY,cAAY,MAAA,mBAC3FE,EAGE,OAAA,CAFA,KAAK,eACL,EAAE,0jBAAA,oBAKUF,EAAA,SAAM,cAAtBC,EAKM,MAAA,OALgC,MAAOD,EAAA,KAAO,OAAQA,EAAA,KAAM,QAAQ,YAAY,cAAY,MAAA,mBAChGE,EAA8I,OAAA,CAAxI,KAAK,UAAU,EAAE,oHAAA,WACvBA,EAAwJ,OAAA,CAAlJ,KAAK,UAAU,EAAE,8HAAA,WACvBA,EAAoJ,OAAA,CAA9I,KAAK,UAAU,EAAE,0HAAA,WACvBA,EAA2J,OAAA,CAArJ,KAAK,UAAU,EAAE,iIAAA,oBAITF,EAAA,SAAM,cAAtBC,EAKM,MAAA,OALgC,MAAOD,EAAA,KAAO,OAAQA,EAAA,KAAM,QAAQ,YAAY,cAA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ACvCA,EAA2E,OAAA,CAArE,EAAE,yCAAyC,iBAAe,QAAA,yBAIlED,EAeM,MAAA,OAbH,MAAOD,EAAA,KACP,OAAQA,EAAA,KACT,QAAQ,YACR,KAAK,OACL,OAAO,eACP,eAAa,IACb,iBAAe,QACf,kBAAgB,QAChB,cAAY,MAAA,mBAEZE,EAA0B,OAAA,CAApB,EAAE,eAAA,EAAe,KAAA,EAAA,EACvBA,EAAqC,SAAA,CAA7B,GAAG,MAAM,GAAG,OAAO,EAAE,KAAA,WAC7BA,EAAoC,OAAA,CAA9B,EAAE,yBAAA,EAAyB,KAAA,EAAA,CAAA"}
1
+ {"version":3,"file":"SsoMark.vue_vue_type_script_setup_true_lang-rMP20d_u.js","sources":["../../src/components/SsoMark.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * The identity-provider brand marks, drawn inline.\n *\n * Inline and bundled ON PURPOSE: the login page is the first thing a browser loads on a fresh\n * host, and fetching marks from a brand CDN would make signing in depend on a third party (and\n * tell that third party about every visit). So each mark is an SVG in this file, in its brand\n * colour — except GitHub and the generic key, whose marks are drawn in black-or-white and\n * therefore use `currentColor` to follow the theme.\n *\n * `preset` is the preset key the API reports (`config.provider`, or `preset` in the health\n * summary). Anything unrecognised — `custom`, a bare OIDC issuer's `''` — gets the generic key,\n * so a provider nobody drew a mark for still renders as *a* provider rather than as a gap.\n *\n * The Keycloak mark is a simplification (their hexagon-and-chevrons icon rebuilt from basic\n * shapes), not traced brand art; the rest follow the providers' published marks.\n */\nwithDefaults(defineProps<{ preset: string; size?: number }>(), { size: 18 });\n</script>\n\n<template>\n <!-- GitHub: the octocat mark ships in black or white only, so it follows the text colour. -->\n <svg v-if=\"preset === 'github'\" :width=\"size\" :height=\"size\" viewBox=\"0 0 16 16\" aria-hidden=\"true\">\n <path\n fill=\"currentColor\"\n d=\"M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.01 8.01 0 0 0 16 8c0-4.42-3.58-8-8-8z\"\n />\n </svg>\n\n <!-- Google: the 'G', four colours, per the sign-in branding assets. -->\n <svg v-else-if=\"preset === 'google'\" :width=\"size\" :height=\"size\" viewBox=\"0 0 18 18\" aria-hidden=\"true\">\n <path fill=\"#4285F4\" d=\"M17.64 9.2c0-.64-.06-1.25-.16-1.84H9v3.48h4.84c-.21 1.13-.84 2.08-1.8 2.72v2.26h2.92c1.7-1.57 2.68-3.88 2.68-6.62z\" />\n <path fill=\"#34A853\" d=\"M9 18c2.43 0 4.47-.8 5.96-2.18l-2.92-2.26c-.8.54-1.84.86-3.04.86-2.34 0-4.32-1.58-5.03-3.71H.96v2.33A8.997 8.997 0 0 0 9 18z\" />\n <path fill=\"#FBBC05\" d=\"M3.97 10.71A5.41 5.41 0 0 1 3.68 9c0-.59.1-1.17.28-1.71V4.96H.96A8.996 8.996 0 0 0 0 9c0 1.45.35 2.82.96 4.04l3.01-2.33z\" />\n <path fill=\"#EA4335\" d=\"M9 3.58c1.32 0 2.5.45 3.44 1.35l2.58-2.58C13.46.89 11.43 0 9 0A8.997 8.997 0 0 0 .96 4.96l3.01 2.33C4.68 5.16 6.66 3.58 9 3.58z\" />\n </svg>\n\n <!-- GitLab: the single-colour tanuki. -->\n <svg v-else-if=\"preset === 'gitlab'\" :width=\"size\" :height=\"size\" viewBox=\"0 0 24 24\" aria-hidden=\"true\">\n <path\n fill=\"#FC6D26\"\n d=\"m23.6 9.593-.033-.086L20.3.98a.851.851 0 0 0-.336-.405.875.875 0 0 0-1 .054.875.875 0 0 0-.29.44l-2.207 6.748H7.537L5.33 1.07a.858.858 0 0 0-.29-.441.875.875 0 0 0-1-.054.86.86 0 0 0-.336.405L.437 9.502l-.032.086a6.066 6.066 0 0 0 2.012 7.01l.01.009.03.021 4.977 3.727 2.462 1.863 1.5 1.132a1.009 1.009 0 0 0 1.22 0l1.499-1.132 2.461-1.863 5.006-3.75.013-.01a6.068 6.068 0 0 0 2.005-7.002Z\"\n />\n </svg>\n\n <!-- Bitbucket. -->\n <svg v-else-if=\"preset === 'bitbucket'\" :width=\"size\" :height=\"size\" viewBox=\"0 0 24 24\" aria-hidden=\"true\">\n <path\n fill=\"#2684FF\"\n d=\"M.778 1.213a.768.768 0 0 0-.768.892l3.263 19.81c.084.5.515.868 1.022.873H19.95a.772.772 0 0 0 .77-.646l3.27-20.03a.768.768 0 0 0-.768-.891zM14.52 15.53H9.522L8.17 8.466h7.561z\"\n />\n </svg>\n\n <!-- Microsoft: the four squares. -->\n <svg v-else-if=\"preset === 'microsoft'\" :width=\"size\" :height=\"size\" viewBox=\"0 0 21 21\" aria-hidden=\"true\">\n <rect x=\"1\" y=\"1\" width=\"9\" height=\"9\" fill=\"#F25022\" />\n <rect x=\"11\" y=\"1\" width=\"9\" height=\"9\" fill=\"#7FBA00\" />\n <rect x=\"1\" y=\"11\" width=\"9\" height=\"9\" fill=\"#00A4EF\" />\n <rect x=\"11\" y=\"11\" width=\"9\" height=\"9\" fill=\"#FFB900\" />\n </svg>\n\n <!-- Okta: the circle mark. -->\n <svg v-else-if=\"preset === 'okta'\" :width=\"size\" :height=\"size\" viewBox=\"0 0 24 24\" aria-hidden=\"true\">\n <path\n fill=\"#007DC1\"\n d=\"M12 0C5.389 0 0 5.35 0 12s5.35 12 12 12 12-5.35 12-12S18.611 0 12 0zm0 18c-3.325 0-6-2.675-6-6s2.675-6 6-6 6 2.675 6 6-2.675 6-6 6z\"\n />\n </svg>\n\n <!-- Auth0: the shield. -->\n <svg v-else-if=\"preset === 'auth0'\" :width=\"size\" :height=\"size\" viewBox=\"0 0 24 24\" aria-hidden=\"true\">\n <path\n fill=\"#EB5424\"\n d=\"M21.98 7.448 19.62 0H4.347L2.02 7.448c-1.352 4.312.03 9.206 3.815 12.015L12.007 24l6.157-4.552c3.755-2.81 5.182-7.688 3.815-12.015l-6.16 4.58 2.343 7.45-6.157-4.597-6.158 4.58 2.358-7.433-6.188-4.55 7.63-.045L12.008 0l2.356 7.404 7.615.044z\"\n />\n </svg>\n\n <!-- Keycloak: hexagon and double chevron, simplified — see the header. -->\n <svg\n v-else-if=\"preset === 'keycloak'\"\n :width=\"size\"\n :height=\"size\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"#00B8E3\"\n stroke-width=\"1.8\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"M7 3.2h10l5 8.8-5 8.8H7L2 12z\" />\n <path d=\"M10.6 8 8.2 12l2.4 4M15 8l-2.4 4L15 16\" stroke-linecap=\"square\" />\n </svg>\n\n <!-- Everything else — custom OAuth2, a bare OIDC issuer, a preset this build has no mark for. -->\n <svg\n v-else\n :width=\"size\"\n :height=\"size\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"m21 2-9.6 9.6\" />\n <circle cx=\"7.5\" cy=\"15.5\" r=\"5.5\" />\n <path d=\"m15.5 7.5 3 3L22 7l-3-3\" />\n </svg>\n</template>\n"],"names":["__props","_createElementBlock","_createElementVNode"],"mappings":"2UAsBaA,EAAA,SAAM,cAAjBC,EAKM,MAAA,OAL2B,MAAOD,EAAA,KAAO,OAAQA,EAAA,KAAM,QAAQ,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