PageSourceSearch

https://ranklet4.com/assets/Rankings-l6fY8dOD.js

js ranklet4.com collected 2026-10-04 08:17:32 UTC 3,508 bytes, 1 lines download raw bytes

1import{d as v,u as w,Z as C,I,J as x,c as i,f as n,b as e,k as d,E as f,t as c,$ as S,m as _,a0 as V,F as k,e as m,A,s as R,v as B,T as $,V as N,a1 as F,a2 as D,S as j,z as L,a3 as P,j as q,a4 as E,U as M}from"./index-CUCG-tou.js";const T={class:"card w-full bg-base-100 shadow-md"},U={class:"card-body"},z={class:"card-title justify-between items-center"},J={class:"flex flex-row items-center gap-2"},Q={class:""},W={class:"hstack-sm items-center"},Z={key:0,class:"text-2xl tooltip","data-tip":"AI レビュー メール配信 設定済み"},G={key:1,class:"text-xs font-normal"},H={key:0,class:"progress w-full"},K={key:1,class:"text-sm text-error mb-4"},O={key:2,class:"table table-compact mb-4"},X={class:"w-5"},Y={class:"text-ellipsis overflow-hidden whitespace-nowrap max-w-0"},ss={class:"card-actions justify-between"},ns={class:"flex justify-start gap-2"},as=["disabled"],es=v({__name:"Summary",props:{ranking:{},plan:{}},setup(h){const u=h,t=w(),y=C(),a=I({}),g=x(async()=>{const s=$(N(t.firestore,"Rankings",u.ranking.rankingId,"DailySnapshots"),F("updatedAt","desc"),D(1));a.unsubscribe&&a.unsubscribe(),a.unsubscribe=j(s,l=>{var p;l.empty&&(a.snapshot=void 0,a.unpublished=!0);const b=(p=l.docs[0])==null?void 0:p.data();a.snapshot=b})});g.run();async function r(s){if(!confirm("本当に削除しますか?"))return;const l=L(t.firestore,"Rankings",s);await P(l)}return(s,l)=>{var p;const b=A("router-link");return n(),i("div",T,[e("div",U,[e("h2",z,[e("span",J,[e("span",Q,c(s.ranking.name),1),s.plan!=="free"?(n(),f(S,{key:0,plan:s.plan},null,8,["plan"])):d("",!0)]),e("div",W,[(p=s.ranking.review)!=null&&p.toSend?(n(),i("span",Z,"✉️")):d("",!0),a.snapshot?(n(),i("div",G,c(_(V)(a.snapshot.updatedAt))+" 更新 ",1)):d("",!0)])]),_(g).state.loading?(n(),i("progress",H)):d("",!0),a.unpublished?(n(),i("div",K,"このランキングはまだ公開されていません。")):d("",!0),a.snapshot?(n(),i("table",O,[e("tbody",null,[(n(!0),i(k,null,m(a.snapshot.wordFilteredRecords.slice(0,5),o=>(n(),i("tr",null,[e("td",X,c(o.rank),1),e("td",Y,c(o.title),1)]))),256))])])):d("",!0),e("div",ss,[e("div",ns,[(n(!0),i(k,null,m(_(y).rankingMenus,o=>(n(),i(k,null,[o.available(s.ranking.rankingId,s.ranking)?(n(),f(b,{key:0,to:{name:o.routeName,params:{rankingId:s.ranking.rankingId}},class:"btn btn-outline"},{default:R(()=>[B(c(o.emoji)+" "+c(o.label),1)]),_:2},1032,["to"])):d("",!0)],64))),256))]),e("button",{class:"btn btn-error",disabled:s.ranking.ownerUid!==_(t).state.uid,onClick:l[0]||(l[0]=o=>r(s.ranking.rankingId))}," 🗑️ 削除 ",8,as)])])])}}}),ts=e("h1",{class:"text-2xl font-bold mb-4"},"ランキングのリスト",-1),is={class:"grid grid-cols-1 lg:grid-cols-2 gap-4 mb-6"},rs=v({__name:"Rankings",setup(h){const u=w(),t=I({rankings:[],rankingPlansById:new Map});return x(async()=>{t.unsubscribe&&t.unsubscribe();const a=$(N(u.firestore,"Rankings"),M("uids","array-contains",u.state.uid));t.unsubscribe=j(a,g=>{t.rankings=g.docs.map(s=>({...s.data(),rankingId:s.id}));const r=t.rankings.map(s=>s.rankingId);u.queryRankingPlansById(r).then(s=>{t.rankingPlansById=s,console.log({rankingPlansById:s})})})}).run(),(a,g)=>(n(),i(k,null,[ts,e("div",is,[(n(!0),i(k,null,m(t.rankings,r=>{var s;return n(),f(es,{ranking:r,plan:((s=t.rankingPlansById.get(r.rankingId))==null?void 0:s.plan)||"free",key:r.rankingId},null,8,["ranking","plan"])}),128))]),e("div",null,[q(E,{class:"btn"},{default:R(()=>[B("新しいランキングを追加")]),_:1})])],64))}});export{rs 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.