PageSourceSearch

https://nexusrms.io/build/assets/SelectNexus-DwFDEEEa.js

js nexusrms.io collected 2026-10-08 05:25:14 UTC 5,310 bytes, 1 lines download raw bytes

1import{d as P,i as g,c as C,a as c,f as m,m as s,k as o,w as t,e as f,o as r,t as d,l as b,q as a,F as B,z as F,B as S}from"./vendor-p_OsGDvy.js";import{_ as T}from"./pages-admin-DpopsCzp.js";import"./vendor-vuetify-Bu7_xgIH.js";import"./vendor-charts-TIVM8R0E.js";import"./vendor-tiptap-BMalAx2M.js";const U={class:"select-nexus-page"},q={class:"select-nexus-layout"},D={class:"select-header"},L={class:"user-info"},O={key:1,class:"text-white font-weight-medium"},R={class:"user-details"},G={class:"user-name"},H={class:"user-email"},J={class:"select-content"},K={class:"content-container"},Q={class:"nexus-grid"},W={class:"nexus-card__icon"},X={class:"nexus-card__icon"},Z={key:1,class:"font-weight-medium"},ee={class:"nexus-card__content"},se={class:"nexus-card__title"},te={class:"nexus-card__description"},ne={class:"nexus-subdomain"},oe={class:"nexus-card__icon"},ae={class:"nexus-card__content"},le={class:"nexus-card__title"},re={class:"nexus-card__description"},ie={key:0,class:"empty-state"},de={class:"select-footer"},ue=P({__name:"SelectNexus",props:{nexuses:{default:()=>[]},isAdmin:{type:Boolean,default:!1},user:{}},setup(i){const x=i,_=g(!1),y=g(!1),v=g(null),p=g(null),A=C(()=>x.user.name.split(" ").map(l=>l[0]).slice(0,2).join("").toUpperCase()),$=C(()=>x.nexuses.filter(l=>l.type==="core")),I=C(()=>x.nexuses.filter(l=>l.type==="freelancer"));function V(l){return l.split(" ").map(e=>e[0]).slice(0,2).join("").toUpperCase()}function k(l,e){_.value||(_.value=!0,v.value=l,p.value=e||null,S.post("/enter-nexus",{type:l,id:e},{onFinish:()=>{},onError:()=>{_.value=!1,v.value=null,p.value=null}}))}function M(){y.value||(y.value=!0,S.post("/logout"))}return(l,e)=>{const z=c("v-img"),N=c("v-avatar"),u=c("v-icon"),w=c("v-card"),h=c("v-chip"),Y=c("router-link"),j=c("v-btn");return r(),m("div",U,[s("div",q,[s("header",D,[e[1]||(e[1]=s("img",{src:"/images/logo-blue.svg",alt:"NexusRMS",class:"header-logo"},null,-1)),s("div",L,[o(N,{size:40,color:"primary"},{default:t(()=>[i.user.avatar_url?(r(),f(z,{key:0,src:i.user.avatar_url},null,8,["src"])):(r(),m("span",O,d(A.value),1))]),_:1}),s("div",R,[s("span",G,d(i.user.name),1),s("span",H,d(i.user.email),1)])])]),s("main",J,[s("div",K,[e[15]||(e[15]=s("h1",{class:"select-title"},"Choose Your Nexus",-1)),e[16]||(e[16]=s("p",{class:"select-subtitle"}," You have access to multiple accounts. Select where you'd like to go. ",-1)),s("div",Q,[i.isAdmin?(r(),f(w,{key:0,class:"nexus-card nexus-card--admin",variant:"outlined",onClick:e[0]||(e[0]=n=>k("admin")),loading:_.value&&v.value==="admin"},{default:t(()=>[s("div",W,[o(u,{size:"32",color:"error"},{default:t(()=>[...e[2]||(e[2]=[a("mdi-shield-crown",-1)])]),_:1})]),e[4]||(e[4]=s("div",{class:"nexus-card__content"},[s("h3",{class:"nexus-card__title"},"Platform Admin"),s("p",{class:"nexus-card__description"}," Manage tenants, users, and system settings ")],-1)),o(u,{class:"nexus-card__arrow",size:"20"},{default:t(()=>[...e[3]||(e[3]=[a("mdi-arrow-right",-1)])]),_:1})]),_:1},8,["loading"])):b("",!0),(r(!0),m(B,null,F($.value,n=>(r(),f(w,{key:`core-${n.id}`,class:"nexus-card nexus-card--core",variant:"outlined",onClick:E=>k("core",n.id),loading:_.value&&v.value==="core"&&p.value===n.id},{default:t(()=>[s("div",X,[o(N,{size:40,color:"primary",variant:"tonal"},{default:t(()=>[n.logo_url?(r(),f(z,{key:0,src:n.logo_url},null,8,["src"])):(r(),m("span",Z,d(V(n.name)),1))]),_:2},1024)]),s("div",ee,[s("h3",se,d(n.name),1),s("p",te,[o(h,{size:"x-small",color:"primary",variant:"flat",class:"mr-1"},{default:t(()=>[a(d(n.role||"Member"),1)]),_:2},1024),s("span",ne,d(n.subdomain)+".nexusrms.io",1)])]),o(u,{class:"nexus-card__arrow",size:"20"},{default:t(()=>[...e[5]||(e[5]=[a("mdi-arrow-right",-1)])]),_:1})]),_:2},1032,["onClick","loading"]))),128)),(r(!0),m(B,null,F(I.value,n=>(r(),f(w,{key:`freelancer-${n.id}`,class:"nexus-card nexus-card--freelancer",variant:"outlined",onClick:E=>k("freelancer",n.id),loading:_.value&&v.value==="freelancer"&&p.value===n.id},{default:t(()=>[s("div",oe,[o(u,{size:"32",color:"warning"},{default:t(()=>[...e[6]||(e[6]=[a("mdi-briefcase-account",-1)])]),_:1})]),s("div",ae,[s("h3",le,d(n.name||"Freelancer Node"),1),s("p",re,[o(h,{size:"x-small",color:"warning",variant:"flat",class:"mr-1"},{default:t(()=>[...e[7]||(e[7]=[a(" Freelancer ",-1)])]),_:1}),e[8]||(e[8]=s("span",{class:"nexus-subdomain"},"Personal dashboard",-1))])]),o(u,{class:"nexus-card__arrow",size:"20"},{default:t(()=>[...e[9]||(e[9]=[a("mdi-arrow-right",-1)])]),_:1})]),_:2},1032,["onClick","loading"]))),128))]),i.nexuses.length===0&&!i.isAdmin?(r(),m("div",ie,[o(u,{size:"64",color:"grey"},{default:t(()=>[...e[10]||(e[10]=[a("mdi-domain-off",-1)])]),_:1}),e[14]||(e[14]=s("h3",null,"No Access Found",-1)),s("p",null,[e[12]||(e[12]=a(" You don't have access to any nexus yet. Contact your administrator or ",-1)),o(Y,{to:"/register"},{default:t(()=>[...e[11]||(e[11]=[a("create a new account",-1)])]),_:1}),e[13]||(e[13]=a(". ",-1))])])):b("",!0)])]),s("footer",de,[o(j,{variant:"text",color:"default",size:"small",onClick:M,loading:y.value},{default:t(()=>[o(u,{start:"",size:"18"},{default:t(()=>[...e[17]||(e[17]=[a("mdi-logout",-1)])]),_:1}),e[18]||(e[18]=a(" Sign out ",-1))]),_:1},8,["loading"])])])])}}}),pe=T(ue,[["__scopeId","data-v-35584cd0"]]);export{pe as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.