@camera.ui/server 0.0.13 → 0.0.14-alpha.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 (59) hide show
  1. package/dist/interface/{Account.BqE7RvC3.0.0.13.js → Account.PfEWxAFM.0.0.13.js} +1 -1
  2. package/dist/interface/{Adminpanel.hllL_vUx.0.0.13.js → Adminpanel.CcWcIKUA.0.0.13.js} +1 -1
  3. package/dist/interface/{Appearance.BvWFogEk.0.0.13.js → Appearance.C7FMN0Df.0.0.13.js} +1 -1
  4. package/dist/interface/{Backup.DS1_0koP.0.0.13.js → Backup.CBhLiyDH.0.0.13.js} +1 -1
  5. package/dist/interface/{Camera.CDpzE3tI.0.0.13.js → Camera.CAY4hEbY.0.0.13.js} +1 -1
  6. package/dist/interface/{Cameras.ImtUGnay.0.0.13.js → Cameras.DehQ2Kr-.0.0.13.js} +1 -1
  7. package/dist/interface/{Camview.CIDDigUd.0.0.13.js → Camview.BgVFhaOD.0.0.13.js} +1 -1
  8. package/dist/interface/{Config.Dx7qqjix.0.0.13.js → Config.Bi4TsfDK.0.0.13.js} +1 -1
  9. package/dist/interface/{Console.IkajRlkS.0.0.13.js → Console.DCZ7CAsZ.0.0.13.js} +1 -1
  10. package/dist/interface/{FirstSteps.gB36CAPV.0.0.13.js → FirstSteps.Dk4PJeYm.0.0.13.js} +1 -1
  11. package/dist/interface/{NewCamera.D3fS-Ayi.0.0.13.js → NewCamera.Bj0fRtL4.0.0.13.js} +1 -1
  12. package/dist/interface/{Plugin.Dmdq7eg2.0.0.13.js → Plugin.DgEI_yw3.0.0.13.js} +1 -1
  13. package/dist/interface/{Plugins.BlsT_Ctm.0.0.13.js → Plugins.DPDGR4C9.0.0.13.js} +1 -1
  14. package/dist/interface/{Recordings.NJkfLyST.0.0.13.js → Recordings.BNMvS0Zl.0.0.13.js} +1 -1
  15. package/dist/interface/{Recordings.d-XiMIJY.0.0.13.js → Recordings.Dia3EI7d.0.0.13.js} +1 -1
  16. package/dist/interface/{Settings.CtjsmS-K.0.0.13.js → Settings.CJSuquSl.0.0.13.js} +1 -1
  17. package/dist/interface/System.ARC4u3oS.0.0.13.js +4 -0
  18. package/dist/interface/{User.B7z96rxB.0.0.13.js → User.BaEc6hd_.0.0.13.js} +1 -1
  19. package/dist/interface/{VConfigEditor.vue_vue_type_script_setup_true_lang.KV9Arktd.0.0.13.js → VConfigEditor.vue_vue_type_script_setup_true_lang.Bm5SFyqC.0.0.13.js} +1 -1
  20. package/dist/interface/{VConsole.B_ucNfW8.0.0.13.js → VConsole.C_HPGX9O.0.0.13.js} +1 -1
  21. package/dist/interface/{VPlayer.DLxaA6uJ.0.0.13.js → VPlayer.BpY-Monz.0.0.13.js} +1 -1
  22. package/dist/interface/{VPluginCard.rN1DHn_c.0.0.13.js → VPluginCard.DFLSjIDw.0.0.13.js} +1 -1
  23. package/dist/interface/index.html +1 -1
  24. package/dist/interface/{main.D-udRFe6.0.0.13.js → main.DjqbBtoK.0.0.13.js} +5 -5
  25. package/dist/interface/{plugins.GodGbcuD.0.0.13.js → plugins.DAiWoszy.0.0.13.js} +1 -1
  26. package/dist/interface/sw.js +1 -1
  27. package/dist/interface/system.CJaTvmhD.0.0.13.js +1 -0
  28. package/dist/server/package.json +5 -4
  29. package/dist/server/src/api/controllers/system.controller.d.ts +4 -1
  30. package/dist/server/src/api/controllers/system.controller.js +33 -0
  31. package/dist/server/src/api/controllers/system.controller.js.map +1 -1
  32. package/dist/server/src/api/database/index.d.ts +3 -1
  33. package/dist/server/src/api/database/index.js +12 -0
  34. package/dist/server/src/api/database/index.js.map +1 -1
  35. package/dist/server/src/api/database/types.d.ts +7 -0
  36. package/dist/server/src/api/index.js +1 -1
  37. package/dist/server/src/api/index.js.map +1 -1
  38. package/dist/server/src/api/routes/system.routes.js +16 -0
  39. package/dist/server/src/api/routes/system.routes.js.map +1 -1
  40. package/dist/server/src/api/schemas/system.schema.d.ts +9 -0
  41. package/dist/server/src/api/schemas/system.schema.js +8 -0
  42. package/dist/server/src/api/schemas/system.schema.js.map +1 -0
  43. package/dist/server/src/api/schemas/users.schema.d.ts +34 -34
  44. package/dist/server/src/api/services/system.service.d.ts +7 -0
  45. package/dist/server/src/api/services/system.service.js +22 -0
  46. package/dist/server/src/api/services/system.service.js.map +1 -0
  47. package/dist/server/src/api/types/index.d.ts +4 -0
  48. package/dist/server/src/api/types/index.js.map +1 -1
  49. package/dist/server/src/go2rtc/index.js +1 -0
  50. package/dist/server/src/go2rtc/index.js.map +1 -1
  51. package/dist/server/src/utils/network.d.ts +12 -0
  52. package/dist/server/src/utils/network.js +92 -0
  53. package/dist/server/src/utils/network.js.map +1 -0
  54. package/dist/server/src/utils/npm.js +7 -2
  55. package/dist/server/src/utils/npm.js.map +1 -1
  56. package/install/lmdb.js +81 -0
  57. package/package.json +5 -4
  58. package/dist/interface/System.CKjKL2-m.0.0.13.js +0 -4
  59. package/dist/interface/system.CJsZbAvb.0.0.13.js +0 -1
