@acedatacloud/nexior 2.11.21 → 2.11.22
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/assets/{Auth.82127628.js → Auth.8b0c2431.js} +1 -1
- package/dist/assets/Buy.0f17fdce.css +1 -0
- package/dist/assets/{Buy.92a8811a.js → Buy.8d42f113.js} +1 -1
- package/dist/assets/Buy.f7008382.js +1 -0
- package/dist/assets/{Callback.e7364366.js → Callback.3e4722a3.js} +1 -1
- package/dist/assets/{Chatdoc.092baa8c.js → Chatdoc.f5571b0d.js} +1 -1
- package/dist/assets/{Console.97738886.js → Console.47ee67f1.js} +1 -1
- package/dist/assets/{Conversation.70597ab3.js → Conversation.bdee5d8a.js} +1 -1
- package/dist/assets/{Conversation.5fea1fac.js → Conversation.e2e15da4.js} +1 -1
- package/dist/assets/{CopyToClipboard.ad2791a9.js → CopyToClipboard.4009fed9.js} +1 -1
- package/dist/assets/{DarkSelector.dd0030a7.js → DarkSelector.5b80f35d.js} +1 -1
- package/dist/assets/{Detail.dc101aa8.js → Detail.b1e193d5.js} +1 -1
- package/dist/assets/{History.7716cf21.js → History.2748fe34.js} +1 -1
- package/dist/assets/{Index.e2310d6d.js → Index.19e5fed1.js} +1 -1
- package/dist/assets/{Index.db4b0137.js → Index.523815c6.js} +1 -1
- package/dist/assets/{Index.6ecd0126.js → Index.8291421a.js} +1 -1
- package/dist/assets/{Index.dc2d0ae7.js → Index.966bf3db.js} +1 -1
- package/dist/assets/{Index.be07c94d.js → Index.a3c75b5e.js} +1 -1
- package/dist/assets/{Index.4c40ba82.js → Index.bd3aceb4.js} +1 -1
- package/dist/assets/{Index.526798c6.js → Index.c29b4386.js} +1 -1
- package/dist/assets/{Index.51cf3985.js → Index.c6f255d3.js} +1 -1
- package/dist/assets/{Index.13941423.js → Index.cafa6bce.js} +1 -1
- package/dist/assets/{Index.f3f58f4d.js → Index.d8020b3f.js} +1 -1
- package/dist/assets/{InfoIcon.d2744757.js → InfoIcon.258c265e.js} +1 -1
- package/dist/assets/{Invitees.e7102877.js → Invitees.1bec6310.js} +1 -1
- package/dist/assets/{List.3a6e5c01.js → List.486f62b8.js} +1 -1
- package/dist/assets/{List.0ef7a19c.js → List.53cc9f23.js} +1 -1
- package/dist/assets/{List.e96867e8.js → List.dc9f5129.js} +1 -1
- package/dist/assets/{Login.e95afdc1.js → Login.2d2aa036.js} +1 -1
- package/dist/assets/{Main.0afe53e3.js → Main.b1f63260.js} +1 -1
- package/dist/assets/{Manage.a7c46af8.js → Manage.a744857c.js} +1 -1
- package/dist/assets/{MarkdownRenderer.eef4e8f7.js → MarkdownRenderer.aaca92e2.js} +1 -1
- package/dist/assets/{Navigator.dd446295.js → Navigator.bfc79e31.js} +1 -1
- package/dist/assets/{Pagination.e0013143.js → Pagination.0949a43f.js} +1 -1
- package/dist/assets/{Setting.a3cd7903.js → Setting.a05db11c.js} +1 -1
- package/dist/assets/{Status.7d78acec.js → Status.11b67b9e.js} +1 -1
- package/dist/assets/{distribution.71254b47.js → distribution.7d379c5b.js} +1 -1
- package/dist/assets/{index.583f4c00.js → index.cf1347fe.js} +1 -1
- package/dist/assets/{order.0f6c0fc4.js → order.3b98b177.js} +1 -1
- package/dist/assets/{price.ee2c55d2.js → price.95e59e83.js} +1 -1
- package/dist/index.html +1 -1
- package/package.json +1 -1
- package/dist/assets/Buy.69dd86b0.css +0 -1
- package/dist/assets/Buy.aebf716a.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
var Ue=Object.defineProperty,Ce=Object.defineProperties;var Pe=Object.getOwnPropertyDescriptors;var ke=Object.getOwnPropertySymbols;var Le=Object.prototype.hasOwnProperty,Ne=Object.prototype.propertyIsEnumerable;var Ie=(e,t,o)=>t in e?Ue(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,w=(e,t)=>{for(var o in t||(t={}))Le.call(t,o)&&Ie(e,o,t[o]);if(ke)for(var o of ke(t))Ne.call(t,o)&&Ie(e,o,t[o]);return e},k=(e,t)=>Ce(e,Pe(t));import{J as Ee}from"./vendor-others.4f34a866.js";import{am as Q}from"./vendor-fortawesome.0d1d9585.js";import{_ as I,ar as Ae,as as Te,at as Ge,H as W,T as J,z as Re,au as De}from"./index.583f4c00.js";import{P as ze,l as D,T as X,O as Y,M as y,N as Oe,s as Fe,F as je,u as qe,C as Be,R as Me}from"./vendor-element-plus.ddf5f024.js";import{H as V,al as n,o as r,e as p,f as a,I as K,V as s,M as m,U as i,T as g,L as A,S as h,Q as H,W as Ve,ai as Se}from"./vendor-@vue.853aef6d.js";import{I as R}from"./InfoIcon.d2744757.js";import{A as He,i as Je,h as Ke}from"./Status.7d78acec.js";import{C as Qe}from"./CopyToClipboard.ad2791a9.js";import"./vendor-axios.168e6950.js";import"./vendor-qrcode.452c7ca7.js";const We=V({name:"LayoutLuma",components:{ElDrawer:ze,ElButton:D,FontAwesomeIcon:Q},data(){return{drawer:!1}}}),Xe={class:"main"},Ye={class:"config"},Ze={class:"result"};function xe(e,t,o,l,f,v){const c=n("font-awesome-icon"),u=n("el-button"),d=n("el-drawer");return r(),p("div",Xe,[a("div",Ye,[K(e.$slots,"config",{},void 0,!0)]),a("div",Ze,[K(e.$slots,"result",{},void 0,!0)]),s(u,{round:"",class:"menu",onClick:t[0]||(t[0]=_=>e.drawer=!0)},{default:m(()=>[s(c,{icon:"fa-solid fa-gear",class:"icon-menu"})]),_:1}),s(d,{modelValue:e.drawer,"onUpdate:modelValue":t[1]||(t[1]=_=>e.drawer=_),"with-header":!1,size:"340px",class:"drawer"},{default:m(()=>[K(e.$slots,"config",{},void 0,!0)]),_:3},8,["modelValue"])])}var et=I(We,[["render",xe],["__scopeId","data-v-234cfb9c"],["__file","/home/runner/work/Nexior/Nexior/src/layouts/Luma.vue"]]);const tt=V({name:"EnhancementSelector",components:{ElSwitch:X,InfoIcon:R},computed:{value:{get(){var e,t;return(t=(e=this.$store.state.luma)==null?void 0:e.config)==null?void 0:t.enhancement},set(e){var t;console.debug("set enhancement",e),this.$store.commit("luma/setConfig",k(w({},(t=this.$store.state.luma)==null?void 0:t.config),{enhancement:e}))}}},mounted(){this.value===void 0&&(this.value=Ae)}}),ot={class:"field"},st={class:"title"};function nt(e,t,o,l,f,v){const c=n("el-switch"),u=n("info-icon");return r(),p("div",ot,[a("h2",st,i(e.$t("luma.name.enhancement")),1),s(c,{modelValue:e.value,"onUpdate:modelValue":t[0]||(t[0]=d=>e.value=d),class:"value"},null,8,["modelValue"]),s(u,{content:e.$t("luma.description.enhancement"),class:"info"},null,8,["content"])])}var at=I(tt,[["render",nt],["__scopeId","data-v-175365a0"],["__file","/home/runner/work/Nexior/Nexior/src/components/luma/config/EnhancementSelector.vue"]]);const lt=V({name:"CustomSelector",components:{ElSwitch:X,InfoIcon:R},computed:{value:{get(){var e,t;return(t=(e=this.$store.state.luma)==null?void 0:e.config)==null?void 0:t.custom},set(e){var t;console.debug("set custom",e),this.$store.commit("luma/setConfig",k(w({},(t=this.$store.state.luma)==null?void 0:t.config),{custom:e}))}}},mounted(){this.value===void 0&&(this.value=Te)}}),it={class:"field"},rt={class:"title"};function ct(e,t,o,l,f,v){const c=n("el-switch"),u=n("info-icon");return r(),p("div",it,[a("h2",rt,i(e.$t("luma.name.custom")),1),s(c,{modelValue:e.value,"onUpdate:modelValue":t[0]||(t[0]=d=>e.value=d),class:"value"},null,8,["modelValue"]),s(u,{content:e.$t("luma.description.custom"),class:"info"},null,8,["content"])])}var ut=I(lt,[["render",ct],["__scopeId","data-v-5ac2addb"],["__file","/home/runner/work/Nexior/Nexior/src/components/luma/config/CustomSelector.vue"]]);const dt=V({name:"LoopSelector",components:{ElSwitch:X,InfoIcon:R},computed:{value:{get(){var e,t;return(t=(e=this.$store.state.luma)==null?void 0:e.config)==null?void 0:t.loop},set(e){var t;console.debug("set loop",e),this.$store.commit("luma/setConfig",k(w({},(t=this.$store.state.luma)==null?void 0:t.config),{loop:e}))}}},mounted(){this.value===void 0&&(this.value=Ge)}}),mt={class:"field"},pt={class:"title"};function _t(e,t,o,l,f,v){const c=n("el-switch"),u=n("info-icon");return r(),p("div",mt,[a("h2",pt,i(e.$t("luma.name.loop")),1),s(c,{modelValue:e.value,"onUpdate:modelValue":t[0]||(t[0]=d=>e.value=d),class:"value"},null,8,["modelValue"]),s(u,{content:e.$t("luma.description.loop"),class:"info"},null,8,["content"])])}var ft=I(dt,[["render",_t],["__scopeId","data-v-69cccd4e"],["__file","/home/runner/work/Nexior/Nexior/src/components/luma/config/LoopSelector.vue"]]);const ht=V({name:"ContentInput",components:{ElUpload:Y,ElButton:D,InfoIcon:R},data(){return{fileList:[],uploadUrl:W()+"/api/v1/files/"}},computed:{headers(){return{Authorization:`Bearer ${this.$store.state.token.access}`}},urls(){return this.fileList.map(e=>{var t;return(t=e==null?void 0:e.response)==null?void 0:t.file_url})},value:{get(){var e,t;return(t=(e=this.$store.state.luma)==null?void 0:e.config)==null?void 0:t.end_image_url},set(e){var o,l;const t=(o=this.urls)==null?void 0:o[0];this.$store.commit("luma/setConfig",k(w({},(l=this.$store.state.luma)==null?void 0:l.config),{end_image_url:t}))}}},mounted(){this.value||(this.value=void 0),this.onSetEndImageUrl()},methods:{onExceed(){y.warning(this.$t("luma.message.uploadEndImageExceed"))},onError(){y.error(this.$t("luma.message.uploadEndImageError"))},onSetEndImageUrl(){var t,o;const e=(t=this.urls)==null?void 0:t[0];this.$store.commit("luma/setConfig",k(w({},(o=this.$store.state.luma)==null?void 0:o.config),{end_image_url:e}))},async onSuccess(){this.onSetEndImageUrl()}}}),vt={class:"field"},gt={class:"title"},$t={class:"upload-wrapper"};function yt(e,t,o,l,f,v){const c=n("el-button"),u=n("el-upload"),d=n("info-icon");return r(),p("div",vt,[a("h2",gt,i(e.$t("luma.name.endImageUrl")),1),a("div",$t,[s(u,{"file-list":e.fileList,"onUpdate:file-list":t[0]||(t[0]=_=>e.fileList=_),accept:".png,.jpg,.jpeg,.gif,.bmp,.webp",name:"file",class:"value","show-file-list":!0,limit:1,multiple:!1,action:e.uploadUrl,"on-exceed":e.onExceed,"on-error":e.onError,"on-success":e.onSuccess,headers:e.headers},{default:m(()=>[s(c,{size:"small",type:"primary",round:""},{default:m(()=>[g(i(e.$t("luma.button.uploadEndImageUrl")),1)]),_:1})]),_:1},8,["file-list","action","on-exceed","on-error","on-success","headers"])]),s(d,{content:e.$t("luma.description.endImageUrl"),class:"info"},null,8,["content"])])}var bt=I(ht,[["render",yt],["__scopeId","data-v-97900bb4"],["__file","/home/runner/work/Nexior/Nexior/src/components/luma/config/EndImageUrlInput.vue"]]);const wt=V({name:"StartImageUrlInput",components:{ElUpload:Y,ElButton:D,InfoIcon:R},data(){return{fileList:[],uploadUrl:W()+"/api/v1/files/"}},computed:{headers(){return{Authorization:`Bearer ${this.$store.state.token.access}`}},urls(){return this.fileList.map(e=>{var t;return(t=e==null?void 0:e.response)==null?void 0:t.file_url})},value:{get(){var e,t;return(t=(e=this.$store.state.luma)==null?void 0:e.config)==null?void 0:t.start_image_url},set(e){var o,l;const t=(o=this.urls)==null?void 0:o[0];this.$store.commit("luma/setConfig",k(w({},(l=this.$store.state.luma)==null?void 0:l.config),{start_image_url:t}))}}},mounted(){this.value||(this.value=void 0),this.onSetStartImageUrl()},methods:{onExceed(){y.warning(this.$t("luma.message.uploadStartImageExceed"))},onError(){y.error(this.$t("luma.message.uploadStartImageError"))},async onRemove(){y.error(this.$t("luma.message.uploadStartImageError"))},onSetStartImageUrl(){var t,o;const e=(t=this.urls)==null?void 0:t[0];this.$store.commit("luma/setConfig",k(w({},(o=this.$store.state.luma)==null?void 0:o.config),{start_image_url:e}))},async onSuccess(){this.onSetStartImageUrl()}}}),kt={class:"field"},It={class:"title"},Vt={class:"upload-wrapper"};function St(e,t,o,l,f,v){const c=n("el-button"),u=n("el-upload"),d=n("info-icon");return r(),p("div",kt,[a("h2",It,i(e.$t("luma.name.startImageUrl")),1),a("div",Vt,[s(u,{"file-list":e.fileList,"onUpdate:file-list":t[0]||(t[0]=_=>e.fileList=_),accept:".png,.jpg,.jpeg,.gif,.bmp,.webp",name:"file",class:"value","show-file-list":!0,limit:1,multiple:!1,action:e.uploadUrl,"on-exceed":e.onExceed,"on-error":e.onError,"on-remove":e.onRemove,"on-success":e.onSuccess,headers:e.headers},{default:m(()=>[s(c,{size:"small",type:"primary",round:""},{default:m(()=>[g(i(e.$t("luma.button.uploadStartImageUrl")),1)]),_:1})]),_:1},8,["file-list","action","on-exceed","on-error","on-remove","on-success","headers"])]),s(d,{content:e.$t("luma.description.startImageUrl"),class:"info"},null,8,["content"])])}var Et=I(wt,[["render",St],["__scopeId","data-v-5440a4bf"],["__file","/home/runner/work/Nexior/Nexior/src/components/luma/config/StartImageUrlInput.vue"]]);const Ut=V({name:"UploadVideo",components:{ElUpload:Y,ElButton:D,InfoIcon:R},data(){return{fileList:[],uploadUrl:W()+"/api/v1/files/"}},computed:{headers(){return{Authorization:`Bearer ${this.$store.state.token.access}`}},urls(){return this.fileList.map(e=>{var t;return(t=e==null?void 0:e.response)==null?void 0:t.file_url})},value:{get(){var e,t;return(t=(e=this.$store.state.luma)==null?void 0:e.config)==null?void 0:t.video_url},set(e){var o,l;const t=(o=this.urls)==null?void 0:o[0];this.$store.commit("luma/setConfig",k(w({},(l=this.$store.state.luma)==null?void 0:l.config),{video_url:t}))}}},mounted(){this.value||(this.value=void 0),this.onSetVideoUrl()},methods:{onExceed(){y.warning(this.$t("luma.message.uploadVideoExceed"))},onError(){y.error(this.$t("luma.message.uploadVideoError"))},beforeUpload(e){const t=e.type==="video/mp4",o=e.size/1024/1024<10;return t?o?!0:(y.error(this.$t("luma.message.uploadVideoSizeExceed")),!1):(y.error(this.$t("luma.message.uploadVideoTypeFailed")),!1)},onSetVideoUrl(){var t,o;const e=(t=this.urls)==null?void 0:t[0];this.$store.commit("luma/setConfig",k(w({},(o=this.$store.state.luma)==null?void 0:o.config),{video_url:e,action:"extend"}))},async onSuccess(){this.onSetVideoUrl()}}}),Ct={class:"field"},Pt={class:"title"},Lt={class:"upload-wrapper"};function Nt(e,t,o,l,f,v){const c=n("el-button"),u=n("el-upload"),d=n("info-icon");return r(),p("div",Ct,[a("h2",Pt,i(e.$t("luma.name.videoUrl")),1),a("div",Lt,[s(u,{"file-list":e.fileList,"onUpdate:file-list":t[0]||(t[0]=_=>e.fileList=_),accept:".mp4",name:"file",class:"value","show-file-list":!0,limit:1,multiple:!1,action:e.uploadUrl,"before-upload":e.beforeUpload,"on-exceed":e.onExceed,"on-error":e.onError,"on-success":e.onSuccess,headers:e.headers},{default:m(()=>[s(c,{size:"small",type:"primary",round:""},{default:m(()=>[g(i(e.$t("luma.button.uploadVideoUrl")),1)]),_:1})]),_:1},8,["file-list","action","before-upload","on-exceed","on-error","on-success","headers"])]),s(d,{content:e.$t("luma.description.videoUrl"),class:"info"},null,8,["content"])])}var At=I(Ut,[["render",Nt],["__scopeId","data-v-46c66c9f"],["__file","/home/runner/work/Nexior/Nexior/src/components/luma/config/UploadVideo.vue"]]);const Tt="",Gt=V({name:"PromptInput",components:{ElInput:Oe,InfoIcon:R},computed:{prompt:{get(){var e,t;return(t=(e=this.$store.state.luma)==null?void 0:e.config)==null?void 0:t.prompt},set(e){var t;console.debug("set prompt",e),this.$store.commit("luma/setConfig",k(w({},(t=this.$store.state.luma)==null?void 0:t.config),{prompt:e}))}}},mounted(){this.value||(this.value=Tt)}}),Rt={class:"field"},Dt={class:"box"},zt={class:"title"};function Ot(e,t,o,l,f,v){const c=n("info-icon"),u=n("el-input");return r(),p("div",Rt,[a("div",Dt,[a("h2",zt,i(e.$t("luma.name.prompt")),1),s(c,{content:e.$t("luma.description.prompt"),class:"info"},null,8,["content"])]),s(u,{modelValue:e.prompt,"onUpdate:modelValue":t[0]||(t[0]=d=>e.prompt=d),rows:3,type:"textarea",class:"prompt",placeholder:e.$t("luma.placeholder.prompt"),maxlength:300,"show-word-limit":""},null,8,["modelValue","placeholder"])])}var Ft=I(Gt,[["render",Ot],["__scopeId","data-v-19a7446b"],["__file","/home/runner/work/Nexior/Nexior/src/components/luma/config/PromptInput.vue"]]);const jt=V({name:"ExtendFromInput",components:{VuePlyr:Ee},props:{modelValue:{type:Object,required:!0}},data(){return{options:{quality:{default:"1080p"}}}},computed:{config(){var e;return(e=this.$store.state.luma)==null?void 0:e.config}}}),qt={class:"field"},Bt={class:"box"},Mt={class:"title"},Ht={class:"task"},Jt=["data-poster"],Kt=["src"];function Qt(e,t,o,l,f,v){const c=n("vue-plyr");return r(),p("div",qt,[a("div",Bt,[a("h2",Mt,i(e.$t("luma.name.extend")),1)]),a("div",Ht,[a("div",null,[s(c,{options:e.options,class:"video"},{default:m(()=>{var u,d;return[a("video",{controls:"",crossorigin:"",playsinline:"","data-poster":(u=e.config)==null?void 0:u.thumbnail_url},[a("source",{size:"1080",src:(d=e.config)==null?void 0:d.video_url,type:"video/mp4"},null,8,Kt)],8,Jt)]}),_:1},8,["options"])])])])}var Wt=I(jt,[["render",Qt],["__scopeId","data-v-1cefb16b"],["__file","/home/runner/work/Nexior/Nexior/src/components/luma/config/ExtendFromInput.vue"]]);const Xt=V({name:"PresetPanel",components:{LoopSelector:ft,StartImageUrlInput:Et,EndImageUrlInput:bt,EnhancementSelector:at,ElButton:D,FontAwesomeIcon:Q,PromptInput:Ft,ExtendFromInput:Wt,CustomSelector:ut,UploadVideo:At},emits:["generate"],computed:{config(){var e;return(e=this.$store.state.luma)==null?void 0:e.config}},methods:{onGenerate(){this.$emit("generate")}}}),Yt={class:"panel"},Zt={class:"config"},xt={class:"actions"};function eo(e,t,o,l,f,v){var N,U,G,z,O,F,j,q,B;const c=n("extend-from-input"),u=n("prompt-input"),d=n("custom-selector"),_=n("upload-video"),$=n("start-image-url-input"),E=n("end-image-url-input"),C=n("enhancement-selector"),T=n("loop-selector"),P=n("font-awesome-icon"),L=n("el-button");return r(),p("div",Yt,[a("div",Zt,[((N=e.config)==null?void 0:N.video_id)||((U=e.config)==null?void 0:U.video_url)?(r(),A(c,{key:0,class:"mb-4"})):h("v-if",!0),s(u,{class:"mb-4"}),(G=e.config)!=null&&G.video_id?h("v-if",!0):(r(),A(d,{key:1,class:"mb-4"})),(z=e.config)!=null&&z.custom?(r(),A(_,{key:2,class:"mb-4"})):h("v-if",!0),!(((O=e.config)==null?void 0:O.video_id)||((F=e.config)==null?void 0:F.video_url))&&!((j=e.config)!=null&&j.custom)?(r(),A($,{key:3,class:"mb-4"})):h("v-if",!0),s(E,{class:"mb-4"}),s(C,{class:"mb-4"}),s(T,{class:"mb-4"}),a("div",xt,[((q=e.config)==null?void 0:q.video_url)!==void 0||((B=e.config)==null?void 0:B.custom)?(r(),A(L,{key:0,type:"primary",class:"btn w-full",round:"",onClick:e.onGenerate},{default:m(()=>[s(P,{icon:"fa-solid fa-magic",class:"mr-2"}),g(" "+i(e.$t("luma.button.extend")),1)]),_:1},8,["onClick"])):(r(),A(L,{key:1,type:"primary",class:"btn w-full",round:"",onClick:e.onGenerate},{default:m(()=>[s(P,{icon:"fa-solid fa-magic",class:"mr-2"}),g(" "+i(e.$t("luma.button.generate")),1)]),_:1},8,["onClick"]))])])])}var to=I(Xt,[["render",eo],["__scopeId","data-v-951b4cc0"],["__file","/home/runner/work/Nexior/Nexior/src/components/luma/ConfigPanel.vue"]]);const oo=V({name:"VideoPlayer",components:{VuePlyr:Ee},props:{modelValue:{type:Object,required:!0}},data(){return{options:{quality:{default:"1080p"}}}}}),so=["data-poster"],no=["src"];function ao(e,t,o,l,f,v){const c=n("vue-plyr");return r(),p("div",null,[s(c,{options:e.options,class:"video"},{default:m(()=>{var u,d,_,$;return[a("video",{controls:"",crossorigin:"",playsinline:"","data-poster":(d=(u=e.modelValue)==null?void 0:u.response)==null?void 0:d.thumbnail_url},[a("source",{size:"1080",src:($=(_=e.modelValue)==null?void 0:_.response)==null?void 0:$.video_url,type:"video/mp4"},null,8,no)],8,so)]}),_:1},8,["options"])])}var lo=I(oo,[["render",ao],["__scopeId","data-v-759e400c"],["__file","/home/runner/work/Nexior/Nexior/src/components/luma/VideoPlayer.vue"]]);const io=V({name:"TaskPreview",components:{ElImage:Fe,CopyToClipboard:Qe,FontAwesomeIcon:Q,ElAlert:je,VideoPlayer:lo,ElTooltip:qe,ElButton:D},props:{modelValue:{type:Object,required:!0}},data(){return{}},computed:{application(){var e;return(e=this.$store.state.luma)==null?void 0:e.application},config(){var e;return(e=this.$store.state.luma)==null?void 0:e.config}},methods:{onExtend(e,t){var o;e.stopPropagation(),console.debug("set config",t),this.$store.commit("luma/setConfig",k(w({},(o=this.$store.state.luma)==null?void 0:o.config),{video_id:t.video_id,prompt:t.prompt,action:"extend",thumbnail_url:t.thumbnail_url,video_url:t.video_url}))},onDownload(e,t){e.stopPropagation(),console.log("on download"),window.open(t,"_blank")},onReload(e){const t=e.target,o=new URL(t.src),l=o.searchParams.get("retry");if(!l)o.searchParams.set("retry","1");else if(parseInt(l)<2)o.searchParams.set("retry",(parseInt(l)+1).toString());else return;t.src=o.toString()},onOpenVideo(e){window.open(e,"_blank")}}}),ro={class:"preview"},co={class:"left"},uo={class:"main"},mo={class:"bot"},po={class:"datetime"},_o={class:"info"},fo={key:0,class:"prompt mt-2"},ho={key:0},vo={key:1},go={key:0,class:H({content:!0,failed:!0})},$o={class:"image-wrapper"},yo={key:0,class:H({operations:!0,"mt-2":!0})},bo={class:"description"},wo={key:1,class:H({content:!0})},ko={class:"description"},Io={class:"description"},Vo={class:"description"},So={key:2,class:H({content:!0})},Eo={class:"description"};function Uo(e,t,o,l,f,v){var T,P,L,N,U,G,z,O,F,j,q,B,Z,x,ee,te,oe,se,ne,ae,le,ie,re,ce,ue,de,me,pe;const c=n("el-image"),u=n("VideoPlayer"),d=n("el-button"),_=n("el-tooltip"),$=n("font-awesome-icon"),E=n("copy-to-clipboard"),C=n("el-alert");return r(),p("div",ro,[a("div",co,[s(c,{src:"https://cdn.acedata.cloud/ahjfwi.png",class:"avatar"})]),a("div",uo,[a("div",mo,[g(i(e.$t("luma.name.lumaBot"))+" ",1),a("span",po,i(e.$dayjs.format(""+new Date(parseFloat(((T=e.modelValue)==null?void 0:T.created_at)||"")*1e3))),1)]),a("div",_o,[(L=(P=e.modelValue)==null?void 0:P.request)!=null&&L.prompt?(r(),p("p",fo,[g(i((U=(N=e.modelValue)==null?void 0:N.request)==null?void 0:U.prompt)+" ",1),(G=e.modelValue)!=null&&G.response?h("v-if",!0):(r(),p("span",ho," - ("+i(e.$t("luma.status.pending"))+") ",1)),((F=(O=(z=e.modelValue)==null?void 0:z.response)==null?void 0:O.data)==null?void 0:F.state)==="processing"||((B=(q=(j=e.modelValue)==null?void 0:j.response)==null?void 0:q.data)==null?void 0:B.state)==="pending"||((ee=(x=(Z=e.modelValue)==null?void 0:Z.response)==null?void 0:x.data)==null?void 0:ee.state)==="completed"?(r(),p("span",vo," - ("+i(e.$t("luma.status.processing"))+") ",1)):h("v-if",!0)])):h("v-if",!0)]),h(" Display success message "),((oe=(te=e.modelValue)==null?void 0:te.response)==null?void 0:oe.success)===!0?(r(),p("div",go,[a("div",$o,[s(u,{"model-value":e.modelValue},null,8,["model-value"])]),((se=e.modelValue)==null?void 0:se.response)&&!((ne=e.config)!=null&&ne.custom)?(r(),p("div",yo,[s(_,{class:"box-item",effect:"dark",content:e.$t("luma.message.extendVideo"),placement:"top-start"},{default:m(()=>[s(d,{type:"info",size:"small",class:"btn-action",onClick:t[0]||(t[0]=S=>{var b;return e.onExtend(S,(b=e.modelValue)==null?void 0:b.response)})},{default:m(()=>[g(i(e.$t("luma.button.extend")),1)]),_:1})]),_:1},8,["content"]),s(_,{class:"box-item",effect:"dark",content:e.$t("luma.message.downloadVideo"),placement:"top-start"},{default:m(()=>[s(d,{type:"info",size:"small",class:"btn-action",onClick:t[1]||(t[1]=S=>{var b,M;return e.onDownload(S,(M=(b=e.modelValue)==null?void 0:b.response)==null?void 0:M.video_url)})},{default:m(()=>[g(i(e.$t("luma.button.download")),1)]),_:1})]),_:1},8,["content"])])):h("v-if",!0),s(C,{closable:!1,class:"mt-2 success"},{default:m(()=>{var S,b;return[a("p",bo,[s($,{icon:"fa-solid fa-magic",class:"mr-1"}),g(" "+i(e.$t("luma.name.taskId"))+": "+i((S=e.modelValue)==null?void 0:S.id)+" ",1),s(E,{content:(b=e.modelValue)==null?void 0:b.id,class:"btn-copy"},null,8,["content"])])]}),_:1})])):h("v-if",!0),h(" Display error message "),((le=(ae=e.modelValue)==null?void 0:ae.response)==null?void 0:le.success)===!1?(r(),p("div",wo,[s(C,{closable:!1,class:"failure"},{template:m(()=>[s($,{icon:"fa-solid fa-exclamation-triangle",class:"mr-1"}),g(" "+i(e.$t("luma.name.failure")),1)]),default:m(()=>{var S,b,M,_e,fe,he,ve,ge,$e,ye,be,we;return[a("p",ko,[s($,{icon:"fa-solid fa-magic",class:"mr-1"}),g(" "+i(e.$t("luma.name.taskId"))+": "+i((S=e.modelValue)==null?void 0:S.id)+" ",1),s(E,{content:(b=e.modelValue)==null?void 0:b.id,class:"btn-copy"},null,8,["content"])]),a("p",Io,[s($,{icon:"fa-solid fa-circle-info",class:"mr-1"}),g(" "+i(e.$t("luma.name.failureReason"))+": "+i((fe=(_e=(M=e.modelValue)==null?void 0:M.response)==null?void 0:_e.error)==null?void 0:fe.message)+" ",1),s(E,{content:(ge=(ve=(he=e.modelValue)==null?void 0:he.response)==null?void 0:ve.error)==null?void 0:ge.message,class:"btn-copy"},null,8,["content"])]),a("p",Vo,[s($,{icon:"fa-solid fa-hashtag",class:"mr-1"}),g(" "+i(e.$t("luma.name.traceId"))+": "+i((ye=($e=e.modelValue)==null?void 0:$e.response)==null?void 0:ye.trace_id)+" ",1),s(E,{content:(we=(be=e.modelValue)==null?void 0:be.response)==null?void 0:we.trace_id,class:"btn-copy"},null,8,["content"])])]}),_:1})])):h("v-if",!0),h(" Display error message "),!((ie=e.modelValue)!=null&&ie.response)||((ue=(ce=(re=e.modelValue)==null?void 0:re.response)==null?void 0:ce.data)==null?void 0:ue.state)==="processing"||((pe=(me=(de=e.modelValue)==null?void 0:de.response)==null?void 0:me.data)==null?void 0:pe.state)==="pending"?(r(),p("div",So,[s(C,{closable:!1,class:"info"},{template:m(()=>[s($,{icon:"fa-solid fa-exclamation-triangle",class:"mr-1"}),g(" "+i(e.$t("luma.name.failure")),1)]),default:m(()=>{var S,b;return[a("p",Eo,[s($,{icon:"fa-solid fa-magic",class:"mr-1"}),g(" "+i(e.$t("luma.name.taskId"))+": "+i((S=e.modelValue)==null?void 0:S.id)+" ",1),s(E,{content:(b=e.modelValue)==null?void 0:b.id,class:"btn-copy"},null,8,["content"])])]}),_:1})])):h("v-if",!0)])])}var Co=I(io,[["render",Uo],["__scopeId","data-v-077795a0"],["__file","/home/runner/work/Nexior/Nexior/src/components/luma/task/Preview.vue"]]);const Po=V({name:"RecentPanel",components:{TaskPreview:Co,ElSkeleton:Be,ElSkeletonItem:Me},data(){return{job:0}},computed:{tasks(){var e,t,o,l;return k(w({},(e=this.$store.state.luma)==null?void 0:e.tasks),{items:(l=(o=(t=this.$store.state.luma)==null?void 0:t.tasks)==null?void 0:o.items)==null?void 0:l.slice().reverse()})}}}),Lo={class:"panel recent"},No={key:0,class:"tasks"},Ao={class:"left"},To={class:"main"},Go={key:1,class:"tasks"},Ro={key:2,class:"description"};function Do(e,t,o,l,f,v){var _,$,E,C,T,P,L,N;const c=n("el-skeleton-item"),u=n("el-skeleton"),d=n("task-preview");return r(),p("div",Lo,[((_=e.tasks)==null?void 0:_.items)===void 0?(r(),p("div",No,[(r(),p(Ve,null,Se(3,U=>a("div",{key:U,class:"task placeholder"},[a("div",Ao,[s(u,{animated:""},{template:m(()=>[s(c,{variant:"image",class:"avatar"})]),_:1})]),a("div",To,[s(u,{animated:""},{template:m(()=>[s(c,{variant:"p",class:"title"}),s(c,{variant:"image",class:"icon"})]),_:1})])])),64))])):((E=($=e.tasks)==null?void 0:$.items)==null?void 0:E.length)&&((T=(C=e.tasks)==null?void 0:C.items)==null?void 0:T.length)>0?(r(),p("div",Go,[(r(!0),p(Ve,null,Se((P=e.tasks)==null?void 0:P.items,(U,G)=>(r(),A(d,{key:G,"model-value":U,class:"preview"},null,8,["model-value"]))),128))])):h("v-if",!0),((N=(L=e.tasks)==null?void 0:L.items)==null?void 0:N.length)===0?(r(),p("p",Ro,i(e.$t("luma.message.noTasks")),1)):h("v-if",!0)])}var zo=I(Po,[["render",Do],["__scopeId","data-v-2f8302a7"],["__file","/home/runner/work/Nexior/Nexior/src/components/luma/RecentPanel.vue"]]);const Oo="https://webhook.acedata.cloud/luma",Fo=V({name:"LumaIndex",components:{ConfigPanel:to,Layout:et,ApplicationStatus:He,RecentPanel:zo},data(){return{task:void 0,job:0}},computed:{loading(){var e,t;return((t=(e=this.$store.state.luma)==null?void 0:e.status)==null?void 0:t.getApplications)===J.Request},service(){return this.$store.state.luma.service},credential(){return this.$store.state.luma.credential},config(){return this.$store.state.luma.config},initializing(){return this.$store.state.luma.status.getApplications===J.Request},needApply(){return this.$store.state.luma.status.getApplications===J.Success&&!this.application},application(){return this.$store.state.luma.application}},async mounted(){await this.onGetService(),await this.onGetApplication(),await this.onScrollDown(),await this.onGetTasks(),await this.onScrollDown(),this.job=setInterval(()=>{this.onGetTasks()},5e3)},async unmounted(){clearInterval(this.job)},methods:{async onGetService(){console.debug("start onGetService"),await this.$store.dispatch("luma/getService"),console.debug("end onGetService")},async onGetApplication(){console.debug("start onGetApplication"),await this.$store.dispatch("luma/getApplications"),console.debug("end onGetApplication"),await this.onGetTasks()},onApply(){Re.create({application:this.application}).then(({data:e})=>{this.application=e,y.success(this.$t("application.message.applySuccessfully"))}).catch(e=>{var t,o;((o=(t=e==null?void 0:e.response)==null?void 0:t.data)==null?void 0:o.code)===Je&&y.error(this.$t("application.message.alreadyApplied"))})},async onScrollDown(){setTimeout(()=>{const e=document.querySelector(".recent");e&&(e.scrollTop=e.scrollHeight)},500)},async onGetTasks(){if(this.loading){console.debug("loading");return}await this.$store.dispatch("luma/getTasks",{limit:30,offset:0})},async onGenerateVideo(){var o;const e=k(w({},this.config),{callback_url:Oo}),t=(o=this.credential)==null?void 0:o.token;if(!t){console.error("no token specified");return}y.info(this.$t("luma.message.startingTask")),De.generate(e,{token:t}).then(()=>{y.success(this.$t("luma.message.startTaskSuccess")),this.$store.commit("luma/setConfig",{config:void 0})}).catch(l=>{var v,c;const f=(v=l==null?void 0:l.response)==null?void 0:v.data;((c=f==null?void 0:f.error)==null?void 0:c.code)===Ke?y.error(this.$t("luma.message.usedUp")):y.error(this.$t("luma.message.startTaskFailed"))}).finally(async()=>{await this.onGetTasks(),await this.onScrollDown()})}}});function jo(e,t,o,l,f,v){const c=n("config-panel"),u=n("application-status"),d=n("recent-panel"),_=n("layout");return r(),A(_,null,{config:m(()=>[s(c,{onGenerate:e.onGenerateVideo},null,8,["onGenerate"])]),result:m(()=>[s(u,{initializing:e.initializing,application:e.application,service:e.service,"need-apply":e.needApply,class:"mb-4",onRefresh:e.onGetApplication},null,8,["initializing","application","service","need-apply","onRefresh"]),s(d,{class:"panel recent"}),h(' <operation-panel class="panel operation" @generate="onGenerate" /> ')]),_:1})}var xo=I(Fo,[["render",jo],["__scopeId","data-v-c45e0af8"],["__file","/home/runner/work/Nexior/Nexior/src/pages/luma/Index.vue"]]);export{xo as default};
|
|
1
|
+
var Ue=Object.defineProperty,Ce=Object.defineProperties;var Pe=Object.getOwnPropertyDescriptors;var ke=Object.getOwnPropertySymbols;var Le=Object.prototype.hasOwnProperty,Ne=Object.prototype.propertyIsEnumerable;var Ie=(e,t,o)=>t in e?Ue(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,w=(e,t)=>{for(var o in t||(t={}))Le.call(t,o)&&Ie(e,o,t[o]);if(ke)for(var o of ke(t))Ne.call(t,o)&&Ie(e,o,t[o]);return e},k=(e,t)=>Ce(e,Pe(t));import{J as Ee}from"./vendor-others.4f34a866.js";import{am as Q}from"./vendor-fortawesome.0d1d9585.js";import{_ as I,ar as Ae,as as Te,at as Ge,H as W,T as J,z as Re,au as De}from"./index.cf1347fe.js";import{P as ze,l as D,T as X,O as Y,M as y,N as Oe,s as Fe,F as je,u as qe,C as Be,R as Me}from"./vendor-element-plus.ddf5f024.js";import{H as V,al as n,o as r,e as p,f as a,I as K,V as s,M as m,U as i,T as g,L as A,S as h,Q as H,W as Ve,ai as Se}from"./vendor-@vue.853aef6d.js";import{I as R}from"./InfoIcon.258c265e.js";import{A as He,i as Je,h as Ke}from"./Status.11b67b9e.js";import{C as Qe}from"./CopyToClipboard.4009fed9.js";import"./vendor-axios.168e6950.js";import"./vendor-qrcode.452c7ca7.js";const We=V({name:"LayoutLuma",components:{ElDrawer:ze,ElButton:D,FontAwesomeIcon:Q},data(){return{drawer:!1}}}),Xe={class:"main"},Ye={class:"config"},Ze={class:"result"};function xe(e,t,o,l,f,v){const c=n("font-awesome-icon"),u=n("el-button"),d=n("el-drawer");return r(),p("div",Xe,[a("div",Ye,[K(e.$slots,"config",{},void 0,!0)]),a("div",Ze,[K(e.$slots,"result",{},void 0,!0)]),s(u,{round:"",class:"menu",onClick:t[0]||(t[0]=_=>e.drawer=!0)},{default:m(()=>[s(c,{icon:"fa-solid fa-gear",class:"icon-menu"})]),_:1}),s(d,{modelValue:e.drawer,"onUpdate:modelValue":t[1]||(t[1]=_=>e.drawer=_),"with-header":!1,size:"340px",class:"drawer"},{default:m(()=>[K(e.$slots,"config",{},void 0,!0)]),_:3},8,["modelValue"])])}var et=I(We,[["render",xe],["__scopeId","data-v-234cfb9c"],["__file","/home/runner/work/Nexior/Nexior/src/layouts/Luma.vue"]]);const tt=V({name:"EnhancementSelector",components:{ElSwitch:X,InfoIcon:R},computed:{value:{get(){var e,t;return(t=(e=this.$store.state.luma)==null?void 0:e.config)==null?void 0:t.enhancement},set(e){var t;console.debug("set enhancement",e),this.$store.commit("luma/setConfig",k(w({},(t=this.$store.state.luma)==null?void 0:t.config),{enhancement:e}))}}},mounted(){this.value===void 0&&(this.value=Ae)}}),ot={class:"field"},st={class:"title"};function nt(e,t,o,l,f,v){const c=n("el-switch"),u=n("info-icon");return r(),p("div",ot,[a("h2",st,i(e.$t("luma.name.enhancement")),1),s(c,{modelValue:e.value,"onUpdate:modelValue":t[0]||(t[0]=d=>e.value=d),class:"value"},null,8,["modelValue"]),s(u,{content:e.$t("luma.description.enhancement"),class:"info"},null,8,["content"])])}var at=I(tt,[["render",nt],["__scopeId","data-v-175365a0"],["__file","/home/runner/work/Nexior/Nexior/src/components/luma/config/EnhancementSelector.vue"]]);const lt=V({name:"CustomSelector",components:{ElSwitch:X,InfoIcon:R},computed:{value:{get(){var e,t;return(t=(e=this.$store.state.luma)==null?void 0:e.config)==null?void 0:t.custom},set(e){var t;console.debug("set custom",e),this.$store.commit("luma/setConfig",k(w({},(t=this.$store.state.luma)==null?void 0:t.config),{custom:e}))}}},mounted(){this.value===void 0&&(this.value=Te)}}),it={class:"field"},rt={class:"title"};function ct(e,t,o,l,f,v){const c=n("el-switch"),u=n("info-icon");return r(),p("div",it,[a("h2",rt,i(e.$t("luma.name.custom")),1),s(c,{modelValue:e.value,"onUpdate:modelValue":t[0]||(t[0]=d=>e.value=d),class:"value"},null,8,["modelValue"]),s(u,{content:e.$t("luma.description.custom"),class:"info"},null,8,["content"])])}var ut=I(lt,[["render",ct],["__scopeId","data-v-5ac2addb"],["__file","/home/runner/work/Nexior/Nexior/src/components/luma/config/CustomSelector.vue"]]);const dt=V({name:"LoopSelector",components:{ElSwitch:X,InfoIcon:R},computed:{value:{get(){var e,t;return(t=(e=this.$store.state.luma)==null?void 0:e.config)==null?void 0:t.loop},set(e){var t;console.debug("set loop",e),this.$store.commit("luma/setConfig",k(w({},(t=this.$store.state.luma)==null?void 0:t.config),{loop:e}))}}},mounted(){this.value===void 0&&(this.value=Ge)}}),mt={class:"field"},pt={class:"title"};function _t(e,t,o,l,f,v){const c=n("el-switch"),u=n("info-icon");return r(),p("div",mt,[a("h2",pt,i(e.$t("luma.name.loop")),1),s(c,{modelValue:e.value,"onUpdate:modelValue":t[0]||(t[0]=d=>e.value=d),class:"value"},null,8,["modelValue"]),s(u,{content:e.$t("luma.description.loop"),class:"info"},null,8,["content"])])}var ft=I(dt,[["render",_t],["__scopeId","data-v-69cccd4e"],["__file","/home/runner/work/Nexior/Nexior/src/components/luma/config/LoopSelector.vue"]]);const ht=V({name:"ContentInput",components:{ElUpload:Y,ElButton:D,InfoIcon:R},data(){return{fileList:[],uploadUrl:W()+"/api/v1/files/"}},computed:{headers(){return{Authorization:`Bearer ${this.$store.state.token.access}`}},urls(){return this.fileList.map(e=>{var t;return(t=e==null?void 0:e.response)==null?void 0:t.file_url})},value:{get(){var e,t;return(t=(e=this.$store.state.luma)==null?void 0:e.config)==null?void 0:t.end_image_url},set(e){var o,l;const t=(o=this.urls)==null?void 0:o[0];this.$store.commit("luma/setConfig",k(w({},(l=this.$store.state.luma)==null?void 0:l.config),{end_image_url:t}))}}},mounted(){this.value||(this.value=void 0),this.onSetEndImageUrl()},methods:{onExceed(){y.warning(this.$t("luma.message.uploadEndImageExceed"))},onError(){y.error(this.$t("luma.message.uploadEndImageError"))},onSetEndImageUrl(){var t,o;const e=(t=this.urls)==null?void 0:t[0];this.$store.commit("luma/setConfig",k(w({},(o=this.$store.state.luma)==null?void 0:o.config),{end_image_url:e}))},async onSuccess(){this.onSetEndImageUrl()}}}),vt={class:"field"},gt={class:"title"},$t={class:"upload-wrapper"};function yt(e,t,o,l,f,v){const c=n("el-button"),u=n("el-upload"),d=n("info-icon");return r(),p("div",vt,[a("h2",gt,i(e.$t("luma.name.endImageUrl")),1),a("div",$t,[s(u,{"file-list":e.fileList,"onUpdate:file-list":t[0]||(t[0]=_=>e.fileList=_),accept:".png,.jpg,.jpeg,.gif,.bmp,.webp",name:"file",class:"value","show-file-list":!0,limit:1,multiple:!1,action:e.uploadUrl,"on-exceed":e.onExceed,"on-error":e.onError,"on-success":e.onSuccess,headers:e.headers},{default:m(()=>[s(c,{size:"small",type:"primary",round:""},{default:m(()=>[g(i(e.$t("luma.button.uploadEndImageUrl")),1)]),_:1})]),_:1},8,["file-list","action","on-exceed","on-error","on-success","headers"])]),s(d,{content:e.$t("luma.description.endImageUrl"),class:"info"},null,8,["content"])])}var bt=I(ht,[["render",yt],["__scopeId","data-v-97900bb4"],["__file","/home/runner/work/Nexior/Nexior/src/components/luma/config/EndImageUrlInput.vue"]]);const wt=V({name:"StartImageUrlInput",components:{ElUpload:Y,ElButton:D,InfoIcon:R},data(){return{fileList:[],uploadUrl:W()+"/api/v1/files/"}},computed:{headers(){return{Authorization:`Bearer ${this.$store.state.token.access}`}},urls(){return this.fileList.map(e=>{var t;return(t=e==null?void 0:e.response)==null?void 0:t.file_url})},value:{get(){var e,t;return(t=(e=this.$store.state.luma)==null?void 0:e.config)==null?void 0:t.start_image_url},set(e){var o,l;const t=(o=this.urls)==null?void 0:o[0];this.$store.commit("luma/setConfig",k(w({},(l=this.$store.state.luma)==null?void 0:l.config),{start_image_url:t}))}}},mounted(){this.value||(this.value=void 0),this.onSetStartImageUrl()},methods:{onExceed(){y.warning(this.$t("luma.message.uploadStartImageExceed"))},onError(){y.error(this.$t("luma.message.uploadStartImageError"))},async onRemove(){y.error(this.$t("luma.message.uploadStartImageError"))},onSetStartImageUrl(){var t,o;const e=(t=this.urls)==null?void 0:t[0];this.$store.commit("luma/setConfig",k(w({},(o=this.$store.state.luma)==null?void 0:o.config),{start_image_url:e}))},async onSuccess(){this.onSetStartImageUrl()}}}),kt={class:"field"},It={class:"title"},Vt={class:"upload-wrapper"};function St(e,t,o,l,f,v){const c=n("el-button"),u=n("el-upload"),d=n("info-icon");return r(),p("div",kt,[a("h2",It,i(e.$t("luma.name.startImageUrl")),1),a("div",Vt,[s(u,{"file-list":e.fileList,"onUpdate:file-list":t[0]||(t[0]=_=>e.fileList=_),accept:".png,.jpg,.jpeg,.gif,.bmp,.webp",name:"file",class:"value","show-file-list":!0,limit:1,multiple:!1,action:e.uploadUrl,"on-exceed":e.onExceed,"on-error":e.onError,"on-remove":e.onRemove,"on-success":e.onSuccess,headers:e.headers},{default:m(()=>[s(c,{size:"small",type:"primary",round:""},{default:m(()=>[g(i(e.$t("luma.button.uploadStartImageUrl")),1)]),_:1})]),_:1},8,["file-list","action","on-exceed","on-error","on-remove","on-success","headers"])]),s(d,{content:e.$t("luma.description.startImageUrl"),class:"info"},null,8,["content"])])}var Et=I(wt,[["render",St],["__scopeId","data-v-5440a4bf"],["__file","/home/runner/work/Nexior/Nexior/src/components/luma/config/StartImageUrlInput.vue"]]);const Ut=V({name:"UploadVideo",components:{ElUpload:Y,ElButton:D,InfoIcon:R},data(){return{fileList:[],uploadUrl:W()+"/api/v1/files/"}},computed:{headers(){return{Authorization:`Bearer ${this.$store.state.token.access}`}},urls(){return this.fileList.map(e=>{var t;return(t=e==null?void 0:e.response)==null?void 0:t.file_url})},value:{get(){var e,t;return(t=(e=this.$store.state.luma)==null?void 0:e.config)==null?void 0:t.video_url},set(e){var o,l;const t=(o=this.urls)==null?void 0:o[0];this.$store.commit("luma/setConfig",k(w({},(l=this.$store.state.luma)==null?void 0:l.config),{video_url:t}))}}},mounted(){this.value||(this.value=void 0),this.onSetVideoUrl()},methods:{onExceed(){y.warning(this.$t("luma.message.uploadVideoExceed"))},onError(){y.error(this.$t("luma.message.uploadVideoError"))},beforeUpload(e){const t=e.type==="video/mp4",o=e.size/1024/1024<10;return t?o?!0:(y.error(this.$t("luma.message.uploadVideoSizeExceed")),!1):(y.error(this.$t("luma.message.uploadVideoTypeFailed")),!1)},onSetVideoUrl(){var t,o;const e=(t=this.urls)==null?void 0:t[0];this.$store.commit("luma/setConfig",k(w({},(o=this.$store.state.luma)==null?void 0:o.config),{video_url:e,action:"extend"}))},async onSuccess(){this.onSetVideoUrl()}}}),Ct={class:"field"},Pt={class:"title"},Lt={class:"upload-wrapper"};function Nt(e,t,o,l,f,v){const c=n("el-button"),u=n("el-upload"),d=n("info-icon");return r(),p("div",Ct,[a("h2",Pt,i(e.$t("luma.name.videoUrl")),1),a("div",Lt,[s(u,{"file-list":e.fileList,"onUpdate:file-list":t[0]||(t[0]=_=>e.fileList=_),accept:".mp4",name:"file",class:"value","show-file-list":!0,limit:1,multiple:!1,action:e.uploadUrl,"before-upload":e.beforeUpload,"on-exceed":e.onExceed,"on-error":e.onError,"on-success":e.onSuccess,headers:e.headers},{default:m(()=>[s(c,{size:"small",type:"primary",round:""},{default:m(()=>[g(i(e.$t("luma.button.uploadVideoUrl")),1)]),_:1})]),_:1},8,["file-list","action","before-upload","on-exceed","on-error","on-success","headers"])]),s(d,{content:e.$t("luma.description.videoUrl"),class:"info"},null,8,["content"])])}var At=I(Ut,[["render",Nt],["__scopeId","data-v-46c66c9f"],["__file","/home/runner/work/Nexior/Nexior/src/components/luma/config/UploadVideo.vue"]]);const Tt="",Gt=V({name:"PromptInput",components:{ElInput:Oe,InfoIcon:R},computed:{prompt:{get(){var e,t;return(t=(e=this.$store.state.luma)==null?void 0:e.config)==null?void 0:t.prompt},set(e){var t;console.debug("set prompt",e),this.$store.commit("luma/setConfig",k(w({},(t=this.$store.state.luma)==null?void 0:t.config),{prompt:e}))}}},mounted(){this.value||(this.value=Tt)}}),Rt={class:"field"},Dt={class:"box"},zt={class:"title"};function Ot(e,t,o,l,f,v){const c=n("info-icon"),u=n("el-input");return r(),p("div",Rt,[a("div",Dt,[a("h2",zt,i(e.$t("luma.name.prompt")),1),s(c,{content:e.$t("luma.description.prompt"),class:"info"},null,8,["content"])]),s(u,{modelValue:e.prompt,"onUpdate:modelValue":t[0]||(t[0]=d=>e.prompt=d),rows:3,type:"textarea",class:"prompt",placeholder:e.$t("luma.placeholder.prompt"),maxlength:300,"show-word-limit":""},null,8,["modelValue","placeholder"])])}var Ft=I(Gt,[["render",Ot],["__scopeId","data-v-19a7446b"],["__file","/home/runner/work/Nexior/Nexior/src/components/luma/config/PromptInput.vue"]]);const jt=V({name:"ExtendFromInput",components:{VuePlyr:Ee},props:{modelValue:{type:Object,required:!0}},data(){return{options:{quality:{default:"1080p"}}}},computed:{config(){var e;return(e=this.$store.state.luma)==null?void 0:e.config}}}),qt={class:"field"},Bt={class:"box"},Mt={class:"title"},Ht={class:"task"},Jt=["data-poster"],Kt=["src"];function Qt(e,t,o,l,f,v){const c=n("vue-plyr");return r(),p("div",qt,[a("div",Bt,[a("h2",Mt,i(e.$t("luma.name.extend")),1)]),a("div",Ht,[a("div",null,[s(c,{options:e.options,class:"video"},{default:m(()=>{var u,d;return[a("video",{controls:"",crossorigin:"",playsinline:"","data-poster":(u=e.config)==null?void 0:u.thumbnail_url},[a("source",{size:"1080",src:(d=e.config)==null?void 0:d.video_url,type:"video/mp4"},null,8,Kt)],8,Jt)]}),_:1},8,["options"])])])])}var Wt=I(jt,[["render",Qt],["__scopeId","data-v-1cefb16b"],["__file","/home/runner/work/Nexior/Nexior/src/components/luma/config/ExtendFromInput.vue"]]);const Xt=V({name:"PresetPanel",components:{LoopSelector:ft,StartImageUrlInput:Et,EndImageUrlInput:bt,EnhancementSelector:at,ElButton:D,FontAwesomeIcon:Q,PromptInput:Ft,ExtendFromInput:Wt,CustomSelector:ut,UploadVideo:At},emits:["generate"],computed:{config(){var e;return(e=this.$store.state.luma)==null?void 0:e.config}},methods:{onGenerate(){this.$emit("generate")}}}),Yt={class:"panel"},Zt={class:"config"},xt={class:"actions"};function eo(e,t,o,l,f,v){var N,U,G,z,O,F,j,q,B;const c=n("extend-from-input"),u=n("prompt-input"),d=n("custom-selector"),_=n("upload-video"),$=n("start-image-url-input"),E=n("end-image-url-input"),C=n("enhancement-selector"),T=n("loop-selector"),P=n("font-awesome-icon"),L=n("el-button");return r(),p("div",Yt,[a("div",Zt,[((N=e.config)==null?void 0:N.video_id)||((U=e.config)==null?void 0:U.video_url)?(r(),A(c,{key:0,class:"mb-4"})):h("v-if",!0),s(u,{class:"mb-4"}),(G=e.config)!=null&&G.video_id?h("v-if",!0):(r(),A(d,{key:1,class:"mb-4"})),(z=e.config)!=null&&z.custom?(r(),A(_,{key:2,class:"mb-4"})):h("v-if",!0),!(((O=e.config)==null?void 0:O.video_id)||((F=e.config)==null?void 0:F.video_url))&&!((j=e.config)!=null&&j.custom)?(r(),A($,{key:3,class:"mb-4"})):h("v-if",!0),s(E,{class:"mb-4"}),s(C,{class:"mb-4"}),s(T,{class:"mb-4"}),a("div",xt,[((q=e.config)==null?void 0:q.video_url)!==void 0||((B=e.config)==null?void 0:B.custom)?(r(),A(L,{key:0,type:"primary",class:"btn w-full",round:"",onClick:e.onGenerate},{default:m(()=>[s(P,{icon:"fa-solid fa-magic",class:"mr-2"}),g(" "+i(e.$t("luma.button.extend")),1)]),_:1},8,["onClick"])):(r(),A(L,{key:1,type:"primary",class:"btn w-full",round:"",onClick:e.onGenerate},{default:m(()=>[s(P,{icon:"fa-solid fa-magic",class:"mr-2"}),g(" "+i(e.$t("luma.button.generate")),1)]),_:1},8,["onClick"]))])])])}var to=I(Xt,[["render",eo],["__scopeId","data-v-951b4cc0"],["__file","/home/runner/work/Nexior/Nexior/src/components/luma/ConfigPanel.vue"]]);const oo=V({name:"VideoPlayer",components:{VuePlyr:Ee},props:{modelValue:{type:Object,required:!0}},data(){return{options:{quality:{default:"1080p"}}}}}),so=["data-poster"],no=["src"];function ao(e,t,o,l,f,v){const c=n("vue-plyr");return r(),p("div",null,[s(c,{options:e.options,class:"video"},{default:m(()=>{var u,d,_,$;return[a("video",{controls:"",crossorigin:"",playsinline:"","data-poster":(d=(u=e.modelValue)==null?void 0:u.response)==null?void 0:d.thumbnail_url},[a("source",{size:"1080",src:($=(_=e.modelValue)==null?void 0:_.response)==null?void 0:$.video_url,type:"video/mp4"},null,8,no)],8,so)]}),_:1},8,["options"])])}var lo=I(oo,[["render",ao],["__scopeId","data-v-759e400c"],["__file","/home/runner/work/Nexior/Nexior/src/components/luma/VideoPlayer.vue"]]);const io=V({name:"TaskPreview",components:{ElImage:Fe,CopyToClipboard:Qe,FontAwesomeIcon:Q,ElAlert:je,VideoPlayer:lo,ElTooltip:qe,ElButton:D},props:{modelValue:{type:Object,required:!0}},data(){return{}},computed:{application(){var e;return(e=this.$store.state.luma)==null?void 0:e.application},config(){var e;return(e=this.$store.state.luma)==null?void 0:e.config}},methods:{onExtend(e,t){var o;e.stopPropagation(),console.debug("set config",t),this.$store.commit("luma/setConfig",k(w({},(o=this.$store.state.luma)==null?void 0:o.config),{video_id:t.video_id,prompt:t.prompt,action:"extend",thumbnail_url:t.thumbnail_url,video_url:t.video_url}))},onDownload(e,t){e.stopPropagation(),console.log("on download"),window.open(t,"_blank")},onReload(e){const t=e.target,o=new URL(t.src),l=o.searchParams.get("retry");if(!l)o.searchParams.set("retry","1");else if(parseInt(l)<2)o.searchParams.set("retry",(parseInt(l)+1).toString());else return;t.src=o.toString()},onOpenVideo(e){window.open(e,"_blank")}}}),ro={class:"preview"},co={class:"left"},uo={class:"main"},mo={class:"bot"},po={class:"datetime"},_o={class:"info"},fo={key:0,class:"prompt mt-2"},ho={key:0},vo={key:1},go={key:0,class:H({content:!0,failed:!0})},$o={class:"image-wrapper"},yo={key:0,class:H({operations:!0,"mt-2":!0})},bo={class:"description"},wo={key:1,class:H({content:!0})},ko={class:"description"},Io={class:"description"},Vo={class:"description"},So={key:2,class:H({content:!0})},Eo={class:"description"};function Uo(e,t,o,l,f,v){var T,P,L,N,U,G,z,O,F,j,q,B,Z,x,ee,te,oe,se,ne,ae,le,ie,re,ce,ue,de,me,pe;const c=n("el-image"),u=n("VideoPlayer"),d=n("el-button"),_=n("el-tooltip"),$=n("font-awesome-icon"),E=n("copy-to-clipboard"),C=n("el-alert");return r(),p("div",ro,[a("div",co,[s(c,{src:"https://cdn.acedata.cloud/ahjfwi.png",class:"avatar"})]),a("div",uo,[a("div",mo,[g(i(e.$t("luma.name.lumaBot"))+" ",1),a("span",po,i(e.$dayjs.format(""+new Date(parseFloat(((T=e.modelValue)==null?void 0:T.created_at)||"")*1e3))),1)]),a("div",_o,[(L=(P=e.modelValue)==null?void 0:P.request)!=null&&L.prompt?(r(),p("p",fo,[g(i((U=(N=e.modelValue)==null?void 0:N.request)==null?void 0:U.prompt)+" ",1),(G=e.modelValue)!=null&&G.response?h("v-if",!0):(r(),p("span",ho," - ("+i(e.$t("luma.status.pending"))+") ",1)),((F=(O=(z=e.modelValue)==null?void 0:z.response)==null?void 0:O.data)==null?void 0:F.state)==="processing"||((B=(q=(j=e.modelValue)==null?void 0:j.response)==null?void 0:q.data)==null?void 0:B.state)==="pending"||((ee=(x=(Z=e.modelValue)==null?void 0:Z.response)==null?void 0:x.data)==null?void 0:ee.state)==="completed"?(r(),p("span",vo," - ("+i(e.$t("luma.status.processing"))+") ",1)):h("v-if",!0)])):h("v-if",!0)]),h(" Display success message "),((oe=(te=e.modelValue)==null?void 0:te.response)==null?void 0:oe.success)===!0?(r(),p("div",go,[a("div",$o,[s(u,{"model-value":e.modelValue},null,8,["model-value"])]),((se=e.modelValue)==null?void 0:se.response)&&!((ne=e.config)!=null&&ne.custom)?(r(),p("div",yo,[s(_,{class:"box-item",effect:"dark",content:e.$t("luma.message.extendVideo"),placement:"top-start"},{default:m(()=>[s(d,{type:"info",size:"small",class:"btn-action",onClick:t[0]||(t[0]=S=>{var b;return e.onExtend(S,(b=e.modelValue)==null?void 0:b.response)})},{default:m(()=>[g(i(e.$t("luma.button.extend")),1)]),_:1})]),_:1},8,["content"]),s(_,{class:"box-item",effect:"dark",content:e.$t("luma.message.downloadVideo"),placement:"top-start"},{default:m(()=>[s(d,{type:"info",size:"small",class:"btn-action",onClick:t[1]||(t[1]=S=>{var b,M;return e.onDownload(S,(M=(b=e.modelValue)==null?void 0:b.response)==null?void 0:M.video_url)})},{default:m(()=>[g(i(e.$t("luma.button.download")),1)]),_:1})]),_:1},8,["content"])])):h("v-if",!0),s(C,{closable:!1,class:"mt-2 success"},{default:m(()=>{var S,b;return[a("p",bo,[s($,{icon:"fa-solid fa-magic",class:"mr-1"}),g(" "+i(e.$t("luma.name.taskId"))+": "+i((S=e.modelValue)==null?void 0:S.id)+" ",1),s(E,{content:(b=e.modelValue)==null?void 0:b.id,class:"btn-copy"},null,8,["content"])])]}),_:1})])):h("v-if",!0),h(" Display error message "),((le=(ae=e.modelValue)==null?void 0:ae.response)==null?void 0:le.success)===!1?(r(),p("div",wo,[s(C,{closable:!1,class:"failure"},{template:m(()=>[s($,{icon:"fa-solid fa-exclamation-triangle",class:"mr-1"}),g(" "+i(e.$t("luma.name.failure")),1)]),default:m(()=>{var S,b,M,_e,fe,he,ve,ge,$e,ye,be,we;return[a("p",ko,[s($,{icon:"fa-solid fa-magic",class:"mr-1"}),g(" "+i(e.$t("luma.name.taskId"))+": "+i((S=e.modelValue)==null?void 0:S.id)+" ",1),s(E,{content:(b=e.modelValue)==null?void 0:b.id,class:"btn-copy"},null,8,["content"])]),a("p",Io,[s($,{icon:"fa-solid fa-circle-info",class:"mr-1"}),g(" "+i(e.$t("luma.name.failureReason"))+": "+i((fe=(_e=(M=e.modelValue)==null?void 0:M.response)==null?void 0:_e.error)==null?void 0:fe.message)+" ",1),s(E,{content:(ge=(ve=(he=e.modelValue)==null?void 0:he.response)==null?void 0:ve.error)==null?void 0:ge.message,class:"btn-copy"},null,8,["content"])]),a("p",Vo,[s($,{icon:"fa-solid fa-hashtag",class:"mr-1"}),g(" "+i(e.$t("luma.name.traceId"))+": "+i((ye=($e=e.modelValue)==null?void 0:$e.response)==null?void 0:ye.trace_id)+" ",1),s(E,{content:(we=(be=e.modelValue)==null?void 0:be.response)==null?void 0:we.trace_id,class:"btn-copy"},null,8,["content"])])]}),_:1})])):h("v-if",!0),h(" Display error message "),!((ie=e.modelValue)!=null&&ie.response)||((ue=(ce=(re=e.modelValue)==null?void 0:re.response)==null?void 0:ce.data)==null?void 0:ue.state)==="processing"||((pe=(me=(de=e.modelValue)==null?void 0:de.response)==null?void 0:me.data)==null?void 0:pe.state)==="pending"?(r(),p("div",So,[s(C,{closable:!1,class:"info"},{template:m(()=>[s($,{icon:"fa-solid fa-exclamation-triangle",class:"mr-1"}),g(" "+i(e.$t("luma.name.failure")),1)]),default:m(()=>{var S,b;return[a("p",Eo,[s($,{icon:"fa-solid fa-magic",class:"mr-1"}),g(" "+i(e.$t("luma.name.taskId"))+": "+i((S=e.modelValue)==null?void 0:S.id)+" ",1),s(E,{content:(b=e.modelValue)==null?void 0:b.id,class:"btn-copy"},null,8,["content"])])]}),_:1})])):h("v-if",!0)])])}var Co=I(io,[["render",Uo],["__scopeId","data-v-077795a0"],["__file","/home/runner/work/Nexior/Nexior/src/components/luma/task/Preview.vue"]]);const Po=V({name:"RecentPanel",components:{TaskPreview:Co,ElSkeleton:Be,ElSkeletonItem:Me},data(){return{job:0}},computed:{tasks(){var e,t,o,l;return k(w({},(e=this.$store.state.luma)==null?void 0:e.tasks),{items:(l=(o=(t=this.$store.state.luma)==null?void 0:t.tasks)==null?void 0:o.items)==null?void 0:l.slice().reverse()})}}}),Lo={class:"panel recent"},No={key:0,class:"tasks"},Ao={class:"left"},To={class:"main"},Go={key:1,class:"tasks"},Ro={key:2,class:"description"};function Do(e,t,o,l,f,v){var _,$,E,C,T,P,L,N;const c=n("el-skeleton-item"),u=n("el-skeleton"),d=n("task-preview");return r(),p("div",Lo,[((_=e.tasks)==null?void 0:_.items)===void 0?(r(),p("div",No,[(r(),p(Ve,null,Se(3,U=>a("div",{key:U,class:"task placeholder"},[a("div",Ao,[s(u,{animated:""},{template:m(()=>[s(c,{variant:"image",class:"avatar"})]),_:1})]),a("div",To,[s(u,{animated:""},{template:m(()=>[s(c,{variant:"p",class:"title"}),s(c,{variant:"image",class:"icon"})]),_:1})])])),64))])):((E=($=e.tasks)==null?void 0:$.items)==null?void 0:E.length)&&((T=(C=e.tasks)==null?void 0:C.items)==null?void 0:T.length)>0?(r(),p("div",Go,[(r(!0),p(Ve,null,Se((P=e.tasks)==null?void 0:P.items,(U,G)=>(r(),A(d,{key:G,"model-value":U,class:"preview"},null,8,["model-value"]))),128))])):h("v-if",!0),((N=(L=e.tasks)==null?void 0:L.items)==null?void 0:N.length)===0?(r(),p("p",Ro,i(e.$t("luma.message.noTasks")),1)):h("v-if",!0)])}var zo=I(Po,[["render",Do],["__scopeId","data-v-2f8302a7"],["__file","/home/runner/work/Nexior/Nexior/src/components/luma/RecentPanel.vue"]]);const Oo="https://webhook.acedata.cloud/luma",Fo=V({name:"LumaIndex",components:{ConfigPanel:to,Layout:et,ApplicationStatus:He,RecentPanel:zo},data(){return{task:void 0,job:0}},computed:{loading(){var e,t;return((t=(e=this.$store.state.luma)==null?void 0:e.status)==null?void 0:t.getApplications)===J.Request},service(){return this.$store.state.luma.service},credential(){return this.$store.state.luma.credential},config(){return this.$store.state.luma.config},initializing(){return this.$store.state.luma.status.getApplications===J.Request},needApply(){return this.$store.state.luma.status.getApplications===J.Success&&!this.application},application(){return this.$store.state.luma.application}},async mounted(){await this.onGetService(),await this.onGetApplication(),await this.onScrollDown(),await this.onGetTasks(),await this.onScrollDown(),this.job=setInterval(()=>{this.onGetTasks()},5e3)},async unmounted(){clearInterval(this.job)},methods:{async onGetService(){console.debug("start onGetService"),await this.$store.dispatch("luma/getService"),console.debug("end onGetService")},async onGetApplication(){console.debug("start onGetApplication"),await this.$store.dispatch("luma/getApplications"),console.debug("end onGetApplication"),await this.onGetTasks()},onApply(){Re.create({application:this.application}).then(({data:e})=>{this.application=e,y.success(this.$t("application.message.applySuccessfully"))}).catch(e=>{var t,o;((o=(t=e==null?void 0:e.response)==null?void 0:t.data)==null?void 0:o.code)===Je&&y.error(this.$t("application.message.alreadyApplied"))})},async onScrollDown(){setTimeout(()=>{const e=document.querySelector(".recent");e&&(e.scrollTop=e.scrollHeight)},500)},async onGetTasks(){if(this.loading){console.debug("loading");return}await this.$store.dispatch("luma/getTasks",{limit:30,offset:0})},async onGenerateVideo(){var o;const e=k(w({},this.config),{callback_url:Oo}),t=(o=this.credential)==null?void 0:o.token;if(!t){console.error("no token specified");return}y.info(this.$t("luma.message.startingTask")),De.generate(e,{token:t}).then(()=>{y.success(this.$t("luma.message.startTaskSuccess")),this.$store.commit("luma/setConfig",{config:void 0})}).catch(l=>{var v,c;const f=(v=l==null?void 0:l.response)==null?void 0:v.data;((c=f==null?void 0:f.error)==null?void 0:c.code)===Ke?y.error(this.$t("luma.message.usedUp")):y.error(this.$t("luma.message.startTaskFailed"))}).finally(async()=>{await this.onGetTasks(),await this.onScrollDown()})}}});function jo(e,t,o,l,f,v){const c=n("config-panel"),u=n("application-status"),d=n("recent-panel"),_=n("layout");return r(),A(_,null,{config:m(()=>[s(c,{onGenerate:e.onGenerateVideo},null,8,["onGenerate"])]),result:m(()=>[s(u,{initializing:e.initializing,application:e.application,service:e.service,"need-apply":e.needApply,class:"mb-4",onRefresh:e.onGetApplication},null,8,["initializing","application","service","need-apply","onRefresh"]),s(d,{class:"panel recent"}),h(' <operation-panel class="panel operation" @generate="onGenerate" /> ')]),_:1})}var xo=I(Fo,[["render",jo],["__scopeId","data-v-c45e0af8"],["__file","/home/runner/work/Nexior/Nexior/src/pages/luma/Index.vue"]]);export{xo as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./vendor-others.4f34a866.js";import{h as O,_ as T,c as A,d as R,e as P,f as B,u as H,H as V,R as M}from"./index.
|
|
1
|
+
import"./vendor-others.4f34a866.js";import{h as O,_ as T,c as A,d as R,e as P,f as B,u as H,H as V,R as M}from"./index.cf1347fe.js";import{am as L}from"./vendor-fortawesome.0d1d9585.js";import{L as j,D as q}from"./DarkSelector.5b80f35d.js";import{s as D,E as X,t as z,j as F,k as J}from"./vendor-element-plus.ddf5f024.js";import{H as U,al as s,o as g,L as E,M as p,V as a,T as N,U as I,S,f as r,e as C,a0 as W,W as G,ai as Q,Q as K}from"./vendor-@vue.853aef6d.js";import"./vendor-axios.168e6950.js";import"./vendor-qrcode.452c7ca7.js";import"./vendor-vue-dark-switch.88f0eab0.js";const Y=U({name:"HelpEntry",components:{ElImage:D,ElDialog:X,ElPopover:z,ElMenu:F,ElMenuItem:J,FontAwesomeIcon:L},props:{visible:{type:Boolean,default:!0}},emits:["close"],computed:{site(){return this.$store.state.site}},methods:{onJoin(){var e,t,n,i;window.open((i=(n=(t=(e=this.$store.state.site)==null?void 0:e.features)==null?void 0:t.support)==null?void 0:n.discord)==null?void 0:i.url,"_blank")},onProfit(){this.$router.push({name:O})}}}),Z={class:"flex"},ee={class:"flex-1 text-center"};function te(e,t,n,i,u,x){const m=s("font-awesome-icon"),l=s("el-menu-item"),f=s("el-image"),_=s("el-popover"),h=s("el-menu"),o=s("el-dialog");return g(),E(o,{"model-value":e.visible,width:200,class:"text-center",onClose:t[0]||(t[0]=c=>e.$emit("close"))},{default:p(()=>[a(h,{collapse:!1,class:"menu"},{default:p(()=>{var c,v,$,k;return[(k=($=(v=(c=e.site)==null?void 0:c.features)==null?void 0:v.support)==null?void 0:$.discord)!=null&&k.enabled?(g(),E(l,{key:0,index:"1",onClick:e.onJoin},{title:p(()=>[N(I(e.$t("common.message.joinDiscord")),1)]),default:p(()=>[a(m,{icon:"fa-brands fa-discord",class:"mr-2"})]),_:1},8,["onClick"])):S("v-if",!0),a(_,{width:350,trigger:"hover"},{reference:p(()=>{var d,b,w,y;return[(y=(w=(b=(d=e.site)==null?void 0:d.features)==null?void 0:b.support)==null?void 0:w.wechat)!=null&&y.enabled?(g(),E(l,{key:0,index:"2"},{title:p(()=>[N(I(e.$t("common.message.addWeChat")),1)]),default:p(()=>[a(m,{icon:"fa-brands fa-weixin",class:"mr-2"})]),_:1})):S("v-if",!0)]}),default:p(()=>{var d,b,w,y;return[r("div",Z,[r("div",ee,[a(f,{src:(y=(w=(b=(d=e.site)==null?void 0:d.features)==null?void 0:b.support)==null?void 0:w.wechat)==null?void 0:y.qr},null,8,["src"])])])]}),_:1})]}),_:1})]),_:1},8,["model-value"])}var oe=T(Y,[["render",te],["__scopeId","data-v-2800d84d"],["__file","/home/runner/work/Nexior/Nexior/src/components/common/HelpDialog.vue"]]);const se=U({name:"ProfileIndex",components:{ElImage:D,HelpDialog:oe,FontAwesomeIcon:L,LocaleSelector:j,DarkSelector:q},data(){return{operating:{locale:!1,dark:!1,help:!1}}},computed:{user(){return this.$store.getters.user},showSupport(){var e,t,n,i,u,x,m,l,f,_,h,o,c,v,$,k,d;return((u=(i=(n=(t=(e=this.$store)==null?void 0:e.state)==null?void 0:t.site)==null?void 0:n.features)==null?void 0:i.support)==null?void 0:u.enabled)&&(((h=(_=(f=(l=(m=(x=this.$store)==null?void 0:x.state)==null?void 0:m.site)==null?void 0:l.features)==null?void 0:f.support)==null?void 0:_.discord)==null?void 0:h.enabled)||((d=(k=($=(v=(c=(o=this.$store)==null?void 0:o.state)==null?void 0:c.site)==null?void 0:v.features)==null?void 0:$.support)==null?void 0:k.wechat)==null?void 0:d.enabled))},showSite(){var e,t,n,i,u;return(u=(n=(t=(e=this.$store)==null?void 0:e.state)==null?void 0:t.site)==null?void 0:n.admins)==null?void 0:u.includes((i=this.$store.getters.user)==null?void 0:i.id)},links(){return[{key:"profile",text:this.$t("console.menu.userProfile"),href:`${A()}/user/profile`,icon:"fa-regular fa-user"},{key:"application-list",text:this.$t("console.menu.applicationList"),name:R,icon:"fa-solid fa-cube"},{key:"order-list",text:this.$t("console.menu.orderList"),name:P,icon:"fa-solid fa-store"},{key:"usage-list",text:this.$t("console.menu.usageList"),name:B,icon:"fa-solid fa-rotate-left"},{key:"distribution-index",text:this.$t("console.menu.distributionIndex"),name:O,icon:"fa-solid fa-coins"},...this.showSite?[{key:"site-index",text:this.$t("common.nav.site"),name:H,icon:"fa-solid fa-gear"}]:[],{key:"dark-setting",text:this.$t("common.nav.darkMode"),icon:"fa-solid fa-moon",callback:()=>{this.operating.dark=!0}},{key:"locale-setting",text:this.$t("common.nav.locale"),icon:"fa-solid fa-language",callback:()=>{this.operating.locale=!0}},{key:"developerPlatform",text:this.$t("console.menu.developerPlatform"),href:V(),icon:"fa-solid fa-laptop-code"},...this.showSupport?[{key:"support",text:this.$t("common.nav.support"),callback:()=>{this.operating.help=!0},icon:"fa-solid fa-question"}]:[],{key:"logout",text:this.$t("common.nav.logOut"),icon:"fa-solid fa-arrow-right-from-bracket",callback:async()=>{await this.$store.dispatch("resetAll"),await this.$store.dispatch("chat/resetAll"),await this.$store.dispatch("midjourney/resetAll"),await this.$store.dispatch("chatdoc/resetAll"),await this.$store.dispatch("qrart/resetAll"),await this.$store.dispatch("login")}}]}},methods:{onHome(){this.$router.push({name:M})},onNavigate(e){e.name?this.$router.push({name:e.name}):e.href?window.open(e.href,"_blank"):e.callback&&e.callback()}}}),ae={class:"profile"},ne={class:"info"},ie={class:"links"},re=["onClick"],le={class:"icon"},ce={class:"text"},de={class:"suffix"};function pe(e,t,n,i,u,x){const m=s("el-image"),l=s("font-awesome-icon"),f=s("locale-selector"),_=s("dark-selector"),h=s("help-dialog");return g(),C("div",ae,[r("div",ne,[a(m,{src:e.user.avatar,fit:"cover",class:"avatar"},null,8,["src"]),r("h2",null,I(e.user.username),1),r("div",{style:W({backgroundImage:"url("+e.user.avatar+")"}),class:"background"},null,4)]),r("div",ie,[(g(!0),C(G,null,Q(e.links,(o,c)=>(g(),C("a",{key:c,class:K({link:!0,active:e.$route.name===o.name}),onClick:v=>e.onNavigate(o)},[r("span",le,[a(l,{icon:o.icon,class:"text-sm"},null,8,["icon"])]),r("span",ce,I(o.text),1),r("span",de,[a(l,{icon:"fa-solid fa-chevron-right",class:"text-sm"})])],10,re))),128))]),a(f,{visible:e.operating.locale==!0,onClose:t[0]||(t[0]=o=>e.operating.locale=!1)},null,8,["visible"]),a(_,{visible:e.operating.dark==!0,onClose:t[1]||(t[1]=o=>e.operating.dark=!1)},null,8,["visible"]),a(h,{visible:e.operating.help==!0,onClose:t[2]||(t[2]=o=>e.operating.help=!1)},null,8,["visible"])])}var be=T(se,[["render",pe],["__scopeId","data-v-0a2212f8"],["__file","/home/runner/work/Nexior/Nexior/src/pages/profile/Index.vue"]]);export{be as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var ie=Object.defineProperty,le=Object.defineProperties;var oe=Object.getOwnPropertyDescriptors;var Z=Object.getOwnPropertySymbols;var se=Object.prototype.hasOwnProperty,ne=Object.prototype.propertyIsEnumerable;var x=(e,i,u)=>i in e?ie(e,i,{enumerable:!0,configurable:!0,writable:!0,value:u}):e[i]=u,r=(e,i)=>{for(var u in i||(i={}))se.call(i,u)&&x(e,u,i[u]);if(Z)for(var u of Z(i))ne.call(i,u)&&x(e,u,i[u]);return e},p=(e,i)=>le(e,oe(i));import"./vendor-others.4f34a866.js";import{E as J,N as ee,l as R,X as H,a3 as P,O as ae,M as z,b as de,D as re,i as ue,s as pe,h as me,r as fe,I as ce,T as ve,J as he}from"./vendor-element-plus.ddf5f024.js";import{_ as A,H as be,ax as ge}from"./index.583f4c00.js";import{H as F,al as a,o as y,e as I,V as t,M as o,f as s,T as f,U as n,W as U,ai as te,L as q,as as $e,O as K,P as j,S as _e}from"./vendor-@vue.853aef6d.js";import{am as we}from"./vendor-fortawesome.0d1d9585.js";import"./vendor-axios.168e6950.js";import"./vendor-qrcode.452c7ca7.js";const Ce=F({name:"EditText",components:{ElDialog:J,ElInput:ee,ElButton:R,ElIcon:H,Edit:P},props:{modelValue:{type:String,required:!0},title:{type:String,required:!0},placeholder:{type:String,required:!0}},emits:["confirm","cancel"],data(){return{editing:!1,value:this.modelValue}},methods:{onCancel(){this.editing=!1},onConfirm(){this.$emit("confirm",this.value),this.editing=!1}}}),ke={class:"dialog-footer"};function ye(e,i,u,E,B,L){const C=a("el-input"),b=a("el-button"),c=a("el-dialog"),d=a("edit"),$=a("el-icon");return y(),I(U,null,[t(c,{modelValue:e.editing,"onUpdate:modelValue":i[1]||(i[1]=g=>e.editing=g),title:e.title,width:"400px"},{footer:o(()=>[s("span",ke,[t(b,{round:"",onClick:e.onCancel},{default:o(()=>[f(n(e.$t("common.button.cancel")),1)]),_:1},8,["onClick"]),t(b,{round:"",type:"primary",onClick:e.onConfirm},{default:o(()=>[f(n(e.$t("common.button.confirm")),1)]),_:1},8,["onClick"])])]),default:o(()=>[s("div",null,[t(C,{modelValue:e.value,"onUpdate:modelValue":i[0]||(i[0]=g=>e.value=g),placeholder:e.placeholder},null,8,["modelValue","placeholder"])])]),_:1},8,["modelValue","title"]),s("span",{class:"edit",onClick:i[2]||(i[2]=g=>e.editing=!0)},[t($,{class:"icon"},{default:o(()=>[t(d)]),_:1})])],64)}var Ve=A(Ce,[["render",ye],["__file","/home/runner/work/Nexior/Nexior/src/components/site/EditText.vue"]]);const Ee=F({name:"EditImage",components:{ElDialog:J,ElButton:R,FontAwesomeIcon:we,ElIcon:H,Edit:P,ElUpload:ae},props:{modelValue:{type:String,required:!0},title:{type:String,required:!0},tip:{type:String,required:!0}},emits:["confirm","cancel"],data(){return{editing:!1,value:this.modelValue,fileList:[],uploadUrl:be()+"/api/v1/files/"}},computed:{headers(){return{Authorization:`Bearer ${this.$store.state.token.access}`}},urls(){return this.fileList.map(e=>{var i;return(i=e==null?void 0:e.response)==null?void 0:i.file_url})}},methods:{onCancel(){this.editing=!1},onConfirm(){var e;this.$emit("confirm",(e=this.urls)==null?void 0:e[0]),this.editing=!1},onExceed(){z.warning(this.$t("site.message.uploadImageExceed"))},onError(){z.error(this.$t("site.message.uploadImageError"))}}}),Ie={class:"el-upload__tip"},Se={class:"dialog-footer"};function Te(e,i,u,E,B,L){const C=a("font-awesome-icon"),b=a("el-button"),c=a("el-upload"),d=a("el-dialog"),$=a("edit"),g=a("el-icon");return y(),I(U,null,[t(d,{modelValue:e.editing,"onUpdate:modelValue":i[1]||(i[1]=m=>e.editing=m),title:e.title,width:"400px"},{footer:o(()=>[s("span",Se,[t(b,{round:"",onClick:e.onCancel},{default:o(()=>[f(n(e.$t("common.button.cancel")),1)]),_:1},8,["onClick"]),t(b,{round:"",type:"primary",onClick:e.onConfirm},{default:o(()=>[f(n(e.$t("common.button.confirm")),1)]),_:1},8,["onClick"])])]),default:o(()=>[s("div",null,[t(c,{"file-list":e.fileList,"onUpdate:file-list":i[0]||(i[0]=m=>e.fileList=m),name:"file",limit:5,multiple:!0,action:e.uploadUrl,"list-type":"picture","on-exceed":e.onExceed,"on-error":e.onError,headers:e.headers},{tip:o(()=>[s("div",Ie,n(e.tip),1)]),default:o(()=>[t(b,{round:"",type:"primary",class:"btn btn-upload"},{default:o(()=>[t(C,{icon:"fa-solid fa-upload",class:"icon mr-2"}),f(" "+n(e.$t("site.button.upload")),1)]),_:1})]),_:1},8,["file-list","action","on-exceed","on-error","headers"])])]),_:1},8,["modelValue","title"]),s("span",{class:"edit",onClick:i[2]||(i[2]=m=>e.editing=!0)},[t(g,{class:"icon"},{default:o(()=>[t($)]),_:1})])],64)}var Ue=A(Ee,[["render",Te],["__file","/home/runner/work/Nexior/Nexior/src/components/site/EditImage.vue"]]);const Ne=F({name:"EditText",components:{ElDialog:J,ElInput:ee,ElButton:R,ElIcon:H,ElTag:de,Edit:P},props:{modelValue:{type:Array,required:!0},title:{type:String,required:!0},placeholder:{type:String,required:!0},tip:{type:String,default:void 0},min:{type:Number,default:void 0},minErrorMessage:{type:String,default:void 0}},emits:["confirm","cancel"],data(){return{inputVisible:!1,inputValue:"",editing:!1,value:JSON.parse(JSON.stringify(this.modelValue))}},methods:{onCancel(){this.editing=!1},onConfirm(){if(this.min!==void 0&&this.value.length<this.min){z.error(this.minErrorMessage);return}this.$emit("confirm",this.value),this.editing=!1},onClose(e){this.value.splice(this.value.indexOf(e),1)},onInputConfirm(){const e=this.inputValue;e&&this.value.push(e),this.inputVisible=!1,this.inputValue=""},onNewItem(){this.inputVisible=!0,this.$nextTick(()=>{this.$refs.input.focus()})}}}),De=f(" + "),qe={class:"block tip"},Ae={class:"dialog-footer"};function Fe(e,i,u,E,B,L){const C=a("el-tag"),b=a("el-input"),c=a("el-button"),d=a("el-dialog"),$=a("edit"),g=a("el-icon");return y(),I(U,null,[t(d,{modelValue:e.editing,"onUpdate:modelValue":i[1]||(i[1]=m=>e.editing=m),title:e.title,width:"400px"},{footer:o(()=>[s("span",Ae,[t(c,{round:"",onClick:e.onCancel},{default:o(()=>[f(n(e.$t("common.button.cancel")),1)]),_:1},8,["onClick"]),t(c,{round:"",type:"primary",onClick:e.onConfirm},{default:o(()=>[f(n(e.$t("common.button.confirm")),1)]),_:1},8,["onClick"])])]),default:o(()=>[(y(!0),I(U,null,te(e.value,(m,N)=>(y(),q(C,{key:N,closable:"",round:"",class:"mr-2 mb-2","disable-transitions":!1,onClose:S=>e.onClose(m)},{default:o(()=>[f(n(m),1)]),_:2},1032,["onClose"]))),128)),e.inputVisible?(y(),q(b,{key:0,ref:"input",modelValue:e.inputValue,"onUpdate:modelValue":i[0]||(i[0]=m=>e.inputValue=m),class:"block",size:"small",onKeyup:$e(e.onInputConfirm,["enter"]),onBlur:e.onInputConfirm},null,8,["modelValue","onKeyup","onBlur"])):(y(),q(c,{key:1,round:"",class:"block",size:"small",onClick:e.onNewItem},{default:o(()=>[De]),_:1},8,["onClick"])),s("span",qe,n(e.tip),1)]),_:1},8,["modelValue","title"]),s("span",{class:"edit",onClick:i[2]||(i[2]=m=>e.editing=!0)},[t(g,{class:"icon"},{default:o(()=>[t($)]),_:1})])],64)}var Be=A(Ne,[["render",Fe],["__file","/home/runner/work/Nexior/Nexior/src/components/site/EditArray.vue"]]);const Le=F({name:"SiteIndex",components:{EditText:Ve,EditImage:Ue,EditArray:Be,ElDivider:re,ElRow:ue,ElImage:pe,ElCol:me,ElCard:fe,ElForm:ce,ElSwitch:ve,ElFormItem:he},data(){return{editing:{title:!1}}},computed:{site(){return this.$store.getters.site}},methods:{onSave(e){var u;const i=r(r({},this.site),e);ge.update((u=this.site)==null?void 0:u.id,i).then(()=>{var E;console.debug("getSite for id",(E=this.site)==null?void 0:E.id),this.$store.dispatch("getSite")})}}}),Oe={class:"title"},Me={class:"title"},Ke={class:"block w-full"},je={class:"block tip"},ze={class:"block w-full"},Je={class:"block tip"},Re={class:"block w-full"},He={class:"block tip"},Pe={class:"block w-full"},Qe={class:"block tip"},We={class:"block w-full"},Xe={class:"block tip"},Ge={class:"title"},Ye={class:"block w-full"},Ze={class:"block tip"},xe={class:"block w-full"},et={class:"block tip"},tt={class:"title"},it={class:"block tip"},lt={class:"block tip"},ot={class:"title"},st={class:"w-full"},nt={class:"block tip w-full"},at={key:0},dt={class:"block w-full"},rt={class:"block w-full"};function ut(e,i,u,E,B,L){const C=a("el-col"),b=a("el-row"),c=a("el-divider"),d=a("el-form-item"),$=a("edit-text"),g=a("el-image"),m=a("edit-image"),N=a("edit-array"),S=a("el-form"),D=a("el-card"),O=a("el-switch");return y(),q(b,{class:"panel"},{default:o(()=>[t(C,{span:24},{default:o(()=>[t(b,null,{default:o(()=>[t(C,{span:24},{default:o(()=>[s("h2",Oe,n(e.$t("common.title.site")),1)]),_:1})]),_:1}),t(b,{gutter:15},{default:o(()=>[t(C,{md:12,xs:24},{default:o(()=>[t(D,{shadow:"hover",class:"mb-4"},{default:o(()=>[s("h4",Me,n(e.$t("site.title.basicConfig")),1),t(c),t(S,{model:e.site,class:"form","label-width":"auto",style:{"max-width":"600px"}},{default:o(()=>[t(d,{label:e.$t("site.field.origin")},{default:o(()=>[s("span",Ke,n(e.site.origin),1),s("span",je,n(e.$t("site.message.originTip")),1)]),_:1},8,["label"]),t(d,{label:e.$t("site.field.title")},{default:o(()=>[s("span",ze,[f(n(e.site.title)+" ",1),t($,{"model-value":e.site.title,title:e.$t("site.title.editTitle"),placeholder:e.$t("site.placeholder.title"),onConfirm:i[0]||(i[0]=l=>e.onSave({title:l}))},null,8,["model-value","title","placeholder"])]),s("span",Je,n(e.$t("site.message.titleTip")),1)]),_:1},8,["label"]),t(d,{label:e.$t("site.field.logo")},{default:o(()=>[s("span",Re,[t(g,{src:e.site.logo,class:"logo"},null,8,["src"]),t(m,{"model-value":e.site.logo,title:e.$t("site.title.editLogo"),tip:e.$t("site.message.editLogoTip"),onConfirm:i[1]||(i[1]=l=>e.onSave({logo:l}))},null,8,["model-value","title","tip"])]),s("span",He,n(e.$t("site.message.logoTip")),1)]),_:1},8,["label"]),t(d,{label:e.$t("site.field.favicon")},{default:o(()=>[s("span",Pe,[t(g,{src:e.site.favicon,class:"favicon"},null,8,["src"]),t(m,{"model-value":e.site.favicon,title:e.$t("site.title.editFavicon"),tip:e.$t("site.message.editFaviconTip"),onConfirm:i[2]||(i[2]=l=>e.onSave({favicon:l}))},null,8,["model-value","title","tip"])]),s("span",Qe,n(e.$t("site.message.faviconTip")),1)]),_:1},8,["label"]),t(c,{"border-style":"dashed"}),t(d,{label:e.$t("site.field.admins")},{default:o(()=>{var l,v;return[s("span",We,[f(n((l=e.site.admins)==null?void 0:l.join(", "))+" ",1),t(N,{"model-value":((v=e.site)==null?void 0:v.admins)||[],title:e.$t("site.title.editAdmins"),placeholder:e.$t("site.placeholder.admins"),tip:e.$t("site.message.adminsTip2"),min:1,"min-error-message":e.$t("site.message.atLeastOneAdmin"),onConfirm:i[3]||(i[3]=k=>e.onSave({admins:k}))},null,8,["model-value","title","placeholder","tip","min-error-message"])]),s("span",Xe,n(e.$t("site.message.adminsTip")),1)]}),_:1},8,["label"])]),_:1},8,["model"])]),_:1}),t(D,{shadow:"hover"},{default:o(()=>[s("h4",Ge,n(e.$t("site.title.seoConfig")),1),t(c),t(S,{model:e.site,class:"form","label-width":"auto",style:{"max-width":"600px"}},{default:o(()=>[t(d,{label:e.$t("site.field.description")},{default:o(()=>[s("span",Ye,[f(n(e.site.description)+" ",1),t($,{"model-value":e.site.description,title:e.$t("site.title.editDescription"),placeholder:e.$t("site.placeholder.description"),onConfirm:i[4]||(i[4]=l=>e.onSave({description:l}))},null,8,["model-value","title","placeholder"])]),s("span",Ze,n(e.$t("site.message.descriptionTip")),1)]),_:1},8,["label"]),t(d,{label:e.$t("site.field.keywords")},{default:o(()=>{var l,v;return[s("span",xe,[f(n((l=e.site.keywords)==null?void 0:l.join(", "))+" ",1),t(N,{"model-value":((v=e.site)==null?void 0:v.keywords)||[],title:e.$t("site.title.editKeywords"),placeholder:e.$t("site.placeholder.keywords"),tip:e.$t("site.message.keywordsTip2"),onConfirm:i[5]||(i[5]=k=>e.onSave({keywords:k}))},null,8,["model-value","title","placeholder","tip"])]),s("span",et,n(e.$t("site.message.keywordsTip")),1)]}),_:1},8,["label"])]),_:1},8,["model"])]),_:1})]),_:1}),t(C,{md:12,xs:24},{default:o(()=>[t(D,{shadow:"hover",class:"mb-4"},{default:o(()=>[s("h4",tt,n(e.$t("site.title.distributionConfig")),1),t(c),t(S,{model:e.site,class:"form","label-width":"auto",style:{"max-width":"600px"}},{default:o(()=>[t(d,{label:e.$t("site.field.distributionDefaultInviterId")},{default:o(()=>{var l,v;return[f(n((l=e.site.distribution)==null?void 0:l.default_inviter_id)+" ",1),t($,{"model-value":(v=e.site.distribution)==null?void 0:v.default_inviter_id,title:e.$t("site.title.editDistributionDefaultInviterId"),placeholder:e.$t("site.placeholder.editDistributionDefaultInviterId"),onConfirm:i[6]||(i[6]=k=>e.onSave({distribution:p(r({},e.site.distribution),{default_inviter_id:k})}))},null,8,["model-value","title","placeholder"]),s("span",it,n(e.$t("site.message.distributionDefaultInviterIdTip")),1)]}),_:1},8,["label"]),t(d,{label:e.$t("site.field.distributionForceInviterId")},{default:o(()=>{var l,v;return[f(n((l=e.site.distribution)==null?void 0:l.force_inviter_id)+" ",1),t($,{"model-value":(v=e.site.distribution)==null?void 0:v.force_inviter_id,title:e.$t("site.title.editDistributionForceInviterId"),placeholder:e.$t("site.placeholder.editDistributionForceInviterId"),onConfirm:i[7]||(i[7]=k=>e.onSave({distribution:p(r({},e.site.distribution),{force_inviter_id:k})}))},null,8,["model-value","title","placeholder"]),s("span",lt,n(e.$t("site.message.distributionForceInviterIdTip")),1)]}),_:1},8,["label"])]),_:1},8,["model"])]),_:1}),t(D,{shadow:"hover"},{default:o(()=>[s("h4",ot,n(e.$t("site.title.featuresConfig")),1),t(c),t(S,{model:e.site,class:"form","label-width":"auto",style:{"max-width":"600px"}},{default:o(()=>[(y(),I(U,null,te(["chat","midjourney","qrart","suno","luma","support"],(l,v)=>t(d,{key:v,label:e.$t("site.field.features"+l.charAt(0).toUpperCase()+l.slice(1))},{default:o(()=>{var k,Q,W,X,G,Y;return[s("div",st,[t(O,{"model-value":((k=e.site.features[l])==null?void 0:k.enabled)||!1,"inline-prompt":"","active-text":e.$t("site.button.enabled"),"inactive-text":e.$t("site.button.disabled"),"onUpdate:modelValue":h=>e.onSave({features:p(r({},e.site.features),{[l]:p(r({},e.site.features[l]),{enabled:h})})})},null,8,["model-value","active-text","inactive-text","onUpdate:modelValue"])]),s("span",nt,n(e.$t("site.message.features"+l.charAt(0).toUpperCase()+l.slice(1))),1),l==="support"?K((y(),I("div",at,[t(d,{label:"WeChat"},{default:o(()=>{var h,_;return[t(O,{"model-value":((_=(h=e.site.features[l])==null?void 0:h.wechat)==null?void 0:_.enabled)||!1,"inline-prompt":"","active-text":e.$t("site.button.enabled"),"inactive-text":e.$t("site.button.disabled"),"onUpdate:modelValue":V=>{var w;return e.onSave({features:p(r({},e.site.features),{[l]:p(r({},e.site.features[l]),{wechat:p(r({},(w=e.site.features[l])==null?void 0:w.wechat),{enabled:V})})})})}},null,8,["model-value","active-text","inactive-text","onUpdate:modelValue"])]}),_:2},1024),K(t(d,{label:e.$t("site.field.qr")},{default:o(()=>{var h,_,V,w;return[s("span",dt,[t(g,{src:(_=(h=e.site.features[l])==null?void 0:h.wechat)==null?void 0:_.qr},null,8,["src"]),t(m,{"model-value":(w=(V=e.site.features[l])==null?void 0:V.wechat)==null?void 0:w.qr,title:e.$t("site.title.editQR"),tip:e.$t("site.message.editQRTip"),onConfirm:M=>{var T;return e.onSave({features:p(r({},e.site.features),{[l]:p(r({},e.site.features[l]),{wechat:p(r({},(T=e.site.features[l])==null?void 0:T.wechat),{qr:M})})})})}},null,8,["model-value","title","tip","onConfirm"])])]}),_:2},1032,["label"]),[[j,(W=(Q=e.site.features[l])==null?void 0:Q.wechat)==null?void 0:W.enabled]]),t(d,{label:"Discord"},{default:o(()=>{var h,_;return[t(O,{"model-value":((_=(h=e.site.features[l])==null?void 0:h.discord)==null?void 0:_.enabled)||!1,"inline-prompt":"","active-text":e.$t("site.button.enabled"),"inactive-text":e.$t("site.button.disabled"),"onUpdate:modelValue":V=>{var w;return e.onSave({features:p(r({},e.site.features),{[l]:p(r({},e.site.features[l]),{discord:p(r({},(w=e.site.features[l])==null?void 0:w.discord),{enabled:V})})})})}},null,8,["model-value","active-text","inactive-text","onUpdate:modelValue"])]}),_:2},1024),K(t(d,{label:e.$t("site.field.url")},{default:o(()=>{var h,_,V,w;return[s("span",rt,[f(n((_=(h=e.site.features[l])==null?void 0:h.discord)==null?void 0:_.url)+" ",1),t($,{"model-value":(w=(V=e.site.features[l])==null?void 0:V.discord)==null?void 0:w.url,title:e.$t("site.title.editUrl"),placeholder:e.$t("site.placeholder.editUrl"),onConfirm:M=>{var T;return e.onSave({features:p(r({},e.site.features),{[l]:p(r({},e.site.features[l]),{discord:p(r({},(T=e.site.features[l])==null?void 0:T.discord),{url:M})})})})}},null,8,["model-value","title","placeholder","onConfirm"])])]}),_:2},1032,["label"]),[[j,(G=(X=e.site.features[l])==null?void 0:X.discord)==null?void 0:G.enabled]])],512)),[[j,(Y=e.site.features[l])==null?void 0:Y.enabled]]):_e("v-if",!0)]}),_:2},1032,["label"])),64))]),_:1},8,["model"])]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})}var $t=A(Le,[["render",ut],["__scopeId","data-v-262b806e"],["__file","/home/runner/work/Nexior/Nexior/src/pages/site/Index.vue"]]);export{$t as default};
|
|
1
|
+
var ie=Object.defineProperty,le=Object.defineProperties;var oe=Object.getOwnPropertyDescriptors;var Z=Object.getOwnPropertySymbols;var se=Object.prototype.hasOwnProperty,ne=Object.prototype.propertyIsEnumerable;var x=(e,i,u)=>i in e?ie(e,i,{enumerable:!0,configurable:!0,writable:!0,value:u}):e[i]=u,r=(e,i)=>{for(var u in i||(i={}))se.call(i,u)&&x(e,u,i[u]);if(Z)for(var u of Z(i))ne.call(i,u)&&x(e,u,i[u]);return e},p=(e,i)=>le(e,oe(i));import"./vendor-others.4f34a866.js";import{E as J,N as ee,l as R,X as H,a3 as P,O as ae,M as z,b as de,D as re,i as ue,s as pe,h as me,r as fe,I as ce,T as ve,J as he}from"./vendor-element-plus.ddf5f024.js";import{_ as A,H as be,ax as ge}from"./index.cf1347fe.js";import{H as F,al as a,o as y,e as I,V as t,M as o,f as s,T as f,U as n,W as U,ai as te,L as q,as as $e,O as K,P as j,S as _e}from"./vendor-@vue.853aef6d.js";import{am as we}from"./vendor-fortawesome.0d1d9585.js";import"./vendor-axios.168e6950.js";import"./vendor-qrcode.452c7ca7.js";const Ce=F({name:"EditText",components:{ElDialog:J,ElInput:ee,ElButton:R,ElIcon:H,Edit:P},props:{modelValue:{type:String,required:!0},title:{type:String,required:!0},placeholder:{type:String,required:!0}},emits:["confirm","cancel"],data(){return{editing:!1,value:this.modelValue}},methods:{onCancel(){this.editing=!1},onConfirm(){this.$emit("confirm",this.value),this.editing=!1}}}),ke={class:"dialog-footer"};function ye(e,i,u,E,B,L){const C=a("el-input"),b=a("el-button"),c=a("el-dialog"),d=a("edit"),$=a("el-icon");return y(),I(U,null,[t(c,{modelValue:e.editing,"onUpdate:modelValue":i[1]||(i[1]=g=>e.editing=g),title:e.title,width:"400px"},{footer:o(()=>[s("span",ke,[t(b,{round:"",onClick:e.onCancel},{default:o(()=>[f(n(e.$t("common.button.cancel")),1)]),_:1},8,["onClick"]),t(b,{round:"",type:"primary",onClick:e.onConfirm},{default:o(()=>[f(n(e.$t("common.button.confirm")),1)]),_:1},8,["onClick"])])]),default:o(()=>[s("div",null,[t(C,{modelValue:e.value,"onUpdate:modelValue":i[0]||(i[0]=g=>e.value=g),placeholder:e.placeholder},null,8,["modelValue","placeholder"])])]),_:1},8,["modelValue","title"]),s("span",{class:"edit",onClick:i[2]||(i[2]=g=>e.editing=!0)},[t($,{class:"icon"},{default:o(()=>[t(d)]),_:1})])],64)}var Ve=A(Ce,[["render",ye],["__file","/home/runner/work/Nexior/Nexior/src/components/site/EditText.vue"]]);const Ee=F({name:"EditImage",components:{ElDialog:J,ElButton:R,FontAwesomeIcon:we,ElIcon:H,Edit:P,ElUpload:ae},props:{modelValue:{type:String,required:!0},title:{type:String,required:!0},tip:{type:String,required:!0}},emits:["confirm","cancel"],data(){return{editing:!1,value:this.modelValue,fileList:[],uploadUrl:be()+"/api/v1/files/"}},computed:{headers(){return{Authorization:`Bearer ${this.$store.state.token.access}`}},urls(){return this.fileList.map(e=>{var i;return(i=e==null?void 0:e.response)==null?void 0:i.file_url})}},methods:{onCancel(){this.editing=!1},onConfirm(){var e;this.$emit("confirm",(e=this.urls)==null?void 0:e[0]),this.editing=!1},onExceed(){z.warning(this.$t("site.message.uploadImageExceed"))},onError(){z.error(this.$t("site.message.uploadImageError"))}}}),Ie={class:"el-upload__tip"},Se={class:"dialog-footer"};function Te(e,i,u,E,B,L){const C=a("font-awesome-icon"),b=a("el-button"),c=a("el-upload"),d=a("el-dialog"),$=a("edit"),g=a("el-icon");return y(),I(U,null,[t(d,{modelValue:e.editing,"onUpdate:modelValue":i[1]||(i[1]=m=>e.editing=m),title:e.title,width:"400px"},{footer:o(()=>[s("span",Se,[t(b,{round:"",onClick:e.onCancel},{default:o(()=>[f(n(e.$t("common.button.cancel")),1)]),_:1},8,["onClick"]),t(b,{round:"",type:"primary",onClick:e.onConfirm},{default:o(()=>[f(n(e.$t("common.button.confirm")),1)]),_:1},8,["onClick"])])]),default:o(()=>[s("div",null,[t(c,{"file-list":e.fileList,"onUpdate:file-list":i[0]||(i[0]=m=>e.fileList=m),name:"file",limit:5,multiple:!0,action:e.uploadUrl,"list-type":"picture","on-exceed":e.onExceed,"on-error":e.onError,headers:e.headers},{tip:o(()=>[s("div",Ie,n(e.tip),1)]),default:o(()=>[t(b,{round:"",type:"primary",class:"btn btn-upload"},{default:o(()=>[t(C,{icon:"fa-solid fa-upload",class:"icon mr-2"}),f(" "+n(e.$t("site.button.upload")),1)]),_:1})]),_:1},8,["file-list","action","on-exceed","on-error","headers"])])]),_:1},8,["modelValue","title"]),s("span",{class:"edit",onClick:i[2]||(i[2]=m=>e.editing=!0)},[t(g,{class:"icon"},{default:o(()=>[t($)]),_:1})])],64)}var Ue=A(Ee,[["render",Te],["__file","/home/runner/work/Nexior/Nexior/src/components/site/EditImage.vue"]]);const Ne=F({name:"EditText",components:{ElDialog:J,ElInput:ee,ElButton:R,ElIcon:H,ElTag:de,Edit:P},props:{modelValue:{type:Array,required:!0},title:{type:String,required:!0},placeholder:{type:String,required:!0},tip:{type:String,default:void 0},min:{type:Number,default:void 0},minErrorMessage:{type:String,default:void 0}},emits:["confirm","cancel"],data(){return{inputVisible:!1,inputValue:"",editing:!1,value:JSON.parse(JSON.stringify(this.modelValue))}},methods:{onCancel(){this.editing=!1},onConfirm(){if(this.min!==void 0&&this.value.length<this.min){z.error(this.minErrorMessage);return}this.$emit("confirm",this.value),this.editing=!1},onClose(e){this.value.splice(this.value.indexOf(e),1)},onInputConfirm(){const e=this.inputValue;e&&this.value.push(e),this.inputVisible=!1,this.inputValue=""},onNewItem(){this.inputVisible=!0,this.$nextTick(()=>{this.$refs.input.focus()})}}}),De=f(" + "),qe={class:"block tip"},Ae={class:"dialog-footer"};function Fe(e,i,u,E,B,L){const C=a("el-tag"),b=a("el-input"),c=a("el-button"),d=a("el-dialog"),$=a("edit"),g=a("el-icon");return y(),I(U,null,[t(d,{modelValue:e.editing,"onUpdate:modelValue":i[1]||(i[1]=m=>e.editing=m),title:e.title,width:"400px"},{footer:o(()=>[s("span",Ae,[t(c,{round:"",onClick:e.onCancel},{default:o(()=>[f(n(e.$t("common.button.cancel")),1)]),_:1},8,["onClick"]),t(c,{round:"",type:"primary",onClick:e.onConfirm},{default:o(()=>[f(n(e.$t("common.button.confirm")),1)]),_:1},8,["onClick"])])]),default:o(()=>[(y(!0),I(U,null,te(e.value,(m,N)=>(y(),q(C,{key:N,closable:"",round:"",class:"mr-2 mb-2","disable-transitions":!1,onClose:S=>e.onClose(m)},{default:o(()=>[f(n(m),1)]),_:2},1032,["onClose"]))),128)),e.inputVisible?(y(),q(b,{key:0,ref:"input",modelValue:e.inputValue,"onUpdate:modelValue":i[0]||(i[0]=m=>e.inputValue=m),class:"block",size:"small",onKeyup:$e(e.onInputConfirm,["enter"]),onBlur:e.onInputConfirm},null,8,["modelValue","onKeyup","onBlur"])):(y(),q(c,{key:1,round:"",class:"block",size:"small",onClick:e.onNewItem},{default:o(()=>[De]),_:1},8,["onClick"])),s("span",qe,n(e.tip),1)]),_:1},8,["modelValue","title"]),s("span",{class:"edit",onClick:i[2]||(i[2]=m=>e.editing=!0)},[t(g,{class:"icon"},{default:o(()=>[t($)]),_:1})])],64)}var Be=A(Ne,[["render",Fe],["__file","/home/runner/work/Nexior/Nexior/src/components/site/EditArray.vue"]]);const Le=F({name:"SiteIndex",components:{EditText:Ve,EditImage:Ue,EditArray:Be,ElDivider:re,ElRow:ue,ElImage:pe,ElCol:me,ElCard:fe,ElForm:ce,ElSwitch:ve,ElFormItem:he},data(){return{editing:{title:!1}}},computed:{site(){return this.$store.getters.site}},methods:{onSave(e){var u;const i=r(r({},this.site),e);ge.update((u=this.site)==null?void 0:u.id,i).then(()=>{var E;console.debug("getSite for id",(E=this.site)==null?void 0:E.id),this.$store.dispatch("getSite")})}}}),Oe={class:"title"},Me={class:"title"},Ke={class:"block w-full"},je={class:"block tip"},ze={class:"block w-full"},Je={class:"block tip"},Re={class:"block w-full"},He={class:"block tip"},Pe={class:"block w-full"},Qe={class:"block tip"},We={class:"block w-full"},Xe={class:"block tip"},Ge={class:"title"},Ye={class:"block w-full"},Ze={class:"block tip"},xe={class:"block w-full"},et={class:"block tip"},tt={class:"title"},it={class:"block tip"},lt={class:"block tip"},ot={class:"title"},st={class:"w-full"},nt={class:"block tip w-full"},at={key:0},dt={class:"block w-full"},rt={class:"block w-full"};function ut(e,i,u,E,B,L){const C=a("el-col"),b=a("el-row"),c=a("el-divider"),d=a("el-form-item"),$=a("edit-text"),g=a("el-image"),m=a("edit-image"),N=a("edit-array"),S=a("el-form"),D=a("el-card"),O=a("el-switch");return y(),q(b,{class:"panel"},{default:o(()=>[t(C,{span:24},{default:o(()=>[t(b,null,{default:o(()=>[t(C,{span:24},{default:o(()=>[s("h2",Oe,n(e.$t("common.title.site")),1)]),_:1})]),_:1}),t(b,{gutter:15},{default:o(()=>[t(C,{md:12,xs:24},{default:o(()=>[t(D,{shadow:"hover",class:"mb-4"},{default:o(()=>[s("h4",Me,n(e.$t("site.title.basicConfig")),1),t(c),t(S,{model:e.site,class:"form","label-width":"auto",style:{"max-width":"600px"}},{default:o(()=>[t(d,{label:e.$t("site.field.origin")},{default:o(()=>[s("span",Ke,n(e.site.origin),1),s("span",je,n(e.$t("site.message.originTip")),1)]),_:1},8,["label"]),t(d,{label:e.$t("site.field.title")},{default:o(()=>[s("span",ze,[f(n(e.site.title)+" ",1),t($,{"model-value":e.site.title,title:e.$t("site.title.editTitle"),placeholder:e.$t("site.placeholder.title"),onConfirm:i[0]||(i[0]=l=>e.onSave({title:l}))},null,8,["model-value","title","placeholder"])]),s("span",Je,n(e.$t("site.message.titleTip")),1)]),_:1},8,["label"]),t(d,{label:e.$t("site.field.logo")},{default:o(()=>[s("span",Re,[t(g,{src:e.site.logo,class:"logo"},null,8,["src"]),t(m,{"model-value":e.site.logo,title:e.$t("site.title.editLogo"),tip:e.$t("site.message.editLogoTip"),onConfirm:i[1]||(i[1]=l=>e.onSave({logo:l}))},null,8,["model-value","title","tip"])]),s("span",He,n(e.$t("site.message.logoTip")),1)]),_:1},8,["label"]),t(d,{label:e.$t("site.field.favicon")},{default:o(()=>[s("span",Pe,[t(g,{src:e.site.favicon,class:"favicon"},null,8,["src"]),t(m,{"model-value":e.site.favicon,title:e.$t("site.title.editFavicon"),tip:e.$t("site.message.editFaviconTip"),onConfirm:i[2]||(i[2]=l=>e.onSave({favicon:l}))},null,8,["model-value","title","tip"])]),s("span",Qe,n(e.$t("site.message.faviconTip")),1)]),_:1},8,["label"]),t(c,{"border-style":"dashed"}),t(d,{label:e.$t("site.field.admins")},{default:o(()=>{var l,v;return[s("span",We,[f(n((l=e.site.admins)==null?void 0:l.join(", "))+" ",1),t(N,{"model-value":((v=e.site)==null?void 0:v.admins)||[],title:e.$t("site.title.editAdmins"),placeholder:e.$t("site.placeholder.admins"),tip:e.$t("site.message.adminsTip2"),min:1,"min-error-message":e.$t("site.message.atLeastOneAdmin"),onConfirm:i[3]||(i[3]=k=>e.onSave({admins:k}))},null,8,["model-value","title","placeholder","tip","min-error-message"])]),s("span",Xe,n(e.$t("site.message.adminsTip")),1)]}),_:1},8,["label"])]),_:1},8,["model"])]),_:1}),t(D,{shadow:"hover"},{default:o(()=>[s("h4",Ge,n(e.$t("site.title.seoConfig")),1),t(c),t(S,{model:e.site,class:"form","label-width":"auto",style:{"max-width":"600px"}},{default:o(()=>[t(d,{label:e.$t("site.field.description")},{default:o(()=>[s("span",Ye,[f(n(e.site.description)+" ",1),t($,{"model-value":e.site.description,title:e.$t("site.title.editDescription"),placeholder:e.$t("site.placeholder.description"),onConfirm:i[4]||(i[4]=l=>e.onSave({description:l}))},null,8,["model-value","title","placeholder"])]),s("span",Ze,n(e.$t("site.message.descriptionTip")),1)]),_:1},8,["label"]),t(d,{label:e.$t("site.field.keywords")},{default:o(()=>{var l,v;return[s("span",xe,[f(n((l=e.site.keywords)==null?void 0:l.join(", "))+" ",1),t(N,{"model-value":((v=e.site)==null?void 0:v.keywords)||[],title:e.$t("site.title.editKeywords"),placeholder:e.$t("site.placeholder.keywords"),tip:e.$t("site.message.keywordsTip2"),onConfirm:i[5]||(i[5]=k=>e.onSave({keywords:k}))},null,8,["model-value","title","placeholder","tip"])]),s("span",et,n(e.$t("site.message.keywordsTip")),1)]}),_:1},8,["label"])]),_:1},8,["model"])]),_:1})]),_:1}),t(C,{md:12,xs:24},{default:o(()=>[t(D,{shadow:"hover",class:"mb-4"},{default:o(()=>[s("h4",tt,n(e.$t("site.title.distributionConfig")),1),t(c),t(S,{model:e.site,class:"form","label-width":"auto",style:{"max-width":"600px"}},{default:o(()=>[t(d,{label:e.$t("site.field.distributionDefaultInviterId")},{default:o(()=>{var l,v;return[f(n((l=e.site.distribution)==null?void 0:l.default_inviter_id)+" ",1),t($,{"model-value":(v=e.site.distribution)==null?void 0:v.default_inviter_id,title:e.$t("site.title.editDistributionDefaultInviterId"),placeholder:e.$t("site.placeholder.editDistributionDefaultInviterId"),onConfirm:i[6]||(i[6]=k=>e.onSave({distribution:p(r({},e.site.distribution),{default_inviter_id:k})}))},null,8,["model-value","title","placeholder"]),s("span",it,n(e.$t("site.message.distributionDefaultInviterIdTip")),1)]}),_:1},8,["label"]),t(d,{label:e.$t("site.field.distributionForceInviterId")},{default:o(()=>{var l,v;return[f(n((l=e.site.distribution)==null?void 0:l.force_inviter_id)+" ",1),t($,{"model-value":(v=e.site.distribution)==null?void 0:v.force_inviter_id,title:e.$t("site.title.editDistributionForceInviterId"),placeholder:e.$t("site.placeholder.editDistributionForceInviterId"),onConfirm:i[7]||(i[7]=k=>e.onSave({distribution:p(r({},e.site.distribution),{force_inviter_id:k})}))},null,8,["model-value","title","placeholder"]),s("span",lt,n(e.$t("site.message.distributionForceInviterIdTip")),1)]}),_:1},8,["label"])]),_:1},8,["model"])]),_:1}),t(D,{shadow:"hover"},{default:o(()=>[s("h4",ot,n(e.$t("site.title.featuresConfig")),1),t(c),t(S,{model:e.site,class:"form","label-width":"auto",style:{"max-width":"600px"}},{default:o(()=>[(y(),I(U,null,te(["chat","midjourney","qrart","suno","luma","support"],(l,v)=>t(d,{key:v,label:e.$t("site.field.features"+l.charAt(0).toUpperCase()+l.slice(1))},{default:o(()=>{var k,Q,W,X,G,Y;return[s("div",st,[t(O,{"model-value":((k=e.site.features[l])==null?void 0:k.enabled)||!1,"inline-prompt":"","active-text":e.$t("site.button.enabled"),"inactive-text":e.$t("site.button.disabled"),"onUpdate:modelValue":h=>e.onSave({features:p(r({},e.site.features),{[l]:p(r({},e.site.features[l]),{enabled:h})})})},null,8,["model-value","active-text","inactive-text","onUpdate:modelValue"])]),s("span",nt,n(e.$t("site.message.features"+l.charAt(0).toUpperCase()+l.slice(1))),1),l==="support"?K((y(),I("div",at,[t(d,{label:"WeChat"},{default:o(()=>{var h,_;return[t(O,{"model-value":((_=(h=e.site.features[l])==null?void 0:h.wechat)==null?void 0:_.enabled)||!1,"inline-prompt":"","active-text":e.$t("site.button.enabled"),"inactive-text":e.$t("site.button.disabled"),"onUpdate:modelValue":V=>{var w;return e.onSave({features:p(r({},e.site.features),{[l]:p(r({},e.site.features[l]),{wechat:p(r({},(w=e.site.features[l])==null?void 0:w.wechat),{enabled:V})})})})}},null,8,["model-value","active-text","inactive-text","onUpdate:modelValue"])]}),_:2},1024),K(t(d,{label:e.$t("site.field.qr")},{default:o(()=>{var h,_,V,w;return[s("span",dt,[t(g,{src:(_=(h=e.site.features[l])==null?void 0:h.wechat)==null?void 0:_.qr},null,8,["src"]),t(m,{"model-value":(w=(V=e.site.features[l])==null?void 0:V.wechat)==null?void 0:w.qr,title:e.$t("site.title.editQR"),tip:e.$t("site.message.editQRTip"),onConfirm:M=>{var T;return e.onSave({features:p(r({},e.site.features),{[l]:p(r({},e.site.features[l]),{wechat:p(r({},(T=e.site.features[l])==null?void 0:T.wechat),{qr:M})})})})}},null,8,["model-value","title","tip","onConfirm"])])]}),_:2},1032,["label"]),[[j,(W=(Q=e.site.features[l])==null?void 0:Q.wechat)==null?void 0:W.enabled]]),t(d,{label:"Discord"},{default:o(()=>{var h,_;return[t(O,{"model-value":((_=(h=e.site.features[l])==null?void 0:h.discord)==null?void 0:_.enabled)||!1,"inline-prompt":"","active-text":e.$t("site.button.enabled"),"inactive-text":e.$t("site.button.disabled"),"onUpdate:modelValue":V=>{var w;return e.onSave({features:p(r({},e.site.features),{[l]:p(r({},e.site.features[l]),{discord:p(r({},(w=e.site.features[l])==null?void 0:w.discord),{enabled:V})})})})}},null,8,["model-value","active-text","inactive-text","onUpdate:modelValue"])]}),_:2},1024),K(t(d,{label:e.$t("site.field.url")},{default:o(()=>{var h,_,V,w;return[s("span",rt,[f(n((_=(h=e.site.features[l])==null?void 0:h.discord)==null?void 0:_.url)+" ",1),t($,{"model-value":(w=(V=e.site.features[l])==null?void 0:V.discord)==null?void 0:w.url,title:e.$t("site.title.editUrl"),placeholder:e.$t("site.placeholder.editUrl"),onConfirm:M=>{var T;return e.onSave({features:p(r({},e.site.features),{[l]:p(r({},e.site.features[l]),{discord:p(r({},(T=e.site.features[l])==null?void 0:T.discord),{url:M})})})})}},null,8,["model-value","title","placeholder","onConfirm"])])]}),_:2},1032,["label"]),[[j,(G=(X=e.site.features[l])==null?void 0:X.discord)==null?void 0:G.enabled]])],512)),[[j,(Y=e.site.features[l])==null?void 0:Y.enabled]]):_e("v-if",!0)]}),_:2},1032,["label"])),64))]),_:1},8,["model"])]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})}var $t=A(Le,[["render",ut],["__scopeId","data-v-262b806e"],["__file","/home/runner/work/Nexior/Nexior/src/pages/site/Index.vue"]]);export{$t as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./vendor-others.4f34a866.js";import{am as M}from"./vendor-fortawesome.0d1d9585.js";import{_ as R}from"./index.
|
|
1
|
+
import"./vendor-others.4f34a866.js";import{am as M}from"./vendor-fortawesome.0d1d9585.js";import{_ as R}from"./index.cf1347fe.js";import{l as U,i as W,h as G,r as J,s as O}from"./vendor-element-plus.ddf5f024.js";import{H as P,al as _,e as m,f as t,V as e,M as i,S as g,o as c,U as n,T as h,W as D,ai as H,L as K,aK as Q,aL as X}from"./vendor-@vue.853aef6d.js";import"./vendor-axios.168e6950.js";import"./vendor-qrcode.452c7ca7.js";const Y=P({name:"Index",components:{ElButton:U,ElRow:W,ElCol:G,ElCard:J,ElImage:O,FontAwesomeIcon:M},data(){return{comments:[{avatar:"https://cdn.acedata.cloud/avatar1.png",name:this.$t("index.customers.name1"),job:this.$t("index.customers.job1"),content:this.$t("index.customers.comment1")},{avatar:"https://cdn.acedata.cloud/avatar2.png",name:this.$t("index.customers.name2"),job:this.$t("index.customers.job2"),content:this.$t("index.customers.comment2")},{avatar:"https://cdn.acedata.cloud/avatar3.png",name:this.$t("index.customers.name3"),job:this.$t("index.customers.job3"),content:this.$t("index.customers.comment3")}]}},computed:{site(){return this.$store.state.site},capabilities(){var s,l,k,w,j,C,u,o,p,d,y,f,b,v,$;return[...(k=(l=(s=this.site)==null?void 0:s.features)==null?void 0:l.chat)!=null&&k.enabled?[{title:this.$t("index.title.chat"),subtitle:this.$t("index.subtitle.chat"),icon:"fa-regular fa-comment"}]:[],...(C=(j=(w=this.site)==null?void 0:w.features)==null?void 0:j.midjourney)!=null&&C.enabled?[{title:this.$t("index.title.midjourney"),subtitle:this.$t("index.subtitle.midjourney"),icon:"fa-solid fa-palette"}]:[],...(p=(o=(u=this.site)==null?void 0:u.features)==null?void 0:o.qrart)!=null&&p.enabled?[{title:this.$t("index.title.qrart"),subtitle:this.$t("index.subtitle.qrart"),icon:"fa-solid fa-qrcode"}]:[],...(f=(y=(d=this.site)==null?void 0:d.features)==null?void 0:y.suno)!=null&&f.enabled?[{title:this.$t("index.title.suno"),subtitle:this.$t("index.subtitle.suno"),icon:"fa-solid fa-music"}]:[],...($=(v=(b=this.site)==null?void 0:b.features)==null?void 0:v.luma)!=null&&$.enabled?[{title:this.$t("index.title.luma"),subtitle:this.$t("index.subtitle.luma"),icon:"fa-solid fa-film"}]:[]]}},mounted(){},methods:{}}),r=s=>(Q("data-v-d9c0303e"),s=s(),X(),s),Z={class:"wrapper"},tt={id:"banner"},st={class:"container"},et={class:"info"},it={class:"title"},nt={class:"subtitle"},ot={class:"operations"},at={id:"introduction"},lt={class:"container"},dt={class:"title"},ct={class:"subtitle"},rt={class:"icon-wrapper"},ut={class:"title"},mt={class:"subtitle"},_t={key:0,id:"chat",class:"block"},ht={class:"container"},pt=r(()=>t("img",{src:"https://cdn.acedata.cloud/axynds.png",class:"image desktop"},null,-1)),ft=r(()=>t("img",{src:"https://cdn.acedata.cloud/vds4i3.png",class:"image mobile"},null,-1)),bt={class:"title"},vt={class:"subtitle"},$t={key:1,id:"midjourney",class:"block"},gt={class:"container"},yt={class:"title"},xt={class:"subtitle"},kt=r(()=>t("img",{src:"https://cdn.acedata.cloud/uk86mz.png",class:"image desktop"},null,-1)),wt=r(()=>t("img",{src:"https://cdn.acedata.cloud/rvelwm.png",class:"image mobile"},null,-1)),jt={key:2,id:"qrart",class:"block"},Ct={class:"container"},It=r(()=>t("img",{src:"https://cdn.acedata.cloud/gyogar.png",class:"image desktop"},null,-1)),qt=r(()=>t("img",{src:"https://cdn.acedata.cloud/5kunm0.png",class:"image mobile"},null,-1)),Et={class:"title"},Nt={class:"subtitle"},Bt={key:3,id:"suno",class:"block"},St={class:"container"},Vt={class:"title"},Ft={class:"subtitle"},Lt=r(()=>t("img",{src:"https://cdn.acedata.cloud/2m8fn.png",class:"image desktop"},null,-1)),Tt=r(()=>t("img",{src:"https://cdn.acedata.cloud/23knvs.png",class:"image mobile"},null,-1)),zt={key:4,id:"luma",class:"block"},At={class:"container"},Dt=r(()=>t("img",{src:"https://cdn.acedata.cloud/6kop1g.png",class:"image desktop"},null,-1)),Ht=r(()=>t("img",{src:"https://cdn.acedata.cloud/3kcjny.png",class:"image mobile"},null,-1)),Kt={class:"title"},Mt={class:"subtitle"},Rt={id:"comments"},Ut={class:"container"},Wt={class:"title"},Gt={class:"subtitle"},Jt={class:"content"},Ot={class:"info"},Pt={class:"left"},Qt={class:"right"},Xt={class:"name"},Yt={class:"job"};function Zt(s,l,k,w,j,C){var b,v,$,I,q,E,N,B,S,V,F,L,T,z,A;const u=_("el-button"),o=_("el-col"),p=_("el-image"),d=_("el-row"),y=_("font-awesome-icon"),f=_("el-card");return c(),m("div",Z,[t("div",tt,[t("div",st,[e(d,null,{default:i(()=>[e(o,{md:12,xs:24,class:"left"},{default:i(()=>{var a;return[t("div",et,[t("h1",it,n((a=s.site)==null?void 0:a.title),1),t("h3",nt,n(s.$t("index.subtitle.banner")),1),t("div",ot,[e(u,{type:"primary",round:"",class:"btn-apply",onClick:l[0]||(l[0]=x=>s.$router.push({path:"/chat"}))},{default:i(()=>[h(n(s.$t("common.button.startForFree")),1)]),_:1})])])]}),_:1}),e(o,{md:12,xs:24,class:"right"},{default:i(()=>[e(p,{src:"https://cdn.acedata.cloud/illustration1.png",class:"brand"})]),_:1})]),_:1})])]),t("div",at,[t("div",lt,[e(d,{class:"mb-6"},{default:i(()=>[e(o,{span:24},{default:i(()=>[t("h2",dt,n(s.$t("index.title.introduction")),1),t("h5",ct,n(s.$t("index.subtitle.introduction")),1)]),_:1})]),_:1}),e(d,{gutter:15},{default:i(()=>[(c(!0),m(D,null,H(s.capabilities,(a,x)=>(c(),K(o,{key:x,md:6,xs:24,class:"mb-4"},{default:i(()=>[e(f,{class:"info text-center",shadow:"hover"},{default:i(()=>[t("div",rt,[e(y,{icon:a.icon,class:"icon"},null,8,["icon"])]),t("h2",ut,n(a.title),1),t("p",mt,n(a.subtitle),1)]),_:2},1024)]),_:2},1024))),128))]),_:1})])]),($=(v=(b=s.site)==null?void 0:b.features)==null?void 0:v.chat)!=null&&$.enabled?(c(),m("div",_t,[t("div",ht,[e(d,null,{default:i(()=>[e(o,{md:16,xs:24,class:"preview"},{default:i(()=>[pt,ft]),_:1}),e(o,{md:8,xs:24,class:"info"},{default:i(()=>[t("h2",bt,n(s.$t("index.title.chat")),1),t("p",vt,n(s.$t("index.subtitle.chat")),1),e(u,{type:"primary",round:"",class:"btn-try",onClick:l[1]||(l[1]=a=>s.$router.push({path:"/chat"}))},{default:i(()=>[h(n(s.$t("index.button.try")),1)]),_:1})]),_:1})]),_:1})])])):g("v-if",!0),(E=(q=(I=s.site)==null?void 0:I.features)==null?void 0:q.midjourney)!=null&&E.enabled?(c(),m("div",$t,[t("div",gt,[e(d,null,{default:i(()=>[e(o,{md:8,xs:24,class:"info"},{default:i(()=>[t("h2",yt,n(s.$t("index.title.midjourney")),1),t("p",xt,n(s.$t("index.subtitle.midjourney")),1),e(u,{type:"primary",round:"",class:"btn-try",onClick:l[2]||(l[2]=a=>s.$router.push({path:"/midjourney"}))},{default:i(()=>[h(n(s.$t("index.button.try")),1)]),_:1})]),_:1}),e(o,{md:16,xs:24,class:"preview"},{default:i(()=>[kt,wt]),_:1})]),_:1})])])):g("v-if",!0),(S=(B=(N=s.site)==null?void 0:N.features)==null?void 0:B.qrart)!=null&&S.enabled?(c(),m("div",jt,[t("div",Ct,[e(d,null,{default:i(()=>[e(o,{md:16,xs:24,class:"preview"},{default:i(()=>[It,qt]),_:1}),e(o,{md:8,xs:24,class:"info"},{default:i(()=>[t("h2",Et,n(s.$t("index.title.qrart")),1),t("p",Nt,n(s.$t("index.subtitle.qrart")),1),e(u,{type:"primary",round:"",class:"btn-try",onClick:l[3]||(l[3]=a=>s.$router.push({path:"/qrart"}))},{default:i(()=>[h(n(s.$t("index.button.try")),1)]),_:1})]),_:1})]),_:1})])])):g("v-if",!0),(L=(F=(V=s.site)==null?void 0:V.features)==null?void 0:F.suno)!=null&&L.enabled?(c(),m("div",Bt,[t("div",St,[e(d,null,{default:i(()=>[e(o,{md:8,xs:24,class:"info"},{default:i(()=>[t("h2",Vt,n(s.$t("index.title.suno")),1),t("p",Ft,n(s.$t("index.subtitle.suno")),1),e(u,{type:"primary",round:"",class:"btn-try",onClick:l[4]||(l[4]=a=>s.$router.push({path:"/suno"}))},{default:i(()=>[h(n(s.$t("index.button.try")),1)]),_:1})]),_:1}),e(o,{md:16,xs:24,class:"preview"},{default:i(()=>[Lt,Tt]),_:1})]),_:1})])])):g("v-if",!0),(A=(z=(T=s.site)==null?void 0:T.features)==null?void 0:z.luma)!=null&&A.enabled?(c(),m("div",zt,[t("div",At,[e(d,null,{default:i(()=>[e(o,{md:16,xs:24,class:"preview"},{default:i(()=>[Dt,Ht]),_:1}),e(o,{md:8,xs:24,class:"info"},{default:i(()=>[t("h2",Kt,n(s.$t("index.title.luma")),1),t("p",Mt,n(s.$t("index.subtitle.luma")),1),e(u,{type:"primary",round:"",class:"btn-try",onClick:l[5]||(l[5]=a=>s.$router.push({path:"/luma"}))},{default:i(()=>[h(n(s.$t("index.button.try")),1)]),_:1})]),_:1})]),_:1})])])):g("v-if",!0),t("div",Rt,[t("div",Ut,[e(d,{class:"mb-6"},{default:i(()=>[e(o,{span:24},{default:i(()=>[t("h2",Wt,n(s.$t("index.title.comments")),1),t("h5",Gt,n(s.$t("index.subtitle.comments")),1)]),_:1})]),_:1}),e(d,{gutter:20,class:"main"},{default:i(()=>[(c(!0),m(D,null,H(s.comments,(a,x)=>(c(),K(o,{key:x,md:8,xs:24},{default:i(()=>[e(f,{shadow:"hover",class:"service","body-style":{padding:0}},{default:i(()=>[t("p",Jt,n(a.content),1),t("div",Ot,[t("div",Pt,[e(p,{class:"avatar",src:a.avatar},null,8,["src"])]),t("div",Qt,[t("div",Xt,n(a.name),1),t("div",Yt,n(a.job),1)])])]),_:2},1024)]),_:2},1024))),128))]),_:1})])])])}var ls=R(Y,[["render",Zt],["__scopeId","data-v-d9c0303e"],["__file","/home/runner/work/Nexior/Nexior/src/pages/index/Index.vue"]]);export{ls as default};
|