PageSourceSearch

https://revby.co/_nuxt/By29jjQM.js

js revby.co collected 2026-09-25 18:19:04 UTC 3,559 bytes, 1 lines download raw bytes

1import{Q as B,e as V,c as y,a as t,b as w,N as u,j as k,w as i,d as f,t as o,k as a,g as l,_ as A,h as D,o as n,i as P,F as S,r as F}from"./Cny-jMUR.js";import{_ as T}from"./B-5qM8bm.js";import{_ as q}from"./CSHkLFmR.js";const E={class:"bg-gray-50 min-h-screen"},H={class:"max-w-5xl mx-auto pt-16 pb-20 p-4 space-y-6"},I={class:"flex flex-wrap items-start justify-between gap-4"},Q={class:"text-sm text-gray-600 mt-2"},R={class:"flex items-center justify-between gap-3"},z={class:"text-xl font-semibold text-neutral-950"},G={class:"text-sm text-gray-500"},J={class:"space-y-4"},K={class:"flex flex-wrap items-start justify-between gap-3"},O={class:"space-y-1"},W=["href"],X={class:"text-sm text-gray-600"},Y={class:"text-xs bg-gray-100 rounded px-2 py-1 text-gray-700"},Z={key:0,class:"mt-2 whitespace-pre-line text-sm text-gray-700"},ee={class:"flex justify-center"},ne=B({__name:"update-history",setup(te){const d=l([]),g=l(1),h=l(!1),_=l(!1),N=l("configured repository"),U=l("main"),p=l(""),m=l(!0),C=c=>{if(!c)return"Unknown date";const e=new Date(c);return Number.isNaN(e.getTime())?"Unknown date":e.toLocaleString()},v=async(c,e=!1)=>{var x;try{p.value="",e?_.value=!0:m.value=!0;const s=await $fetch("/api/admin/update-history",{query:{page:c,perPage:50}});N.value=`${s.owner}/${s.repo}`,U.value=s.branch,h.value=s.hasMore,g.value=c,d.value=e?[...d.value,...s.commits]:s.commits}catch(s){p.value=((x=s==null?void 0:s.data)==null?void 0:x.statusMessage)||(s==null?void 0:s.message)||"Unable to load update history"}finally{m.value=!1,_.value=!1}},L=async()=>{!h.value||_.value||await v(g.value+1,!0)},M=async()=>{await v(1,!1)};return V(async()=>{await v(1,!1)}),(c,e)=>{const x=P,s=A,j=D,$=T,b=q;return n(),y("div",E,[t("div",H,[w(s,{to:"/admin",class:"inline-flex items-center gap-2 text-brand"},{default:i(()=>[w(x,{name:"i-lucide-arrow-left"}),e[0]||(e[0]=f(" Admin ",-1))]),_:1}),t("div",I,[t("div",null,[e[2]||(e[2]=t("h1",{class:"text-3xl md:text-4xl font-bold text-neutral-950"},"Update history",-1)),t("p",Q,[f(" Latest commits from "+o(a(N))+" on ",1),t("code",null,o(a(U)),1),e[1]||(e[1]=f(". ",-1))])]),w(j,{icon:"i-heroicons-arrow-path",color:"neutral",variant:"outline",loading:a(m)&&a(d).length===0,onClick:M},{default:i(()=>[...e[3]||(e[3]=[f(" Refresh ",-1)])]),_:1},8,["loading"])]),a(p)?(n(),u($,{key:0,color:"error",variant:"soft",icon:"i-heroicons-exclamation-triangle",title:a(p)},null,8,["title"])):k("",!0),a(d).length?(n(),u(b,{key:1},{header:i(()=>[t("div",R,[t("h2",z," Commits ("+o(a(d).length)+") ",1),t("span",G,"Page "+o(a(g)),1)])]),default:i(()=>[t("div",J,[(n(!0),y(S,null,F(a(d),r=>(n(),y("div",{key:r.sha,class:"rounded-lg border border-gray-200 bg-white/90 px-4 py-3"},[t("div",K,[t("div",O,[t("a",{href:r.url,target:"_blank",rel:"noopener noreferrer",class:"font-semibold text-neutral-900 hover:underline"},o(r.subject),9,W),t("p",X,o(r.authorName)+" · "+o(C(r.authoredAt)),1)]),t("code",Y,o(r.shortSha),1)]),r.body?(n(),y("p",Z,o(r.body),1)):k("",!0)]))),128))])]),_:1})):a(m)?(n(),u(b,{key:2},{default:i(()=>[...e[4]||(e[4]=[t("div",{class:"h-[180px] flex items-center justify-center"},[t("div",{class:"animate-spin rounded-full h-10 w-10 border-b-2 border-neutral-400"})],-1)])]),_:1})):(n(),u(b,{key:3},{default:i(()=>[...e[5]||(e[5]=[t("p",{class:"text-gray-600"},"No commits found.",-1)])]),_:1})),t("div",ee,[a(h)?(n(),u(j,{key:0,loading:a(_),color:"primary",variant:"soft",onClick:L},{default:i(()=>[...e[6]||(e[6]=[f(" Load 50 more ",-1)])]),_:1},8,["loading"])):k("",!0)])])])}}});export{ne 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.