PageSourceSearch

https://enthub.it/build/assets/Index-C9iFmm7W.js

js enthub.it collected 2026-09-25 04:23:58 UTC 6,848 bytes, 2 lines download raw bytes

1import{_ as e}from"./EmptyState.vue_vue_type_script_setup_true_lang-BZttJflu.js";import{_ as t}from"./Loader-CNZS6PFa.js";import{_ as s}from"./CommunityFollow-DAwzwqxm.js";import{ab as a,f as l,e as o,l as n,am as i,F as u,G as r,K as m}from"./app-BwiOD-xT.js";import{M as d,o as c,p as _,q as p,x as f,w as v,z as g,y,u as x,A as h,J as b,K as k,c as j,r as w,B as I,ay as C,n as S,j as V,V as z,W as E}from"./vendor-eWDfdwlh.js";import{I as F}from"./card-ui-24-regular-vpn8swkG.js";import{I as O}from"./sort-horizontal-linear-CwdiEoVm.js";import{u as U}from"./useScrollRestore-B6xIpHuy.js";import{a as q,b as K,c as M,d as R,e as A,_ as B}from"./SelectContent.vue_vue_type_script_setup_true_lang-QITrU-Sa.js";import{_ as D,a as G}from"./DropdownMenuRadioItem.vue_vue_type_script_setup_true_lang-CR4VbW7n.js";import"./three-dots-loading-B0-IaqDh.js";import"./user-check-linear-s-z3Ss7L.js";/* empty css            */import"./media-vendor-aRMZHiv3.js";const J={class:"flex items-center gap-2 sm:gap-4 justify-between w-full"},L={class:"flex items-start w-full gap-4"},T=["src","alt"],W={class:"flex flex-col"},$={class:"flex items-center gap-x-2"},H={key:0,class:"flex items-center text-endpoint text-xs gap-x-2"},N={class:"flex items-center gap-0.5 text-endpoint"},P={class:"hidden sm:flex"},Q={class:"text-sm line-clamp-1 pt-0.5 text-endpoint"},X={__name:"CommunityFeedItem",props:{community:Object},setup:e=>(t,l)=>{const o=d("router-link"),n=s;return c(),_("div",J,[p("div",L,[f(o,{to:t.route("community.show",e.community),class:"shrink-0 w-10 h-10"},{default:v(()=>[p("img",{src:e.community.avatar_url,alt:e.community.name,class:"h-full w-full object-cover rounded-full"},null,8,T)]),_:1},8,["to"]),p("div",W,[p("div",$,[f(o,{to:t.route("community.show",e.community),class:"text-sm sm:text-base font-medium text-foreground hover:text-foreground/90"},{default:v(()=>[g(y(e.community.name),1)]),_:1},8,["to"])]),e.community.members_count>0?(c(),_("div",H,[p("div",N,[p("span",null,y(e.community.members_count),1),p("span",null,y(x(a)(e.community.members_count,["участник","участника","участников"])),1)])])):h("",!0),p("div",P,[p("span",Q,y(e.community.description),1)])])]),f(n,{following:e.community,size:"badge"},null,8,["following"])])}},Y={class:"space-y-4"},Z={class:"bg-background sm:rounded-lg px-2 md:px-4 py-4"},ee={class:"pb-1"},te={class:"text-lg font-semibold"},se={class:"text-sm text-muted-foreground mt-0.5"},ae={class:"flex items-center justify-between gap-4 pt-3 mt-3 border-t border-border"},le={class:"flex items-center gap-1 bg-muted rounded-lg p-1"},oe={class:"flex items-center gap-2"},ne={class:"hidden md:flex items-center gap-2"},ie={class:"bg-background sm:rounded-lg divide-y divide-border"},ue={layout:l},re=Object.assign(ue,{name:"CommunitiesIndex"},{__name:"Index",props:{communities:Object,sort:{type:String,default:"popularity"}},setup(s){const a=b(),l=k(),J=o(),L=j(()=>J.auth?.check),T=s,W=w({data:[],links:{}});I(()=>T.sort,(e,t)=>{e!==t&&W.value.data.length&&(W.value={data:[],links:{}})}),I(()=>T.communities,e=>{e?.data?.length&&!W.value.data.length&&(W.value=e)},{immediate:!0}),U("communities",W);const $=w(null),H=w(!1),{stop:N}=C($,async([{isIntersecting:e}])=>{if(e&&!H.value&&W.value.links?.next){H.value=!0;try{const e=await axios.get(W.value.links.next);W.value.data.push(...e.data.data),W.value.links=e.data.links,e.data.links.next||N()}catch(t){console.error("Error fetching communities")}finally{H.value=!1}}}),P=e=>{a.push({path:"/communities",query:{sort:e}})};return(a,o)=>{const b=d("router-link"),k=X,j=t,w=e;return c(),_("div",Y,[p("div",Z,[p("div",ee,[p("h1",te,y(("__"in a?a.__:x(n))("Сообщества")),1),p("p",se,y(("__"in a?a.__:x(n))("Сообщества по интересам — находите единомышленников, вступайте и публикуйте контент")),1)]),p("div",ae,[p("div",le,[f(b,{to:"/communities"+(s.sort?"?sort="+s.sort:""),class:S(["px-3 py-1.5 text-sm font-medium rounded-md base-transition","/communities"===x(l).path?"bg-background shadow-sm":"hover:bg-background/50"])},{default:v(()=>[g(y(("__"in a?a.__:x(n))("Все сообщества")),1)]),_:1},8,["to","class"]),L.value?(c(),V(b,{key:0,to:"/communities/mine"+(s.sort?"?sort="+s.sort:""),class:S(["px-3 py-1.5 text-sm font-medium rounded-md base-transition","/communities/mine"===x(l).path?"bg-background shadow-sm":"hover:bg-background/50"])},{default:v(()=>[g(y(("__"in a?a.__:x(n))("Мои сообщества")),1)]),_:1},8,["to","class"])):(c(),V(b,{key:1,to:a.route("login"),class:"px-3 py-1.5 text-sm font-medium rounded-md base-transition hover:bg-background/50"},{default:v(()=>[g(y(("__"in a?a.__:x(n))("Мои сообщества")),1)]),_:1},8,["to"]))]),p("div",oe,[L.value?(c(),V(b,{key:0,to:a.route("community.create"),class:"p-1.5 hover:bg-accent base-transition rounded-full",title:("__"in a?a.__:x(n))("Создать сообщество")},{default:v(()=>[f(x(i),{class:"h-5 w-5 shrink-0"})]),_:1},8,["to","title"])):h("",!0),f(x(m),{modal:!1},{default:v(()=>[f(x(u),{class:"md:hidden p-1.5 hover:bg-accent base-transition rounded-full"},{default:v(()=>[f(x(O),{class:"h-5 w-5 shrink-0"})]),_:1}),f(x(r),{align:"end"},{default:v(()=>[f(x(D),{"model-value":s.sort,"onUpdate:modelValue":P},{default:v(()=>[f(x(G),{value:"popularity"},{default:v(()=>[g(y(("__"in a?a.__:x(n))("Популярные")),1)]),_:1}),f(x(G),{value:"freshness"},{default:v(()=>[g(y(("__"in a?a.__:x(n))("Новые")),1)]),_:1}),f(x(G),{value:"latest_post"},{default:v(()=>[g(y(("__"in a?a.__:x(n))("Активные")),1)]),_:1})]),_:1},8,["model-value"])]),_:1})]),_:1}),p("div",ne,[f(x(O),{class:"h-4 w-4 text-muted-foreground shrink-0"}),f(x(B),{"model-value":s.sort,"onUpdate:modelValue":P},{default:v(()=>[f(x(q),{class:"h-9 w-40"},{default:v(()=>[f(x(K))]),_:1}),f(x(M),null,{default:v(()=>[f(x(R),null,{default:v(()=>[f(x(A),{value:"popularity"},{default:v(()=>[g(y(("__"in a?a.__:x(n))("Популярные")),1)]),_:1}),f(x(A),{value:"freshness"},{default:v(()=>[g(y(("__"in a?a.__:x(n))("Новые")),1)]),_:1}),f(x(A),{value:"latest_post"},{default:v(()=>[g(y(("__"in a?a.__:x(n))("Активные")),1)]),_:1})]),_:1})]),_:1})]),_:1},8,["model-value"])])])])]),p("div",ie,[W.value.data.length?(c(),_(z,{key:0},[(c(!0),_(z,null,E(W.value.data,e=>(c(),_("div",{key:e.id,class:"px-4 py-3 first:pt-4 last:pb-4"},[f(k,{community:e},null,8,["community"])]))),128)),f(j,{"is-loading":H.value,onlyIcon:!0},null,8,["is-loading"]),p("div",{ref_key:"last",ref:$,class:"-translate-y-32"},null,512)],64)):(c(),V(w,{key:1,title:("__"in a?a.__:x(n))("There is nothing here yet")},{icon:v(()=>[f(x(F),{class:"w-16 h-16 text-muted-foreground"})]),_:1},8,["title"]))])])}}});
1export{re as default};
2//# sourceMappingURL=Index-C9iFmm7W.js.map

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.