omnigateway 0.2.0 → 0.2.1

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 (42) hide show
  1. package/bin/omni.js +527 -228
  2. package/gateway.js +763 -401
  3. package/package.json +1 -1
  4. package/public/assets/{Chip-BB_5C1Zp.js → Chip-C4X8tf5z.js} +1 -1
  5. package/public/assets/Confirm-BnmH8Gn0.js +4 -0
  6. package/public/assets/{CopyValue-CRQDLo7k.js → CopyValue-B-uR4Js-.js} +5 -5
  7. package/public/assets/{Field-uHZxl4fI.js → Field-Ct4SeDZD.js} +2 -2
  8. package/public/assets/{Lamp-B-5SjXbG.js → Lamp-CBOwqG5K.js} +7 -7
  9. package/public/assets/{Meter-DI_BRUKt.js → Meter-COdz0dwY.js} +1 -1
  10. package/public/assets/{Modal-CI6jk2D4.js → Modal-DMFUHQ-A.js} +8 -8
  11. package/public/assets/{Rack-D1WJswv3.js → Rack-DAbY9x1I.js} +18 -18
  12. package/public/assets/{Readout-BocZ2HXP.js → Readout-Bl2kD9Tl.js} +6 -2
  13. package/public/assets/{States-Bbiu5cHE.js → States-D5Memn8D.js} +4 -4
  14. package/public/assets/{Table-CdPWxYaz.js → Table-DObRatbW.js} +1 -1
  15. package/public/assets/{Toggle-CiLC67Dw.js → Toggle-Dkjlvck5.js} +1 -1
  16. package/public/assets/{TokenBreakdown-B96iPBm9.js → TokenBreakdown-oXP49ZTa.js} +5 -2
  17. package/public/assets/_app-Brc2wQZm.js +1 -0
  18. package/public/assets/_app.accounts-I9RXUiyi.js +54 -0
  19. package/public/assets/{_app.console-Daz4aKhf.js → _app.console-BVVpryIB.js} +10 -10
  20. package/public/assets/_app.index-83Ig4FUL.js +62 -0
  21. package/public/assets/_app.keys-KeP6L4g_.js +39 -0
  22. package/public/assets/_app.logs-B5oh01Ls.js +32 -0
  23. package/public/assets/_app.models-BuOFMZUN.js +144 -0
  24. package/public/assets/{_app.settings-a0FKyQAi.js → _app.settings-BN436vI2.js} +4 -4
  25. package/public/assets/_app.usage-C528VOia.js +166 -0
  26. package/public/assets/catalog-kJ53n_fc.js +1 -0
  27. package/public/assets/{dist-C-IbPRiV.js → dist-CnzT-Ut2.js} +1 -1
  28. package/public/assets/index-CE-KQ-ju.js +172 -0
  29. package/public/assets/{login-CTvH_KAd.js → login-2LpCZOtB.js} +8 -8
  30. package/public/assets/{queries-D2o-X8Pj.js → queries-1zRLkX-Q.js} +27 -27
  31. package/public/assets/{trash-2-BcZb-sCT.js → trash-2-Da6cLgPn.js} +1 -1
  32. package/public/index.html +2 -2
  33. package/public/assets/Confirm-B6aAiVbT.js +0 -4
  34. package/public/assets/_app-BBOF6A0T.js +0 -1
  35. package/public/assets/_app.accounts-BNkhpvaB.js +0 -54
  36. package/public/assets/_app.index-LO6d38oe.js +0 -62
  37. package/public/assets/_app.keys-kBqLqoFf.js +0 -39
  38. package/public/assets/_app.logs-_wYNS47N.js +0 -32
  39. package/public/assets/_app.models-Cjng8ohC.js +0 -144
  40. package/public/assets/_app.usage-D3KtgLrC.js +0 -166
  41. package/public/assets/catalog-C_OQ0icG.js +0 -1
  42. package/public/assets/index-PW6EvVh5.js +0 -170
@@ -1,33 +1,33 @@
1
- import{B as e,G as t,L as n,Mt as r,Nt as i,P as a,T as o,Y as s,Zt as c,g as l,j as u,w as d,z as f}from"./queries-D2o-X8Pj.js";import{a as p}from"./index-PW6EvVh5.js";import{t as m}from"./Lamp-B-5SjXbG.js";import{n as h,t as g}from"./Field-uHZxl4fI.js";import{i as _,o as v}from"./States-Bbiu5cHE.js";var y=c(i()),b=r(),x=t.div`
1
+ import{B as e,E as t,F as n,K as r,M as i,Nt as a,Pt as o,Qt as s,R as c,T as l,V as u,X as d,_ as f}from"./queries-1zRLkX-Q.js";import{a as p}from"./index-CE-KQ-ju.js";import{t as m}from"./Lamp-CBOwqG5K.js";import{n as h,t as g}from"./Field-Ct4SeDZD.js";import{i as _,o as v}from"./States-D5Memn8D.js";var y=s(o()),b=a(),x=r.div`
2
2
  display: flex;
3
3
  align-items: center;
4
4
  justify-content: center;
5
5
  min-height: 100vh;
6
6
  padding: ${({theme:e})=>e.space(4)};
7
- `,S=t(v)`
7
+ `,S=r(v)`
8
8
  width: min(380px, 100%);
9
- `,C=t.div`
9
+ `,C=r.div`
10
10
  display: flex;
11
11
  align-items: center;
12
12
  gap: 8px;
13
13
  padding: ${({theme:e})=>`${e.space(3)} ${e.space(4)}`};
