PageSourceSearch

https://topm.pages.dev/static/js/new-albums-Bur_0IP0.js

js topm.pages.dev collected 2026-10-03 05:58:41 UTC 3,580 bytes, 1 lines download raw bytes

1import{_ as L}from"./LazyImage.vue_vue_type_script_setup_true_lang-vWJGDuq-.js";import{_ as A}from"./PageSkeleton.vue_vue_type_script_setup_true_lang-DXMMSDZk.js";import{d as C,B as M,w as K,j as N,H as $,I as r,M as i,N as t,U as n,u as a,F as _,Y as g,G as h,V as y,S as b,r as B,W as V,Q as x,v as k,O as j}from"./@vue-rvbOyIQz.js";import{F as I}from"./index-BvnZ4m3B.js";import{u as z}from"./vue-i18n-CBNz3CqA.js";import{k as F}from"./transformers-DHcG3T4K.js";import"./@vueuse-eaih1oDf.js";import"./axios-BCn5QfZZ.js";import"./nprogress-C7TNpM9m.js";import"./@intlify-BBe1nVPd.js";const S={class:"flex h-full flex-1 flex-col overflow-hidden"},D={class:"glass-card mx-4 mb-0 shrink-0 p-4"},E={class:"flex items-center gap-4"},H={class:"text-primary text-lg font-bold"},O={class:"flex gap-1"},P=["onClick"],R={class:"flex-1 overflow-auto p-4"},T={key:1,class:"grid grid-cols-2 gap-4 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-5 xl:grid-cols-6"},U={class:"relative mb-3 aspect-square overflow-hidden rounded-lg"},q={class:"text-primary truncate text-sm font-medium"},G={class:"text-primary/40 mt-1 text-xs"},J={key:2,class:"mt-6 text-center"},Q=["disabled"],W={key:0,class:"icon-[mdi--loading] mr-2 h-4 w-4 animate-spin"},ce=C({__name:"new-albums",setup(Y){const{t:m}=z(),e=B({albums:[],isLoading:!1,area:"ALL",offset:0,limit:30,hasMore:!0}),{area:p}=M(e),v=[{key:"ALL",labelKey:"newAlbums.areas.all"},{key:"ZH",labelKey:"newAlbums.areas.zh"},{key:"EA",labelKey:"newAlbums.areas.ea"},{key:"JP",labelKey:"newAlbums.areas.jp"},{key:"KR",labelKey:"newAlbums.areas.kr"}],f=async(l=!1)=>{if(l&&(e.offset=0,e.albums=[],e.hasMore=!0),!!e.hasMore)try{e.isLoading=!0;const o=await I({area:e.area,limit:e.limit,offset:e.offset}),d=F(o),u=d.map(c=>({...c,cover:c.picUrl}));e.albums=l?u:[...e.albums,...u],e.hasMore=d.length===e.limit,e.offset+=e.limit}finally{e.isLoading=!1}},w=l=>l||"";return K(p,()=>f(!0)),N(()=>f(!0)),(l,o)=>{const d=A,u=L,c=$("router-link");return r(),i("div",S,[t("div",D,[t("div",E,[t("h2",H,n(a(m)("newAlbums.title")),1),t("div",O,[(r(),i(_,null,g(v,s=>t("button",{key:s.key,class:V(["rounded-lg px-3 py-1.5 text-xs transition-all",a(p)===s.key?"bg-pink-500/20 text-pink-400":"text-primary/60 hover:bg-white/5"]),onClick:Z=>p.value=s.key},n(a(m)(s.labelKey)),11,P)),64))])])]),t("div",R,[a(e).isLoading&&!a(e).albums.length?(r(),h(d,{key:0,sections:["grid"]})):(r(),i("div",T,[(r(!0),i(_,null,g(a(e).albums,s=>(r(),h(c,{key:s.id,to:`/album/${s.id}`,class:"glass-card group cursor-pointer overflow-hidden p-3 transition-all hover:bg-white/10"},{default:x(()=>[t("div",U,[k(u,{src:s.cover+"?param=300y300",alt:s.name,class:"h-full w-full object-cover transition-transform group-hover:scale-105"},null,8,["src","alt"]),o[2]||(o[2]=t("div",{class:"absolute inset-0 flex items-center justify-center bg-black/0 opacity-0 transition-all group-hover:bg-black/30 group-hover:opacity-100"},[t("span",{class:"icon-[mdi--play-circle] h-12 w-12 text-white"})],-1))]),t("div",null,[t("p",q,n(s.name),1),k(c,{to:`/artist/${s.artistId}`,class:"text-primary/60 hover:text-primary truncate text-xs",onClick:o[0]||(o[0]=j(()=>{},["stop"]))},{default:x(()=>[b(n(s.artist),1)]),_:2},1032,["to"]),t("p",G,n(w(s.publishTime)),1)])]),_:2},1032,["to"]))),128))])),a(e).hasMore&&a(e).albums.length?(r(),i("div",J,[t("button",{disabled:a(e).isLoading,class:"glass-button px-6 py-2 text-sm",onClick:o[1]||(o[1]=s=>f(!1))},[a(e).isLoading?(r(),i("span",W)):y("",!0),b(" "+n(a(e).isLoading?a(m)("common.loading"):a(m)("newAlbums.loadMore")),1)],8,Q)])):y("",!0)])])}}});export{ce 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.