PageSourceSearch

https://assets.fansyme.com/build/assets/CollectionsTab-DTCJ5nJi.js

js fansyme.com collected 2026-10-04 07:07:41 UTC 4,277 bytes, 1 lines download raw bytes

1import V from"./CollectionCard-W_PRcAV7.js";import N from"./CreateCollectionModal-B2cMoiOG.js";import{_ as I,S as L}from"./app-w-hBgmQf.js";import{_ as R,a as U,b as F,d as j,e as D,f as E}from"./shadcn-52BcaFbU.js";import{N as O}from"./NoResultsFound-bKJApuIx.js";import"./vendor-icons-D5ihmiRa.js";import{a8 as Q,i as q}from"./app-core-7gUmsGXO.js";import{H as o,aE as z,o as n,t as a,e as u,f as t,w as c,a5 as d,E as m,I as h,a4 as S,c as v,M as A,F as f}from"./vendor-CN3HZqby.js";import"./vendor-inertia-DwP8K3Ec.js";import"./layout-clean-B-qMo5Wb.js";import"./vendor-pinia-B68sAcL0.js";import"./minimal-profile-CsubwN-D.js";const H={name:"CollectionsTab",components:{CollectionCard:V,CreateCollectionModal:N,Spinner:L,Button:R,Select:U,SelectContent:F,SelectItem:j,SelectTrigger:D,SelectValue:E,NoResultsFound:O},props:{authUser:Object,inscriptions:Object,searchQuery:String},data(){return{store:Q(),searchTimeout:null,showCreateModal:!1,skeletonCount:4}},computed:{isLoggedIn(){return!!(this.authUser&&this.authUser.id)},showSkeletons(){return this.store.loading&&this.store.collections.length===0},showNoResults(){return!this.store.loading&&this.store.collections.length===0},loginViewMoreLabel(){return q(this.inscriptions,"login_view_more")},sortBy:{get(){return this.store.sortBy},set(_){this.store.setSortBy(_)}}},watch:{searchQuery(){this.searchTimeout&&clearTimeout(this.searchTimeout),this.searchTimeout=setTimeout(()=>{this.store.setSearch(this.searchQuery)},500)}},mounted(){this.store.seeded?this.store.seeded=!1:this.store.reload()},methods:{handleCollectionCreated(){this.store.reload()},openCreateModal(){this.store.requireAuth()&&(this.showCreateModal=!0)},visibilityChanged(_){_&&this.store.loadMore()}}},G={class:"collections-tab-wrapper"},J={class:"flex justify-between items-center pt-1 pb-1 mx-2"},K={class:"grid grid-cols-1 md:grid-cols-2 gap-4 mt-2 mx-2 md:mx-0"},P={class:"h-4 w-full col-span-full"},W={key:0,class:"text-center my-4"},X={class:"w-full text-center mt-8"},Y={key:0,class:"flex justify-center"},Z={key:1,class:"text-center my-8"};function $(_,i,l,ee,s,r){const y=o("SelectValue"),w=o("SelectTrigger"),p=o("SelectItem"),b=o("SelectContent"),k=o("Select"),C=o("Button"),g=o("CollectionCard"),x=o("Spinner"),M=o("NoResultsFound"),T=o("CreateCollectionModal"),B=z("observe-visibility");return n(),a(h,null,[u("div",G,[u("div",J,[t(k,{modelValue:r.sortBy,"onUpdate:modelValue":i[0]||(i[0]=e=>r.sortBy=e)},{default:c(()=>[t(w,{class:"w-[180px]"},{default:c(()=>{var e;return[t(y,{placeholder:((e=l.inscriptions)==null?void 0:e.sort_by)||"Sort by"},null,8,["placeholder"])]}),_:1}),t(b,null,{default:c(()=>[t(p,{value:"popular"},{default:c(()=>{var e;return[d(m((e=l.inscriptions)==null?void 0:e.popular),1)]}),_:1}),t(p,{value:"newest"},{default:c(()=>{var e;return[d(m((e=l.inscriptions)==null?void 0:e.newest),1)]}),_:1}),t(p,{value:"oldest"},{default:c(()=>{var e;return[d(m((e=l.inscriptions)==null?void 0:e.oldest),1)]}),_:1})]),_:1})]),_:1},8,["modelValue"]),t(C,{onClick:r.openCreateModal,class:"create-btn"},{default:c(()=>{var e;return[i[3]||(i[3]=u("i",{class:"fa fa-plus"},null,-1)),d(" "+m((e=l.inscriptions)==null?void 0:e.create_collection),1)]}),_:1},8,["onClick"])]),u("div",K,[r.showSkeletons?(n(!0),a(h,{key:0},S(s.skeletonCount,e=>
1(n(),v(g,{key:"collection-skeleton-"+e,loading:""}))),128)):s.store.collections.length>0?(n(),a(h,{key:1},[(n(!0),a(h,null,S(s.store.collections,e=>(n(),v(g,{key:e.id,collection:e,inscriptions:l.inscriptions,"auth-user":l.authUser},null,8,["collection","inscriptions","auth-user"]))),128)),A(u("div",P,null,512),[[B,{callback:r.visibilityChanged,throttle:200,throttleOptions:{leading:"hidden"}}]])],64)):f("",!0)]),!r.isLoggedIn&&s.store.guestReachedLimit&&!s.store.loading?(n(),a("div",W,[t(C,{onClick:i[1]||(i[1]=e=>s.store.promptLogin()),variant:"tall",size:"xl"},{default:c(()=>[d(m(r.loginViewMoreLabel),1)]),_:1})])):f("",!0),u("div",X,[s.store.loadingMore?(n(),a("div",Y,[t(x,{class:"h-8 w-8"})])):r.showNoResults?(n(),a("div",Z,[t(M)])):f("",!0)])]),t(T,{open:s.showCreateModal,"onUpdate:open":i[2]||(i[2]=e=>s.showCreateModal=e),inscriptions:l.inscriptions},null,8,["open","inscriptions"])],64)}const _e=I(H,[["render",$],["__scopeId","data-v-aadf1d1d"]]);export{_e 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.