PageSourceSearch

https://linuxos.ovh/yunohost/admin/assets/DomainList-q4Y-TFif.js

js linuxos.ovh collected 2026-10-08 03:34:39 UTC 3,368 bytes, 1 lines download raw bytes

1import{d as R,p as z}from"./index-mGgJqOFQ.js";import{d as S,r as D,o as i,a as u,aK as N,aH as P,w as a,c as b,a4 as U,F as w,b as d,k as L,z as G,f as T,aa as j,n as x,g as f,t as h,j as g,ao as F,an as Y,_ as q,bo as A,bn as E,u as c,a2 as H,af as K,q as I,I as M,bl as J}from"./core-Cu1dlvv4.js";import{u as O}from"./useSearch-BI9R3Mbd.js";const Q={class:"visually-hidden"},W=S({__name:"RecursiveListGroup",props:{tree:{},flush:{type:Boolean,default:!1},last:{type:Boolean,default:void 0},toggleText:{default:void 0}},setup(C){const m=C;function v(t,y){var l;const s=t.height>0,o=s&&((l=t.data)==null?void 0:l.opened),n=m.last!==!1&&(!s||!o)&&y===m.tree.children.length-1;return{collapsible:s,uncollapsible:!s,opened:o,last:n}}return(t,y)=>{const s=R,o=T,n=F,l=D("RecursiveListGroup",!0),$=Y,B=N;return i(),u(B,{flush:t.flush,style:P({"--depth":t.tree.depth})},{default:a(()=>[(i(!0),b(w,null,U(t.tree.children,(e,k)=>(i(),b(w,{key:e.id},[d(n,{class:x(["list-group-item-action",v(e,k)]),onClick:r=>t.$router.push(e.data.to)},{default:a(()=>[L(t.$slots,"default",G({ref_for:!0},e),void 0,!0),e.height>0?(i(),u(o,{key:0,size:"xs",variant:"outline-secondary","aria-expanded":e.data.opened?"true":"false","aria-controls":"collapse-"+e.id,class:x([e.data.opened?"not-collapsed":"collapsed","ms-2"]),onClick:j(r=>e.data.opened=!e.data.opened,["stop"])},{default:a(()=>[f("span",Q,h(t.toggleText),1),d(s,{iname:"chevron-right"})]),_:2},1032,["aria-expanded","aria-controls","class","onClick"])):g("",!0)]),_:2},1032,["class","onClick"]),e.height>0?(i(),u($,{key:0,id:"collapse-"+e.id,modelValue:e.data.opened,"onUpdate:modelValue":r=>e.data.opened=r},{default:a(()=>[d(l,{tree:e,last:t.last!==void 0?t.last:k===t.tree.children.length-1,flush:""},{default:a(r=>[L(t.$slots,"default",G({ref_for:!0},r),void 0,!0)]),_:2},1032,["tree","last"])]),_:2},1032,["id","modelValue","onUpdate:modelValue"])):g("",!0)],64))),128))]),_:3},8,["flush","style"])}}}),X=q(W,[["__scopeId","data-v-04a14dcc"]]),Z={class:"w-100 d-flex justify-content-between align-items-center"},ee={class:"me-3"},te={class:"fw-bold"},ae={key:0,class:"text-secondary"},se={class:"ms-1"},ie=S({__name:"DomainList",async setup(C){let m,v;[m,v]=A(()=>J.fetch({uri:"domains",cachePath:"domains"})),await m,v();const{mainDomain:t,domainsTree:y}=E(),[s,o]=O(y,(n,l)=>l.id.includes(n));return(n,l)=>{const $=R,B=T,e=H,k=K,r=z;return i(),u(r,{id:"domain-list",modelValue:c(s),"onUpdate:modelValue":l[0]||(l[0]=_=>M(s)?s.value=_:null),items:c(o)?c(o).children:c(o),"items-name":"domains"},{"top-bar-buttons":a(()=>[d(B,{variant:"success",to:{name:"domain-add"}},{default:a(()=>[d($,{iname:"plus"}),I(" "+h(n.$t("domain_add")),1)]),_:1})]),default:a(()=>[c(o)?(i(),u(X,{key:0,tree:c(o),"toggle-text":n.$t("domain.toggle_subdomains"),class:"mb-5"},{default:a(({data:_,parent:p})=>[f("div",Z,[f("h5",ee,[d(e,{to:_.to,class:"text-body text-decoration-none"},{default:a(()=>{var V;return[f("span",te,h(_.name.replace(((V=p.data)==null?void 0:V.name)??"","")),1),p!=null&&p.data?(i(),b("span",ae,h(p.data.name),1)):g("",!0)]}),_:2},1032,["to"]),_.name===c(t)?(i(),u(k,{key:0,click:!1},{target:a(()=>[f("small",se,[d($,{iname:"star"})])]),default:a(()=>[I(" "+h(n.$t("domain.types.main_domain")),1)]),_:1})):g("",!0)])])]),_:1},8,["tree","toggle-text"])):g("",!0)]),_:1},8,["modelValue","items"])}}});export{ie 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.