@camera.ui/server 0.0.13-alpha.2 → 0.0.13-alpha.4
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.
- package/dist/interface/assets/{@vueuse-kxQLk53-.js → @vueuse-Ty7ydkJu.js} +1 -1
- package/dist/interface/assets/@xterm-LO7TPXYg.js +66 -0
- package/dist/interface/assets/{Account-tFf3ISCI.js → Account-DIag_fJb.js} +1 -1
- package/dist/interface/assets/{Adminpanel-BNsmPAL6.js → Adminpanel-3UQD7k83.js} +1 -1
- package/dist/interface/assets/{Appearance-B9H2dDzs.js → Appearance-DyPCFCcA.js} +1 -1
- package/dist/interface/assets/{Backup-CzrUcsEM.js → Backup-B_md0hEE.js} +1 -1
- package/dist/interface/assets/{Camera-D031rtso.js → Camera-RYKuJlEk.js} +1 -1
- package/dist/interface/assets/{Cameras-M8tt-UsY.js → Cameras-C04Bv4eW.js} +1 -1
- package/dist/interface/assets/{Camview-BXEDJs8v.js → Camview-cHy9U5Au.js} +1 -1
- package/dist/interface/assets/Config-BoMvRU2R.js +1 -0
- package/dist/interface/assets/Config-DahKsDli.css +1 -0
- package/dist/interface/assets/Console-DdfiafPz.css +1 -0
- package/dist/interface/assets/Console-DpF86XdY.js +4 -0
- package/dist/interface/assets/FirstSteps-43_Gw1p8.css +1 -0
- package/dist/interface/assets/FirstSteps-bb9JvbeK.js +1 -0
- package/dist/interface/assets/{NewCamera-BymSLdBI.js → NewCamera-C19Y-MPI.js} +1 -1
- package/dist/interface/assets/{Plugin-BkhWhWQo.js → Plugin-QDo9itJL.js} +1 -1
- package/dist/interface/assets/Plugins-Ca9wwgSE.css +1 -0
- package/dist/interface/assets/Plugins-DreFX0ds.js +1 -0
- package/dist/interface/assets/{Recordings-CMYCylWj.js → Recordings-B3hIlCpR.js} +1 -1
- package/dist/interface/assets/{Recordings-FJTQUMoY.js → Recordings-CWgcAA57.js} +1 -1
- package/dist/interface/assets/{Settings-DqJZpQwp.js → Settings-BJ3dhoG6.js} +1 -1
- package/dist/interface/assets/System-DkejFIOg.js +4 -0
- package/dist/interface/assets/{User-dhVO_2kg.js → User-_5hrGMI-.js} +1 -1
- package/dist/interface/assets/{VConfigEditor.vue_vue_type_script_setup_true_lang-CXi6f5FH.js → VConfigEditor.vue_vue_type_script_setup_true_lang-C9bbpAse.js} +2 -2
- package/dist/interface/assets/VConsole-BZT1WyS-.css +1 -0
- package/dist/interface/assets/VConsole-UsuKdCF6.js +1 -0
- package/dist/interface/assets/{VPlayer-BaQ-zHRj.js → VPlayer-6KqHadcW.js} +1 -1
- package/dist/interface/assets/VPluginCard-D4bre1hy.js +4 -0
- package/dist/interface/assets/VPluginCard-EcierHZ1.css +1 -0
- package/dist/interface/assets/{ace-builds-CigWTak4.js → ace-builds-Jtyk_kwI.js} +1 -1
- package/dist/interface/assets/{draggabilly-Arakw9Dk.js → draggabilly-YEGzHR3_.js} +1 -1
- package/dist/interface/assets/{ev-emitter-CXYwG0eJ.js → ev-emitter-t78oQA8k.js} +1 -1
- package/dist/interface/assets/{fast-deep-equal-5pvsDbwX.js → fast-deep-equal-Bs1__Kao.js} +1 -1
- package/dist/interface/assets/{highlight.js-TxRCSjhv.js → highlight.js-fBaokXp-.js} +1 -1
- package/dist/interface/assets/main-Bbvif0oi.js +9 -0
- package/dist/interface/assets/main-CHMPMUzx.css +1 -0
- package/dist/interface/assets/{nprogress-DSyAi0LF.js → nprogress-QK5AFhFr.js} +1 -1
- package/dist/interface/assets/{plugins-B3ae47WR.js → plugins-BVTgiMCC.js} +1 -1
- package/dist/interface/assets/{system-CMGNVlB9.js → system-DzN6086S.js} +1 -1
- package/dist/interface/assets/{ui-Dfx7c8IA.js → ui-s9WkyTXF.js} +1 -1
- package/dist/interface/assets/{unidragger-BYtqgAQ0.js → unidragger-91TYirAP.js} +1 -1
- package/dist/interface/assets/{vue3-dnd-BLhJdrGw.js → vue3-dnd-CB0hw1gI.js} +1 -1
- package/dist/interface/index.html +5 -5
- package/dist/interface/sw.js +1 -1
- package/dist/server/package.json +1 -1
- package/dist/server/src/camera/controller.d.ts +3 -1
- package/dist/server/src/camera/controller.js +6 -0
- package/dist/server/src/camera/controller.js.map +1 -1
- package/dist/server/src/camera/index.d.ts +3 -7
- package/dist/server/src/camera/index.js +10 -7
- package/dist/server/src/camera/index.js.map +1 -1
- package/dist/server/src/camera/interfaces/camera.d.ts +1 -1
- package/dist/server/src/camera/interfaces/prebuffer.js +2 -2
- package/dist/server/src/camera/interfaces/prebuffer.js.map +1 -1
- package/dist/server/src/camera/types.d.ts +8 -2
- package/dist/server/src/camera/types.js.map +1 -1
- package/dist/server/src/nats/proxy/cameraDevice.d.ts +4 -9
- package/dist/server/src/nats/proxy/cameraDevice.js +47 -15
- package/dist/server/src/nats/proxy/cameraDevice.js.map +1 -1
- package/dist/server/src/nats/proxy/deviceManager.js +1 -2
- package/dist/server/src/nats/proxy/deviceManager.js.map +1 -1
- package/dist/server/src/nats/types.d.ts +12 -5
- package/dist/server/src/polyglot/node/plugins/child.js +2 -4
- package/dist/server/src/polyglot/node/plugins/child.js.map +1 -1
- package/dist/server/src/polyglot/node/plugins/proxy/cameraDevice.js +6 -4
- package/dist/server/src/polyglot/node/plugins/proxy/cameraDevice.js.map +1 -1
- package/dist/server/src/polyglot/python/camera/interfaces/camera.py +1 -1
- package/dist/server/src/polyglot/python/camera_ui_types/__init__.py +2 -2
- package/dist/server/src/polyglot/python/plugins/child.py +4 -8
- package/dist/server/src/polyglot/python/plugins/proxy/camera_device.py +10 -10
- package/package.json +1 -1
- package/dist/interface/assets/@xterm-B4Ga69iL.js +0 -9
- package/dist/interface/assets/Config-BaduqAPa.js +0 -1
- package/dist/interface/assets/Config-CC4N6cZ_.css +0 -1
- package/dist/interface/assets/Console-CZti-HkE.js +0 -4
- package/dist/interface/assets/Console-oK3EOhXd.css +0 -1
- package/dist/interface/assets/FirstSteps-Crrpv1xD.css +0 -1
- package/dist/interface/assets/FirstSteps-CxkCZshO.js +0 -1
- package/dist/interface/assets/Plugins-BEpzwIvz.css +0 -1
- package/dist/interface/assets/Plugins-CuhjzrrN.js +0 -1
- package/dist/interface/assets/System-sfhoKWOV.css +0 -1
- package/dist/interface/assets/System-vupk638j.js +0 -4
- package/dist/interface/assets/VConsole-Ce_ESyGu.css +0 -1
- package/dist/interface/assets/VConsole-DF4z0QLd.js +0 -1
- package/dist/interface/assets/VPluginCard-D5wpfmsY.js +0 -4
- package/dist/interface/assets/VPluginCard-DKHCsA14.css +0 -1
- package/dist/interface/assets/main-B4eXSkTt.js +0 -9
- package/dist/interface/assets/main-DqbPuifX.css +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var se=Object.defineProperty;var ie=(n,t,o)=>t in n?se(n,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):n[t]=o;var R=(n,t,o)=>ie(n,typeof t!="symbol"?t+"":t,o);import{i as Q,x as C,a as re,f as ce,y as le,w as ue,B as me,d as fe}from"./main-B4eXSkTt.js";import{_ as de}from"./VConfigEditor.vue_vue_type_script_setup_true_lang-CXi6f5FH.js";import{r as l,u as e,F as ge,c as K,w as O,x as pe,e as c,f as j,O as g,M as s,l as ye,ae as Ce,j as F,X as _e,R as a,ar as ve,i as G,m as he,V as p,T as f,q as V,g as P,v as E}from"./@vue-CHoPEscU.js";import{_ as be,$ as we,I as Qe,H as Ve}from"./@mdi-DdmeckA1.js";import{i as x}from"./vue3-toastify-DSsDwESL.js";import{u as xe,a as N,b as k}from"./@tanstack-BRh6vUDU.js";import{r as ke}from"./system-CMGNVlB9.js";import{u as qe}from"./ui-Dfx7c8IA.js";import{s as ze}from"./utils-BvINh1mj.js";import{s as U}from"./pinia-B42WbXFS.js";import{P as Se,Q as Re,e as y,b as q}from"./vuetify-Bs5zynkb.js";import"./vue-inline-svg-Dk2QTAg8.js";import"./vue-i18n-COBHesGQ.js";import"./@intlify-Ck2ZoCVz.js";import"./axios-BI2i94Vb.js";import"./vue-router-C1SPCwo7.js";import"./@vueuse-kxQLk53-.js";import"./nprogress-DSyAi0LF.js";import"./@xterm-B4Ga69iL.js";import"./vee-validate-Bcyi_7NV.js";import"./@vee-validate-aIk5PQoc.js";import"./zod-BaF2dDCd.js";import"./uuid-DvF23Exx.js";import"./socket.io-client-Bq_SHkin.js";import"./engine.io-client-DBBxzneW.js";import"./engine.io-parser-BiEtp6m2.js";import"./@socket.io-Dkula2eQ.js";import"./socket.io-parser-BBkuslX-.js";import"./rxjs-CQrF441D.js";import"./tslib-9k7AwCpt.js";import"./v-calendar-DI1KYDXS.js";import"./@popperjs-BQBsAJpH.js";import"./ace-builds-CigWTak4.js";const Fe=async({json:n,signal:t})=>(await C.get("/config",{params:{json:n},signal:t})).data,Ge=async({json:n,signal:t})=>(await C.get("/config/go2rtc",{params:{json:n},signal:t})).data,Ae=async({configData:n})=>(await C.patch("/config",n,{headers:{"Content-Type":"text/yaml"}})).data,Le=async({configData:n})=>(await C.patch("/config/go2rtc",n,{headers:{"Content-Type":"text/yaml"}})).data,Me=async()=>(await C.delete("/config")).data,Te=async()=>(await C.delete("/config/go2rtc")).data;class Be{constructor(){R(this,"_queryClient",xe());R(this,"queryActivator",l([{name:"getConfigQuery",enabled:!0},{name:"getGo2RtcConfigQuery",enabled:!0}]))}get queryClient(){return this._queryClient}getConfigQuery(t=!1){return N({queryKey:["config",{json:t}],queryFn:({signal:o})=>Fe({json:e(t),signal:o}),enabled:()=>this.queryActivator.value.some(o=>o.name==="getConfigQuery"&&o.enabled)})}getGo2RtcConfigQuery(t=!1){return N({queryKey:["go2rtcConfig"],queryFn:({signal:o})=>Ge({json:e(t),signal:o}),enabled:()=>this.queryActivator.value.some(o=>o.name==="getGo2RtcConfigQuery"&&o.enabled)})}patchConfigQuery(){return k({mutationFn:Ae,onSuccess:async()=>{await this._queryClient.refetchQueries({queryKey:["config"]}),x.success(Q.global.t("components.toast.config_updated"))}})}patchGo2RtcConfigQuery(){return k({mutationFn:Le,onSuccess:async()=>{await this._queryClient.refetchQueries({queryKey:["go2rtcConfig"]}),x.success(Q.global.t("components.toast.config_go2rtc_updated"))}})}delteConfigQuery(){return k({mutationFn:Me,onSuccess:async()=>{await this._queryClient.refetchQueries({queryKey:["config"]}),x.success(Q.global.t("components.toast.config_deleted"))}})}delteGo2RtcConfigQuery(){return k({mutationFn:Te,onSuccess:async()=>{await this._queryClient.refetchQueries({queryKey:["go2rtcConfig"]}),x.success(Q.global.t("components.toast.config_go2rtc_deleted"))}})}toggleQueryActivator(t,o){const w=this.queryActivator.value.find(z=>z.name===t);w&&(w.enabled=o)}}const De={class:"w-full h-full",style:{padding:"0 !important"}},$e={key:0,class:"flex w-full h-full justify-center items-center fixed top-0 left-0",style:{"z-index":"9000"}},Ie={class:"h-full w-full"},Ke=ge({__name:"Config",setup(n){const t=new Be,o=re(),w=qe(),{extraSmallMobileActive:z}=ce(),{theme:A}=U(o),{uiSettings:u}=U(w),d=l("camera.ui"),_=l(""),v=l(""),L=l(!1),S=l(!1),M=l(!1),h=l(!1),T=K(()=>({fontSize:u.value.config.zoom})),{data:B,isLoading:H}=t.getConfigQuery(L),{data:D,isLoading:X}=t.getGo2RtcConfigQuery(L),{mutateAsync:Z,isPending:J}=t.patchConfigQuery(),{mutateAsync:W,isPending:Y}=t.patchGo2RtcConfigQuery(),m=K(()=>H.value||X.value||J.value||Y.value);O(B,()=>{_.value=B.value||""},{deep:!0,immediate:!0}),O(D,()=>{v.value=D.value||""},{deep:!0,immediate:!0});const $=async b=>{d.value==="camera.ui"?(await Z({configData:_.value}),b&&(M.value=!0,ke())):await W({configData:v.value}),b||(h.value=!1)},ee=()=>{d.value=d.value==="camera.ui"?"go2rtc":"camera.ui"},te=()=>{u.value.config.zoom!==8&&u.value.config.zoom--},oe=()=>{u.value.config.zoom!==20&&u.value.config.zoom++};return pe(async()=>{await ze(100),S.value=!0}),(b,i)=>{const ne=le,I=de,ae=ue;return c(),j("main",De,[(c(),g(Ce,{to:".app"},[e(M)?(c(),j("div",$e,[s(ne,{reload:""})])):ye("",!0)])),F("div",Ie,[F("div",{class:"text-editor-buttons flex flex-row justify-center",style:_e(e(z)?`bottom: calc(1rem + ${e(me).HEIGHT}px + env(safe-area-inset-bottom, 0px))`:"bottom: calc(1rem + env(safe-area-inset-bottom, 0px))")},[s(Se,{location:"top center",transition:"fade-transition","close-on-content-click":!1},{activator:a(({props:r})=>[s(Re,he(r,{size:"default",icon:""}),{default:a(()=>[s(y,{size:"20"},{default:a(()=>[p(f(e(be)),1)]),_:1})]),_:2},1040)]),default:a(()=>[s(q,{key:"1",loading:e(m),color:"success",icon:"",onClick:i[0]||(i[0]=V(r=>e(d)==="go2rtc"?$(!1):h.value=!0,["prevent"]))},{default:a(()=>[s(y,{size:"20"},{default:a(()=>[p(f(e(we)),1)]),_:1})]),_:1},8,["loading"]),s(q,{key:"2",loading:e(m),color:"#df2a4c",icon:"",onClick:V(ee,["prevent"])},{default:a(()=>[e(d)==="camera.ui"?(c(),g(y,{key:0,size:"20"},{default:a(()=>[p(f("$cuiLogo"))]),_:1})):(c(),g(y,{key:1,size:"30"},{default:a(()=>[p(f("$cuiGo2rtc"))]),_:1}))]),_:1},8,["loading"]),s(q,{key:"3",loading:e(m),icon:"",disabled:e(u).config.zoom===20,onClick:V(oe,["prevent"])},{default:a(()=>[s(y,{size:"20"},{default:a(()=>[p(f(e(Qe)),1)]),_:1})]),_:1},8,["loading","disabled"]),s(q,{key:"4",loading:e(m),disabled:e(u).config.zoom===8,icon:"",onClick:V(te,["prevent"])},{default:a(()=>[s(y,{size:"20"},{default:a(()=>[p(f(e(Ve)),1)]),_:1})]),_:1},8,["loading","disabled"])]),_:1})],4),(c(),g(ve,null,{default:a(()=>[e(d)==="camera.ui"?P((c(),g(I,{key:0,modelValue:e(_),"onUpdate:modelValue":i[1]||(i[1]=r=>G(_)?_.value=r:null),lang:"yaml",theme:e(A),options:e(T),"read-only":e(m),class:"text-editor"},null,8,["modelValue","theme","options","read-only"])),[[E,e(S)]]):P((c(),g(I,{key:1,modelValue:e(v),"onUpdate:modelValue":i[2]||(i[2]=r=>G(v)?v.value=r:null),lang:"yaml",theme:e(A),options:e(T),"read-only":e(m),class:"text-editor"},null,8,["modelValue","theme","options","read-only"])),[[E,e(S)]])]),_:1})),s(ae,{modelValue:e(h),"onUpdate:modelValue":i[3]||(i[3]=r=>G(h)?h.value=r:null),title:b.$t("components.dialog.title.confirm"),"confirm-text":"components.form.button.save_and_restart",loading:e(m),onConfirm:i[4]||(i[4]=r=>$(!0))},{content:a(()=>[F("span",null,f(b.$t("components.dialog.message.confirm_restart_server")),1)]),_:1},8,["modelValue","title","loading"])])])}}}),wt=fe(Ke,[["__scopeId","data-v-0bcf9812"]]);export{wt as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.text-editor[data-v-0bcf9812]{height:calc(100% - env(safe-area-inset-bottom,0px));z-index:1;background:none!important}.text-editor-buttons[data-v-0bcf9812]{z-index:3;width:48px;height:48px;position:fixed;right:calc(1rem + env(safe-area-inset-right,0px));background:none;border-top:none;box-shadow:none;padding:0;opacity:.5;transition:opacity .3s}.text-editor-buttons[data-v-0bcf9812]:hover{opacity:1}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{z as E,f as $,w as h,B as N,d as P}from"./main-B4eXSkTt.js";import{F as j,r as k,c as S,a3 as L,U as H,e as F,f as q,j as w,M as t,u as o,X as G,R as n,i as W,n as X,m as Z,V as f,T as m,q as y}from"./@vue-CHoPEscU.js";import{_ as J,a0 as K,a1 as Y,I as oo,H as eo}from"./@mdi-DdmeckA1.js";import{S as to}from"./system-CMGNVlB9.js";import{V as no}from"./VConsole-DF4z0QLd.js";import{u as ao}from"./ui-Dfx7c8IA.js";import{s as so}from"./pinia-B42WbXFS.js";import{P as lo,Q as io,e as g,b as _}from"./vuetify-Bs5zynkb.js";import"./vue-inline-svg-Dk2QTAg8.js";import"./vue3-toastify-DSsDwESL.js";import"./vue-i18n-COBHesGQ.js";import"./@intlify-Ck2ZoCVz.js";import"./axios-BI2i94Vb.js";import"./@tanstack-BRh6vUDU.js";import"./vue-router-C1SPCwo7.js";import"./@vueuse-kxQLk53-.js";import"./nprogress-DSyAi0LF.js";import"./@xterm-B4Ga69iL.js";import"./vee-validate-Bcyi_7NV.js";import"./@vee-validate-aIk5PQoc.js";import"./zod-BaF2dDCd.js";import"./uuid-DvF23Exx.js";import"./socket.io-client-Bq_SHkin.js";import"./engine.io-client-DBBxzneW.js";import"./engine.io-parser-BiEtp6m2.js";import"./@socket.io-Dkula2eQ.js";import"./socket.io-parser-BBkuslX-.js";import"./rxjs-CQrF441D.js";import"./tslib-9k7AwCpt.js";import"./v-calendar-DI1KYDXS.js";import"./@popperjs-BQBsAJpH.js";const ro={class:"w-full h-full",style:{padding:"0 !important"}},co=j({__name:"Console",setup(mo){const u=new to,V=E(),C=ao(),{mobileActive:x,extraSmallMobileActive:Q}=$(),{uiSettings:i}=so(C),v=k(null),c=k(),d=k(!1),B=S(()=>({fontSize:i.value.console.zoom}));u.toggleQueryActivator("downloadLogQuery",!1);const{data:b,isLoading:T,suspense:M}=u.downloadLogQuery(),{mutate:R,isPending:A}=u.clearLogQuery(),p=S(()=>T.value||A.value),D=async()=>{R(void 0,{onSuccess:()=>{d.value=!1}})},I=async()=>{try{if(u.toggleQueryActivator("downloadLogQuery",!0),await M(),b.value){const a=b.value,e=window.URL.createObjectURL(new Blob([a])),s=document.createElement("a");s.href=e,s.setAttribute("download","camera.ui.log.txt"),document.body.appendChild(s),s.click(),s.remove()}}finally{u.toggleQueryActivator("downloadLogQuery",!1)}},O=()=>{i.value.console.zoom!==8&&i.value.console.zoom--},U=()=>{i.value.console.zoom!==20&&i.value.console.zoom++};return L(()=>{c.value=V.connectToNamespace("/logs")}),L(()=>{var a,e,s,l;(a=c.value)==null||a.socket.on("stdout",r=>{var z;(z=v.value)==null||z.writeTerminal(r)}),(e=c.value)==null||e.socket.on("disconnect",()=>{var r;(r=v.value)==null||r.writeTerminal(`
|
|
2
|
-
\rWebsocket failed to connect! Is the server running?
|
|
3
|
-
\r
|
|
4
|
-
\r`)}),(s=c.value)==null||s.socket.on("clear-log",()=>{var r;(r=v.value)==null||r.clearTerminal()}),(l=c.value)==null||l.socket.emit("get-log")}),H(()=>{var a,e;(e=(a=c.value)==null?void 0:a.end)==null||e.call(a)}),(a,e)=>{const s=h;return F(),q("main",ro,[w("div",{class:X(["h-full w-full",{"mb-safe":o(x)}])},[t(no,{ref_key:"consoleRef",ref:v,class:"text-editor",options:o(B)},null,8,["options"]),w("div",{class:"text-editor-buttons flex flex-row justify-center",style:G(o(Q)?`bottom: calc(1rem + ${o(N).HEIGHT}px + env(safe-area-inset-bottom, 0px))`:"bottom: calc(1rem + env(safe-area-inset-bottom, 0px))")},[t(lo,{location:"top center",transition:"fade-transition","close-on-content-click":!1},{activator:n(({props:l})=>[t(io,Z(l,{size:"default",icon:""}),{default:n(()=>[t(g,{size:"20"},{default:n(()=>[f(m(o(J)),1)]),_:1})]),_:2},1040)]),default:n(()=>[t(_,{key:"1",loading:o(p),color:"success",icon:"",onClick:y(I,["prevent"])},{default:n(()=>[t(g,{size:"20"},{default:n(()=>[f(m(o(K)),1)]),_:1})]),_:1},8,["loading"]),t(_,{key:"2",loading:o(p),color:"red",icon:"",onClick:e[0]||(e[0]=y(l=>d.value=!0,["prevent"]))},{default:n(()=>[t(g,{size:"20"},{default:n(()=>[f(m(o(Y)),1)]),_:1})]),_:1},8,["loading"]),t(_,{key:"3",loading:o(p),icon:"",disabled:o(i).console.zoom===20,onClick:y(U,["prevent"])},{default:n(()=>[t(g,{size:"20"},{default:n(()=>[f(m(o(oo)),1)]),_:1})]),_:1},8,["loading","disabled"]),t(_,{key:"4",loading:o(p),disabled:o(i).console.zoom===8,icon:"",onClick:y(O,["prevent"])},{default:n(()=>[t(g,{size:"20"},{default:n(()=>[f(m(o(eo)),1)]),_:1})]),_:1},8,["loading","disabled"])]),_:1})],4),t(s,{modelValue:o(d),"onUpdate:modelValue":e[1]||(e[1]=l=>W(d)?d.value=l:null),title:a.$t("components.dialog.title.confirm"),"confirm-text":"components.form.button.clear",loading:o(p),onConfirm:e[2]||(e[2]=l=>D())},{content:n(()=>[w("span",null,m(a.$t("components.dialog.message.confirm_clear_log")),1)]),_:1},8,["modelValue","title","loading"])],2)])}}}),jo=P(co,[["__scopeId","data-v-8e51de9e"]]);export{jo as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.page-title[data-v-8e51de9e]{font-size:1.2rem;font-weight:600}.text-editor[data-v-8e51de9e]{height:calc(100% - env(safe-area-inset-bottom,0px));z-index:1;background:none!important}.text-editor-buttons[data-v-8e51de9e]{z-index:3;width:48px;height:48px;position:fixed;right:calc(1rem + env(safe-area-inset-right,0px));background:none;border-top:none;box-shadow:none;padding:0;opacity:.5;transition:opacity .3s}.text-editor-buttons[data-v-8e51de9e]:hover{opacity:1}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.window[data-v-1fab1ad8]{height:100%}.firststeps-progress[data-v-1fab1ad8]{background:var(--color-primary);position:fixed;height:calc(170px + env(safe-area-inset-top,0px));top:0;left:0;z-index:1}.firststeps-progress-inner[data-v-1fab1ad8]{max-width:500px}.firststeps-button[data-v-1fab1ad8]{position:relative;text-transform:none!important;color:#ffffff80!important;font-size:.8rem}.firststeps-next[data-v-1fab1ad8]{background:var(--color-primary);color:#fff}.firststeps-skip[data-v-1fab1ad8]{position:relative;right:-10px}.firststeps[data-v-1fab1ad8]{background:var(--background-login);overflow-y:scroll;top:calc(170px + env(safe-area-inset-top,0px));height:calc(100% - 170px - env(safe-area-inset-top,0px));position:relative}.firststeps-progress-text[data-v-1fab1ad8]{color:#fff;font-size:1.2rem}.firststeps-progress-text b[data-v-1fab1ad8]{font-weight:800}.firststeps-progress-text span[data-v-1fab1ad8]{margin-left:10px;opacity:.5}.firststeps-progress-title[data-v-1fab1ad8]{color:#fff;font-size:1.5rem;font-weight:800}.firststeps-step-bar[data-v-1fab1ad8]{height:3px;width:50px;background:#ffffff80;flex:1 1 auto}.firststeps-step-bar-active[data-v-1fab1ad8]{background:#fff}.firststeps-info[data-v-1fab1ad8]{color:var(--color-disabled)}.firststeps-form[data-v-1fab1ad8]{max-width:500px}@media screen and (max-width: 450px){.firststeps-progress[data-v-1fab1ad8]{width:100dvw}}@keyframes animate-svg-stroke-3-1fab1ad8{0%{stroke-dashoffset:119.24423783197108px;stroke-dasharray:119.24423783197108px}to{stroke-dashoffset:0;stroke-dasharray:119.24423783197108px}}@keyframes animate-svg-fill-3-1fab1ad8{0%{fill:transparent}to{fill:#c5c6c8}}div[data-v-1fab1ad8] .svg-elem-3{animation:animate-svg-stroke-3-1fab1ad8 .5s cubic-bezier(.47,0,.745,.715) .24s both,animate-svg-fill-3-1fab1ad8 .3s cubic-bezier(.47,0,.745,.715) 1s both}@keyframes animate-svg-stroke-4-1fab1ad8{0%{stroke-dashoffset:72.2947006225586px;stroke-dasharray:72.2947006225586px}to{stroke-dashoffset:0;stroke-dasharray:72.2947006225586px}}@keyframes animate-svg-fill-4-1fab1ad8{0%{fill:transparent}to{fill:#1a1e21}}div[data-v-1fab1ad8] .svg-elem-4{animation:animate-svg-stroke-4-1fab1ad8 .5s cubic-bezier(.47,0,.745,.715) .36s both,animate-svg-fill-4-1fab1ad8 .3s cubic-bezier(.47,0,.745,.715) 1.1s both}@keyframes animate-svg-stroke-5-1fab1ad8{0%{stroke-dashoffset:12.32623871258889px;stroke-dasharray:12.32623871258889px}to{stroke-dashoffset:0;stroke-dasharray:12.32623871258889px}}@keyframes animate-svg-fill-5-1fab1ad8{0%{fill:transparent}to{fill:#fff}}div[data-v-1fab1ad8] .svg-elem-5{animation:animate-svg-stroke-5-1fab1ad8 .5s cubic-bezier(.47,0,.745,.715) .48s both,animate-svg-fill-5-1fab1ad8 .3s cubic-bezier(.47,0,.745,.715) 1.2000000000000002s both}@keyframes animate-svg-stroke-6-1fab1ad8{0%{stroke-dashoffset:12.32623871258889px;stroke-dasharray:12.32623871258889px}to{stroke-dashoffset:0;stroke-dasharray:12.32623871258889px}}@keyframes animate-svg-fill-6-1fab1ad8{0%{fill:transparent}to{fill:#fff}}div[data-v-1fab1ad8] .svg-elem-6{animation:animate-svg-stroke-6-1fab1ad8 .5s cubic-bezier(.47,0,.745,.715) .6s both,animate-svg-fill-6-1fab1ad8 .3s cubic-bezier(.47,0,.745,.715) 1.3s both}@keyframes animate-svg-stroke-7-1fab1ad8{0%{stroke-dashoffset:12.32623871258889px;stroke-dasharray:12.32623871258889px}to{stroke-dashoffset:0;stroke-dasharray:12.32623871258889px}}@keyframes animate-svg-fill-7-1fab1ad8{0%{fill:transparent}to{fill:#fff}}div[data-v-1fab1ad8] .svg-elem-7{animation:animate-svg-stroke-7-1fab1ad8 .5s cubic-bezier(.47,0,.745,.715) .72s both,animate-svg-fill-7-1fab1ad8 .3s cubic-bezier(.47,0,.745,.715) 1.4000000000000001s both}@keyframes animate-svg-stroke-8-1fab1ad8{0%{stroke-dashoffset:12.430087609918113px;stroke-dasharray:12.430087609918113px}to{stroke-dashoffset:0;stroke-dasharray:12.430087609918113px}}@keyframes animate-svg-fill-8-1fab1ad8{0%{fill:transparent}to{fill:#fff}}div[data-v-1fab1ad8] .svg-elem-8{animation:animate-svg-stroke-8-1fab1ad8 .5s cubic-bezier(.47,0,.745,.715) .84s both,animate-svg-fill-8-1fab1ad8 .3s cubic-bezier(.47,0,.745,.715) 1.5s both}@keyframes animate-svg-stroke-9-1fab1ad8{0%{stroke-dashoffset:24.203350067138672px;stroke-dasharray:24.203350067138672px}to{stroke-dashoffset:0;stroke-dasharray:24.203350067138672px}}@keyframes animate-svg-fill-9-1fab1ad8{0%{fill:transparent}to{fill:#fff}}div[data-v-1fab1ad8] .svg-elem-9{animation:animate-svg-stroke-9-1fab1ad8 .5s cubic-bezier(.47,0,.745,.715) .96s both,animate-svg-fill-9-1fab1ad8 .3s cubic-bezier(.47,0,.745,.715) 1.6s both}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{u as ie,a as de,b as me,i as ce,g as pe,c as ue,r as fe,_ as ve,d as he}from"./main-B4eXSkTt.js";import{F as ge,r as u,b as be,c as G,w as _e,e as f,f as R,j as s,u as e,O as z,q as B,l as E,T as m,N as we,Q as ye,M as l,R as c,n as xe,i as V,m as S,V as L,ai as ke,aj as Ve}from"./@vue-CHoPEscU.js";import{m as H,a as J}from"./@mdi-DdmeckA1.js";import{F as b,a as Se}from"./vee-validate-Bcyi_7NV.js";import{I as $e}from"./vue-inline-svg-Dk2QTAg8.js";import{a as Ce}from"./vue-router-C1SPCwo7.js";import{s as N}from"./pinia-B42WbXFS.js";import{b as $,w as Fe,x as P,y as K,d as T,c as O,z as X}from"./vuetify-Bs5zynkb.js";import"./vue3-toastify-DSsDwESL.js";import"./vue-i18n-COBHesGQ.js";import"./@intlify-Ck2ZoCVz.js";import"./axios-BI2i94Vb.js";import"./@tanstack-BRh6vUDU.js";import"./@vueuse-kxQLk53-.js";import"./nprogress-DSyAi0LF.js";import"./@xterm-B4Ga69iL.js";import"./@vee-validate-aIk5PQoc.js";import"./zod-BaF2dDCd.js";import"./uuid-DvF23Exx.js";import"./socket.io-client-Bq_SHkin.js";import"./engine.io-client-DBBxzneW.js";import"./engine.io-parser-BiEtp6m2.js";import"./@socket.io-Dkula2eQ.js";import"./socket.io-parser-BBkuslX-.js";import"./rxjs-CQrF441D.js";import"./tslib-9k7AwCpt.js";import"./v-calendar-DI1KYDXS.js";import"./@popperjs-BQBsAJpH.js";const q=_=>(ke("data-v-1fab1ad8"),_=_(),Ve(),_),Ie={class:"w-full h-full router-view p-2",style:{padding:"0",height:"100dvh"}},Ue={class:"firststeps-progress flex flex-col items-center p-5 w-full"},je={class:"firststeps-progress-inner pt-safe flex flex-col h-full w-full"},Me={class:"flex flex-row items-center"},Re={class:"firststeps-progress-title mt-3"},ze={class:"firststeps-progress-text mt-1"},Be={class:"flex flex-row gap-2 mt-3 mb-3"},Ee={class:"firststeps flex flex-col items-center p-5 w-full h-full hide-scrollbar"},Le={class:"relative"},Ne={for:"theme",class:"v-label"},Pe=q(()=>s("div",{class:"py-2"},null,-1)),Te={class:"ml-auto flex"},Oe=q(()=>s("div",{class:"py-3"},null,-1)),qe={class:"relative"},Ae={for:"language",class:"v-label"},De={class:"flex flex-row relative"},We={class:"w-100 mr-5"},Qe={for:"username",class:"v-label"},Ge={class:"image-upload ml-auto mt-3"},He={for:"file-input"},Je={class:"relative mt-5"},Ke={for:"password",class:"v-label"},Xe={class:"relative"},Ye={for:"password",class:"v-label"},Ze={class:"ml-auto flex"},et=q(()=>s("div",{class:"py-3"},null,-1)),tt={class:"ml-auto flex"},st={class:"w-full flex flex-col justify-center items-center"},at={class:"text-center mt-10 firststeps-info"},ot=ge({__name:"FirstSteps",setup(_){const C=ie(),Y=de(),Z=me(),ee=Ce(),{t:F}=ce.global,{loading:v,loginState:te}=N(C),{locale:I,languages:se}=N(Z),{colors:ae,theme:U,autoMode:w}=N(Y),n=u(0),A=u(),j=u(),y=u(!1),x=u(!1),h=u(),D=u(!1),k=be([{title:F("views.firststeps.step_appearance")},{title:F("views.firststeps.step_account")},{title:F("views.firststeps.step_finish")}]),oe=G(()=>Math.round((n.value+1)/k.length*100)),M=G(()=>n.value===k.length-1);_e(n,a=>{a===0&&(D.value=!1)});const le=async a=>{var d;const t=(d=a.target)==null?void 0:d.files;j.value=t==null?void 0:t[0],A.value=await fe(a)},re=async()=>{var a,t;try{await C.logout()}catch(d){console.error(((t=(a=d.response)==null?void 0:a.data)==null?void 0:t.message)??d.message??d)}},W=async()=>{var a,t,d,o;if(n.value>0){const r=(a=h.value)==null?void 0:a.getValues();if(r&&!r.password){(t=h.value)==null||t.setFieldError("password","Required"),(d=h.value)==null||d.setFieldError("passwordConfirm","Required");return}const i=await((o=h.value)==null?void 0:o.validate());i!=null&&i.valid&&!M.value&&n.value++}else n.value++},ne=async a=>{var t,d;if(D.value=!0,M.value){let o;const r={...a};r.firstLogin=!1,delete r.upload;try{v.value=!0,j.value&&(o=new FormData,o.append("upload",j.value)),await C.updateUser(r,o,!0),ee.push({path:"/cameras"})}catch(i){console.error(((d=(t=i.response)==null?void 0:t.data)==null?void 0:d.message)??i.message??i)}}},Q=()=>{n.value>0&&n.value--};return(a,t)=>{const d=ve;return f(),R("main",Ie,[s("div",Ue,[s("div",je,[s("div",Me,[e(n)>0?(f(),z($,{key:0,density:"compact",class:"firststeps-button no-drag",variant:"tonal",color:"tonal",text:a.$t("components.form.button.previous"),loading:e(v),onClick:t[0]||(t[0]=B(o=>Q(),["prevent"]))},null,8,["text","loading"])):E("",!0),e(n)===0?(f(),z($,{key:1,density:"compact",class:"firststeps-button no-drag",variant:"tonal",color:"white",text:a.$t("components.form.button.logout"),loading:e(v),onClick:t[1]||(t[1]=B(o=>re(),["prevent"]))},null,8,["text","loading"])):E("",!0),e(M)?E("",!0):(f(),z($,{key:2,density:"compact",class:"firststeps-button ml-auto no-drag",variant:"tonal",color:"white",text:a.$t("components.form.button.next"),loading:e(v),onClick:t[2]||(t[2]=B(o=>W(),["prevent"]))},null,8,["text","loading"]))]),s("h1",Re,m(e(k)[e(n)].title),1),s("h1",ze,[s("b",null,m(e(oe))+"%",1),s("span",null,m(a.$t("views.firststeps.complete")),1)]),s("div",Be,[(f(!0),R(we,null,ye(e(k),(o,r)=>(f(),R("div",{key:r,class:xe(["firststeps-step-bar",{"firststeps-step-bar-active":e(n)===r}])},null,2))),128))])])]),s("div",Ee,[l(e(Se),{ref_key:"userForm",ref:h,class:"firststeps-form flex flex-col h-full w-full","validation-schema":e(ue),onSubmit:t[10]||(t[10]=o=>ne(o))},{default:c(()=>[l(Fe,{modelValue:e(n),"onUpdate:modelValue":t[9]||(t[9]=o=>V(n)?n.value=o:null),class:"window",touch:{left:W,right:Q}},{default:c(()=>[l(P,{value:0,transition:"fade","reverse-transition":"fade-reverse",disabled:!1},{default:c(()=>[s("div",Le,[s("label",Ne,m(a.$t("components.form.label.theme")),1),l(K,{modelValue:e(U),"onUpdate:modelValue":t[3]||(t[3]=o=>V(U)?U.value=o:null),variant:"outlined",name:"theme","hide-details":"",density:"compact",items:e(ae),disabled:e(w)},null,8,["modelValue","items","disabled"])]),Pe,s("div",null,[s("div",Te,[l(T,{modelValue:e(w),"onUpdate:modelValue":t[4]||(t[4]=o=>V(w)?w.value=o:null),color:"#df2a4c",type:"checkbox",label:a.$t("components.form.label.system_preference"),"hide-details":""},null,8,["modelValue","label"])])]),Oe,s("div",qe,[s("label",Ae,m(a.$t("components.form.label.language")),1),l(K,{modelValue:e(I),"onUpdate:modelValue":t[5]||(t[5]=o=>V(I)?I.value=o:null),variant:"outlined",name:"language","hide-details":"",density:"compact",items:e(se)},null,8,["modelValue","items"])])]),_:1}),l(P,{value:1,transition:"fade","reverse-transition":"fade-reverse",disabled:!1},{default:c(()=>{var o;return[s("div",De,[s("div",We,[s("label",Qe,m(a.$t("components.form.label.username")),1),l(O,{variant:"outlined",type:"text",disabled:"","hide-details":"",density:"compact",value:(o=e(te).user)==null?void 0:o.username},null,8,["value"])]),s("div",Ge,[s("label",He,[l(d,{src:e(A),size:"4rem",style:{"border-radius":"4rem",border:"1px solid var(--border)"}},null,8,["src"]),l(e(b),{id:"file-input",type:"file",name:"upload",accept:"image/png,image/jpeg,image/jpg",onChange:t[6]||(t[6]=r=>le(r))})])])]),s("div",Je,[s("label",Ke,m(a.$t("components.form.label.new_password")),1),l(e(b),{name:"password"},{default:c(({field:r,errorMessage:i,errors:p})=>[l(O,S({variant:"outlined"},r,{name:"password",type:e(y)?"text":"password",error:p.length>0,"error-messages":i,density:"compact","append-inner-icon":e(y)?e(H):e(J),"onClick:appendInner":t[7]||(t[7]=g=>y.value=!e(y))}),null,16,["type","error","error-messages","append-inner-icon"])]),_:1})]),s("div",Xe,[s("label",Ye,m(a.$t("components.form.label.new_password_confirm")),1),l(e(b),{name:"passwordConfirm"},{default:c(({field:r,errorMessage:i,errors:p})=>[l(O,S({variant:"outlined"},r,{name:"passwordConfirm",type:e(x)?"text":"password",error:p.length>0,"error-messages":i,density:"compact","append-inner-icon":e(x)?e(H):e(J),"onClick:appendInner":t[8]||(t[8]=g=>x.value=!e(x))}),null,16,["type","error","error-messages","append-inner-icon"])]),_:1})]),s("div",null,[s("div",Ze,[l(e(b),{name:"oneLogin",type:"checkbox","checked-value":!0,"unchecked-value":!1},{default:c(({field:r,errorMessage:i,errors:p,value:g})=>[l(T,S(r,{name:"oneLogin",color:"#df2a4c",type:"checkbox",error:p.length>0,"error-messages":i,value:g,label:a.$t("components.form.label.one_login"),"hide-details":""}),null,16,["error","error-messages","value","label"])]),_:1})]),l(X,{theme:"dark",density:"compact",variant:"tonal",style:{"font-size":"0.7rem",color:"var(--color-disabled)"}},{default:c(()=>[L(m(a.$t("components.form.hint.one_login")),1)]),_:1})]),et,s("div",null,[s("div",tt,[l(e(b),{name:"rememberMe",type:"checkbox","checked-value":!0,"unchecked-value":!1},{default:c(({field:r,errorMessage:i,errors:p,value:g})=>[l(T,S({name:"rememberMe"},r,{color:"#df2a4c",type:"checkbox",error:p.length>0,"error-messages":i,value:g,label:a.$t("components.form.label.remember_me"),"hide-details":""}),null,16,["error","error-messages","value","label"])]),_:1})]),l(X,{class:"mb-safe",theme:"dark",density:"compact",variant:"tonal",style:{"font-size":"0.7rem",color:"var(--color-disabled)"}},{default:c(()=>[L(m(a.$t("components.form.hint.remember_me")),1)]),_:1})])]}),_:1}),l(P,{value:2,transition:"fade","reverse-transition":"fade-reverse",disabled:!1},{default:c(()=>[s("div",st,[l(e($e),{src:e(pe)("logo_animated.svg"),width:"78px",height:"84px",title:"camera.ui","aria-label":"camera.ui"},null,8,["src"]),s("p",at,m(a.$t("views.firststeps.finish_message")),1),l($,{class:"mt-7 text-white",type:"submit",elevation:"1",color:"#df2a4c",loading:e(v)},{default:c(()=>[L(m(a.$t("views.firststeps.enjoy")),1)]),_:1},8,["loading"])])]),_:1})]),_:1},8,["modelValue","touch"])]),_:1},8,["validation-schema"])])])}}}),Rt=he(ot,[["__scopeId","data-v-1fab1ad8"]]);export{Rt as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.plugin-card[data-v-49a85457]{width:100%;max-height:125px;background:var(--background-inner-component-card);border-radius:4px;box-shadow:0 3px 1px -2px #0000000f,0 2px 2px #00000014,0 1px 5px #0000000d}.grid[data-v-57d17284]{display:grid;width:100%}div[data-v-57d17284] .v-skeleton-loader__image{height:175px}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{d as S,f as T,z as j,w as D}from"./main-B4eXSkTt.js";import{_ as C}from"./VPluginCard-D5wpfmsY.js";import{P as z}from"./plugins-B3ae47WR.js";import{c as F,S as I,m as R,n as U,C as q,b as A,A as E,e as G}from"./vuetify-Bs5zynkb.js";import{F as B,r as u,w as O,e as s,f as a,M as l,R as g,j as c,T as p,u as e,i as L,V as N,N as k,Q as P,O as X,l as H,a3 as J,U as K,n as b,aa as W,q as Y,X as $}from"./@vue-CHoPEscU.js";import{e as Z}from"./@mdi-DdmeckA1.js";import"./vue-inline-svg-Dk2QTAg8.js";import"./vue3-toastify-DSsDwESL.js";import"./vue-i18n-COBHesGQ.js";import"./@intlify-Ck2ZoCVz.js";import"./axios-BI2i94Vb.js";import"./@tanstack-BRh6vUDU.js";import"./pinia-B42WbXFS.js";import"./vue-router-C1SPCwo7.js";import"./@vueuse-kxQLk53-.js";import"./nprogress-DSyAi0LF.js";import"./@xterm-B4Ga69iL.js";import"./vee-validate-Bcyi_7NV.js";import"./@vee-validate-aIk5PQoc.js";import"./zod-BaF2dDCd.js";import"./uuid-DvF23Exx.js";import"./socket.io-client-Bq_SHkin.js";import"./engine.io-client-DBBxzneW.js";import"./engine.io-parser-BiEtp6m2.js";import"./@socket.io-Dkula2eQ.js";import"./socket.io-parser-BBkuslX-.js";import"./rxjs-CQrF441D.js";import"./tslib-9k7AwCpt.js";import"./v-calendar-DI1KYDXS.js";import"./@popperjs-BQBsAJpH.js";import"./VConfigEditor.vue_vue_type_script_setup_true_lang-CXi6f5FH.js";import"./ace-builds-CigWTak4.js";import"./@vueform-CEy-r2-e.js";import"./system-CMGNVlB9.js";import"./VConsole-DF4z0QLd.js";const ee={class:"v-label"},te={class:"flex flex-row items-center justify-center w-full mt-8"},oe={class:"flex flex-col items-center justify-center w-full mt-3"},se={key:0,class:"my-3"},le={key:1,class:"w-full overflow-scroll hide-scrollbar",style:{height:"calc(100dvh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - 325px)"}},ae=B({__name:"VPluginSearch",setup(Q){const i=new z,w=u({page:1,pageSize:-1}),v=u({}),d=u(""),m=u([]),{data:y,isLoading:n}=i.searchPluginsQuery(v,w);O(y,o=>{o!=null&&o.result&&(m.value=o.result.filter(t=>!t.installPath))},{immediate:!0,deep:!0});const f=o=>{o.preventDefault(),v.value.pluginname=d.value??""};return(o,t)=>{const r=C;return s(),a("div",null,[l(I,{class:"ml-auto",onSubmit:f},{default:g(()=>[c("label",ee,p(o.$t("components.form.label.name")),1),l(F,{modelValue:e(d),"onUpdate:modelValue":t[0]||(t[0]=h=>L(d)?d.value=h:null),placeholder:"camera-ui-","hide-details":"",clearable:"",solo:"",variant:"outlined",density:"comfortable","onClick:clear":f},null,8,["modelValue"])]),_:1}),c("div",te,[c("h3",null,p(o.$t("components.plugin_search.plugins")),1),l(R,{size:"small",class:"ml-auto",color:"#df2a4c"},{default:g(()=>[N(p(e(m).length),1)]),_:1})]),l(U,{style:{"border-color":"rgba(var(--color-rgb), 0.1)",opacity:"1"},class:"mt-3"}),l(q,{active:e(n),indeterminate:e(n),color:"#df2a4c",height:"2px"},null,8,["active","indeterminate"]),c("div",oe,[!e(n)&&!e(m).length?(s(),a("div",se,p(o.$t("views.plugins.no_plugins")),1)):e(n)?H("",!0):(s(),a("div",le,[(s(!0),a(k,null,P(e(m),(h,x)=>(s(),X(r,{key:x,plugin:h,height:"175px","max-height":"140px",background:"var(--background-inner-component-card)",class:"my-2","show-installed-icon":"","show-install-button":""},null,8,["plugin"]))),128))]))])])}}}),ie=S(ae,[["__scopeId","data-v-49a85457"]]),ne={class:"h-full w-full inline-size mb-safe"},re={class:"page-title"},ue={class:"w-full flex justify-center items-center mt-3"},ce=B({__name:"Plugins",setup(Q){const{smallMobileActive:i}=T(),w=j(),v=new z,d=u(null),m=u(),y=u({page:1,pageSize:-1}),n=u(!1),{data:f,isLoading:o}=v.getPluginsQuery(y);return J(()=>{m.value=w.connectToNamespace("/plugins")}),K(()=>{var t,r;(r=(t=m.value)==null?void 0:t.end)==null||r.call(t)}),(t,r)=>{const h=ie,x=D;return s(),a("main",{class:b(["w-full h-full",{"px-0":e(i)}])},[c("div",ne,[c("div",{class:b(["mb-3 flex w-full items-center",{"px-2":e(i)}]),style:{height:"30px"}},[c("h1",re,p(t.$t(`views.${String(t.$route.name).toLowerCase()}.title`)),1)],2),l(W,{name:"fade",tag:"div"},{default:g(()=>{var _;return[e(o)?(s(),a("div",{key:0,class:"grid gap-2",style:$(`grid-template-columns: repeat(auto-fill, minmax(${e(i)?"100%":"450px"}, 1fr))`)},[(s(),a(k,null,P(15,V=>l(E,{key:V,elevation:1,type:"image",class:"relative",style:{"border-radius":"8px",overflow:"hidden"},height:175})),64))],4)):(_=e(f))!=null&&_.result.length?(s(),a("div",{key:2,class:"grid gap-2",style:$(`grid-template-columns: repeat(auto-fill, minmax(${e(i)?"100%":"450px"}, 1fr))`)},[(s(!0),a(k,null,P(e(f).result,(V,M)=>(s(),a("div",{key:M,class:"relative"},[l(C,{ref_for:!0,ref_key:"pluginRef",ref:d,plugin:V,height:"175px","max-height":"175px",width:"100%","min-width":e(i)?"100%":"450px","border-radius":e(i)?"0px":"8px","show-toggle":"","show-settings":"","show-logo":"","show-plugin-status":"","show-logs":"","show-configs":""},null,8,["plugin","min-width","border-radius"])]))),128))],4)):(s(),a("div",{key:1,class:b(["disabled-text",{"px-2":e(i)}])},p(t.$t("views.plugins.no_plugins")),3))]}),_:1}),c("div",ue,[l(A,{variant:"text",color:"#df2a4c",icon:"",onClick:r[0]||(r[0]=Y(_=>n.value=!0,["prevent"]))},{default:g(()=>[l(G,{size:"30"},{default:g(()=>[N(p(e(Z)),1)]),_:1})]),_:1})]),l(x,{modelValue:e(n),"onUpdate:modelValue":r[1]||(r[1]=_=>L(n)?n.value=_:null),title:t.$t("components.dialog.title.search_plugin"),"hide-confirm-button":"",loading:e(o),fullscreen:""},{content:g(()=>[l(h)]),_:1},8,["modelValue","title","loading"])])],2)}}}),Oe=S(ce,[["__scopeId","data-v-57d17284"]]);export{Oe as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.text-editor[data-v-dec612f4]{height:100%;z-index:1;background:none!important}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{z as K,f as X,W as Y,y as Z,w as ee,d as te}from"./main-B4eXSkTt.js";import{F as oe,r as i,c as Q,w as x,e as r,f as v,O as z,u as o,M as c,l as se,ae as ne,j as t,T as u,R as S,q as ae,i as R,V as ie,ai as le,aj as re}from"./@vue-CHoPEscU.js";import{S as ue,r as ce}from"./system-CMGNVlB9.js";import{V as de}from"./VConsole-DF4z0QLd.js";import{s as me}from"./utils-BvINh1mj.js";import{c as pe}from"./compare-versions-DqEOhma6.js";import{V as A,b as ve}from"./vuetify-Bs5zynkb.js";import"./vue-inline-svg-Dk2QTAg8.js";import"./vue3-toastify-DSsDwESL.js";import"./vue-i18n-COBHesGQ.js";import"./@intlify-Ck2ZoCVz.js";import"./axios-BI2i94Vb.js";import"./@tanstack-BRh6vUDU.js";import"./pinia-B42WbXFS.js";import"./vue-router-C1SPCwo7.js";import"./@vueuse-kxQLk53-.js";import"./nprogress-DSyAi0LF.js";import"./@xterm-B4Ga69iL.js";import"./@mdi-DdmeckA1.js";import"./vee-validate-Bcyi_7NV.js";import"./@vee-validate-aIk5PQoc.js";import"./zod-BaF2dDCd.js";import"./uuid-DvF23Exx.js";import"./socket.io-client-Bq_SHkin.js";import"./engine.io-client-DBBxzneW.js";import"./engine.io-parser-BiEtp6m2.js";import"./@socket.io-Dkula2eQ.js";import"./socket.io-parser-BBkuslX-.js";import"./rxjs-CQrF441D.js";import"./tslib-9k7AwCpt.js";import"./v-calendar-DI1KYDXS.js";import"./@popperjs-BQBsAJpH.js";const U=w=>(le("data-v-dec612f4"),w=w(),re(),w),fe={key:0,class:"flex w-full h-full justify-center items-center fixed top-0 left-0",style:{"z-index":"9000"}},_e={class:"subview-title text-color"},ge={class:"inner-component p-4"},ye={class:"flex"},we={class:"text-sm"},Ve={class:"text-sm ml-auto text-right"},he={key:1},ke=U(()=>t("div",{class:"my-8"},null,-1)),xe={class:"flex items-center justify-center"},Se={key:0,class:"flex flex-row items-center"},be={class:"text-disabled"},Ce={key:1,class:"flex flex-col items-center justify-center"},$e={class:"text-disabled mb-3"},Ie={key:2,class:"text-disabled"},Te=U(()=>t("div",{class:"p-5"},[t("span",null,"WIP: Release Notes")],-1)),Le={class:"p-5 flex w-full items-center justify-center"},Qe=oe({__name:"System",setup(w){const D=new Y,j=new ue,F=K(),{smallMobileActive:B}=X(),d=i(!1),f=i(!1),_=i(!1),b=i(""),C=i(!1),g=i(null),m=i(),$=i(!1),l=i(""),P=Q(()=>T.value||C.value),W=Q(()=>({fontSize:B.value?12:14})),M=Q(()=>V.value&&l.value?pe(l.value,V.value.version)===1:!1),{data:V,isLoading:O}=D.apiInfoQuery(),{data:I,isLoading:q}=j.checkVersionQuery(),{mutateAsync:E,isPending:T}=j.updateSystemQuery();x(V,()=>{var e;b.value=((e=V.value)==null?void 0:e.version)||""},{deep:!0,immediate:!0}),x(I,()=>{var e;l.value=((e=I.value)==null?void 0:e.versions[I.value.versions.length-1])||""},{deep:!0,immediate:!0}),x(d,e=>{L(e),!e&&!$.value&&setTimeout(()=>{_.value=!0},300)}),x(B,()=>{G()});const L=e=>{var s,h,p,n,k,N;e?(m.value=F.connectToNamespace("/logs"),(s=m.value)==null||s.socket.on("stdout/@camera.ui/server",a=>{var y;(y=g.value)==null||y.writeTerminal(a)}),(h=m.value)==null||h.socket.on("stdout",a=>{var y;(y=g.value)==null||y.writeTerminal(a)}),(p=m.value)==null||p.socket.on("disconnect",()=>{var a;(a=g.value)==null||a.writeTerminal(`
|
|
2
|
-
\rWebsocket failed to connect! Is the server running?
|
|
3
|
-
\r
|
|
4
|
-
\r`)}),(n=m.value)==null||n.socket.on("clear-log",()=>{var a;(a=g.value)==null||a.clearTerminal()})):(N=(k=m.value)==null?void 0:k.end)==null||N.call(k)},G=()=>{d.value&&(L(!1),L(!0))},H=async()=>{if(f.value=!1,$.value=!1,!(!M.value||!l.value)){await me(300),d.value=!0;try{await E({pluginData:{pluginname:"@camera.ui/server",pluginversion:l.value}}),b.value=l.value}catch{$.value=!0}}},J=async()=>{_.value=!1,C.value=!0,await ce()};return(e,s)=>{const h=Z,p=ee;return r(),v("div",null,[(r(),z(ne,{to:".app"},[o(C)?(r(),v("div",fe,[c(h,{reload:""})])):se("",!0)])),t("div",null,[t("span",_e,u(e.$t("views.settings.current_version")),1),t("div",ge,[t("div",ye,[t("span",we,u(e.$t("views.settings.current_version_info")),1),t("span",Ve,[o(O)?(r(),z(A,{key:0,color:"#df2a4c",indeterminate:""})):(r(),v("span",he,[t("b",null,u(o(b)),1)]))])])]),ke,t("div",xe,[o(q)?(r(),v("div",Se,[c(A,{color:"#df2a4c",indeterminate:"",class:"mr-3",size:"15",width:"2"}),t("span",be,u(e.$t("views.settings.searching_updates")),1)])):o(M)?(r(),v("div",Ce,[t("span",$e,u(e.$t("views.settings.available_updates_info")),1),c(ve,{loading:o(T),color:"#df2a4c",onClick:s[0]||(s[0]=ae(n=>f.value=!0,["prevent"]))},{default:S(()=>[ie("v"+u(o(l)),1)]),_:1},8,["loading"])])):(r(),v("span",Ie,u(e.$t("views.settings.not_available_updates_info")),1))])]),c(p,{modelValue:o(f),"onUpdate:modelValue":s[1]||(s[1]=n=>R(f)?f.value=n:null),title:`${e.$t("components.dialog.title.update")}: ${o(l)}`,"fullscreen-content":"",loading:o(T),"confirm-text":"components.form.button.update",onConfirm:H},{content:S(()=>[Te]),_:1},8,["modelValue","title","loading"]),c(p,{modelValue:o(d),"onUpdate:modelValue":s[2]||(s[2]=n=>R(d)?d.value=n:null),title:e.$t("components.dialog.title.log"),"fullscreen-content":"","hide-confirm-button":""},{content:S(()=>[c(de,{ref_key:"consoleRef",ref:g,class:"text-editor",options:o(W)},null,8,["options"])]),_:1},8,["modelValue","title"]),c(p,{modelValue:o(_),"onUpdate:modelValue":s[3]||(s[3]=n=>R(_)?_.value=n:null),title:e.$t("components.dialog.title.restart"),"confirm-text":"components.form.button.restart",loading:o(P),onConfirm:s[4]||(s[4]=n=>J())},{content:S(()=>[t("div",Le,[t("span",null,u(e.$t("components.dialog.message.restart_server_info")),1)])]),_:1},8,["modelValue","title","loading"])])}}}),ct=te(Qe,[["__scopeId","data-v-dec612f4"]]);export{ct as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
div[data-v-014a1ab2] .terminal{padding:10px;height:100%!important}div[data-v-014a1ab2] .xterm-screen,div[data-v-014a1ab2] .xterm-rows,div[data-v-014a1ab2] .xterm-screen div{width:100%!important}.console[data-v-014a1ab2]{height:calc(100dvh - 45px - env(safe-area-inset-bottom,0px) - env(safe-area-inset-top,0px));z-index:1;background:none!important;width:100%;overflow:hidden}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{x as g,a as k}from"./@xterm-B4Ga69iL.js";import{Q as y,d as A}from"./main-B4eXSkTt.js";import{b as D,d as F,f as V}from"./@vueuse-kxQLk53-.js";import{F as O,t as U,r as v,w as d,x as W,U as H,e as Q,f as R}from"./@vue-CHoPEscU.js";const j=O({__name:"VConsole",props:{options:{default:()=>({fontSize:14})}},setup(x,{expose:S}){const b=x,E=V(y),M=D(),m=F({listenOrientation:!1}),{options:i}=U(b),n=v(null),p=v(null),e=v(null);let f,s;d(i,()=>{e.value&&(e.value.options=i.value,l())},{deep:!0}),d(M.orientation,()=>{l()},{deep:!0}),d([m.height,m.width],()=>{l()},{deep:!0}),E.on(t=>{try{t.sidebarState&&(clearTimeout(f),f=setTimeout(()=>{l()},150))}catch{}});const h=()=>{var t,a,o;(a=(t=e.value)==null?void 0:t._core)!=null&&a.viewport&&(e.value._core.viewport.scrollBarWidth=0),(o=n.value)==null||o.fit()},l=()=>{setTimeout(()=>{var t;h(),(t=e.value)==null||t.scrollToBottom()})},B=()=>{var t;(t=e.value)==null||t.clear()},I=t=>{var a;(a=e.value)==null||a.write(t)},Y=()=>{if(!e.value||!e.value.element)return;let t=0,a=0,o=0,c=0,u=!1;const w=1,z=10;e.value.element.addEventListener("touchstart",r=>{clearInterval(s),t=r.touches[0].clientY,a=t,o=0,c=Date.now(),u=!1}),e.value.element.addEventListener("touchmove",r=>{r.preventDefault();const _=r.touches[0].clientY,T=Date.now(),C=_-a,L=T-c;c=T,a=_,o=Math.max(-w,Math.min(C/L,w)),u=!0}),e.value.element.addEventListener("touchend",()=>{u&&Math.abs(o)>.5&&(s=setInterval(()=>{if(!e.value){clearInterval(s);return}e.value.scrollLines(-Math.round(o*z)),o*=.9,Math.abs(o)<.1&&clearInterval(s)},16))})};return W(()=>{e.value=new g.Terminal(i.value),n.value=new k.FitAddon,e.value.loadAddon(n.value),e.value.open(p.value),n.value.activate(e.value),h(),Y()}),H(()=>{var t,a;try{(t=e.value)==null||t.dispose(),(a=n.value)==null||a.dispose()}catch{}}),S({clearTerminal:B,writeTerminal:I,resizeHandler:l}),(t,a)=>(Q(),R("div",{ref_key:"terminalContainer",ref:p,class:"console"},null,512))}}),N=A(j,[["__scopeId","data-v-014a1ab2"]]);export{N as V};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{_ as wt}from"./VConfigEditor.vue_vue_type_script_setup_true_lang-CXi6f5FH.js";import{z as xt,a as kt,f as Pt,t as Vt,P as b,e as $t,w as Ct,d as Nt}from"./main-B4eXSkTt.js";import{F as Lt,t as St,r as c,c as W,w,a3 as zt,x as Qt,J as At,e as r,f as x,j as i,u as e,X as B,M as n,R as o,V as m,T as u,O as g,l as d,g as Tt,m as le,i as V,q as k,ar as It,ai as Bt,aj as Ut}from"./@vue-CHoPEscU.js";import{L as Rt,as as ke,ac as Dt,h as Ot,g as jt,at as Pe,au as Ve,aa as Et,av as Mt,aw as Ht,ax as Jt,T as Wt}from"./@mdi-DdmeckA1.js";import{b as qt}from"./@vueform-CEy-r2-e.js";import{i as Gt}from"./vue3-toastify-DSsDwESL.js";import{P as Kt}from"./plugins-B3ae47WR.js";import{S as Xt}from"./system-CMGNVlB9.js";import{V as Ft}from"./VConsole-DF4z0QLd.js";import{s as Yt}from"./pinia-B42WbXFS.js";import{k as Zt,b as el,d as tl}from"./@vueuse-kxQLk53-.js";import{e as y,V as pe,$ as ll,T as sl,X as $e,m as al,l as Ce,b as U,f as z,j as ol,o as nl,I as il,J as ul,H as rl,y as dl}from"./vuetify-Bs5zynkb.js";const cl=R=>(Bt("data-v-9d017608"),R=R(),Ut(),R),pl={class:"flex space-x-4 w-full"},ml={key:0,class:"relative"},gl={class:"absolute right-0",style:{"z-index":"1",bottom:"5px"}},vl={class:"w-full",style:{"max-width":"calc(100% - 52px - 16px)"}},fl={class:"flex items-center w-full truncate",style:{height:"28px","max-height":"28px"}},yl={key:0,class:"mx-1"},hl={class:"ml-auto"},_l={key:0},bl={class:"truncate-box mt-2"},wl=["data-truncate-text"],xl={class:"flex space-x-1 items-center h-full w-full mt-auto",style:{height:"28px","max-height":"28px"}},kl={class:"flex items-center justify-center"},Pl={style:{"font-size":"9pt"}},Vl=cl(()=>i("div",{class:"ml-auto"},null,-1)),$l={style:{margin:"5px"}},Cl={class:"flex flex-row w-full justify-start items-center"},Nl={class:"icon-wrapper"},Ll={class:"menu-item ml-2"},Sl={key:1,class:"my-1"},zl={class:"flex flex-row w-full justify-start items-center"},Ql={class:"icon-wrapper"},Al={class:"menu-item ml-2"},Tl={key:2,class:"my-1"},Il={class:"flex flex-row w-full justify-start items-center"},Bl={class:"icon-wrapper"},Ul={class:"menu-item ml-2"},Rl={key:3,class:"my-1"},Dl={class:"flex flex-row w-full justify-start items-center"},Ol={class:"icon-wrapper"},jl={class:"menu-item ml-2"},El={key:5,class:"my-1"},Ml={class:"flex flex-row w-full justify-start items-center"},Hl={class:"icon-wrapper"},Jl={class:"menu-item ml-2"},Wl={key:7,class:"my-1"},ql={class:"flex flex-row w-full justify-start items-center"},Gl={class:"icon-wrapper"},Kl={class:"menu-item ml-2",style:{color:"#ef4444 !important"}},Xl={class:"text-white"},Fl={class:"v-label"},Yl=Lt({__name:"VPluginCard",props:{plugin:{},showInstallButton:{type:Boolean,default:!1},showToggle:{type:Boolean,default:!1},showSettings:{type:Boolean,default:!1},showLogo:{type:Boolean,default:!1},showInstalledIcon:{type:Boolean,default:!1},showRestart:{type:Boolean,default:!1},showPluginStatus:{type:Boolean,default:!1},showLogs:{type:Boolean,default:!1},showConfigs:{type:Boolean,default:!1},background:{default:"var(--background-inner-component)"},borderRadius:{default:"8px"},width:{default:"100%"},height:{default:"100%"},minWidth:{},maxWidth:{},minHeight:{},maxHeight:{},truncate:{type:Boolean,default:!0}},emits:["isLoading"],setup(R,{emit:Ne}){const p=new Kt,q=new Xt,me=xt(),Le=kt(),{smallMobileActive:G}=Pt(),Se=Ne,ze=R,{plugin:t,background:Qe,borderRadius:Ae,height:C,minHeight:K,maxHeight:X,width:Te,minWidth:F,maxWidth:Y,showToggle:ge,showSettings:Ie,showInstallButton:Be,showLogo:se,showInstalledIcon:Ue,showRestart:Re,showPluginStatus:ve,showLogs:De,showConfigs:Oe,truncate:fe}=St(ze),{theme:je}=Yt(Le),ye=c(Vt()),D=c(""),he=c(t.value.installedVersion||t.value.latestVersion),O=c(t.value.installedVersion||t.value.latestVersion),Ee=c(!1),N=c(),Z=c(),_e=c(null),v=c({color:"rgba(var(--color-rgb), 0.3)",text:b.UNKNOWN}),ee=c(!1),L=c(!t.value.disabled),ae=c(!1),Q=c(!1),S=c(!1),A=c(!1),T=c(!1),j=c(!1),oe=c(!1),E=c(null),Me=Zt(_e),He=el(),be=tl({listenOrientation:!1});q.toggleQueryActivator("downloadLogQuery",!1),p.toggleQueryActivator("getPluginVersionsQuery",!1),p.toggleQueryActivator("getPluginConfigJsonQuery",!1),p.toggleQueryActivator("getPluginUpdateQuery",t.value.installPath!==void 0),p.toggleQueryActivator("getPluginLogoQuery",se.value);const{mutateAsync:Je,isPending:We}=p.enablePluginQuery(),{mutateAsync:qe,isPending:Ge}=p.disablePluginQuery(),{mutateAsync:Ke,isPending:Xe}=p.startPluginQuery(),{mutateAsync:Fe,isPending:Ye}=p.stopPluginQuery(),{mutateAsync:Ze,isPending:et}=p.restartPluginQuery(),{mutateAsync:tt,isPending:lt}=p.installPluginQuery(),{mutateAsync:st,isPending:at}=p.uninstallPluginQuery(),{mutate:ot,isPending:nt}=p.patchPluginConfigQuery(),{data:te,isLoading:ne}=p.getPluginVersionsQuery(t.value.pluginName),{data:M,isLoading:it}=p.getPluginUpdateQuery(t.value.pluginName),{data:ie,isLoading:ut}=p.getPluginConfigJsonQuery(t.value.pluginName),{data:rt,isLoading:dt}=p.getPluginLogoQuery(t.value.pluginName),{data:we,isLoading:ct,suspense:pt}=q.downloadLogQuery([`[${t.value.displayName}]`,t.value.pluginName]),mt=W(()=>({fontSize:14,showGutter:!G.value})),gt=W(()=>({fontSize:G.value?12:14})),vt=W(()=>{let s=`width: ${Te.value}; height: ${C.value}; background: ${Qe.value}; border-radius: ${Ae.value};`;return K!=null&&K.value&&(s+=`min-height: ${K.value};`),X!=null&&X.value&&(s+=`max-height: ${X.value};`),F!=null&&F.value&&(s+=`min-width: ${F.value};`),Y!=null&&Y.value&&(s+=`max-width: ${Y.value};`),s}),$=W(()=>Ee.value||We.value||Ge.value||et.value||at.value||lt.value||Xe.value||Ye.value||ut.value),ue=W(()=>v.value.text==="stopped"||v.value.text==="unknown");w(te,()=>{var s;(s=te.value)!=null&&s.versions.length&&(O.value=te.value.versions[0])}),w(t,()=>{he.value=t.value.installedVersion||t.value.latestVersion,L.value=!t.value.disabled},{deep:!0}),w(ie,()=>{ie.value&&(D.value=JSON.stringify(ie.value,null,2))},{deep:!0,immediate:!0}),w($,s=>Se("isLoading",s)),fe.value&&(w(He.orientation,()=>{de()},{deep:!0}),w([be.height,be.width],()=>{de()},{deep:!0})),w(Q,s=>{p.toggleQueryActivator("getPluginConfigJsonQuery",s)}),w(T,s=>{p.toggleQueryActivator("getPluginVersionsQuery",s)}),w(S,s=>{re(s),s||setTimeout(()=>{oe.value=!1},300)}),w(G,()=>{ft()});const xe=s=>{switch(s){case b.ERROR:v.value.color="#9d5752";break;case b.STARTING:v.value.color="orange",L.value=!0;break;case b.READY:v.value.color="yellow",L.value=!0;break;case b.STARTED:v.value.color="green",L.value=!0;break;case b.STOPPED:v.value.color="red";break;case b.DISABLED:v.value.color="transparent";break;case b.UNKNOWN:v.value.color="gray";break;default:v.value.color="gray";break}},re=s=>{var l,_,I,P,H,a,f;s?(N.value=me.connectToNamespace("/logs"),(l=N.value)==null||l.socket.on(`stdout/${t.value.pluginName}`,h=>{var J;(J=E.value)==null||J.writeTerminal(h)}),(_=N.value)==null||_.socket.on("stdout",h=>{var J;(J=E.value)==null||J.writeTerminal(h)}),(I=N.value)==null||I.socket.on("disconnect",()=>{var h;(h=E.value)==null||h.writeTerminal(`
|
|
2
|
-
\rWebsocket failed to connect! Is the server running?
|
|
3
|
-
\r
|
|
4
|
-
\r`)}),(P=N.value)==null||P.socket.on("clear-log",()=>{var h;(h=E.value)==null||h.clearTerminal()}),ae.value||(H=N.value)==null||H.socket.emit("get-log",[`[${t.value.displayName}]`,t.value.pluginName])):(f=(a=N.value)==null?void 0:a.end)==null||f.call(a)},ft=()=>{S.value&&(re(!1),re(!0))},de=()=>{const s=document.querySelector(`[data-truncate-text='${ye.value}']`);let l=t.value.description||s.innerText;s.innerText=l||"";const _=C!=null&&C.value?parseInt(C==null?void 0:C.value,10):Me.height.value,I=2*20,a=_-I-28-28;for(;s.scrollHeight>a&&l.includes(" ");)l=l.substring(0,l.lastIndexOf(" ")),s.innerText=l+"..."},ce=async(s="latest")=>{ae.value=!0,T.value=!1,oe.value=!0,t.value.installedVersion!==s&&(S.value=!0,await tt({pluginData:{pluginname:t.value.pluginName,pluginversion:s}}),he.value=t.value.installedVersion||t.value.latestVersion,ae.value=!1)},yt=async()=>{j.value=!1,await st({pluginName:t.value.pluginName,removeStorage:ee.value})},ht=async()=>{A.value=!1,await Ze({pluginName:t.value.pluginName})},_t=async()=>{let s;try{s=JSON.parse(D.value)}catch(l){console.error(l.message),Gt.error(l.message);return}ot({pluginName:t.value.pluginName,configData:s},{onSuccess:()=>{Q.value=!1}})},bt=async()=>{try{if(q.toggleQueryActivator("downloadLogQuery",!0),await pt(),we.value){const s=we.value,l=window.URL.createObjectURL(new Blob([s])),_=document.createElement("a");_.href=l,_.setAttribute("download",`${t.value.pluginName}.log.txt`),document.body.appendChild(_),_.click(),_.remove()}}finally{q.toggleQueryActivator("downloadLogQuery",!1)}};return zt(()=>{if(ve.value){if(Z.value=me.getExistingNamespace("/plugins"),!Z.value)throw new Error("Not connected to plugins!");Z.value.request("get-plugin-status",t.value.pluginName).subscribe(s=>{v.value.text=s.status,xe(s.status)}),Z.value.socket.on(`plugin-status-${t.value.pluginName}`,s=>{console.log(s),v.value.text=s.status,xe(s.status)})}}),Qt(()=>{fe.value&&de()}),(s,l)=>{const _=$t,I=At("router-link"),P=Ct,H=wt;return r(),x("div",{ref_key:"pluginCard",ref:_e,class:"inner-component mt-0 flex flex-col w-full h-full p-5",style:B(e(vt))},[i("div",pl,[e(se)?(r(),x("div",ml,[i("div",gl,[i("div",{class:"plugin-type flex items-center justify-center",style:B({background:e(t).isPython?"var(--background-inner-component)":"#f7df1c"})},[n(y,{size:15,style:B({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)]),n(ll,{size:"50",style:{border:"1px solid rgba(var(--color-rgb), 0.15)"}},{default:o(()=>[e(dt)?d("",!0):(r(),g(_,{key:0,src:`data:image/png;base64,${e(rt)}`,"error-height":70,"spinner-size":20,"spinner-width":3},null,8,["src"])),n(pe,{size:"20",width:"3",color:"#df2a4c",indeterminate:""})]),_:1})])):d("",!0),i("div",vl,[i("div",fl,[n(I,{to:e(t).installPath?`/plugins/${e(t).pluginName}`:"",class:"text-lg font-semibold truncate mr-1"},{default:o(()=>[m(u(e(t).displayName),1)]),_:1},8,["to"]),e(t).installPath&&e(it)?(r(),x("div",yl,[n(pe,{size:"12",width:"2",color:"#df2a4c",indeterminate:""})])):d("",!0),e(t).installPath&&e(Ue)?Tt((r(),g(y,{key:1,size:"15",color:"success",class:"mx-1"},{default:o(()=>[m(u(e(Rt)),1)]),_:1})),[[sl,s.$t("components.plugin_card.installed")]]):d("",!0),n($e,{text:s.$t("components.plugin_card.update_available"),location:"top"},{activator:o(({props:a})=>{var f;return[(f=e(M))!=null&&f.updateAvailable?(r(),g(y,le({key:0},a,{size:"17",color:"green",class:"mx-1"}),{default:o(()=>[m(u(e(ke)),1)]),_:2},1040)):d("",!0)]}),_:1},8,["text"]),i("div",hl,[e($)&&e(ge)?(r(),x("div",_l,[n(pe,{color:"#df2a4c",indeterminate:"",size:"15",width:"2"})])):e(ge)?(r(),g(e(qt),{key:1,modelValue:e(L),"onUpdate:modelValue":l[0]||(l[0]=a=>V(L)?L.value=a:null),class:"toggle-primary",onChange:l[1]||(l[1]=a=>a?e(Je)({pluginName:e(t).pluginName}):e(qe)({pluginName:e(t).pluginName}))},null,8,["modelValue"])):d("",!0)])]),i("div",bl,[i("p",{class:"text-sm",style:{color:"var(--color-disabled)"},"data-truncate-text":e(ye)},u(e(t).description||s.$t("components.plugin_card.no_description")),9,wl)])])]),i("div",xl,[i("div",kl,[e(se)?d("",!0):(r(),x("div",{key:0,class:"plugin-type flex items-center justify-center mr-2",style:B({background:e(t).isPython?"var(--background-inner-component)":"#f7df1c"})},[n(y,{size:15,style:B({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)),n(al,{class:"mr-1 flex items-center justify-center",size:"x-small",onClick:l[2]||(l[2]=k(a=>{var f;return s.$router.absUrl((f=e(t).links)==null?void 0:f.homepage)},["prevent"]))},{default:o(()=>[i("span",Pl,"v"+u(e(t).installedVersion||e(t).latestVersion),1),n(y,{size:"12",class:"ml-1"},{default:o(()=>[m(u(e(Dt)),1)]),_:1})]),_:1})]),Vl,e(ve)&&e(v).text!==e(b).DISABLED&&e(v).text!==e(b).UNKNOWN?(r(),g($e,{key:0,location:"top",text:s.$t(`components.plugin_card.status_${e(v).text}`)},{activator:o(({props:a})=>[n(Ce,le(a,{color:e(v).color,dot:"",inline:""}),null,16,["color"])]),_:1},8,["text"])):d("",!0),e(De)?(r(),g(U,{key:1,class:"disabled-text",size:"28",rounded:"",density:"compact",variant:"text",onClick:l[3]||(l[3]=k(a=>S.value=!0,["prevent"]))},{default:o(()=>[n(y,{size:"20"},{default:o(()=>[m(u(e(Ot)),1)]),_:1})]),_:1})):d("",!0),e(Oe)?(r(),g(U,{key:2,class:"disabled-text",size:"28",rounded:"",density:"compact",variant:"text",disabled:e($),onClick:l[4]||(l[4]=k(a=>Q.value=!0,["prevent"]))},{default:o(()=>[n(y,{size:"20"},{default:o(()=>[m(u(e(jt)),1)]),_:1})]),_:1},8,["disabled"])):d("",!0),e(Re)?(r(),g(U,{key:3,class:"disabled-text",size:"28",rounded:"",density:"compact",variant:"text",disabled:e($),onClick:l[5]||(l[5]=k(a=>A.value=!0,["prevent"]))},{default:o(()=>[n(y,{size:"20"},{default:o(()=>[m(u(e(Pe)),1)]),_:1})]),_:1},8,["disabled"])):d("",!0),e(Ie)||e(t).installPath?(r(),g(nl,{key:4,offset:"2"},{activator:o(({props:a})=>{var f;return[(f=e(M))!=null&&f.updateAvailable?(r(),g(Ce,{key:0,dot:"",color:"red","offset-x":"2","offset-y":"2"},{default:o(()=>[n(U,le({class:"disabled-text"},a,{size:"28",rounded:"",density:"compact",variant:"text",disabled:e($)}),{default:o(()=>[n(y,{size:"20"},{default:o(()=>[m(u(e(Ve)),1)]),_:1})]),_:2},1040,["disabled"])]),_:2},1024)):(r(),g(U,le({key:1,class:"disabled-text"},a,{size:"28",rounded:"",density:"compact",variant:"text",disabled:e($)}),{default:o(()=>[n(y,{size:"20"},{default:o(()=>[m(u(e(Ve)),1)]),_:1})]),_:2},1040,["disabled"]))]}),default:o(()=>[n(ol,{width:"200",style:{border:"1px solid var(--background-timeline)","border-radius":"10px"},elevation:"3"},{default:o(()=>{var a,f;return[i("div",$l,[e(t).installPath&&((a=e(M))!=null&&a.updateAvailable)?(r(),g(z,{key:0,style:{"border-radius":"5px !important"},onClick:l[6]||(l[6]=k(h=>ce(e(M).latestVersion),["prevent"]))},{default:o(()=>[i("div",Cl,[i("div",Nl,[n(y,{size:"20",class:"text-passive"},{default:o(()=>[m(u(e(ke)),1)]),_:1})]),i("span",Ll,u(s.$t("components.plugin_card.update")),1)])]),_:1})):d("",!0),e(t).installPath&&((f=e(M))!=null&&f.updateAvailable)?(r(),x("div",Sl)):d("",!0),n(z,{to:e(t).installPath?`/plugins/${e(t).pluginName}`:"",style:{"border-radius":"5px !important"}},{default:o(()=>[i("div",zl,[i("div",Ql,[n(y,{size:"20",class:"text-passive"},{default:o(()=>[m(u(e(Et)),1)]),_:1})]),i("span",Al,u(s.$t("components.plugin_card.settings")),1)])]),_:1},8,["to"]),e(t).installPath?(r(),x("div",Tl)):d("",!0),n(z,{disabled:e(t).private,style:{"border-radius":"5px !important"},onClick:l[7]||(l[7]=k(h=>T.value=!0,["prevent"]))},{default:o(()=>[i("div",Il,[i("div",Bl,[n(y,{size:"20",class:"text-passive"},{default:o(()=>[m(u(e(Mt)),1)]),_:1})]),i("span",Ul,u(s.$t("components.plugin_card.select_version")),1)])]),_:1},8,["disabled"]),e(t).installPath?(r(),x("div",Rl)):d("",!0),e(t).installPath?(r(),g(z,{key:4,disabled:e(t).disabled,style:{"border-radius":"5px !important"},onClick:l[8]||(l[8]=k(h=>e(ue)?e(Ke)({pluginName:e(t).pluginName}):e(Fe)({pluginName:e(t).pluginName}),["prevent"]))},{default:o(()=>[i("div",Dl,[i("div",Ol,[n(y,{size:"20",class:"text-passive"},{default:o(()=>[m(u(e(ue)?e(Ht):e(Jt)),1)]),_:1})]),i("span",jl,u(e(ue)?s.$t("components.plugin_card.start"):s.$t("components.plugin_card.stop")),1)])]),_:1},8,["disabled"])):d("",!0),e(t).installPath?(r(),x("div",El)):d("",!0),e(t).installPath?(r(),g(z,{key:6,style:{"border-radius":"5px !important"},disabled:e(t).disabled,onClick:l[9]||(l[9]=k(h=>A.value=!0,["prevent"]))},{default:o(()=>[i("div",Ml,[i("div",Hl,[n(y,{size:"20",class:"text-passive"},{default:o(()=>[m(u(e(Pe)),1)]),_:1})]),i("span",Jl,u(s.$t("components.plugin_card.restart")),1)])]),_:1},8,["disabled"])):d("",!0),e(t).installPath?(r(),x("div",Wl)):d("",!0),e(t).installPath?(r(),g(z,{key:8,style:{color:"#ef4444 !important","border-radius":"5px !important"},onClick:l[10]||(l[10]=k(h=>j.value=!0,["prevent"]))},{default:o(()=>[i("div",ql,[i("div",Gl,[n(y,{size:"20",color:"red"},{default:o(()=>[m(u(e(Wt)),1)]),_:1})]),i("span",Kl,u(s.$t("components.plugin_card.uninstall")),1)])]),_:1})):d("",!0)])]}),_:1})]),_:1})):e(Be)?(r(),g(U,{key:5,class:"disabled-text",density:"compact",color:"#df2a4c",variant:"flat",disabled:e($),onClick:l[11]||(l[11]=k(a=>ce(),["prevent"]))},{default:o(()=>[i("span",Xl,u(s.$t("components.form.button.install")),1)]),_:1},8,["disabled"])):d("",!0)]),n(P,{modelValue:e(A),"onUpdate:modelValue":l[12]||(l[12]=a=>V(A)?A.value=a:null),title:s.$t("components.dialog.title.confirm"),"confirm-text":"components.form.button.restart",onConfirm:l[13]||(l[13]=a=>ht())},{content:o(()=>[i("span",null,u(s.$t("components.dialog.message.confirm_restart_plugin")),1)]),_:1},8,["modelValue","title"]),n(P,{modelValue:e(j),"onUpdate:modelValue":l[15]||(l[15]=a=>V(j)?j.value=a:null),title:s.$t("components.dialog.title.confirm"),"confirm-text":"components.form.button.uninstall",onConfirm:l[16]||(l[16]=a=>yt())},{content:o(()=>[i("span",null,u(s.$t("components.dialog.message.confirm_uninstall_plugin")),1),n(z,{class:"px-0 mt-3"},{prepend:o(()=>[n(il,{start:""},{default:o(()=>[n(ul,{modelValue:e(ee),"onUpdate:modelValue":l[14]||(l[14]=a=>V(ee)?ee.value=a:null),color:"#df2a4c"},null,8,["modelValue"])]),_:1})]),default:o(()=>[n(rl,null,{default:o(()=>[m(u(s.$t("components.form.label.remove_storage")),1)]),_:1})]),_:1})]),_:1},8,["modelValue","title"]),n(P,{modelValue:e(T),"onUpdate:modelValue":l[18]||(l[18]=a=>V(T)?T.value=a:null),title:s.$t("components.dialog.title.install_plugin"),"confirm-text":"components.form.button.install",loading:e(ne),onConfirm:l[19]||(l[19]=a=>ce(e(O)))},{content:o(()=>{var a;return[i("label",Fl,u(s.$t("components.form.label.plugin_version")),1),n(dl,{modelValue:e(O),"onUpdate:modelValue":l[17]||(l[17]=f=>V(O)?O.value=f:null),"hide-details":"",solo:"",variant:"outlined",density:"compact",items:((a=e(te))==null?void 0:a.versions)||[],disabled:e(ne),loading:e(ne)},null,8,["modelValue","items","disabled","loading"])]}),_:1},8,["modelValue","title","loading"]),n(P,{modelValue:e(S),"onUpdate:modelValue":l[20]||(l[20]=a=>V(S)?S.value=a:null),title:s.$t("components.dialog.title.plugin_log"),"confirm-text":"components.form.button.download",loading:e(ct),"fullscreen-content":"","hide-confirm-button":e(oe),onConfirm:l[21]||(l[21]=a=>bt())},{content:o(()=>[n(Ft,{ref_key:"consoleRef",ref:E,class:"text-editor",options:e(gt)},null,8,["options"])]),_:1},8,["modelValue","title","loading","hide-confirm-button"]),n(P,{modelValue:e(Q),"onUpdate:modelValue":l[23]||(l[23]=a=>V(Q)?Q.value=a:null),title:s.$t("components.dialog.title.plugin_config"),loading:e(nt),"fullscreen-content":"",onConfirm:l[24]||(l[24]=a=>_t())},{content:o(()=>[(r(),g(It,null,{default:o(()=>[n(H,{modelValue:e(D),"onUpdate:modelValue":l[22]||(l[22]=a=>V(D)?D.value=a:null),lang:"json",theme:e(je),options:e(mt),"read-only":e($),class:"config-editor",style:B(e(G)?"height: 100%":"height: 400px")},null,8,["modelValue","theme","options","read-only","style"])]),_:1}))]),_:1},8,["modelValue","title","loading"])],4)}}}),cs=Nt(Yl,[["__scopeId","data-v-9d017608"]]);export{cs as _};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.plugin-card[data-v-9d017608]{box-shadow:0 3px 1px -2px #0000000f,0 2px 2px #00000014,0 1px 5px #0000000d;border:1px solid rgba(var(--color-rgb),0)}.truncate-box[data-v-9d017608]{max-height:100px;overflow:hidden;position:relative}.toggle-primary[data-v-9d017608]{--toggle-bg-on: #df2a4c;--toggle-border-on: #df2a4c;--toggle-bg-on-disabled: #df2a4c;--toggle-border-on-disabled: #df2a4c;--toggle-bg-off: var(--toggle-off-color);--toggle-border-off: transparent;--toggle-bg-off-disabled: var(--toggle-off-color);--toggle-border-off-disabled: var(--toggle-off-color)}.toggle-container[data-v-9d017608]:focus{box-shadow:none!important}.text-editor[data-v-9d017608]{height:100%;z-index:1;background:none!important}.config-editor[data-v-9d017608]{z-index:1;background:var(--background)!important}.plugin-type[data-v-9d017608]{width:20px;height:20px;border-radius:50%;border:2px solid var(--background-inner-component);overflow:hidden}
|