1import{o as s,c as a,a as e,r as x,E as b,G as w,d as g,C as _,I as k,g as r,J as C,t as v,h as d,w as E,F as S,y as B,f as h,L as M,v as y,D as $}from"./app.633fe645.js";/* empty css */function V(n,l){return s(),a("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 6v6h4.5m4.5 0a9 9 0 11-18 0 9 9 0 0118 0z"})])}function z(n,l){return s(),a("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true"},[e("path",{"fill-rule":"evenodd",d:"M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12zm13.36-1.814a.75.75 0 10-1.22-.872l-3.236 4.53L9.53 12.22a.75.75 0 00-1.06 1.06l2.25 2.25a.75.75 0 001.14-.094l3.75-5.25z","clip-rule":"evenodd"})])}function N(n,l){return s(),a("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true"},[e("path",{"fill-rule":"evenodd",d:"M19.916 4.626a.75.75 0 01.208 1.04l-9 13.5a.75.75 0 01-1.154.114l-6-6a.75.75 0 011.06-1.06l5.353 5.353 8.493-12.739a.75.75 0 011.04-.208z","clip-rule":"evenodd"})])}function R(n,l){return s(),a("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true"},[e("path",{"fill-rule":"evenodd",d:"M3.75 12a.75.75 0 01.75-.75h15a.75.75 0 010 1.5h-15a.75.75 0 01-.75-.75z","clip-rule":"evenodd"})])}const D=e("div",{class:"sm:flex sm:items-center"},[e("div",{class:"sm:flex-auto"},[e("p",{class:"mt-2 text-sm text-gray-700"},"These are all repositories that What The Diff has access to.")])],-1),L={class:"text-gray-700 pt-4 flex items-center space-x-4"},T=e("label",{for:"search",class:"sr-only"},"Search",-1),I={class:"flex h-5 text-sm items-center"},j={class:"flex justify-end items-center"},F={class:"-mx-4 mt-8 overflow-hidden shadow ring-1 ring-black ring-opacity-5 sm:-mx-6 md:mx-0 md:rounded-lg"},P={class:"min-w-full divide-y divide-gray-200"},U=e("thead",{class:"bg-gray-50"},[e("tr",null,[e("th",{scope:"col",class:"px-6 py-3 text-left text-sm font-medium text-gray-500"}," Name "),e("th",{scope:"col",class:"px-6 py-3 text-left text-sm font-medium text-gray-500"}," Status "),e("th",{scope:"col",class:"relative py-3.5 pl-3 pr-4 sm:pr-6"},[e("span",{class:"sr-only"},"Configuration")])])],-1),W={class:"divide-y divide-gray-200 bg-white"},A={class:"px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900"},G={class:"w-14 inline-flex mr-4"},J={class:"rounded-full text-gray-600 border-gray-300 font-medium border text-xs px-2 py-1"},K=["href"],O={class:"px-6 py-4 whitespace-nowrap text-sm text-gray-500"},q={key:0,class:"space-y-2"},H={class:"flex items-center space-x-2"},Q=e("span",{class:"text-gray-500 text-sm"},"Enabled",-1),X={key:0,class:"flex items-center space-x-2"},Y=e("span",{class:"text-gray-500 text-sm"},"Weekly summary enabled",-1),Z={key:1,class:"flex items-center space-x-2"},ee={class:"whitespace-nowrap py-4 pl-3 pr-4 text-right text-sm font-medium sm:pr-6"},te=["href"],se=["onClick"],ae={key:0},re={key:1},ne={key:0},oe=e("td",{colspan:"3",class:"px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900"},[e("div",{class:"text-center"},[e("a",{class:"underline text-blue-700",target:"_blank",href:"https://github.com/apps/what-the-diff/installations/new"},"Add additional repositories.")])],-1),le=[oe],he={__name:"Repositories",props:["repositories","onlyEnabled"],setup(n){const l=n,u=x(""),m=x(null),c=x(l.onlyEnabled==1);b(c,i=>{p()});const p=w.exports.debounce(()=>{g.Inertia.get("/dashboard",{search:u.value,onlyEnabled:c.value?1:0},{preserveState:!0,preserveScroll:!0})},500),f=i=>{m.value=i,g.Inertia.post(`/repository/${i.provider_id}`,{is_enabled:1},{preserveScroll:!0})};return(i,o)=>(s(),a("div",null,[D,e("div",L,[e("div",null,[T,_(e("input",{"onUpdate:modelValue":o[0]||(o[0]=t=>u.value=t),onKeyup:o[1]||(o[1]=(...t)=>r(p)&&r(p)(...t)),type:"text",name:"search",id:"search",class:"block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm",placeholder:"Search\u2026"},null,544),[[k,u.value]])]),e("label",I,[_(e("input",{"onUpdate:modelValue":o[2]||(o[2]=t=>
1c.value=t),value:"1",type:"checkbox",class:"h-4 w-4 rounded border-gray-300 text-indigo-600 focus:ring-indigo-500 mr-2"},null,512),[[C,c.value]]),v(" Only enabled repositories ")])]),e("div",j,[d(r(M),{href:"/dashboard/reload",class:"ml-2 text-sm bg-gray-100 text-sm text-gray-800 border border-gray-400 px-3 py-1.5 rounded-md hover:bg-gray-200"},{default:E(()=>[v(" Reload ")]),_:1})]),e("div",F,[e("table",P,[U,e("tbody",W,[(s(!0),a(S,null,B(n.repositories,t=>(s(),a("tr",{key:t.id},[e("td",A,[e("div",G,[e("span",J,y(t.visibility==="private"||t.visibility==="internal"?"Private":"Public"),1)]),e("a",{target:"_blank",class:"text-blue-700 underline",href:t.html_url},y(t.name),9,K)]),e("td",O,[t.is_enabled?(s(),a("div",q,[e("div",H,[d(r(z),{class:"h-6 w-6 text-green-500"}),Q]),t.weekly_summary_enabled?(s(),a("div",X,[d(r(V),{class:"h-6 w-6 text-green-500"}),Y])):h("",!0)])):h("",!0),t.is_enabled?h("",!0):(s(),a("div",Z,[d(r(R),{class:"h-6 w-6 text-gray-400"})]))]),e("td",ee,[t.is_enabled?(s(),a("a",{key:0,href:`/repository/${t.provider_id}/settings`,class:"p-3 rounded-md border text-gray-800 hover:text-gray-900 hover:bg-gray-50"},"Configuration ",8,te)):(s(),a("button",{key:1,onClick:$(ie=>f(t),["prevent"]),class:"p-3 rounded-md border text-gray-800 hover:text-gray-900 hover:bg-green-50 inline-flex items-center space-x-2"},[d(r(N),{class:"h-4 w-4 text-green-500"}),m.value===t?(s(),a("span",ae,"Enabling...")):(s(),a("span",re,"Enable"))],8,se))])]))),128)),i.$page.props.user.provider==="github"?(s(),a("tr",ne,le)):h("",!0)])])])]))}};export{he 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.