@@ -1,4 +1,4 @@
1
- import{_ as yt}from"./VConfigEditor.vue_vue_type_script_setup_true_lang.KV9Arktd.0.0.13.js";import{z as ht,a as _t,f as bt,P as w,e as wt,w as xt,d as Pt}from"./main.D-udRFe6.0.0.13.js";import{F as kt,t as Vt,r as p,c as M,w as N,a3 as Ct,U as Nt,J as $t,e as r,f as b,j as i,u as e,X as S,M as n,R as o,V as m,T as u,l as d,O as y,m as Y,i as P,q as x,ar as Lt,ai as St,aj as Qt}from"./@vue.CIFymae3.0.0.13.js";import{as as fe,ac as zt,h as At,g as Tt,at as ve,au as ye,aa as Bt,av as Ut,aw as Rt,ax as It,T as jt}from"./@mdi.jq8isxax.0.0.13.js";import{b as Dt}from"./@vueform.CaTOdvWk.0.0.13.js";import{i as Ot}from"./vue3-toastify.CudLrsQ6.0.0.13.js";import{P as Et}from"./plugins.GodGbcuD.0.0.13.js";import{S as Wt}from"./system.CJsZbAvb.0.0.13.js";import{V as Mt}from"./VConsole.B_ucNfW8.0.0.13.js";import{s as Jt}from"./pinia.Bga1JTi8.0.0.13.js";import{e as h,V as ne,$ as Ht,X as he,m as Ft,l as _e,b as U,f as Q,j as Gt,o as Kt,I as qt,J as Xt,H as Yt,y as Zt}from"./vuetify.BenoxTsr.0.0.13.js";const el=R=>(St("data-v-da148cb1"),R=R(),Qt(),R),tl={class:"flex space-x-4 w-full"},ll={key:0,class:"relative"},sl={class:"absolute",style:{"z-index":"1",bottom:"0px",right:"-5px"}},al={class:"flex items-center w-full truncate",style:{height:"28px","max-height":"28px"}},ol={key:0,class:"mx-1"},nl={class:"ml-auto"},il={key:0},ul={key:0,class:"truncate text-sm text-disabled"},rl={class:"w-full h-full py-3"},dl={class:"multiline-ellipsis text-disabled text-sm"},cl={class:"flex space-x-1 items-center h-full w-full mt-auto",style:{height:"28px","max-height":"28px"}},pl={class:"flex items-center justify-center"},ml={style:{"font-size":"9pt"}},gl=el(()=>i("div",{class:"ml-auto"},null,-1)),fl={style:{margin:"5px"}},vl={class:"flex flex-row w-full justify-start items-center"},yl={class:"icon-wrapper"},hl={class:"menu-item ml-2"},_l={key:1,class:"my-1"},bl={class:"flex flex-row w-full justify-start items-center"},wl={class:"icon-wrapper"},xl={class:"menu-item ml-2"},Pl={key:2,class:"my-1"},kl={class:"flex flex-row w-full justify-start items-center"},Vl={class:"icon-wrapper"},Cl={class:"menu-item ml-2"},Nl={key:3,class:"my-1"},$l={class:"flex flex-row w-full justify-start items-center"},Ll={class:"icon-wrapper"},Sl={class:"menu-item ml-2"},Ql={key:5,class:"my-1"},zl={class:"flex flex-row w-full justify-start items-center"},Al={class:"icon-wrapper"},Tl={class:"menu-item ml-2"},Bl={key:7,class:"my-1"},Ul={class:"flex flex-row w-full justify-start items-center"},Rl={class:"icon-wrapper"},Il={class:"menu-item ml-2",style:{color:"#ef4444 !important"}},jl={class:"text-white"},Dl={class:"v-label"},Ol=kt({__name:"VPluginCard",props:{plugin:{},showInstallButton:{type:Boolean,default:!1},showToggle:{type:Boolean,default:!1},showSettings:{type:Boolean,default:!1},showLogo:{type:Boolean,default:!1},showRestart:{type:Boolean,default:!1},showPluginStatus:{type:Boolean,default:!1},showPluginType:{type:Boolean,default:!0},showPluginCode:{type:Boolean,default:!0},showFullPluginName:{type:Boolean,default:!1},showLogs:{type:Boolean,default:!1},showConfigs:{type:Boolean,default:!1},borderRadius:{default:"8px"},background:{default:"var(--background-inner-component)"},width:{default:"100%"},height:{default:"100%"},minWidth:{},maxWidth:{},minHeight:{},maxHeight:{}},emits:["isLoading"],setup(R,{emit:be}){const c=new Et,J=new Wt,ie=ht(),we=_t(),{smallMobileActive:H}=bt(),xe=be,Pe=R,{plugin:t,background:ue,borderRadius:ke,height:Ve,minHeight:Ce,maxHeight:Ne,width:$e,minWidth:Le,maxWidth:Se,showToggle:re,showSettings:Qe,showInstallButton:ze,showLogo:F,showRestart:Ae,showPluginStatus:de,showLogs:Te,showConfigs:Be,showPluginType:Ue,showPluginCode:ce,showFullPluginName:Re}=Vt(Pe),{theme:Ie}=Jt(we),I=p(""),pe=p(t.value.installedVersion||t.value.latestVersion),j=p(t.value.installedVersion||t.value.latestVersion),je=p(!1),k=p(),G=p(),De=p(null),g=p({color:"rgba(var(--color-rgb), 0.3)",text:w.UNKNOWN}),K=p(!1),$=p(!t.value.disabled),Z=p(!1),z=p(!1),L=p(!1),A=p(!1),T=p(!1),D=p(!1),ee=p(!1),O=p(null);J.toggleQueryActivator("downloadLogQuery",!1),c.toggleQueryActivator("getPluginVersionsQuery",!1),c.toggleQueryActivator("getPluginConfigJsonQuery",!1),c.toggleQueryActivator("getPluginUpdateQuery",t.value.installPath!==void 0),c.toggleQueryActivator("getPluginLogoQuery",F.value);const{mutateAsync:Oe,isPending:Ee}=c.enablePluginQuery(),{mutateAsync:We,isPending:Me}=c.disablePluginQuery(),{mutateAsync:Je,isPending:He}=c.startPluginQuery(),{mutateAsync:Fe,isPending:Ge}=c.stopPluginQuery(),{mutateAsync:Ke,isPending:qe}=c.restartPluginQuery(),{mutateAsync:Xe,isPending:Ye}=c.installPluginQuery(),{mutateAsync:Ze,isPending:et}=c.uninstallPluginQuery(),{mutate:tt,isPending:lt}=c.patchPluginConfigQuery(),{data:q,isLoading:te}=c.getPluginVersionsQuery(t.value.pluginName),{data:E,isLoading:st}=c.getPluginUpdateQuery(t.value.pluginName),{data:le,isLoading:at}=c.getPluginConfigJsonQuery(t.value.pluginName),{data:ot,isLoading:nt}=c.getPluginLogoQuery(t.value.pluginName),{data:me,isLoading:it,suspense:ut}=J.downloadLogQuery([`[${t.value.displayName}]`,t.value.pluginName]),rt=M(()=>({fontSize:14,showGutter:!H.value})),dt=M(()=>({fontSize:H.value?12:14})),V=M(()=>je.value||Ee.value||Me.value||qe.value||et.value||Ye.value||He.value||Ge.value||at.value),se=M(()=>g.value.text==="stopped"||g.value.text==="unknown"),ct=M(()=>{var s;const l=new Set;if(t.value["camera.ui"]){const f=t.value["camera.ui"];f.extension?l.add(f.extension):f.supportAdditionalCameras&&((s=f.builtIns)!=null&&s.length)&&(l.add("camera"),f.builtIns.forEach(B=>l.add(B)))}return l.size===0&&l.add("camera"),Array.from(l)});N(q,()=>{var l;(l=q.value)!=null&&l.versions.length&&(j.value=q.value.versions[0])}),N(t,()=>{pe.value=t.value.installedVersion||t.value.latestVersion,$.value=!t.value.disabled},{deep:!0}),N(le,()=>{le.value&&(I.value=JSON.stringify(le.value,null,2))},{deep:!0,immediate:!0}),N(V,l=>xe("isLoading",l)),N(z,l=>{c.toggleQueryActivator("getPluginConfigJsonQuery",l)}),N(T,l=>{c.toggleQueryActivator("getPluginVersionsQuery",l)}),N(L,l=>{ae(l),l||setTimeout(()=>{ee.value=!1},300)}),N(H,()=>{pt()});const ge=l=>{switch(l){case w.ERROR:g.value.color="#9d5752";break;case w.STARTING:g.value.color="orange",$.value=!0;break;case w.READY:g.value.color="yellow",$.value=!0;break;case w.STARTED:g.value.color="green",$.value=!0;break;case w.STOPPED:g.value.color="red";break;case w.DISABLED:g.value.color="transparent";break;case w.UNKNOWN:g.value.color="gray";break;default:g.value.color="gray";break}},ae=l=>{var s,f,B,C,X,a,v;l?(k.value=ie.connectToNamespace("/logs"),(s=k.value)==null||s.socket.on(`stdout/${t.value.pluginName}`,_=>{var W;(W=O.value)==null||W.writeTerminal(_)}),(f=k.value)==null||f.socket.on("stdout",_=>{var W;(W=O.value)==null||W.writeTerminal(_)}),(B=k.value)==null||B.socket.on("disconnect",()=>{var _;(_=O.value)==null||_.writeTerminal(`
1
+ import{_ as yt}from"./VConfigEditor.vue_vue_type_script_setup_true_lang.Bm5SFyqC.0.0.13.js";import{z as ht,a as _t,f as bt,P as w,e as wt,w as xt,d as Pt}from"./main.DjqbBtoK.0.0.13.js";import{F as kt,t as Vt,r as p,c as M,w as N,a3 as Ct,U as Nt,J as $t,e as r,f as b,j as i,u as e,X as S,M as n,R as o,V as m,T as u,l as d,O as y,m as Y,i as P,q as x,ar as Lt,ai as St,aj as Qt}from"./@vue.CIFymae3.0.0.13.js";import{as as fe,ac as zt,h as At,g as Tt,at as ve,au as ye,aa as Bt,av as Ut,aw as Rt,ax as It,T as jt}from"./@mdi.jq8isxax.0.0.13.js";import{b as Dt}from"./@vueform.CaTOdvWk.0.0.13.js";import{i as Ot}from"./vue3-toastify.CudLrsQ6.0.0.13.js";import{P as Et}from"./plugins.DAiWoszy.0.0.13.js";import{S as Wt}from"./system.CJaTvmhD.0.0.13.js";import{V as Mt}from"./VConsole.C_HPGX9O.0.0.13.js";import{s as Jt}from"./pinia.Bga1JTi8.0.0.13.js";import{e as h,V as ne,$ as Ht,X as he,m as Ft,l as _e,b as U,f as Q,j as Gt,o as Kt,I as qt,J as Xt,H as Yt,y as Zt}from"./vuetify.BenoxTsr.0.0.13.js";const el=R=>(St("data-v-da148cb1"),R=R(),Qt(),R),tl={class:"flex space-x-4 w-full"},ll={key:0,class:"relative"},sl={class:"absolute",style:{"z-index":"1",bottom:"0px",right:"-5px"}},al={class:"flex items-center w-full truncate",style:{height:"28px","max-height":"28px"}},ol={key:0,class:"mx-1"},nl={class:"ml-auto"},il={key:0},ul={key:0,class:"truncate text-sm text-disabled"},rl={class:"w-full h-full py-3"},dl={class:"multiline-ellipsis text-disabled text-sm"},cl={class:"flex space-x-1 items-center h-full w-full mt-auto",style:{height:"28px","max-height":"28px"}},pl={class:"flex items-center justify-center"},ml={style:{"font-size":"9pt"}},gl=el(()=>i("div",{class:"ml-auto"},null,-1)),fl={style:{margin:"5px"}},vl={class:"flex flex-row w-full justify-start items-center"},yl={class:"icon-wrapper"},hl={class:"menu-item ml-2"},_l={key:1,class:"my-1"},bl={class:"flex flex-row w-full justify-start items-center"},wl={class:"icon-wrapper"},xl={class:"menu-item ml-2"},Pl={key:2,class:"my-1"},kl={class:"flex flex-row w-full justify-start items-center"},Vl={class:"icon-wrapper"},Cl={class:"menu-item ml-2"},Nl={key:3,class:"my-1"},$l={class:"flex flex-row w-full justify-start items-center"},Ll={class:"icon-wrapper"},Sl={class:"menu-item ml-2"},Ql={key:5,class:"my-1"},zl={class:"flex flex-row w-full justify-start items-center"},Al={class:"icon-wrapper"},Tl={class:"menu-item ml-2"},Bl={key:7,class:"my-1"},Ul={class:"flex flex-row w-full justify-start items-center"},Rl={class:"icon-wrapper"},Il={class:"menu-item ml-2",style:{color:"#ef4444 !important"}},jl={class:"text-white"},Dl={class:"v-label"},Ol=kt({__name:"VPluginCard",props:{plugin:{},showInstallButton:{type:Boolean,default:!1},showToggle:{type:Boolean,default:!1},showSettings:{type:Boolean,default:!1},showLogo:{type:Boolean,default:!1},showRestart:{type:Boolean,default:!1},showPluginStatus:{type:Boolean,default:!1},showPluginType:{type:Boolean,default:!0},showPluginCode:{type:Boolean,default:!0},showFullPluginName:{type:Boolean,default:!1},showLogs:{type:Boolean,default:!1},showConfigs:{type:Boolean,default:!1},borderRadius:{default:"8px"},background:{default:"var(--background-inner-component)"},width:{default:"100%"},height:{default:"100%"},minWidth:{},maxWidth:{},minHeight:{},maxHeight:{}},emits:["isLoading"],setup(R,{emit:be}){const c=new Et,J=new Wt,ie=ht(),we=_t(),{smallMobileActive:H}=bt(),xe=be,Pe=R,{plugin:t,background:ue,borderRadius:ke,height:Ve,minHeight:Ce,maxHeight:Ne,width:$e,minWidth:Le,maxWidth:Se,showToggle:re,showSettings:Qe,showInstallButton:ze,showLogo:F,showRestart:Ae,showPluginStatus:de,showLogs:Te,showConfigs:Be,showPluginType:Ue,showPluginCode:ce,showFullPluginName:Re}=Vt(Pe),{theme:Ie}=Jt(we),I=p(""),pe=p(t.value.installedVersion||t.value.latestVersion),j=p(t.value.installedVersion||t.value.latestVersion),je=p(!1),k=p(),G=p(),De=p(null),g=p({color:"rgba(var(--color-rgb), 0.3)",text:w.UNKNOWN}),K=p(!1),$=p(!t.value.disabled),Z=p(!1),z=p(!1),L=p(!1),A=p(!1),T=p(!1),D=p(!1),ee=p(!1),O=p(null);J.toggleQueryActivator("downloadLogQuery",!1),c.toggleQueryActivator("getPluginVersionsQuery",!1),c.toggleQueryActivator("getPluginConfigJsonQuery",!1),c.toggleQueryActivator("getPluginUpdateQuery",t.value.installPath!==void 0),c.toggleQueryActivator("getPluginLogoQuery",F.value);const{mutateAsync:Oe,isPending:Ee}=c.enablePluginQuery(),{mutateAsync:We,isPending:Me}=c.disablePluginQuery(),{mutateAsync:Je,isPending:He}=c.startPluginQuery(),{mutateAsync:Fe,isPending:Ge}=c.stopPluginQuery(),{mutateAsync:Ke,isPending:qe}=c.restartPluginQuery(),{mutateAsync:Xe,isPending:Ye}=c.installPluginQuery(),{mutateAsync:Ze,isPending:et}=c.uninstallPluginQuery(),{mutate:tt,isPending:lt}=c.patchPluginConfigQuery(),{data:q,isLoading:te}=c.getPluginVersionsQuery(t.value.pluginName),{data:E,isLoading:st}=c.getPluginUpdateQuery(t.value.pluginName),{data:le,isLoading:at}=c.getPluginConfigJsonQuery(t.value.pluginName),{data:ot,isLoading:nt}=c.getPluginLogoQuery(t.value.pluginName),{data:me,isLoading:it,suspense:ut}=J.downloadLogQuery([`[${t.value.displayName}]`,t.value.pluginName]),rt=M(()=>({fontSize:14,showGutter:!H.value})),dt=M(()=>({fontSize:H.value?12:14})),V=M(()=>je.value||Ee.value||Me.value||qe.value||et.value||Ye.value||He.value||Ge.value||at.value),se=M(()=>g.value.text==="stopped"||g.value.text==="unknown"),ct=M(()=>{var s;const l=new Set;if(t.value["camera.ui"]){const f=t.value["camera.ui"];f.extension?l.add(f.extension):f.supportAdditionalCameras&&((s=f.builtIns)!=null&&s.length)&&(l.add("camera"),f.builtIns.forEach(B=>l.add(B)))}return l.size===0&&l.add("camera"),Array.from(l)});N(q,()=>{var l;(l=q.value)!=null&&l.versions.length&&(j.value=q.value.versions[0])}),N(t,()=>{pe.value=t.value.installedVersion||t.value.latestVersion,$.value=!t.value.disabled},{deep:!0}),N(le,()=>{le.value&&(I.value=JSON.stringify(le.value,null,2))},{deep:!0,immediate:!0}),N(V,l=>xe("isLoading",l)),N(z,l=>{c.toggleQueryActivator("getPluginConfigJsonQuery",l)}),N(T,l=>{c.toggleQueryActivator("getPluginVersionsQuery",l)}),N(L,l=>{ae(l),l||setTimeout(()=>{ee.value=!1},300)}),N(H,()=>{pt()});const ge=l=>{switch(l){case w.ERROR:g.value.color="#9d5752";break;case w.STARTING:g.value.color="orange",$.value=!0;break;case w.READY:g.value.color="yellow",$.value=!0;break;case w.STARTED:g.value.color="green",$.value=!0;break;case w.STOPPED:g.value.color="red";break;case w.DISABLED:g.value.color="transparent";break;case w.UNKNOWN:g.value.color="gray";break;default:g.value.color="gray";break}},ae=l=>{var s,f,B,C,X,a,v;l?(k.value=ie.connectToNamespace("/logs"),(s=k.value)==null||s.socket.on(`stdout/${t.value.pluginName}`,_=>{var W;(W=O.value)==null||W.writeTerminal(_)}),(f=k.value)==null||f.socket.on("stdout",_=>{var W;(W=O.value)==null||W.writeTerminal(_)}),(B=k.value)==null||B.socket.on("disconnect",()=>{var _;(_=O.value)==null||_.writeTerminal(`
2
2
  \rWebsocket failed to connect! Is the server running?
3
3
  \r
4
4
  \r`)}),(C=k.value)==null||C.socket.on("clear-log",()=>{var _;(_=O.value)==null||_.clearTerminal()}),Z.value||(X=k.value)==null||X.socket.emit("get-log",[`[${t.value.displayName}]`,t.value.pluginName])):(v=(a=k.value)==null?void 0:a.end)==null||v.call(a)},pt=()=>{L.value&&(ae(!1),ae(!0))},oe=async(l="latest")=>{Z.value=!0,T.value=!1,ee.value=!0,t.value.installedVersion!==l&&(L.value=!0,await Xe({pluginData:{pluginname:t.value.pluginName,pluginversion:l}}),pe.value=t.value.installedVersion||t.value.latestVersion,Z.value=!1)},mt=async()=>{D.value=!1,await Ze({pluginName:t.value.pluginName,removeStorage:K.value})},gt=async()=>{A.value=!1,await Ke({pluginName:t.value.pluginName})},ft=async()=>{let l;try{l=JSON.parse(I.value)}catch(s){console.error(s.message),Ot.error(s.message);return}tt({pluginName:t.value.pluginName,configData:l},{onSuccess:()=>{z.value=!1}})},vt=async()=>{try{if(J.toggleQueryActivator("downloadLogQuery",!0),await ut(),me.value){const l=me.value,s=window.URL.createObjectURL(new Blob([l])),f=document.createElement("a");f.href=s,f.setAttribute("download",`${t.value.pluginName}.log.txt`),document.body.appendChild(f),f.click(),f.remove()}}finally{J.toggleQueryActivator("downloadLogQuery",!1)}};return Ct(()=>{if(de.value){if(G.value=ie.getExistingNamespace("/plugins"),!G.value)throw new Error("Not connected to plugins!");G.value.request("get-plugin-status",t.value.pluginName).subscribe(l=>{g.value.text=l.status,ge(l.status)}),G.value.socket.on(`plugin-status-${t.value.pluginName}`,l=>{console.log(l),g.value.text=l.status,ge(l.status)})}}),Nt(()=>{var l,s;(s=(l=k.value)==null?void 0:l.end)==null||s.call(l)}),(l,s)=>{const f=wt,B=$t("router-link"),C=xt,X=yt;return r(),b("div",{ref_key:"pluginCard",ref:De,class:"inner-component mt-0 flex flex-col w-full h-full p-5",style:S({width:e($e),height:e(Ve),background:e(ue),minHeight:e(Ce),maxHeight:e(Ne),minWidth:e(Le),maxWidth:e(Se),borderRadius:e(ke)+" !important"})},[i("div",tl,[e(F)?(r(),b("div",ll,[i("div",sl,[e(ce)?(r(),b("div",{key:0,class:"plugin-logo-type flex items-center justify-center",style:S({background:e(t).isPython?"var(--background-inner-component)":"#f7df1c"})},[n(h,{size:15,style:S({marginTop:e(t).isPython?void 0:"-2px",marginRight:e(t).isPython?void 0:"1px"})},{default:o(()=>[m(u(e(t).isPython?"$cuiPy":"$cuiJs"),1)]),_:1},8,["style"])],4)):d("",!0)]),n(Ht,{size:"50",style:{border:"1px solid rgba(var(--color-rgb), 0.15)"}},{default:o(()=>[e(nt)?d("",!0):(r(),y(f,{key:0,src:`data:image/png;base64,${e(ot)}`,"error-height":70,"spinner-size":20,"spinner-width":3},null,8,["src"])),n(ne,{size:"20",width:"3",color:"#df2a4c",indeterminate:""})]),_:1})])):d("",!0),i("div",{class:"w-full",style:S({maxWidth:e(t).installPath?"calc(100% - 52px - 16px)":void 0})},[i("div",al,[n(B,{to:e(t).installPath?`/plugins/${e(t).pluginName}`:"",class:"text-lg font-semibold truncate mr-1"},{default:o(()=>[m(u(e(Re)?e(t).pluginName:e(t).displayName),1)]),_:1},8,["to"]),e(t).installPath&&e(st)?(r(),b("div",ol,[n(ne,{size:"12",width:"2",color:"#df2a4c",indeterminate:""})])):d("",!0),n(he,{text:l.$t("components.plugin_card.update_available"),location:"top"},{activator:o(({props:a})=>{var v;return[(v=e(E))!=null&&v.updateAvailable?(r(),y(h,Y({key:0},a,{size:"17",color:"green",class:"mx-1"}),{default:o(()=>[m(u(e(fe)),1)]),_:2},1040)):d("",!0)]}),_:1},8,["text"]),i("div",nl,[e(V)&&e(re)?(r(),b("div",il,[n(ne,{color:"#df2a4c",indeterminate:"",size:"15",width:"2"})])):e(re)?(r(),y(e(Dt),{key:1,modelValue:e($),"onUpdate:modelValue":s[0]||(s[0]=a=>P($)?$.value=a:null),class:"toggle-primary",onChange:s[1]||(s[1]=a=>a?e(Oe)({pluginName:e(t).pluginName}):e(We)({pluginName:e(t).pluginName}))},null,8,["modelValue"])):d("",!0)])]),e(Ue)?(r(),b("div",ul,u(e(ct).map(a=>l.$t(`components.plugin_types.${a}`)).join(", ")),1)):d("",!0)],4)]),i("div",rl,[i("div",dl,u(e(t).description||l.$t("components.plugin_card.no_description")),1)]),i("div",cl,[i("div",pl,[!e(F)&&e(ce)?(r(),b("div",{key:0,class:"plugin-logo-type flex items-center justify-center mr-1",style:S({background:e(t).isPython?"var(--background-inner-component)":"#f7df1c","border-color":e(F)?void 0:e(ue)})},[n(h,{size:15,style:S({marginTop:e(t).isPython?void 0:"-2px",marginRight:e(t).isPython?void 0:"1px"})},{default:o(()=>[m(u(e(t).isPython?"$cuiPy":"$cuiJs"),1)]),_:1},8,["style"])],4)):d("",!0),n(Ft,{class:"mr-1 flex items-center justify-center",size:"x-small",onClick:s[2]||(s[2]=x(a=>{var v;return l.$router.absUrl((v=e(t).links)==null?void 0:v.homepage)},["prevent"]))},{default:o(()=>[i("span",ml,"v"+u(e(t).installedVersion||e(t).latestVersion),1),n(h,{size:"12",class:"ml-1"},{default:o(()=>[m(u(e(zt)),1)]),_:1})]),_:1})]),gl,e(de)&&e(g).text!==e(w).DISABLED&&e(g).text!==e(w).UNKNOWN?(r(),y(he,{key:0,location:"top",text:l.$t(`components.plugin_card.status_${e(g).text}`)},{activator:o(({props:a})=>[n(_e,Y(a,{color:e(g).color,dot:"",inline:""}),null,16,["color"])]),_:1},8,["text"])):d("",!0),e(Te)?(r(),y(U,{key:1,class:"disabled-text",size:"28",rounded:"",density:"compact",variant:"text",onClick:s[3]||(s[3]=x(a=>L.value=!0,["prevent"]))},{default:o(()=>[n(h,{size:"20"},{default:o(()=>[m(u(e(At)),1)]),_:1})]),_:1})):d("",!0),e(Be)?(r(),y(U,{key:2,class:"disabled-text",size:"28",rounded:"",density:"compact",variant:"text",disabled:e(V),onClick:s[4]||(s[4]=x(a=>z.value=!0,["prevent"]))},{default:o(()=>[n(h,{size:"20"},{default:o(()=>[m(u(e(Tt)),1)]),_:1})]),_:1},8,["disabled"])):d("",!0),e(Ae)?(r(),y(U,{key:3,class:"disabled-text",size:"28",rounded:"",density:"compact",variant:"text",disabled:e(V),onClick:s[5]||(s[5]=x(a=>A.value=!0,["prevent"]))},{default:o(()=>[n(h,{size:"20"},{default:o(()=>[m(u(e(ve)),1)]),_:1})]),_:1},8,["disabled"])):d("",!0),e(Qe)||e(t).installPath?(r(),y(Kt,{key:4,offset:"2"},{activator:o(({props:a})=>{var v;return[(v=e(E))!=null&&v.updateAvailable?(r(),y(_e,{key:0,dot:"",color:"red","offset-x":"2","offset-y":"2"},{default:o(()=>[n(U,Y({class:"disabled-text"},a,{size:"28",rounded:"",density:"compact",variant:"text",disabled:e(V)}),{default:o(()=>[n(h,{size:"20"},{default:o(()=>[m(u(e(ye)),1)]),_:1})]),_:2},1040,["disabled"])]),_:2},1024)):(r(),y(U,Y({key:1,class:"disabled-text"},a,{size:"28",rounded:"",density:"compact",variant:"text",disabled:e(V)}),{default:o(()=>[n(h,{size:"20"},{default:o(()=>[m(u(e(ye)),1)]),_:1})]),_:2},1040,["disabled"]))]}),default:o(()=>[n(Gt,{width:"200",style:{border:"1px solid var(--background-timeline)","border-radius":"10px"},elevation:"3"},{default:o(()=>{var a,v;return[i("div",fl,[e(t).installPath&&((a=e(E))!=null&&a.updateAvailable)?(r(),y(Q,{key:0,style:{"border-radius":"5px !important"},onClick:s[6]||(s[6]=x(_=>oe(e(E).latestVersion),["prevent"]))},{default:o(()=>[i("div",vl,[i("div",yl,[n(h,{size:"20",class:"text-passive"},{default:o(()=>[m(u(e(fe)),1)]),_:1})]),i("span",hl,u(l.$t("components.plugin_card.update")),1)])]),_:1})):d("",!0),e(t).installPath&&((v=e(E))!=null&&v.updateAvailable)?(r(),b("div",_l)):d("",!0),n(Q,{to:e(t).installPath?`/plugins/${e(t).pluginName}`:"",style:{"border-radius":"5px !important"}},{default:o(()=>[i("div",bl,[i("div",wl,[n(h,{size:"20",class:"text-passive"},{default:o(()=>[m(u(e(Bt)),1)]),_:1})]),i("span",xl,u(l.$t("components.plugin_card.settings")),1)])]),_:1},8,["to"]),e(t).installPath?(r(),b("div",Pl)):d("",!0),n(Q,{disabled:e(t).private,style:{"border-radius":"5px !important"},onClick:s[7]||(s[7]=x(_=>T.value=!0,["prevent"]))},{default:o(()=>[i("div",kl,[i("div",Vl,[n(h,{size:"20",class:"text-passive"},{default:o(()=>[m(u(e(Ut)),1)]),_:1})]),i("span",Cl,u(l.$t("components.plugin_card.select_version")),1)])]),_:1},8,["disabled"]),e(t).installPath?(r(),b("div",Nl)):d("",!0),e(t).installPath?(r(),y(Q,{key:4,disabled:e(t).disabled,style:{"border-radius":"5px !important"},onClick:s[8]||(s[8]=x(_=>e(se)?e(Je)({pluginName:e(t).pluginName}):e(Fe)({pluginName:e(t).pluginName}),["prevent"]))},{default:o(()=>[i("div",$l,[i("div",Ll,[n(h,{size:"20",class:"text-passive"},{default:o(()=>[m(u(e(se)?e(Rt):e(It)),1)]),_:1})]),i("span",Sl,u(e(se)?l.$t("components.plugin_card.start"):l.$t("components.plugin_card.stop")),1)])]),_:1},8,["disabled"])):d("",!0),e(t).installPath?(r(),b("div",Ql)):d("",!0),e(t).installPath?(r(),y(Q,{key:6,style:{"border-radius":"5px !important"},disabled:e(t).disabled,onClick:s[9]||(s[9]=x(_=>A.value=!0,["prevent"]))},{default:o(()=>[i("div",zl,[i("div",Al,[n(h,{size:"20",class:"text-passive"},{default:o(()=>[m(u(e(ve)),1)]),_:1})]),i("span",Tl,u(l.$t("components.plugin_card.restart")),1)])]),_:1},8,["disabled"])):d("",!0),e(t).installPath?(r(),b("div",Bl)):d("",!0),e(t).installPath?(r(),y(Q,{key:8,style:{color:"#ef4444 !important","border-radius":"5px !important"},onClick:s[10]||(s[10]=x(_=>D.value=!0,["prevent"]))},{default:o(()=>[i("div",Ul,[i("div",Rl,[n(h,{size:"20",color:"red"},{default:o(()=>[m(u(e(jt)),1)]),_:1})]),i("span",Il,u(l.$t("components.plugin_card.uninstall")),1)])]),_:1})):d("",!0)])]}),_:1})]),_:1})):e(ze)?(r(),y(U,{key:5,class:"disabled-text",density:"compact",color:"#df2a4c",variant:"flat",disabled:e(V),onClick:s[11]||(s[11]=x(a=>oe(),["prevent"]))},{default:o(()=>[i("span",jl,u(l.$t("components.form.button.install")),1)]),_:1},8,["disabled"])):d("",!0)]),n(C,{modelValue:e(A),"onUpdate:modelValue":s[12]||(s[12]=a=>P(A)?A.value=a:null),title:l.$t("components.dialog.title.confirm"),"confirm-text":"components.form.button.restart",onConfirm:s[13]||(s[13]=a=>gt())},{content:o(()=>[i("span",null,u(l.$t("components.dialog.message.confirm_restart_plugin")),1)]),_:1},8,["modelValue","title"]),n(C,{modelValue:e(D),"onUpdate:modelValue":s[15]||(s[15]=a=>P(D)?D.value=a:null),title:l.$t("components.dialog.title.confirm"),"confirm-text":"components.form.button.uninstall",onConfirm:s[16]||(s[16]=a=>mt())},{content:o(()=>[i("span",null,u(l.$t("components.dialog.message.confirm_uninstall_plugin")),1),n(Q,{class:"px-0 mt-3"},{prepend:o(()=>[n(qt,{start:""},{default:o(()=>[n(Xt,{modelValue:e(K),"onUpdate:modelValue":s[14]||(s[14]=a=>P(K)?K.value=a:null),color:"#df2a4c"},null,8,["modelValue"])]),_:1})]),default:o(()=>[n(Yt,null,{default:o(()=>[m(u(l.$t("components.form.label.remove_storage")),1)]),_:1})]),_:1})]),_:1},8,["modelValue","title"]),n(C,{modelValue:e(T),"onUpdate:modelValue":s[18]||(s[18]=a=>P(T)?T.value=a:null),title:l.$t("components.dialog.title.install_version"),"confirm-text":"components.form.button.install",loading:e(te),onConfirm:s[19]||(s[19]=a=>oe(e(j)))},{content:o(()=>{var a;return[i("label",Dl,u(l.$t("components.form.label.plugin_version")),1),n(Zt,{modelValue:e(j),"onUpdate:modelValue":s[17]||(s[17]=v=>P(j)?j.value=v:null),"hide-details":"",solo:"",variant:"outlined",density:"compact",items:((a=e(q))==null?void 0:a.versions)||[],disabled:e(te),loading:e(te)},null,8,["modelValue","items","disabled","loading"])]}),_:1},8,["modelValue","title","loading"]),n(C,{modelValue:e(L),"onUpdate:modelValue":s[20]||(s[20]=a=>P(L)?L.value=a:null),title:l.$t("components.dialog.title.plugin_log"),"confirm-text":"components.form.button.download",loading:e(it),"fullscreen-content":"","hide-confirm-button":e(ee),onConfirm:s[21]||(s[21]=a=>vt())},{content:o(()=>[n(Mt,{ref_key:"consoleRef",ref:O,class:"text-editor",options:e(dt)},null,8,["options"])]),_:1},8,["modelValue","title","loading","hide-confirm-button"]),n(C,{modelValue:e(z),"onUpdate:modelValue":s[23]||(s[23]=a=>P(z)?z.value=a:null),title:l.$t("components.dialog.title.plugin_config"),loading:e(lt),"fullscreen-content":"",onConfirm:s[24]||(s[24]=a=>ft())},{content:o(()=>[(r(),y(Lt,null,{default:o(()=>[n(X,{modelValue:e(I),"onUpdate:modelValue":s[22]||(s[22]=a=>P(I)?I.value=a:null),lang:"json",theme:e(Ie),options:e(rt),"read-only":e(V),class:"config-editor",style:S(e(H)?"height: 100%":"height: 400px")},null,8,["modelValue","theme","options","read-only","style"])]),_:1}))]),_:1},8,["modelValue","title","loading"])],4)}}}),Zl=Pt(Ol,[["__scopeId","data-v-da148cb1"]]);export{Zl as _};
@@ -336,7 +336,7 @@
336
336
  media="screen and (prefers-color-scheme: dark) and (device-width: 320px) and (device-height: 568px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)"
337
337
  href="/pwa/apple-splash-portrait-dark-640x1136.png"
338
338
  />
339
- <script type="module" crossorigin src="/main.D-udRFe6.0.0.13.js"></script>
339
+ <script type="module" crossorigin src="/main.DjqbBtoK.0.0.13.js"></script>
340
340
  <link rel="modulepreload" crossorigin href="/@vue.CIFymae3.0.0.13.js">
341
341
  <link rel="modulepreload" crossorigin href="/vue-inline-svg.va799EvK.0.0.13.js">
342
342
  <link rel="modulepreload" crossorigin href="/vue3-toastify.CudLrsQ6.0.0.13.js">