14
14
  border-bottom: 1px solid ${({theme:e})=>e.color.rule};
15
15
  background: ${({theme:e})=>e.color.panelSunk};
16
- ${f}
16
+ ${e}
17
17
  font-stretch: 74%;
18
18
  font-weight: 700;
19
19
  letter-spacing: 0.2em;
20
20
  font-size: 12px;
21
21
  text-transform: uppercase;
22
- `,w=t.form`
22
+ `,w=r.form`
23
23
  display: flex;
24
24
  flex-direction: column;
25
25
  gap: ${({theme:e})=>e.space(3)};
26
26
  padding: ${({theme:e})=>e.space(4)};
27
- `,T=t.p`
27
+ `,T=r.p`
28
28
  font-size: 12.5px;
29
29
  color: ${({theme:e})=>e.color.inkDim};
30
- `,E=t.p`
30
+ `,E=r.p`
31
31
  font-size: 12px;
32
32
  color: ${({theme:e})=>e.color.down};
33
- `;function D(){let t=s(),{next:r}=p.useSearch(),i=o(),c=l(),f=d(),[v,D]=(0,y.useState)(``),[O,k]=(0,y.useState)(``),[A,j]=(0,y.useState)(null),M=i.data?.configured===!1,N=c.isPending||f.isPending||i.isLoading,P=()=>{t({to:r?.startsWith(`/`)===!0?r:`/`})};return(0,b.jsx)(x,{children:(0,b.jsxs)(S,{children:[(0,b.jsxs)(C,{children:[(0,b.jsx)(m,{state:i.isError?`down`:`ok`,label:i.isError?`gateway unreachable`:`gateway reachable`}),`Omnigateway`]}),(0,b.jsxs)(w,{onSubmit:e=>{if(e.preventDefault(),j(null),M){if(v!==O){j(`The two passwords do not match.`);return}f.mutate(v,{onSuccess:P,onError:e=>j(_(e))});return}c.mutate(v,{onSuccess:P,onError:()=>j(`That password does not match. Try again.`)})},children:[i.isError?(0,b.jsx)(E,{children:`The gateway is not answering. Check that it is running, then reload.`}):null,(0,b.jsxs)(n,{$gap:1,children:[(0,b.jsx)(u,{children:M?`First run`:`Sign in`}),(0,b.jsx)(T,{children:M?`Set the operator password for this gateway. It is the only account, and it is stored hashed.`:`This console is for the operator of this gateway.`})]}),(0,b.jsx)(g,{label:`Password`,children:e=>(0,b.jsx)(h,{...e,type:`password`,autoFocus:!0,autoComplete:M?`new-password`:`current-password`,value:v,onChange:e=>D(e.target.value)})}),M?(0,b.jsx)(g,{label:`Confirm password`,children:e=>(0,b.jsx)(h,{...e,type:`password`,autoComplete:`new-password`,value:O,onChange:e=>k(e.target.value)})}):null,A===null?null:(0,b.jsx)(E,{role:`alert`,children:A}),(0,b.jsx)(a,{children:(0,b.jsx)(e,{type:`submit`,$variant:`primary`,disabled:N||v.length===0,children:M?`Set password and sign in`:`Sign in`})})]})]})})}export{D as component};
33
+ `;function D(){let e=d(),{next:r}=p.useSearch(),a=t(),o=f(),s=l(),[v,D]=(0,y.useState)(``),[O,k]=(0,y.useState)(``),[A,j]=(0,y.useState)(null),M=a.data?.configured===!1,N=o.isPending||s.isPending||a.isLoading,P=()=>{e({to:r?.startsWith(`/`)===!0?r:`/`})};return(0,b.jsx)(x,{children:(0,b.jsxs)(S,{children:[(0,b.jsxs)(C,{children:[(0,b.jsx)(m,{state:a.isError?`down`:`ok`,label:a.isError?`gateway unreachable`:`gateway reachable`}),`Omnigateway`]}),(0,b.jsxs)(w,{onSubmit:e=>{if(e.preventDefault(),j(null),M){if(v!==O){j(`The two passwords do not match.`);return}s.mutate(v,{onSuccess:P,onError:e=>j(_(e))});return}o.mutate(v,{onSuccess:P,onError:()=>j(`That password does not match. Try again.`)})},children:[a.isError?(0,b.jsx)(E,{children:`The gateway is not answering. Check that it is running, then reload.`}):null,(0,b.jsxs)(c,{$gap:1,children:[(0,b.jsx)(i,{children:M?`First run`:`Sign in`}),(0,b.jsx)(T,{children:M?`Set the operator password for this gateway. It is the only account, and it is stored hashed.`:`This console is for the operator of this gateway.`})]}),(0,b.jsx)(g,{label:`Password`,children:e=>(0,b.jsx)(h,{...e,type:`password`,autoFocus:!0,autoComplete:M?`new-password`:`current-password`,value:v,onChange:e=>D(e.target.value)})}),M?(0,b.jsx)(g,{label:`Confirm password`,children:e=>(0,b.jsx)(h,{...e,type:`password`,autoComplete:`new-password`,value:O,onChange:e=>k(e.target.value)})}):null,A===null?null:(0,b.jsx)(E,{role:`alert`,children:A}),(0,b.jsx)(n,{children:(0,b.jsx)(u,{type:`submit`,$variant:`primary`,disabled:N||v.length===0,children:M?`Set password and sign in`:`Sign in`})})]})]})})}export{D as component};