WebUI improvements and gitea tools fix
* The "CA Certificate Bundle (Optional)" showed no indication of a certificate being selected. This change fixes that. * The gitea tools cache worker should not fall back to the default releases page if the custom page set by the user returned an error. * Selecting "Use Internal Tools Metadata" in the gitea endpoint edit modal now greys out the "Tools Metadata URL (optional)" text field. Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
This commit is contained in:
parent
80e042ee88
commit
1637f326cb
67 changed files with 165 additions and 114 deletions
File diff suppressed because one or more lines are too long
1
webapp/assets/_app/immutable/assets/0.Dm58_Ye1.css
Normal file
1
webapp/assets/_app/immutable/assets/0.Dm58_Ye1.css
Normal file
File diff suppressed because one or more lines are too long
|
|
@ -1 +1 @@
|
|||
import{f as D,s as P,a as I}from"./o8CdT7B0.js";import{i as w}from"./ChJfoPF0.js";import{p as S,c as s,r as n,s as u,u as l,h as i,t as N,a as A}from"./DUMcBckj.js";import{d as f,c as F}from"./By1mMPic.js";import{p as d}from"./i7pKks78.js";import{D as E,G,A as j}from"./feAEhHKM.js";import{E as L}from"./D8XSG0sn.js";import{S as g}from"./QVHDSiOj.js";var M=D('<div class="bg-white dark:bg-gray-800 shadow rounded-lg"><div class="px-4 py-5 sm:p-6"><div class="flex items-center justify-between mb-4"><h2 class="text-lg font-medium text-gray-900 dark:text-white"> </h2> <a class="text-sm text-blue-600 dark:text-blue-400 hover:text-blue-500 dark:hover:text-blue-300">View all instances</a></div> <!></div></div>');function O(y,a){S(a,!1);let e=d(a,"instances",8),h=d(a,"entityType",8),v=d(a,"onDeleteInstance",8);const b=[{key:"name",title:"Name",cellComponent:L,cellProps:{entityType:"instance",nameField:"name"}},{key:"status",title:"Status",cellComponent:g,cellProps:{statusType:"instance",statusField:"status"}},{key:"runner_status",title:"Runner Status",cellComponent:g,cellProps:{statusType:"instance",statusField:"runner_status"}},{key:"created",title:"Created",cellComponent:G,cellProps:{field:"created_at",type:"date"}},{key:"actions",title:"Actions",align:"right",cellComponent:j,cellProps:{actions:[{type:"delete",label:"Delete",title:"Delete instance",ariaLabel:"Delete instance",action:"delete"}]}}],x={entityType:"instance",primaryText:{field:"name",isClickable:!0,href:"/instances/{name}"},secondaryText:{field:"provider_id"},badges:[{type:"status",field:"status"}],actions:[{type:"delete",handler:t=>m(t)}]};function m(t){v()(t)}function C(t){m(t.detail.item)}w();var r=M(),p=s(r),o=s(p),c=s(o),T=s(c);n(c);var _=u(c,2);n(o);var k=u(o,2);E(k,{get columns(){return b},get data(){return e()},loading:!1,error:"",searchTerm:"",showSearch:!1,showPagination:!1,currentPage:1,get perPage(){return i(e()),l(()=>e().length)},totalPages:1,get totalItems(){return i(e()),l(()=>e().length)},itemName:"instances",emptyTitle:"No instances running",get emptyMessage(){return`No instances running for this ${h()??""}.`},emptyIconType:"cog",get mobileCardConfig(){return x},$$events:{delete:C}}),n(p),n(r),N(t=>{P(T,`Instances (${i(e()),l(()=>e().length)??""})`),F(_,"href",t)},[()=>(i(f),l(()=>f("/instances")))]),I(y,r),A()}export{O as I};
|
||||
import{f as D,s as P,a as I}from"./o8CdT7B0.js";import{i as w}from"./ChJfoPF0.js";import{p as S,c as s,r as n,s as u,u as l,h as i,t as N,a as A}from"./DUMcBckj.js";import{d as f,c as F}from"./BrpPrY5G.js";import{p as d}from"./i7pKks78.js";import{D as E,G,A as j}from"./oMjxEQyr.js";import{E as L}from"./DFpS82qQ.js";import{S as g}from"./Bm38E3Lu.js";var M=D('<div class="bg-white dark:bg-gray-800 shadow rounded-lg"><div class="px-4 py-5 sm:p-6"><div class="flex items-center justify-between mb-4"><h2 class="text-lg font-medium text-gray-900 dark:text-white"> </h2> <a class="text-sm text-blue-600 dark:text-blue-400 hover:text-blue-500 dark:hover:text-blue-300">View all instances</a></div> <!></div></div>');function O(y,a){S(a,!1);let e=d(a,"instances",8),h=d(a,"entityType",8),v=d(a,"onDeleteInstance",8);const b=[{key:"name",title:"Name",cellComponent:L,cellProps:{entityType:"instance",nameField:"name"}},{key:"status",title:"Status",cellComponent:g,cellProps:{statusType:"instance",statusField:"status"}},{key:"runner_status",title:"Runner Status",cellComponent:g,cellProps:{statusType:"instance",statusField:"runner_status"}},{key:"created",title:"Created",cellComponent:G,cellProps:{field:"created_at",type:"date"}},{key:"actions",title:"Actions",align:"right",cellComponent:j,cellProps:{actions:[{type:"delete",label:"Delete",title:"Delete instance",ariaLabel:"Delete instance",action:"delete"}]}}],x={entityType:"instance",primaryText:{field:"name",isClickable:!0,href:"/instances/{name}"},secondaryText:{field:"provider_id"},badges:[{type:"status",field:"status"}],actions:[{type:"delete",handler:t=>m(t)}]};function m(t){v()(t)}function C(t){m(t.detail.item)}w();var r=M(),p=s(r),o=s(p),c=s(o),T=s(c);n(c);var _=u(c,2);n(o);var k=u(o,2);E(k,{get columns(){return b},get data(){return e()},loading:!1,error:"",searchTerm:"",showSearch:!1,showPagination:!1,currentPage:1,get perPage(){return i(e()),l(()=>e().length)},totalPages:1,get totalItems(){return i(e()),l(()=>e().length)},itemName:"instances",emptyTitle:"No instances running",get emptyMessage(){return`No instances running for this ${h()??""}.`},emptyIconType:"cog",get mobileCardConfig(){return x},$$events:{delete:C}}),n(p),n(r),N(t=>{P(T,`Instances (${i(e()),l(()=>e().length)??""})`),F(_,"href",t)},[()=>(i(f),l(()=>f("/instances")))]),I(y,r),A()}export{O as I};
|
||||
|
|
@ -1 +1 @@
|
|||
import{f as _,a as h,s as x}from"./o8CdT7B0.js";import{i as u}from"./ChJfoPF0.js";import{p as g,t as k,a as w,s as y,c as o,u as m,h as e,r}from"./DUMcBckj.js";import{h as z}from"./By1mMPic.js";import{p as d}from"./i7pKks78.js";import{g as l}from"./BPOuWaSt.js";var E=_('<div class="flex items-center"><div class="flex-shrink-0 mr-2"><!></div> <div class="text-sm text-gray-900 dark:text-white"> </div></div>');function j(v,i){g(i,!1);let t=d(i,"item",8),s=d(i,"iconSize",8,"w-5 h-5");u();var a=E(),n=o(a),f=o(n);z(f,()=>(e(l),e(t()),e(s()),m(()=>l(t()?.endpoint?.endpoint_type||t()?.endpoint_type||"unknown",s())))),r(n);var p=y(n,2),c=o(p,!0);r(p),r(a),k(()=>x(c,(e(t()),m(()=>t()?.endpoint?.name||t()?.endpoint_name||t()?.endpoint_type||"Unknown")))),h(v,a),w()}export{j as E};
|
||||
import{f as _,a as h,s as x}from"./o8CdT7B0.js";import{i as u}from"./ChJfoPF0.js";import{p as g,t as k,a as w,s as y,c as o,u as m,h as e,r}from"./DUMcBckj.js";import{h as z}from"./BrpPrY5G.js";import{p as d}from"./i7pKks78.js";import{g as l}from"./CDFYnmbx.js";var E=_('<div class="flex items-center"><div class="flex-shrink-0 mr-2"><!></div> <div class="text-sm text-gray-900 dark:text-white"> </div></div>');function j(v,i){g(i,!1);let t=d(i,"item",8),s=d(i,"iconSize",8,"w-5 h-5");u();var a=E(),n=o(a),f=o(n);z(f,()=>(e(l),e(t()),e(s()),m(()=>l(t()?.endpoint?.endpoint_type||t()?.endpoint_type||"unknown",s())))),r(n);var p=y(n,2),c=o(p,!0);r(p),r(a),k(()=>x(c,(e(t()),m(()=>t()?.endpoint?.name||t()?.endpoint_name||t()?.endpoint_type||"Unknown")))),h(v,a),w()}export{j as E};
|
||||
|
|
@ -1 +1 @@
|
|||
import{f as v,e as t,a as m}from"./o8CdT7B0.js";import{i as u}from"./ChJfoPF0.js";import{p as h,v as k,c as r,r as s,a as g}from"./DUMcBckj.js";import{f as b}from"./By1mMPic.js";var w=v('<div class="fixed inset-0 bg-black/30 dark:bg-black/50 overflow-y-auto h-full w-full z-50 flex items-center justify-center p-4" role="dialog" aria-modal="true" tabindex="-1"><div class="relative mx-auto bg-white dark:bg-gray-800 rounded-lg shadow-lg" role="document"><!></div></div>');function M(d,i){h(i,!1);const l=k();function n(){l("close")}function c(o){o.stopPropagation()}function f(o){o.key==="Escape"&&l("close")}u();var a=w(),e=r(a),p=r(e);b(p,i,"default",{}),s(e),s(a),t("click",e,c),t("click",a,n),t("keydown",a,f),m(d,a),g()}export{M};
|
||||
import{f as v,e as t,a as m}from"./o8CdT7B0.js";import{i as u}from"./ChJfoPF0.js";import{p as h,v as k,c as r,r as s,a as g}from"./DUMcBckj.js";import{f as b}from"./BrpPrY5G.js";var w=v('<div class="fixed inset-0 bg-black/30 dark:bg-black/50 overflow-y-auto h-full w-full z-50 flex items-center justify-center p-4" role="dialog" aria-modal="true" tabindex="-1"><div class="relative mx-auto bg-white dark:bg-gray-800 rounded-lg shadow-lg" role="document"><!></div></div>');function M(d,i){h(i,!1);const l=k();function n(){l("close")}function c(o){o.stopPropagation()}function f(o){o.key==="Escape"&&l("close")}u();var a=w(),e=r(a),p=r(e);b(p,i,"default",{}),s(e),s(a),t("click",e,c),t("click",a,n),t("keydown",a,f),m(d,a),g()}export{M};
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -1 +1 @@
|
|||
import{f as j,t as $,a as n,s as v}from"./o8CdT7B0.js";import{i as J}from"./ChJfoPF0.js";import{p as K,v as O,c as e,r as t,s as i,n as D,t as h,g as Q,i as R,a as S}from"./DUMcBckj.js";import{p as l,i as T}from"./i7pKks78.js";import{B as L,s as M}from"./By1mMPic.js";import{M as U}from"./bEwPjd5X.js";var V=j('<p class="mt-1 font-medium text-gray-900 dark:text-white"> </p>'),W=j('<div class="max-w-xl w-full p-6"><div><svg fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-2.5L13.732 4c-.77-.833-1.964-.833-2.732 0L3.732 16.5c-.77.833.192 2.5 1.732 2.5z"></path></svg></div> <div class="text-center"><h3 class="text-lg leading-6 font-medium text-gray-900 dark:text-white mb-2"> </h3> <div class="text-sm text-gray-500 dark:text-gray-400"><p> </p> <!></div></div> <div class="mt-6 flex justify-end space-x-3"><!> <!></div></div>');function se(B,a){K(a,!1);let C=l(a,"title",8),P=l(a,"message",8),_=l(a,"itemName",8,""),c=l(a,"loading",8,!1),N=l(a,"confirmLabel",8,"Delete"),m=l(a,"danger",8,!0);const f=O();function q(){f("confirm")}J(),U(B,{$$events:{close:()=>f("close")},children:(z,X)=>{var u=W(),d=e(u),E=e(d);t(d);var x=i(d,2),g=e(x),A=e(g,!0);t(g);var k=i(g,2),p=e(k),F=e(p,!0);t(p);var G=i(p,2);{var H=r=>{var s=V(),o=e(s,!0);t(s),h(()=>v(o,_())),n(r,s)};T(G,r=>{_()&&r(H)})}t(k),t(x);var b=i(x,2),w=e(b);L(w,{variant:"secondary",get disabled(){return c()},$$events:{click:()=>f("close")},children:(r,s)=>{D();var o=$("Cancel");n(r,o)},$$slots:{default:!0}});var I=i(w,2);{let r=R(()=>m()?"danger":"primary");L(I,{get variant(){return Q(r)},get disabled(){return c()},get loading(){return c()},$$events:{click:q},children:(s,o)=>{D();var y=$();h(()=>v(y,N())),n(s,y)},$$slots:{default:!0}})}t(b),t(u),h(()=>{M(d,1,`mx-auto flex items-center justify-center h-12 w-12 rounded-full ${m()?"bg-red-100 dark:bg-red-900":"bg-yellow-100 dark:bg-yellow-900"} mb-4`),M(E,0,`h-6 w-6 ${m()?"text-red-600 dark:text-red-400":"text-yellow-600 dark:text-yellow-400"}`),v(A,C()),v(F,P())}),n(z,u)},$$slots:{default:!0}}),S()}export{se as D};
|
||||
import{f as j,t as $,a as n,s as v}from"./o8CdT7B0.js";import{i as J}from"./ChJfoPF0.js";import{p as K,v as O,c as e,r as t,s as i,n as D,t as h,g as Q,i as R,a as S}from"./DUMcBckj.js";import{p as l,i as T}from"./i7pKks78.js";import{B as L,s as M}from"./BrpPrY5G.js";import{M as U}from"./BEywZTME.js";var V=j('<p class="mt-1 font-medium text-gray-900 dark:text-white"> </p>'),W=j('<div class="max-w-xl w-full p-6"><div><svg fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-2.5L13.732 4c-.77-.833-1.964-.833-2.732 0L3.732 16.5c-.77.833.192 2.5 1.732 2.5z"></path></svg></div> <div class="text-center"><h3 class="text-lg leading-6 font-medium text-gray-900 dark:text-white mb-2"> </h3> <div class="text-sm text-gray-500 dark:text-gray-400"><p> </p> <!></div></div> <div class="mt-6 flex justify-end space-x-3"><!> <!></div></div>');function se(B,a){K(a,!1);let C=l(a,"title",8),P=l(a,"message",8),_=l(a,"itemName",8,""),c=l(a,"loading",8,!1),N=l(a,"confirmLabel",8,"Delete"),m=l(a,"danger",8,!0);const f=O();function q(){f("confirm")}J(),U(B,{$$events:{close:()=>f("close")},children:(z,X)=>{var u=W(),d=e(u),E=e(d);t(d);var x=i(d,2),g=e(x),A=e(g,!0);t(g);var k=i(g,2),p=e(k),F=e(p,!0);t(p);var G=i(p,2);{var H=r=>{var s=V(),o=e(s,!0);t(s),h(()=>v(o,_())),n(r,s)};T(G,r=>{_()&&r(H)})}t(k),t(x);var b=i(x,2),w=e(b);L(w,{variant:"secondary",get disabled(){return c()},$$events:{click:()=>f("close")},children:(r,s)=>{D();var o=$("Cancel");n(r,o)},$$slots:{default:!0}});var I=i(w,2);{let r=R(()=>m()?"danger":"primary");L(I,{get variant(){return Q(r)},get disabled(){return c()},get loading(){return c()},$$events:{click:q},children:(s,o)=>{D();var y=$();h(()=>v(y,N())),n(s,y)},$$slots:{default:!0}})}t(b),t(u),h(()=>{M(d,1,`mx-auto flex items-center justify-center h-12 w-12 rounded-full ${m()?"bg-red-100 dark:bg-red-900":"bg-yellow-100 dark:bg-yellow-900"} mb-4`),M(E,0,`h-6 w-6 ${m()?"text-red-600 dark:text-red-400":"text-yellow-600 dark:text-yellow-400"}`),v(A,C()),v(F,P())}),n(z,u)},$$slots:{default:!0}}),S()}export{se as D};
|
||||
|
|
@ -1 +1 @@
|
|||
const w=/^(\[)?(\.\.\.)?(\w+)(?:=(\w+))?(\])?$/;function x(t){const s=[];return{pattern:t==="/"?/^\/$/:new RegExp(`^${_(t).map(i=>{const o=/^\[\.\.\.(\w+)(?:=(\w+))?\]$/.exec(i);if(o)return s.push({name:o[1],matcher:o[2],optional:!1,rest:!0,chained:!0}),"(?:/([^]*))?";const l=/^\[\[(\w+)(?:=(\w+))?\]\]$/.exec(i);if(l)return s.push({name:l[1],matcher:l[2],optional:!0,rest:!1,chained:!0}),"(?:/([^/]+))?";if(!i)return;const n=i.split(/\[(.+?)\](?!\])/);return"/"+n.map((e,r)=>{if(r%2){if(e.startsWith("x+"))return h(String.fromCharCode(parseInt(e.slice(2),16)));if(e.startsWith("u+"))return h(String.fromCharCode(...e.slice(2).split("-").map(g=>parseInt(g,16))));const c=w.exec(e),[,u,p,m,d]=c;return s.push({name:m,matcher:d,optional:!!u,rest:!!p,chained:p?r===1&&n[0]==="":!1}),p?"([^]*?)":u?"([^/]*)?":"([^/]+?)"}return h(e)}).join("")}).join("")}/?$`),params:s}}function $(t){return t!==""&&!/^\([^)]+\)$/.test(t)}function _(t){return t.slice(1).split("/").filter($)}function j(t,s,f){const i={},o=t.slice(1),l=o.filter(a=>a!==void 0);let n=0;for(let a=0;a<s.length;a+=1){const e=s[a];let r=o[a-n];if(e.chained&&e.rest&&n&&(r=o.slice(a-n,a+1).filter(c=>c).join("/"),n=0),r===void 0)if(e.rest)r="";else continue;if(!e.matcher||f[e.matcher](r)){i[e.name]=r;const c=s[a+1],u=o[a+1];c&&!c.rest&&c.optional&&u&&e.chained&&(n=0),!c&&!u&&Object.keys(i).length===l.length&&(n=0);continue}if(e.optional&&e.chained){n++;continue}return}if(!n)return i}function h(t){return t.normalize().replace(/[[\]]/g,"\\$&").replace(/%/g,"%25").replace(/\//g,"%2[Ff]").replace(/\?/g,"%3[Ff]").replace(/#/g,"%23").replace(/[.*+?^${}()|\\]/g,"\\$&")}const b=/\[(\[)?(\.\.\.)?(\w+?)(?:=(\w+))?\]\]?/g;function W(t,s){const f=_(t),i=t!="/"&&t.endsWith("/");return"/"+f.map(o=>o.replace(b,(l,n,a,e)=>{const r=s[e];if(!r){if(n||a&&r!==void 0)return"";throw new Error(`Missing parameter '${e}' in route ${t}`)}if(r.startsWith("/")||r.endsWith("/"))throw new Error(`Parameter '${e}' in route ${t} cannot start or end with a slash -- this would cause an invalid route like foo//bar`);return r})).filter(Boolean).join("/")+(i?"/":"")}const v=globalThis.__sveltekit_1djifpb?.base??"/ui",k=globalThis.__sveltekit_1djifpb?.assets??v??"";export{k as a,v as b,j as e,x as p,W as r};
|
||||
const w=/^(\[)?(\.\.\.)?(\w+)(?:=(\w+))?(\])?$/;function v(t){const s=[];return{pattern:t==="/"?/^\/$/:new RegExp(`^${_(t).map(i=>{const o=/^\[\.\.\.(\w+)(?:=(\w+))?\]$/.exec(i);if(o)return s.push({name:o[1],matcher:o[2],optional:!1,rest:!0,chained:!0}),"(?:/([^]*))?";const l=/^\[\[(\w+)(?:=(\w+))?\]\]$/.exec(i);if(l)return s.push({name:l[1],matcher:l[2],optional:!0,rest:!1,chained:!0}),"(?:/([^/]+))?";if(!i)return;const n=i.split(/\[(.+?)\](?!\])/);return"/"+n.map((e,r)=>{if(r%2){if(e.startsWith("x+"))return h(String.fromCharCode(parseInt(e.slice(2),16)));if(e.startsWith("u+"))return h(String.fromCharCode(...e.slice(2).split("-").map(d=>parseInt(d,16))));const c=w.exec(e),[,u,p,m,g]=c;return s.push({name:m,matcher:g,optional:!!u,rest:!!p,chained:p?r===1&&n[0]==="":!1}),p?"([^]*?)":u?"([^/]*)?":"([^/]+?)"}return h(e)}).join("")}).join("")}/?$`),params:s}}function $(t){return t!==""&&!/^\([^)]+\)$/.test(t)}function _(t){return t.slice(1).split("/").filter($)}function j(t,s,f){const i={},o=t.slice(1),l=o.filter(a=>a!==void 0);let n=0;for(let a=0;a<s.length;a+=1){const e=s[a];let r=o[a-n];if(e.chained&&e.rest&&n&&(r=o.slice(a-n,a+1).filter(c=>c).join("/"),n=0),r===void 0)if(e.rest)r="";else continue;if(!e.matcher||f[e.matcher](r)){i[e.name]=r;const c=s[a+1],u=o[a+1];c&&!c.rest&&c.optional&&u&&e.chained&&(n=0),!c&&!u&&Object.keys(i).length===l.length&&(n=0);continue}if(e.optional&&e.chained){n++;continue}return}if(!n)return i}function h(t){return t.normalize().replace(/[[\]]/g,"\\$&").replace(/%/g,"%25").replace(/\//g,"%2[Ff]").replace(/\?/g,"%3[Ff]").replace(/#/g,"%23").replace(/[.*+?^${}()|\\]/g,"\\$&")}const b=/\[(\[)?(\.\.\.)?(\w+?)(?:=(\w+))?\]\]?/g;function W(t,s){const f=_(t),i=t!="/"&&t.endsWith("/");return"/"+f.map(o=>o.replace(b,(l,n,a,e)=>{const r=s[e];if(!r){if(n||a&&r!==void 0)return"";throw new Error(`Missing parameter '${e}' in route ${t}`)}if(r.startsWith("/")||r.endsWith("/"))throw new Error(`Parameter '${e}' in route ${t} cannot start or end with a slash -- this would cause an invalid route like foo//bar`);return r})).filter(Boolean).join("/")+(i?"/":"")}const x=globalThis.__sveltekit_1x9zgb8?.base??"/ui",k=globalThis.__sveltekit_1x9zgb8?.assets??x??"";export{k as a,x as b,j as e,v as p,W as r};
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -1 +1 @@
|
|||
import{c as S,a as C}from"./o8CdT7B0.js";import{i as L}from"./ChJfoPF0.js";import{p as B,l as w,h as n,g as t,m as y,b as V,f as A,a as E,d as _,u as f}from"./DUMcBckj.js";import{k as F}from"./feAEhHKM.js";import{p as m}from"./i7pKks78.js";import{B as G}from"./D3LjnYSP.js";import{k as x}from"./BPOuWaSt.js";import{f as D}from"./ow_oMtSd.js";function J(v,u){B(u,!1);const s=y(),c=y();let e=m(u,"item",8),g=m(u,"statusType",8,"entity"),r=m(u,"statusField",8,"status");w(()=>(n(e()),n(r())),()=>{_(s,e()?.[r()]||"unknown")}),w(()=>(n(e()),n(g()),t(s),n(r())),()=>{_(c,(()=>{if(!e())return{variant:"error",text:"Unknown"};switch(g()){case"entity":return x(e());case"instance":let a="secondary";switch(t(s).toLowerCase()){case"running":a="success";break;case"stopped":a="info";break;case"creating":case"pending_create":a="warning";break;case"deleting":case"pending_delete":case"pending_force_delete":a="warning";break;case"error":case"deleted":a="error";break;case"active":case"online":a="success";break;case"idle":a="info";break;case"pending":case"installing":a="warning";break;case"failed":case"terminated":case"offline":a="error";break;case"unknown":default:a="secondary";break}return{variant:a,text:D(t(s))};case"enabled":return{variant:e().enabled?"success":"error",text:e().enabled?"Enabled":"Disabled"};case"os_type":const T=(t(s)||"").toLowerCase();let i="secondary",o=t(s)||"Unknown";switch(T){case"linux":i="success",o="Linux";break;case"windows":i="blue",o="Windows";break;case"macos":case"darwin":i="purple",o="macOS";break;default:i="gray",o=t(s)||"Unknown";break}return{variant:i,text:o};case"forge_type":const U=(t(s)||"").toLowerCase();let d="secondary",l=t(s)||"Unknown";switch(U){case"github":d="gray",l="GitHub";break;case"gitea":d="green",l="Gitea";break;default:d="secondary",l=t(s)||"Unknown";break}return{variant:d,text:l};case"custom":const p=e()[r()]||"Unknown";if(r()==="auth-type"){const b=p==="pat"||!p?"pat":"app";return{variant:b==="pat"?"success":"info",text:b==="pat"?"PAT":"App"}}return{variant:"info",text:p};default:return x(e())}})())}),V(),L();var k=S(),h=A(k);F(h,()=>(n(e()),n(r()),f(()=>`${e()?.name||"item"}-${e()?.[r()]||"status"}-${e()?.updated_at||"time"}`)),a=>{G(a,{get variant(){return t(c),f(()=>t(c).variant)},get text(){return t(c),f(()=>t(c).text)}})}),C(v,k),E()}export{J as S};
|
||||
import{c as S,a as C}from"./o8CdT7B0.js";import{i as L}from"./ChJfoPF0.js";import{p as B,l as w,h as n,g as t,m as y,b as V,f as A,a as E,d as _,u as f}from"./DUMcBckj.js";import{k as F}from"./oMjxEQyr.js";import{p as m}from"./i7pKks78.js";import{B as G}from"./CVTuRyLt.js";import{k as x}from"./CDFYnmbx.js";import{f as D}from"./ow_oMtSd.js";function J(v,u){B(u,!1);const s=y(),c=y();let e=m(u,"item",8),g=m(u,"statusType",8,"entity"),r=m(u,"statusField",8,"status");w(()=>(n(e()),n(r())),()=>{_(s,e()?.[r()]||"unknown")}),w(()=>(n(e()),n(g()),t(s),n(r())),()=>{_(c,(()=>{if(!e())return{variant:"error",text:"Unknown"};switch(g()){case"entity":return x(e());case"instance":let a="secondary";switch(t(s).toLowerCase()){case"running":a="success";break;case"stopped":a="info";break;case"creating":case"pending_create":a="warning";break;case"deleting":case"pending_delete":case"pending_force_delete":a="warning";break;case"error":case"deleted":a="error";break;case"active":case"online":a="success";break;case"idle":a="info";break;case"pending":case"installing":a="warning";break;case"failed":case"terminated":case"offline":a="error";break;case"unknown":default:a="secondary";break}return{variant:a,text:D(t(s))};case"enabled":return{variant:e().enabled?"success":"error",text:e().enabled?"Enabled":"Disabled"};case"os_type":const T=(t(s)||"").toLowerCase();let i="secondary",o=t(s)||"Unknown";switch(T){case"linux":i="success",o="Linux";break;case"windows":i="blue",o="Windows";break;case"macos":case"darwin":i="purple",o="macOS";break;default:i="gray",o=t(s)||"Unknown";break}return{variant:i,text:o};case"forge_type":const U=(t(s)||"").toLowerCase();let d="secondary",l=t(s)||"Unknown";switch(U){case"github":d="gray",l="GitHub";break;case"gitea":d="green",l="Gitea";break;default:d="secondary",l=t(s)||"Unknown";break}return{variant:d,text:l};case"custom":const p=e()[r()]||"Unknown";if(r()==="auth-type"){const b=p==="pat"||!p?"pat":"app";return{variant:b==="pat"?"success":"info",text:b==="pat"?"PAT":"App"}}return{variant:"info",text:p};default:return x(e())}})())}),V(),L();var k=S(),h=A(k);F(h,()=>(n(e()),n(r()),f(()=>`${e()?.name||"item"}-${e()?.[r()]||"status"}-${e()?.updated_at||"time"}`)),a=>{G(a,{get variant(){return t(c),f(()=>t(c).variant)},get text(){return t(c),f(()=>t(c).text)}})}),C(v,k),E()}export{J as S};
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -1,4 +1,4 @@
|
|||
import{d as o}from"./By1mMPic.js";function l(r){if(!r)return"N/A";try{return(typeof r=="string"?new Date(r):r).toLocaleString()}catch{return"Invalid Date"}}function f(r,e="w-4 h-4"){return r==="gitea"?`<svg class="${e}" xmlns="http://www.w3.org/2000/svg" xml:space="preserve" viewBox="0 0 640 640"><path d="m395.9 484.2-126.9-61c-12.5-6-17.9-21.2-11.8-33.8l61-126.9c6-12.5 21.2-17.9 33.8-11.8 17.2 8.3 27.1 13 27.1 13l-.1-109.2 16.7-.1.1 117.1s57.4 24.2 83.1 40.1c3.7 2.3 10.2 6.8 12.9 14.4 2.1 6.1 2 13.1-1 19.3l-61 126.9c-6.2 12.7-21.4 18.1-33.9 12" style="fill:#fff"/><path d="M622.7 149.8c-4.1-4.1-9.6-4-9.6-4s-117.2 6.6-177.9 8c-13.3.3-26.5.6-39.6.7v117.2c-5.5-2.6-11.1-5.3-16.6-7.9 0-36.4-.1-109.2-.1-109.2-29 .4-89.2-2.2-89.2-2.2s-141.4-7.1-156.8-8.5c-9.8-.6-22.5-2.1-39 1.5-8.7 1.8-33.5 7.4-53.8 26.9C-4.9 212.4 6.6 276.2 8 285.8c1.7 11.7 6.9 44.2 31.7 72.5 45.8 56.1 144.4 54.8 144.4 54.8s12.1 28.9 30.6 55.5c25 33.1 50.7 58.9 75.7 62 63 0 188.9-.1 188.9-.1s12 .1 28.3-10.3c14-8.5 26.5-23.4 26.5-23.4S547 483 565 451.5c5.5-9.7 10.1-19.1 14.1-28 0 0 55.2-117.1 55.2-231.1-1.1-34.5-9.6-40.6-11.6-42.6M125.6 353.9c-25.9-8.5-36.9-18.7-36.9-18.7S69.6 321.8 60 295.4c-16.5-44.2-1.4-71.2-1.4-71.2s8.4-22.5 38.5-30c13.8-3.7 31-3.1 31-3.1s7.1 59.4 15.7 94.2c7.2 29.2 24.8 77.7 24.8 77.7s-26.1-3.1-43-9.1m300.3 107.6s-6.1 14.5-19.6 15.4c-5.8.4-10.3-1.2-10.3-1.2s-.3-.1-5.3-2.1l-112.9-55s-10.9-5.7-12.8-15.6c-2.2-8.1 2.7-18.1 2.7-18.1L322 273s4.8-9.7 12.2-13c.6-.3 2.3-1 4.5-1.5 8.1-2.1 18 2.8 18 2.8L467.4 315s12.6 5.7 15.3 16.2c1.9 7.4-.5 14-1.8 17.2-6.3 15.4-55 113.1-55 113.1" style="fill:#609926"/><path d="M326.8 380.1c-8.2.1-15.4 5.8-17.3 13.8s2 16.3 9.1 20c7.7 4 17.5 1.8 22.7-5.4 5.1-7.1 4.3-16.9-1.8-23.1l24-49.1c1.5.1 3.7.2 6.2-.5 4.1-.9 7.1-3.6 7.1-3.6 4.2 1.8 8.6 3.8 13.2 6.1 4.8 2.4 9.3 4.9 13.4 7.3.9.5 1.8 1.1 2.8 1.9 1.6 1.3 3.4 3.1 4.7 5.5 1.9 5.5-1.9 14.9-1.9 14.9-2.3 7.6-18.4 40.6-18.4 40.6-8.1-.2-15.3 5-17.7 12.5-2.6 8.1 1.1 17.3 8.9 21.3s17.4 1.7 22.5-5.3c5-6.8 4.6-16.3-1.1-22.6 1.9-3.7 3.7-7.4 5.6-11.3 5-10.4 13.5-30.4 13.5-30.4.9-1.7 5.7-10.3 2.7-21.3-2.5-11.4-12.6-16.7-12.6-16.7-12.2-7.9-29.2-15.2-29.2-15.2s0-4.1-1.1-7.1c-1.1-3.1-2.8-5.1-3.9-6.3 4.7-9.7 9.4-19.3 14.1-29-4.1-2-8.1-4-12.2-6.1-4.8 9.8-9.7 19.7-14.5 29.5-6.7-.1-12.9 3.5-16.1 9.4-3.4 6.3-2.7 14.1 1.9 19.8z" style="fill:#609926"/></svg>`:r==="github"?`<div class="inline-flex ${e}"><svg class="${e} dark:hidden" width="98" height="96" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 98 96"><path fill-rule="evenodd" clip-rule="evenodd" d="M48.854 0C21.839 0 0 22 0 49.217c0 21.756 13.993 40.172 33.405 46.69 2.427.49 3.316-1.059 3.316-2.362 0-1.141-.08-5.052-.08-9.127-13.59 2.934-16.42-5.867-16.42-5.867-2.184-5.704-5.42-7.17-5.42-7.17-4.448-3.015.324-3.015.324-3.015 4.934.326 7.523 5.052 7.523 5.052 4.367 7.496 11.404 5.378 14.235 4.074.404-3.178 1.699-5.378 3.074-6.6-10.839-1.141-22.243-5.378-22.243-24.283 0-5.378 1.94-9.778 5.014-13.2-.485-1.222-2.184-6.275.486-13.038 0 0 4.125-1.304 13.426 5.052a46.97 46.97 0 0 1 12.214-1.63c4.125 0 8.33.571 12.213 1.63 9.302-6.356 13.427-5.052 13.427-5.052 2.67 6.763.97 11.816.485 13.038 3.155 3.422 5.015 7.822 5.015 13.2 0 18.905-11.404 23.06-22.324 24.283 1.78 1.548 3.316 4.481 3.316 9.126 0 6.6-.08 11.897-.08 13.526 0 1.304.89 2.853 3.316 2.364 19.412-6.52 33.405-24.935 33.405-46.691C97.707 22 75.788 0 48.854 0z" fill="#24292f"/></svg><svg class="${e} hidden dark:block" width="98" height="96" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 98 96"><path fill-rule="evenodd" clip-rule="evenodd" d="M48.854 0C21.839 0 0 22 0 49.217c0 21.756 13.993 40.172 33.405 46.69 2.427.49 3.316-1.059 3.316-2.362 0-1.141-.08-5.052-.08-9.127-13.59 2.934-16.42-5.867-16.42-5.867-2.184-5.704-5.42-7.17-5.42-7.17-4.448-3.015.324-3.015.324-3.015 4.934.326 7.523 5.052 7.523 5.052 4.367 7.496 11.404 5.378 14.235 4.074.404-3.178 1.699-5.378 3.074-6.6-10.839-1.141-22.243-5.378-22.243-24.283 0-5.378 1.94-9.778 5.014-13.2-.485-1.222-2.184-6.275.486-13.038 0 0 4.125-1.304 13.426 5.052a46.97 46.97 0 0 1 12.214-1.63c4.125 0 8.33.571 12.213 1.63 9.302-6.356 13.427-5.052 13.427-5.052 2.67 6.763.97 11.816.485 13.038 3.155 3.422 5.015 7.822 5.015 13.2 0 18.905-11.404 23.06-22.324 24.283 1.78 1.548 3.316 4.481 3.316 9.126 0 6.6-.08 11.897-.08 13.526 0 1.304.89 2.853 3.316 2.364 19.412-6.52 33.405-24.935 33.405-46.691C97.707 22 75.788 0 48.854 0z" fill="#fff"/></svg></div>`:`<svg class="${e} text-gray-400" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
import{d as o}from"./BrpPrY5G.js";function l(r){if(!r)return"N/A";try{return(typeof r=="string"?new Date(r):r).toLocaleString()}catch{return"Invalid Date"}}function f(r,e="w-4 h-4"){return r==="gitea"?`<svg class="${e}" xmlns="http://www.w3.org/2000/svg" xml:space="preserve" viewBox="0 0 640 640"><path d="m395.9 484.2-126.9-61c-12.5-6-17.9-21.2-11.8-33.8l61-126.9c6-12.5 21.2-17.9 33.8-11.8 17.2 8.3 27.1 13 27.1 13l-.1-109.2 16.7-.1.1 117.1s57.4 24.2 83.1 40.1c3.7 2.3 10.2 6.8 12.9 14.4 2.1 6.1 2 13.1-1 19.3l-61 126.9c-6.2 12.7-21.4 18.1-33.9 12" style="fill:#fff"/><path d="M622.7 149.8c-4.1-4.1-9.6-4-9.6-4s-117.2 6.6-177.9 8c-13.3.3-26.5.6-39.6.7v117.2c-5.5-2.6-11.1-5.3-16.6-7.9 0-36.4-.1-109.2-.1-109.2-29 .4-89.2-2.2-89.2-2.2s-141.4-7.1-156.8-8.5c-9.8-.6-22.5-2.1-39 1.5-8.7 1.8-33.5 7.4-53.8 26.9C-4.9 212.4 6.6 276.2 8 285.8c1.7 11.7 6.9 44.2 31.7 72.5 45.8 56.1 144.4 54.8 144.4 54.8s12.1 28.9 30.6 55.5c25 33.1 50.7 58.9 75.7 62 63 0 188.9-.1 188.9-.1s12 .1 28.3-10.3c14-8.5 26.5-23.4 26.5-23.4S547 483 565 451.5c5.5-9.7 10.1-19.1 14.1-28 0 0 55.2-117.1 55.2-231.1-1.1-34.5-9.6-40.6-11.6-42.6M125.6 353.9c-25.9-8.5-36.9-18.7-36.9-18.7S69.6 321.8 60 295.4c-16.5-44.2-1.4-71.2-1.4-71.2s8.4-22.5 38.5-30c13.8-3.7 31-3.1 31-3.1s7.1 59.4 15.7 94.2c7.2 29.2 24.8 77.7 24.8 77.7s-26.1-3.1-43-9.1m300.3 107.6s-6.1 14.5-19.6 15.4c-5.8.4-10.3-1.2-10.3-1.2s-.3-.1-5.3-2.1l-112.9-55s-10.9-5.7-12.8-15.6c-2.2-8.1 2.7-18.1 2.7-18.1L322 273s4.8-9.7 12.2-13c.6-.3 2.3-1 4.5-1.5 8.1-2.1 18 2.8 18 2.8L467.4 315s12.6 5.7 15.3 16.2c1.9 7.4-.5 14-1.8 17.2-6.3 15.4-55 113.1-55 113.1" style="fill:#609926"/><path d="M326.8 380.1c-8.2.1-15.4 5.8-17.3 13.8s2 16.3 9.1 20c7.7 4 17.5 1.8 22.7-5.4 5.1-7.1 4.3-16.9-1.8-23.1l24-49.1c1.5.1 3.7.2 6.2-.5 4.1-.9 7.1-3.6 7.1-3.6 4.2 1.8 8.6 3.8 13.2 6.1 4.8 2.4 9.3 4.9 13.4 7.3.9.5 1.8 1.1 2.8 1.9 1.6 1.3 3.4 3.1 4.7 5.5 1.9 5.5-1.9 14.9-1.9 14.9-2.3 7.6-18.4 40.6-18.4 40.6-8.1-.2-15.3 5-17.7 12.5-2.6 8.1 1.1 17.3 8.9 21.3s17.4 1.7 22.5-5.3c5-6.8 4.6-16.3-1.1-22.6 1.9-3.7 3.7-7.4 5.6-11.3 5-10.4 13.5-30.4 13.5-30.4.9-1.7 5.7-10.3 2.7-21.3-2.5-11.4-12.6-16.7-12.6-16.7-12.2-7.9-29.2-15.2-29.2-15.2s0-4.1-1.1-7.1c-1.1-3.1-2.8-5.1-3.9-6.3 4.7-9.7 9.4-19.3 14.1-29-4.1-2-8.1-4-12.2-6.1-4.8 9.8-9.7 19.7-14.5 29.5-6.7-.1-12.9 3.5-16.1 9.4-3.4 6.3-2.7 14.1 1.9 19.8z" style="fill:#609926"/></svg>`:r==="github"?`<div class="inline-flex ${e}"><svg class="${e} dark:hidden" width="98" height="96" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 98 96"><path fill-rule="evenodd" clip-rule="evenodd" d="M48.854 0C21.839 0 0 22 0 49.217c0 21.756 13.993 40.172 33.405 46.69 2.427.49 3.316-1.059 3.316-2.362 0-1.141-.08-5.052-.08-9.127-13.59 2.934-16.42-5.867-16.42-5.867-2.184-5.704-5.42-7.17-5.42-7.17-4.448-3.015.324-3.015.324-3.015 4.934.326 7.523 5.052 7.523 5.052 4.367 7.496 11.404 5.378 14.235 4.074.404-3.178 1.699-5.378 3.074-6.6-10.839-1.141-22.243-5.378-22.243-24.283 0-5.378 1.94-9.778 5.014-13.2-.485-1.222-2.184-6.275.486-13.038 0 0 4.125-1.304 13.426 5.052a46.97 46.97 0 0 1 12.214-1.63c4.125 0 8.33.571 12.213 1.63 9.302-6.356 13.427-5.052 13.427-5.052 2.67 6.763.97 11.816.485 13.038 3.155 3.422 5.015 7.822 5.015 13.2 0 18.905-11.404 23.06-22.324 24.283 1.78 1.548 3.316 4.481 3.316 9.126 0 6.6-.08 11.897-.08 13.526 0 1.304.89 2.853 3.316 2.364 19.412-6.52 33.405-24.935 33.405-46.691C97.707 22 75.788 0 48.854 0z" fill="#24292f"/></svg><svg class="${e} hidden dark:block" width="98" height="96" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 98 96"><path fill-rule="evenodd" clip-rule="evenodd" d="M48.854 0C21.839 0 0 22 0 49.217c0 21.756 13.993 40.172 33.405 46.69 2.427.49 3.316-1.059 3.316-2.362 0-1.141-.08-5.052-.08-9.127-13.59 2.934-16.42-5.867-16.42-5.867-2.184-5.704-5.42-7.17-5.42-7.17-4.448-3.015.324-3.015.324-3.015 4.934.326 7.523 5.052 7.523 5.052 4.367 7.496 11.404 5.378 14.235 4.074.404-3.178 1.699-5.378 3.074-6.6-10.839-1.141-22.243-5.378-22.243-24.283 0-5.378 1.94-9.778 5.014-13.2-.485-1.222-2.184-6.275.486-13.038 0 0 4.125-1.304 13.426 5.052a46.97 46.97 0 0 1 12.214-1.63c4.125 0 8.33.571 12.213 1.63 9.302-6.356 13.427-5.052 13.427-5.052 2.67 6.763.97 11.816.485 13.038 3.155 3.422 5.015 7.822 5.015 13.2 0 18.905-11.404 23.06-22.324 24.283 1.78 1.548 3.316 4.481 3.316 9.126 0 6.6-.08 11.897-.08 13.526 0 1.304.89 2.853 3.316 2.364 19.412-6.52 33.405-24.935 33.405-46.691C97.707 22 75.788 0 48.854 0z" fill="#fff"/></svg></div>`:`<svg class="${e} text-gray-400" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z" />
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 12a3 3 0 11-6 0 3 3 0 016 0z" />
|
||||
</svg>`}function d(r,e){if(r.repo_name)return r.repo_name;if(r.org_name)return r.org_name;if(r.enterprise_name)return r.enterprise_name;if(r.repo_id&&!r.repo_name&&e?.repositories){const n=e.repositories.find(t=>t.id===r.repo_id);return n?`${n.owner}/${n.name}`:"Unknown Entity"}if(r.org_id&&!r.org_name&&e?.organizations){const n=e.organizations.find(t=>t.id===r.org_id);return n&&n.name?n.name:"Unknown Entity"}if(r.enterprise_id&&!r.enterprise_name&&e?.enterprises){const n=e.enterprises.find(t=>t.id===r.enterprise_id);return n&&n.name?n.name:"Unknown Entity"}return"Unknown Entity"}function p(r){return r.repo_id?"repository":r.org_id?"organization":r.enterprise_id?"enterprise":"unknown"}function g(r){return r.repo_id?o(`/repositories/${r.repo_id}`):r.org_id?o(`/organizations/${r.org_id}`):r.enterprise_id?o(`/enterprises/${r.enterprise_id}`):"#"}function w(r){r&&(r.scrollTop=r.scrollHeight)}function m(r){return{newPerPage:r,newCurrentPage:1}}function v(r){return r.pool_manager_status?.running?{text:"Running",variant:"success"}:{text:"Stopped",variant:"error"}}function _(r){switch(r.toLowerCase()){case"error":return{text:"Error",variant:"error"};case"warning":return{text:"Warning",variant:"warning"};case"info":return{text:"Info",variant:"info"};default:return{text:r,variant:"info"}}}function i(r,e,n){if(!e.trim())return r;const t=e.toLowerCase();return r.filter(s=>typeof n=="function"?n(s).toLowerCase().includes(t):n.some(a=>s[a]?.toString().toLowerCase().includes(t)))}function h(r,e){return i(r,e,["name","owner"])}function x(r,e){return i(r,e,["name"])}function k(r,e){return i(r,e,n=>[n.name||"",n.description||"",n.endpoint?.name||""].join(" "))}function E(r,e){return i(r,e,["name","description","base_url","api_base_url"])}function L(r,e,n){return r.slice((e-1)*n,e*n)}export{E as a,l as b,m as c,_ as d,d as e,k as f,f as g,i as h,p as i,g as j,v as k,x as l,h as m,L as p,w as s};
|
||||
|
|
@ -1 +1 @@
|
|||
import{f as D,e as B,a as E}from"./o8CdT7B0.js";import{i as P}from"./ChJfoPF0.js";import{p as S,v as T,l as t,h as s,g as e,m as o,b as q,t as F,a as G,u as I,c as _,d as a,r as z}from"./DUMcBckj.js";import{j as J,h as K,s as N,k as O}from"./By1mMPic.js";import{l as j,p as l}from"./i7pKks78.js";var Q=D('<button><svg fill="none" stroke="currentColor" viewBox="0 0 24 24"><!></svg></button>');function Z(M,i){const C=j(i,["children","$$slots","$$events","$$legacy"]),H=j(C,["action","disabled","title","ariaLabel","size"]);S(i,!1);const u=o(),h=o(),k=o(),p=o(),f=o(),v=o(),n=o(),m=o(),x=o(),L=T();let r=l(i,"action",8,"edit"),b=l(i,"disabled",8,!1),w=l(i,"title",8,""),y=l(i,"ariaLabel",8,""),c=l(i,"size",8,"md");function A(){b()||L("click")}t(()=>{},()=>{a(u,"transition-colors focus:outline-none focus:ring-2 focus:ring-offset-2 dark:focus:ring-offset-gray-900 cursor-pointer disabled:cursor-not-allowed disabled:opacity-50")}),t(()=>s(c()),()=>{a(h,{sm:"p-1",md:"p-2"}[c()])}),t(()=>s(r()),()=>{a(k,{edit:"text-indigo-600 dark:text-indigo-400 hover:text-indigo-900 dark:hover:text-indigo-300 focus:ring-indigo-500",delete:"text-red-600 dark:text-red-400 hover:text-red-900 dark:hover:text-red-300 focus:ring-red-500",view:"text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-300 focus:ring-gray-500",add:"text-green-600 dark:text-green-400 hover:text-green-900 dark:hover:text-green-300 focus:ring-green-500",copy:"text-blue-600 dark:text-blue-400 hover:text-blue-900 dark:hover:text-blue-300 focus:ring-blue-500",download:"text-blue-600 dark:text-blue-400 hover:text-blue-900 dark:hover:text-blue-300 focus:ring-blue-500",shell:"text-green-600 dark:text-green-400 hover:text-green-900 dark:hover:text-green-300 focus:ring-green-500"}[r()])}),t(()=>s(c()),()=>{a(p,c()==="sm"?"h-4 w-4":"h-5 w-5")}),t(()=>(e(u),e(h),e(k)),()=>{a(f,[e(u),e(h),e(k)].join(" "))}),t(()=>{},()=>{a(v,{edit:'<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z" />',delete:'<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16" />',view:'<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 12a3 3 0 11-6 0 3 3 0 016 0z" /><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z" />',add:'<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 6v6m0 0v6m0-6h6m-6 0H6" />',copy:'<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z" />',download:'<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4" />',shell:'<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 9l3 3-3 3m5 0h3M5 20h14a2 2 0 002-2V6a2 2 0 00-2-2H5a2 2 0 00-2 2v14a2 2 0 002 2z" />'})}),t(()=>{},()=>{a(n,{edit:"Edit",delete:"Delete",view:"View",add:"Add",copy:"Clone",download:"Download",shell:"Shell"})}),t(()=>(s(w()),e(n),s(r())),()=>{a(m,w()||e(n)[r()])}),t(()=>(s(y()),e(n),s(r())),()=>{a(x,y()||`${e(n)[r()]} item`)}),q(),P();var d=Q();J(d,()=>({type:"button",class:e(f),disabled:b(),title:e(m),"aria-label":e(x),...H}));var g=_(d),V=_(g);K(V,()=>(e(v),s(r()),I(()=>e(v)[r()])),!0),z(g),z(d),F(()=>N(g,0,O(e(p)))),B("click",d,A),E(M,d),G()}export{Z as A};
|
||||
import{f as D,e as B,a as E}from"./o8CdT7B0.js";import{i as P}from"./ChJfoPF0.js";import{p as S,v as T,l as t,h as s,g as e,m as o,b as q,t as F,a as G,u as I,c as _,d as a,r as z}from"./DUMcBckj.js";import{j as J,h as K,s as N,k as O}from"./BrpPrY5G.js";import{l as j,p as l}from"./i7pKks78.js";var Q=D('<button><svg fill="none" stroke="currentColor" viewBox="0 0 24 24"><!></svg></button>');function Z(M,i){const C=j(i,["children","$$slots","$$events","$$legacy"]),H=j(C,["action","disabled","title","ariaLabel","size"]);S(i,!1);const u=o(),h=o(),k=o(),p=o(),f=o(),v=o(),n=o(),m=o(),x=o(),L=T();let r=l(i,"action",8,"edit"),b=l(i,"disabled",8,!1),w=l(i,"title",8,""),y=l(i,"ariaLabel",8,""),c=l(i,"size",8,"md");function A(){b()||L("click")}t(()=>{},()=>{a(u,"transition-colors focus:outline-none focus:ring-2 focus:ring-offset-2 dark:focus:ring-offset-gray-900 cursor-pointer disabled:cursor-not-allowed disabled:opacity-50")}),t(()=>s(c()),()=>{a(h,{sm:"p-1",md:"p-2"}[c()])}),t(()=>s(r()),()=>{a(k,{edit:"text-indigo-600 dark:text-indigo-400 hover:text-indigo-900 dark:hover:text-indigo-300 focus:ring-indigo-500",delete:"text-red-600 dark:text-red-400 hover:text-red-900 dark:hover:text-red-300 focus:ring-red-500",view:"text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-300 focus:ring-gray-500",add:"text-green-600 dark:text-green-400 hover:text-green-900 dark:hover:text-green-300 focus:ring-green-500",copy:"text-blue-600 dark:text-blue-400 hover:text-blue-900 dark:hover:text-blue-300 focus:ring-blue-500",download:"text-blue-600 dark:text-blue-400 hover:text-blue-900 dark:hover:text-blue-300 focus:ring-blue-500",shell:"text-green-600 dark:text-green-400 hover:text-green-900 dark:hover:text-green-300 focus:ring-green-500"}[r()])}),t(()=>s(c()),()=>{a(p,c()==="sm"?"h-4 w-4":"h-5 w-5")}),t(()=>(e(u),e(h),e(k)),()=>{a(f,[e(u),e(h),e(k)].join(" "))}),t(()=>{},()=>{a(v,{edit:'<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z" />',delete:'<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16" />',view:'<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 12a3 3 0 11-6 0 3 3 0 016 0z" /><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z" />',add:'<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 6v6m0 0v6m0-6h6m-6 0H6" />',copy:'<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z" />',download:'<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4" />',shell:'<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 9l3 3-3 3m5 0h3M5 20h14a2 2 0 002-2V6a2 2 0 00-2-2H5a2 2 0 00-2 2v14a2 2 0 002 2z" />'})}),t(()=>{},()=>{a(n,{edit:"Edit",delete:"Delete",view:"View",add:"Add",copy:"Clone",download:"Download",shell:"Shell"})}),t(()=>(s(w()),e(n),s(r())),()=>{a(m,w()||e(n)[r()])}),t(()=>(s(y()),e(n),s(r())),()=>{a(x,y()||`${e(n)[r()]} item`)}),q(),P();var d=Q();J(d,()=>({type:"button",class:e(f),disabled:b(),title:e(m),"aria-label":e(x),...H}));var g=_(d),V=_(g);K(V,()=>(e(v),s(r()),I(()=>e(v)[r()])),!0),z(g),z(d),F(()=>N(g,0,O(e(p)))),B("click",d,A),E(M,d),G()}export{Z as A};
|
||||
|
|
@ -1 +1 @@
|
|||
import{f as k,a as p,s as u}from"./o8CdT7B0.js";import{i as c}from"./ChJfoPF0.js";import{p as f,l as m,h as g,b as w,t as _,a as v,d as h,m as z,c as B,r as j,g as V}from"./DUMcBckj.js";import{s as q,k as A}from"./By1mMPic.js";import{p as a}from"./i7pKks78.js";var C=k("<span> </span>");function I(d,e){f(e,!1);const l=z();let t=a(e,"variant",8,"gray"),n=a(e,"size",8,"sm"),i=a(e,"text",8),s=a(e,"ring",8,!1);const o={success:"bg-green-100 dark:bg-green-900 text-green-800 dark:text-green-200",error:"bg-red-100 dark:bg-red-900 text-red-800 dark:text-red-200",warning:"bg-yellow-100 dark:bg-yellow-900 text-yellow-800 dark:text-yellow-200",info:"bg-blue-100 dark:bg-blue-900 text-blue-800 dark:text-blue-200",gray:"bg-gray-100 dark:bg-gray-700 text-gray-800 dark:text-gray-200",blue:"bg-blue-100 dark:bg-blue-900 text-blue-800 dark:text-blue-200",green:"bg-green-100 dark:bg-green-900 text-green-800 dark:text-green-200",red:"bg-red-100 dark:bg-red-900 text-red-800 dark:text-red-200",yellow:"bg-yellow-100 dark:bg-yellow-900 text-yellow-800 dark:text-yellow-200",secondary:"bg-gray-100 dark:bg-gray-700 text-gray-800 dark:text-gray-200",purple:"bg-purple-100 dark:bg-purple-900 text-purple-800 dark:text-purple-200"},b={success:"ring-green-600/20 dark:ring-green-400/30",error:"ring-red-600/20 dark:ring-red-400/30",warning:"ring-yellow-600/20 dark:ring-yellow-400/30",info:"ring-blue-600/20 dark:ring-blue-400/30",gray:"ring-gray-500/20 dark:ring-gray-400/30",blue:"ring-blue-600/20 dark:ring-blue-400/30",green:"ring-green-600/20 dark:ring-green-400/30",red:"ring-red-600/20 dark:ring-red-400/30",yellow:"ring-yellow-600/20 dark:ring-yellow-400/30",secondary:"ring-gray-500/20 dark:ring-gray-400/30",purple:"ring-purple-600/20 dark:ring-purple-400/30"},x={sm:"px-2 py-1 text-xs",md:"px-2.5 py-0.5 text-xs"};m(()=>(g(t()),g(n()),g(s())),()=>{h(l,["inline-flex items-center rounded-full font-semibold",o[t()],x[n()],s()?`ring-1 ring-inset ${b[t()]}`:""].filter(Boolean).join(" "))}),w(),c();var r=C(),y=B(r,!0);j(r),_(()=>{q(r,1,A(V(l))),u(y,i())}),p(d,r),v()}export{I as B};
|
||||
import{f as k,a as p,s as u}from"./o8CdT7B0.js";import{i as c}from"./ChJfoPF0.js";import{p as f,l as m,h as g,b as w,t as _,a as v,d as h,m as z,c as B,r as j,g as V}from"./DUMcBckj.js";import{s as q,k as A}from"./BrpPrY5G.js";import{p as a}from"./i7pKks78.js";var C=k("<span> </span>");function I(d,e){f(e,!1);const l=z();let t=a(e,"variant",8,"gray"),n=a(e,"size",8,"sm"),i=a(e,"text",8),s=a(e,"ring",8,!1);const o={success:"bg-green-100 dark:bg-green-900 text-green-800 dark:text-green-200",error:"bg-red-100 dark:bg-red-900 text-red-800 dark:text-red-200",warning:"bg-yellow-100 dark:bg-yellow-900 text-yellow-800 dark:text-yellow-200",info:"bg-blue-100 dark:bg-blue-900 text-blue-800 dark:text-blue-200",gray:"bg-gray-100 dark:bg-gray-700 text-gray-800 dark:text-gray-200",blue:"bg-blue-100 dark:bg-blue-900 text-blue-800 dark:text-blue-200",green:"bg-green-100 dark:bg-green-900 text-green-800 dark:text-green-200",red:"bg-red-100 dark:bg-red-900 text-red-800 dark:text-red-200",yellow:"bg-yellow-100 dark:bg-yellow-900 text-yellow-800 dark:text-yellow-200",secondary:"bg-gray-100 dark:bg-gray-700 text-gray-800 dark:text-gray-200",purple:"bg-purple-100 dark:bg-purple-900 text-purple-800 dark:text-purple-200"},b={success:"ring-green-600/20 dark:ring-green-400/30",error:"ring-red-600/20 dark:ring-red-400/30",warning:"ring-yellow-600/20 dark:ring-yellow-400/30",info:"ring-blue-600/20 dark:ring-blue-400/30",gray:"ring-gray-500/20 dark:ring-gray-400/30",blue:"ring-blue-600/20 dark:ring-blue-400/30",green:"ring-green-600/20 dark:ring-green-400/30",red:"ring-red-600/20 dark:ring-red-400/30",yellow:"ring-yellow-600/20 dark:ring-yellow-400/30",secondary:"ring-gray-500/20 dark:ring-gray-400/30",purple:"ring-purple-600/20 dark:ring-purple-400/30"},x={sm:"px-2 py-1 text-xs",md:"px-2.5 py-0.5 text-xs"};m(()=>(g(t()),g(n()),g(s())),()=>{h(l,["inline-flex items-center rounded-full font-semibold",o[t()],x[n()],s()?`ring-1 ring-inset ${b[t()]}`:""].filter(Boolean).join(" "))}),w(),c();var r=C(),y=B(r,!0);j(r),_(()=>{q(r,1,A(V(l))),u(y,i())}),p(d,r),v()}export{I as B};
|
||||
|
|
@ -1 +1 @@
|
|||
import{f as p,a as l,c as T,t as D,s as B}from"./o8CdT7B0.js";import{i as ae}from"./ChJfoPF0.js";import{p as se,v as re,l as V,h as ie,d as r,g as t,m as y,b as le,c as v,s as F,r as f,a as oe,f as N,n as q,t as R,u as ne}from"./DUMcBckj.js";import{p as A,i as m}from"./i7pKks78.js";import{g as h,B as G}from"./By1mMPic.js";import{t as k}from"./Bbk4dQfI.js";import{e as de}from"./BZiHL9L3.js";var ce=p('<div class="flex items-center"><div class="animate-spin rounded-full h-4 w-4 border-b-2 border-blue-600 mr-2"></div> <span class="text-sm text-gray-500 dark:text-gray-400">Checking...</span></div>'),ve=p('<div class="ml-4 text-xs text-gray-500 dark:text-gray-400"> </div>'),fe=p('<div class="flex items-center"><svg class="w-4 h-4 text-green-500 mr-2" fill="currentColor" viewBox="0 0 20 20"><path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z" clip-rule="evenodd"></path></svg> <span class="text-sm text-green-700 dark:text-green-300">Webhook installed</span></div> <!>',1),he=p('<div class="flex items-center"><svg class="w-4 h-4 text-gray-400 mr-2" fill="currentColor" viewBox="0 0 20 20"><path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zm0-2a6 6 0 100-12 6 6 0 000 12zm0-10a1 1 0 011 1v3a1 1 0 01-2 0V7a1 1 0 011-1z" clip-rule="evenodd"></path></svg> <span class="text-sm text-gray-500 dark:text-gray-400">No webhook installed</span></div>'),ue=p('<div class="bg-white dark:bg-gray-800 shadow rounded-lg"><div class="px-4 py-5 sm:p-6"><div class="flex items-center justify-between"><div><h3 class="text-lg font-medium text-gray-900 dark:text-white">Webhook Status</h3> <div class="mt-1 flex items-center"><!></div></div> <div class="flex space-x-2"><!></div></div></div></div>');function _e(H,g){se(g,!1);const x=y();let u=A(g,"entityType",8),s=A(g,"entityId",8),E=A(g,"entityName",8),i=y(null),o=y(!1),b=y(!0);const O=re();async function _(){if(s())try{r(b,!0),u()==="repository"?r(i,await h.getRepositoryWebhookInfo(s())):r(i,await h.getOrganizationWebhookInfo(s()))}catch(e){e&&typeof e=="object"&&"response"in e&&e.response?.status===404?r(i,null):(console.warn("Failed to check webhook status:",e),r(i,null))}finally{r(b,!1)}}async function J(){if(s())try{r(o,!0),u()==="repository"?await h.installRepositoryWebhook(s()):await h.installOrganizationWebhook(s()),k.success("Webhook Installed",`Webhook for ${u()} ${E()} has been installed successfully.`),await _(),O("webhookStatusChanged",{installed:!0})}catch(e){k.error("Webhook Installation Failed",e instanceof Error?e.message:"Failed to install webhook.")}finally{r(o,!1)}}async function K(){if(s())try{r(o,!0),u()==="repository"?await h.uninstallRepositoryWebhook(s()):await h.uninstallOrganizationWebhook(s()),k.success("Webhook Uninstalled",`Webhook for ${u()} ${E()} has been uninstalled successfully.`),await _(),O("webhookStatusChanged",{installed:!1})}catch(e){k.error("Webhook Uninstall Failed",de(e))}finally{r(o,!1)}}V(()=>ie(s()),()=>{s()&&_()}),V(()=>t(i),()=>{r(x,t(i)&&t(i).active)}),le(),ae();var w=ue(),P=v(w),j=v(P),W=v(j),L=F(v(W),2),Q=v(L);{var X=e=>{var d=ce();l(e,d)},Y=e=>{var d=T(),I=N(d);{var z=a=>{var n=fe(),C=F(N(n),2);{var c=U=>{var $=ve(),te=v($);f($),R(()=>B(te,`URL: ${t(i),ne(()=>t(i).url||"N/A")??""}`)),l(U,$)};m(C,U=>{t(i)&&U(c)})}l(a,n)},S=a=>{var n=he();l(a,n)};m(I,a=>{t(x)?a(z):a(S,!1)},!0)}l(e,d)};m(Q,e=>{t(b)?e(X):e(Y,!1)})}f(L),f(W);var M=F(W,2),Z=v(M);{var ee=e=>{var d=T(),I=N(d);{var z=a=>{G(a,{variant:"danger",size:"sm",get disabled(){return t(o)},$$events:{click:K},children:(n,C)=>{q();var c=D();R(()=>B(c,t(o)?"Uninstalling...":"Uninstall")),l(n,c)},$$slots:{default:!0}})},S=a=>{G(a,{variant:"primary",size:"sm",get disabled(){return t(o)},$$events:{click:J},children:(n,C)=>{q();var c=D();R(()=>B(c,t(o)?"Installing...":"Install Webhook")),l(n,c)},$$slots:{default:!0}})};m(I,a=>{t(x)?a(z):a(S,!1)})}l(e,d)};m(Z,e=>{t(b)||e(ee)})}f(M),f(j),f(P),f(w),l(H,w),oe()}export{_e as W};
|
||||
import{f as p,a as l,c as T,t as D,s as B}from"./o8CdT7B0.js";import{i as ae}from"./ChJfoPF0.js";import{p as se,v as re,l as V,h as ie,d as r,g as t,m as y,b as le,c as v,s as F,r as f,a as oe,f as N,n as q,t as R,u as ne}from"./DUMcBckj.js";import{p as A,i as m}from"./i7pKks78.js";import{g as h,B as G}from"./BrpPrY5G.js";import{t as k}from"./Bbk4dQfI.js";import{e as de}from"./BZiHL9L3.js";var ce=p('<div class="flex items-center"><div class="animate-spin rounded-full h-4 w-4 border-b-2 border-blue-600 mr-2"></div> <span class="text-sm text-gray-500 dark:text-gray-400">Checking...</span></div>'),ve=p('<div class="ml-4 text-xs text-gray-500 dark:text-gray-400"> </div>'),fe=p('<div class="flex items-center"><svg class="w-4 h-4 text-green-500 mr-2" fill="currentColor" viewBox="0 0 20 20"><path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z" clip-rule="evenodd"></path></svg> <span class="text-sm text-green-700 dark:text-green-300">Webhook installed</span></div> <!>',1),he=p('<div class="flex items-center"><svg class="w-4 h-4 text-gray-400 mr-2" fill="currentColor" viewBox="0 0 20 20"><path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zm0-2a6 6 0 100-12 6 6 0 000 12zm0-10a1 1 0 011 1v3a1 1 0 01-2 0V7a1 1 0 011-1z" clip-rule="evenodd"></path></svg> <span class="text-sm text-gray-500 dark:text-gray-400">No webhook installed</span></div>'),ue=p('<div class="bg-white dark:bg-gray-800 shadow rounded-lg"><div class="px-4 py-5 sm:p-6"><div class="flex items-center justify-between"><div><h3 class="text-lg font-medium text-gray-900 dark:text-white">Webhook Status</h3> <div class="mt-1 flex items-center"><!></div></div> <div class="flex space-x-2"><!></div></div></div></div>');function _e(H,g){se(g,!1);const x=y();let u=A(g,"entityType",8),s=A(g,"entityId",8),E=A(g,"entityName",8),i=y(null),o=y(!1),b=y(!0);const O=re();async function _(){if(s())try{r(b,!0),u()==="repository"?r(i,await h.getRepositoryWebhookInfo(s())):r(i,await h.getOrganizationWebhookInfo(s()))}catch(e){e&&typeof e=="object"&&"response"in e&&e.response?.status===404?r(i,null):(console.warn("Failed to check webhook status:",e),r(i,null))}finally{r(b,!1)}}async function J(){if(s())try{r(o,!0),u()==="repository"?await h.installRepositoryWebhook(s()):await h.installOrganizationWebhook(s()),k.success("Webhook Installed",`Webhook for ${u()} ${E()} has been installed successfully.`),await _(),O("webhookStatusChanged",{installed:!0})}catch(e){k.error("Webhook Installation Failed",e instanceof Error?e.message:"Failed to install webhook.")}finally{r(o,!1)}}async function K(){if(s())try{r(o,!0),u()==="repository"?await h.uninstallRepositoryWebhook(s()):await h.uninstallOrganizationWebhook(s()),k.success("Webhook Uninstalled",`Webhook for ${u()} ${E()} has been uninstalled successfully.`),await _(),O("webhookStatusChanged",{installed:!1})}catch(e){k.error("Webhook Uninstall Failed",de(e))}finally{r(o,!1)}}V(()=>ie(s()),()=>{s()&&_()}),V(()=>t(i),()=>{r(x,t(i)&&t(i).active)}),le(),ae();var w=ue(),P=v(w),j=v(P),W=v(j),L=F(v(W),2),Q=v(L);{var X=e=>{var d=ce();l(e,d)},Y=e=>{var d=T(),I=N(d);{var z=a=>{var n=fe(),C=F(N(n),2);{var c=U=>{var $=ve(),te=v($);f($),R(()=>B(te,`URL: ${t(i),ne(()=>t(i).url||"N/A")??""}`)),l(U,$)};m(C,U=>{t(i)&&U(c)})}l(a,n)},S=a=>{var n=he();l(a,n)};m(I,a=>{t(x)?a(z):a(S,!1)},!0)}l(e,d)};m(Q,e=>{t(b)?e(X):e(Y,!1)})}f(L),f(W);var M=F(W,2),Z=v(M);{var ee=e=>{var d=T(),I=N(d);{var z=a=>{G(a,{variant:"danger",size:"sm",get disabled(){return t(o)},$$events:{click:K},children:(n,C)=>{q();var c=D();R(()=>B(c,t(o)?"Uninstalling...":"Uninstall")),l(n,c)},$$slots:{default:!0}})},S=a=>{G(a,{variant:"primary",size:"sm",get disabled(){return t(o)},$$events:{click:J},children:(n,C)=>{q();var c=D();R(()=>B(c,t(o)?"Installing...":"Install Webhook")),l(n,c)},$$slots:{default:!0}})};m(I,a=>{t(x)?a(z):a(S,!1)})}l(e,d)};m(Z,e=>{t(b)||e(ee)})}f(M),f(j),f(P),f(w),l(H,w),oe()}export{_e as W};
|
||||
|
|
@ -1 +1 @@
|
|||
import{f as j,s as G,e as g,a as S}from"./o8CdT7B0.js";import{i as D}from"./ChJfoPF0.js";import{p as E,v as H,c as t,r,s as u,u as p,h as m,n as f,t as I,a as q}from"./DUMcBckj.js";import{h as y,s as h}from"./By1mMPic.js";import{p as v}from"./i7pKks78.js";import{g as o}from"./BPOuWaSt.js";var z=j('<fieldset><legend class="block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2"> </legend> <div class="grid grid-cols-2 gap-4"><button type="button"><!> <span class="mt-2 text-sm font-medium text-gray-900 dark:text-white">GitHub</span></button> <button type="button"><!> <span class="mt-2 text-sm font-medium text-gray-900 dark:text-white">Gitea</span></button></div></fieldset>');function M(x,s){E(s,!1);const k=H();let i=v(s,"selectedForgeType",12,""),_=v(s,"label",8,"Select Forge Type");function n(c){i(c),k("select",c)}D();var l=z(),d=t(l),F=t(d,!0);r(d);var b=u(d,2),e=t(b),w=t(e);y(w,()=>(m(o),p(()=>o("github","w-8 h-8")))),f(2),r(e);var a=u(e,2),T=t(a);y(T,()=>(m(o),p(()=>o("gitea","w-8 h-8")))),f(2),r(a),r(b),r(l),I(()=>{G(F,_()),h(e,1,`flex flex-col items-center justify-center p-6 border-2 rounded-lg transition-colors cursor-pointer ${i()==="github"?"border-blue-500 bg-blue-50 dark:bg-blue-900":"border-gray-300 dark:border-gray-600 hover:border-gray-400 dark:hover:border-gray-500"}`),h(a,1,`flex flex-col items-center justify-center p-6 border-2 rounded-lg transition-colors cursor-pointer ${i()==="gitea"?"border-blue-500 bg-blue-50 dark:bg-blue-900":"border-gray-300 dark:border-gray-600 hover:border-gray-400 dark:hover:border-gray-500"}`)}),g("click",e,()=>n("github")),g("click",a,()=>n("gitea")),S(x,l),q()}export{M as F};
|
||||
import{f as j,s as G,e as g,a as S}from"./o8CdT7B0.js";import{i as D}from"./ChJfoPF0.js";import{p as E,v as H,c as t,r,s as u,u as p,h as m,n as f,t as I,a as q}from"./DUMcBckj.js";import{h as y,s as h}from"./BrpPrY5G.js";import{p as v}from"./i7pKks78.js";import{g as o}from"./CDFYnmbx.js";var z=j('<fieldset><legend class="block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2"> </legend> <div class="grid grid-cols-2 gap-4"><button type="button"><!> <span class="mt-2 text-sm font-medium text-gray-900 dark:text-white">GitHub</span></button> <button type="button"><!> <span class="mt-2 text-sm font-medium text-gray-900 dark:text-white">Gitea</span></button></div></fieldset>');function M(x,s){E(s,!1);const k=H();let i=v(s,"selectedForgeType",12,""),_=v(s,"label",8,"Select Forge Type");function n(c){i(c),k("select",c)}D();var l=z(),d=t(l),F=t(d,!0);r(d);var b=u(d,2),e=t(b),w=t(e);y(w,()=>(m(o),p(()=>o("github","w-8 h-8")))),f(2),r(e);var a=u(e,2),T=t(a);y(T,()=>(m(o),p(()=>o("gitea","w-8 h-8")))),f(2),r(a),r(b),r(l),I(()=>{G(F,_()),h(e,1,`flex flex-col items-center justify-center p-6 border-2 rounded-lg transition-colors cursor-pointer ${i()==="github"?"border-blue-500 bg-blue-50 dark:bg-blue-900":"border-gray-300 dark:border-gray-600 hover:border-gray-400 dark:hover:border-gray-500"}`),h(a,1,`flex flex-col items-center justify-center p-6 border-2 rounded-lg transition-colors cursor-pointer ${i()==="gitea"?"border-blue-500 bg-blue-50 dark:bg-blue-900":"border-gray-300 dark:border-gray-600 hover:border-gray-400 dark:hover:border-gray-500"}`)}),g("click",e,()=>n("github")),g("click",a,()=>n("gitea")),S(x,l),q()}export{M as F};
|
||||
|
|
@ -1 +1 @@
|
|||
import{f as b,a as r,s as k,c as B,t as T}from"./o8CdT7B0.js";import{i as U}from"./ChJfoPF0.js";import{p as V,v as W,t as H,a as X,c as i,r as o,s as y,u as g,f as L,h as z,n as Y}from"./DUMcBckj.js";import{p as v,i as l}from"./i7pKks78.js";import{e as Z,f as D,B as $}from"./By1mMPic.js";var tt=b('<div class="mt-4 sm:mt-0 flex items-center space-x-4"><!></div>'),at=b('<div class="mt-4 sm:mt-0 flex items-center space-x-3"><!> <!></div>'),et=b('<div class="sm:flex sm:items-center sm:justify-between"><div><h1 class="text-2xl font-bold text-gray-900 dark:text-white"> </h1> <p class="mt-2 text-sm text-gray-700 dark:text-gray-300"> </p></div> <!></div>');function ct(E,t){const d=Z(t);V(t,!1);const M=W();let q=v(t,"title",8),C=v(t,"description",8),n=v(t,"actionLabel",8,null),m=v(t,"showAction",8,!0);function F(){M("action")}U();var f=et(),_=i(f),x=i(_),G=i(x,!0);o(x);var w=y(x,2),I=i(w,!0);o(w),o(_);var J=y(_,2);{var K=e=>{var s=tt(),h=i(s);D(h,t,"actions",{}),o(s),r(e,s)},N=e=>{var s=B(),h=L(s);{var O=p=>{var u=at(),A=i(u);{var Q=a=>{var c=B(),P=L(c);D(P,t,"secondary-actions",{}),r(a,c)};l(A,a=>{g(()=>d["secondary-actions"])&&a(Q)})}var R=y(A,2);{var S=a=>{$(a,{variant:"primary",icon:'<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 6v6m0 0v6m0-6h6m-6 0H6" />',$$events:{click:F},children:(c,P)=>{Y();var j=T();H(()=>k(j,n())),r(c,j)},$$slots:{default:!0}})};l(R,a=>{m()&&n()&&a(S)})}o(u),r(p,u)};l(h,p=>{z(m()),z(n()),g(()=>m()&&n()||d["secondary-actions"])&&p(O)},!0)}r(e,s)};l(J,e=>{g(()=>d.actions)?e(K):e(N,!1)})}o(f),H(()=>{k(G,q()),k(I,C())}),r(E,f),X()}export{ct as P};
|
||||
import{f as b,a as r,s as k,c as B,t as T}from"./o8CdT7B0.js";import{i as U}from"./ChJfoPF0.js";import{p as V,v as W,t as H,a as X,c as i,r as o,s as y,u as g,f as L,h as z,n as Y}from"./DUMcBckj.js";import{p as v,i as l}from"./i7pKks78.js";import{e as Z,f as D,B as $}from"./BrpPrY5G.js";var tt=b('<div class="mt-4 sm:mt-0 flex items-center space-x-4"><!></div>'),at=b('<div class="mt-4 sm:mt-0 flex items-center space-x-3"><!> <!></div>'),et=b('<div class="sm:flex sm:items-center sm:justify-between"><div><h1 class="text-2xl font-bold text-gray-900 dark:text-white"> </h1> <p class="mt-2 text-sm text-gray-700 dark:text-gray-300"> </p></div> <!></div>');function ct(E,t){const d=Z(t);V(t,!1);const M=W();let q=v(t,"title",8),C=v(t,"description",8),n=v(t,"actionLabel",8,null),m=v(t,"showAction",8,!0);function F(){M("action")}U();var f=et(),_=i(f),x=i(_),G=i(x,!0);o(x);var w=y(x,2),I=i(w,!0);o(w),o(_);var J=y(_,2);{var K=e=>{var s=tt(),h=i(s);D(h,t,"actions",{}),o(s),r(e,s)},N=e=>{var s=B(),h=L(s);{var O=p=>{var u=at(),A=i(u);{var Q=a=>{var c=B(),P=L(c);D(P,t,"secondary-actions",{}),r(a,c)};l(A,a=>{g(()=>d["secondary-actions"])&&a(Q)})}var R=y(A,2);{var S=a=>{$(a,{variant:"primary",icon:'<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 6v6m0 0v6m0-6h6m-6 0H6" />',$$events:{click:F},children:(c,P)=>{Y();var j=T();H(()=>k(j,n())),r(c,j)},$$slots:{default:!0}})};l(R,a=>{m()&&n()&&a(S)})}o(u),r(p,u)};l(h,p=>{z(m()),z(n()),g(()=>m()&&n()||d["secondary-actions"])&&p(O)},!0)}r(e,s)};l(J,e=>{g(()=>d.actions)?e(K):e(N,!1)})}o(f),H(()=>{k(G,q()),k(I,C())}),r(E,f),X()}export{ct as P};
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -1 +1 @@
|
|||
import{f as k,s as m,a as v,t as p}from"./o8CdT7B0.js";import"./ChJfoPF0.js";import{c as a,s as f,r as i,t as g,n as H}from"./DUMcBckj.js";import{p as t,i as u}from"./i7pKks78.js";import{s as Y,h as Z,B as j}from"./By1mMPic.js";var $=k('<div class="flex-shrink-0"><!></div>'),ee=k('<div class="mt-4 sm:mt-0 flex space-x-3"><!> <!></div>'),te=k('<div class="bg-white dark:bg-gray-800 shadow rounded-lg"><div class="px-4 py-5 sm:p-6"><div class="sm:flex sm:items-center sm:justify-between"><div class="flex items-center space-x-3"><!> <div><h1> </h1> <p class="text-sm text-gray-500 dark:text-gray-400"> </p></div></div> <!></div></div></div>');function se(z,e){let E=t(e,"title",8),M=t(e,"subtitle",8),y=t(e,"forgeIcon",8,""),h=t(e,"onEdit",8,null),x=t(e,"onDelete",8,null),B=t(e,"editLabel",8,"Edit"),C=t(e,"deleteLabel",8,"Delete"),P=t(e,"editVariant",8,"secondary"),A=t(e,"deleteVariant",8,"danger"),q=t(e,"editDisabled",8,!1),F=t(e,"deleteDisabled",8,!1),G=t(e,"editIcon",8,"<path stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z'/>"),J=t(e,"deleteIcon",8,"<path stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16'/>"),K=t(e,"titleClass",8,"");var _=te(),D=a(_),w=a(D),b=a(w),I=a(b);{var N=l=>{var r=$(),c=a(r);Z(c,y),i(r),v(l,r)};u(I,l=>{y()&&l(N)})}var L=f(I,2),o=a(L),O=a(o,!0);i(o);var V=f(o,2),Q=a(V,!0);i(V),i(L),i(b);var R=f(b,2);{var S=l=>{var r=ee(),c=a(r);{var T=d=>{j(d,{get variant(){return P()},size:"md",get disabled(){return q()},get icon(){return G()},$$events:{click(...s){h()?.apply(this,s)}},children:(s,X)=>{H();var n=p();g(()=>m(n,B())),v(s,n)},$$slots:{default:!0}})};u(c,d=>{h()&&d(T)})}var U=f(c,2);{var W=d=>{j(d,{get variant(){return A()},size:"md",get disabled(){return F()},get icon(){return J()},$$events:{click(...s){x()?.apply(this,s)}},children:(s,X)=>{H();var n=p();g(()=>m(n,C())),v(s,n)},$$slots:{default:!0}})};u(U,d=>{x()&&d(W)})}i(r),v(l,r)};u(R,l=>{(h()||x())&&l(S)})}i(w),i(D),i(_),g(()=>{Y(o,1,`text-2xl font-bold text-gray-900 dark:text-white ${K()??""}`),m(O,E()),m(Q,M())}),v(z,_)}export{se as D};
|
||||
import{f as k,s as m,a as v,t as p}from"./o8CdT7B0.js";import"./ChJfoPF0.js";import{c as a,s as f,r as i,t as g,n as H}from"./DUMcBckj.js";import{p as t,i as u}from"./i7pKks78.js";import{s as Y,h as Z,B as j}from"./BrpPrY5G.js";var $=k('<div class="flex-shrink-0"><!></div>'),ee=k('<div class="mt-4 sm:mt-0 flex space-x-3"><!> <!></div>'),te=k('<div class="bg-white dark:bg-gray-800 shadow rounded-lg"><div class="px-4 py-5 sm:p-6"><div class="sm:flex sm:items-center sm:justify-between"><div class="flex items-center space-x-3"><!> <div><h1> </h1> <p class="text-sm text-gray-500 dark:text-gray-400"> </p></div></div> <!></div></div></div>');function se(z,e){let E=t(e,"title",8),M=t(e,"subtitle",8),y=t(e,"forgeIcon",8,""),h=t(e,"onEdit",8,null),x=t(e,"onDelete",8,null),B=t(e,"editLabel",8,"Edit"),C=t(e,"deleteLabel",8,"Delete"),P=t(e,"editVariant",8,"secondary"),A=t(e,"deleteVariant",8,"danger"),q=t(e,"editDisabled",8,!1),F=t(e,"deleteDisabled",8,!1),G=t(e,"editIcon",8,"<path stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z'/>"),J=t(e,"deleteIcon",8,"<path stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16'/>"),K=t(e,"titleClass",8,"");var _=te(),D=a(_),w=a(D),b=a(w),I=a(b);{var N=l=>{var r=$(),c=a(r);Z(c,y),i(r),v(l,r)};u(I,l=>{y()&&l(N)})}var L=f(I,2),o=a(L),O=a(o,!0);i(o);var V=f(o,2),Q=a(V,!0);i(V),i(L),i(b);var R=f(b,2);{var S=l=>{var r=ee(),c=a(r);{var T=d=>{j(d,{get variant(){return P()},size:"md",get disabled(){return q()},get icon(){return G()},$$events:{click(...s){h()?.apply(this,s)}},children:(s,X)=>{H();var n=p();g(()=>m(n,B())),v(s,n)},$$slots:{default:!0}})};u(c,d=>{h()&&d(T)})}var U=f(c,2);{var W=d=>{j(d,{get variant(){return A()},size:"md",get disabled(){return F()},get icon(){return J()},$$events:{click(...s){x()?.apply(this,s)}},children:(s,X)=>{H();var n=p();g(()=>m(n,C())),v(s,n)},$$slots:{default:!0}})};u(U,d=>{x()&&d(W)})}i(r),v(l,r)};u(R,l=>{(h()||x())&&l(S)})}i(w),i(D),i(_),g(()=>{Y(o,1,`text-2xl font-bold text-gray-900 dark:text-white ${K()??""}`),m(O,E()),m(Q,M())}),v(z,_)}export{se as D};
|
||||
|
|
@ -1 +1 @@
|
|||
import{w as m}from"./DUMcBckj.js";import{g as s}from"./By1mMPic.js";const z=!0,I=()=>window.location.port==="5173",_={isAuthenticated:!1,user:null,loading:!0,needsInitialization:!1},o=m(_);function f(t,a,e=7){const i=new Date;i.setTime(i.getTime()+e*24*60*60*1e3),document.cookie=`${t}=${a};expires=${i.toUTCString()};path=/;SameSite=Lax`}function d(t){const a=t+"=",e=document.cookie.split(";");for(let i=0;i<e.length;i++){let n=e[i];for(;n.charAt(0)===" ";)n=n.substring(1,n.length);if(n.indexOf(a)===0)return n.substring(a.length,n.length)}return null}function g(t){document.cookie=`${t}=;expires=Thu, 01 Jan 1970 00:00:01 GMT;path=/`}const c={async login(t,a){try{o.update(i=>({...i,loading:!0}));const e=await s.login({username:t,password:a});z&&(f("garm_token",e.token),f("garm_user",t)),s.setToken(e.token),o.set({isAuthenticated:!0,user:t,loading:!1,needsInitialization:!1})}catch(e){throw o.update(i=>({...i,loading:!1})),e}},logout(){g("garm_token"),g("garm_user"),o.set({isAuthenticated:!1,user:null,loading:!1,needsInitialization:!1})},async init(){try{o.update(e=>({...e,loading:!0})),await c.checkInitializationStatus();const t=d("garm_token"),a=d("garm_user");if(t&&a&&(s.setToken(t),await c.checkAuth())){o.set({isAuthenticated:!0,user:a,loading:!1,needsInitialization:!1});return}o.update(e=>({...e,loading:!1,needsInitialization:!1}))}catch{o.update(a=>({...a,loading:!1}))}},async checkInitializationStatus(){try{const t={Accept:"application/json"},a=d("garm_token"),e=I();e&&a&&(t.Authorization=`Bearer ${a}`);const i=await fetch("/api/v1/login",{method:"GET",headers:t,credentials:e?"omit":"include"});if(!i.ok){if(i.status===409&&(await i.json()).error==="init_required")throw o.update(l=>({...l,needsInitialization:!0,loading:!1})),new Error("Initialization required");return}return}catch(t){if(t instanceof Error&&t.message==="Initialization required")throw t;return}},async checkAuth(){try{return await c.checkInitializationStatus(),await s.getControllerInfo(),!0}catch(t){return t instanceof Error&&t.message==="Initialization required"?!1:t?.response?.status===409&&t?.response?.data?.error==="init_required"?(o.update(a=>({...a,needsInitialization:!0,loading:!1})),!1):(c.logout(),!1)}},async initialize(t,a,e,i,n){try{o.update(u=>({...u,loading:!0}));const l=await s.firstRun({username:t,email:a,password:e,full_name:i||t});await c.login(t,e);const r=window.location.origin,h=n?.metadataUrl||`${r}/api/v1/metadata`,p=n?.callbackUrl||`${r}/api/v1/callbacks`,k=n?.webhookUrl||`${r}/webhooks`,w=n?.agentUrl||`${r}/agent`;await s.updateController({metadata_url:h,callback_url:p,webhook_url:k,agent_url:w}),o.update(u=>({...u,needsInitialization:!1}))}catch(l){throw o.update(r=>({...r,loading:!1})),l}}};export{o as a,c as b};
|
||||
import{w as m}from"./DUMcBckj.js";import{g as s}from"./BrpPrY5G.js";const z=!0,I=()=>window.location.port==="5173",_={isAuthenticated:!1,user:null,loading:!0,needsInitialization:!1},o=m(_);function f(t,a,e=7){const i=new Date;i.setTime(i.getTime()+e*24*60*60*1e3),document.cookie=`${t}=${a};expires=${i.toUTCString()};path=/;SameSite=Lax`}function d(t){const a=t+"=",e=document.cookie.split(";");for(let i=0;i<e.length;i++){let n=e[i];for(;n.charAt(0)===" ";)n=n.substring(1,n.length);if(n.indexOf(a)===0)return n.substring(a.length,n.length)}return null}function g(t){document.cookie=`${t}=;expires=Thu, 01 Jan 1970 00:00:01 GMT;path=/`}const c={async login(t,a){try{o.update(i=>({...i,loading:!0}));const e=await s.login({username:t,password:a});z&&(f("garm_token",e.token),f("garm_user",t)),s.setToken(e.token),o.set({isAuthenticated:!0,user:t,loading:!1,needsInitialization:!1})}catch(e){throw o.update(i=>({...i,loading:!1})),e}},logout(){g("garm_token"),g("garm_user"),o.set({isAuthenticated:!1,user:null,loading:!1,needsInitialization:!1})},async init(){try{o.update(e=>({...e,loading:!0})),await c.checkInitializationStatus();const t=d("garm_token"),a=d("garm_user");if(t&&a&&(s.setToken(t),await c.checkAuth())){o.set({isAuthenticated:!0,user:a,loading:!1,needsInitialization:!1});return}o.update(e=>({...e,loading:!1,needsInitialization:!1}))}catch{o.update(a=>({...a,loading:!1}))}},async checkInitializationStatus(){try{const t={Accept:"application/json"},a=d("garm_token"),e=I();e&&a&&(t.Authorization=`Bearer ${a}`);const i=await fetch("/api/v1/login",{method:"GET",headers:t,credentials:e?"omit":"include"});if(!i.ok){if(i.status===409&&(await i.json()).error==="init_required")throw o.update(l=>({...l,needsInitialization:!0,loading:!1})),new Error("Initialization required");return}return}catch(t){if(t instanceof Error&&t.message==="Initialization required")throw t;return}},async checkAuth(){try{return await c.checkInitializationStatus(),await s.getControllerInfo(),!0}catch(t){return t instanceof Error&&t.message==="Initialization required"?!1:t?.response?.status===409&&t?.response?.data?.error==="init_required"?(o.update(a=>({...a,needsInitialization:!0,loading:!1})),!1):(c.logout(),!1)}},async initialize(t,a,e,i,n){try{o.update(u=>({...u,loading:!0}));const l=await s.firstRun({username:t,email:a,password:e,full_name:i||t});await c.login(t,e);const r=window.location.origin,h=n?.metadataUrl||`${r}/api/v1/metadata`,p=n?.callbackUrl||`${r}/api/v1/callbacks`,k=n?.webhookUrl||`${r}/webhooks`,w=n?.agentUrl||`${r}/agent`;await s.updateController({metadata_url:h,callback_url:p,webhook_url:k,agent_url:w}),o.update(u=>({...u,needsInitialization:!1}))}catch(l){throw o.update(r=>({...r,loading:!1})),l}}};export{o as a,c as b};
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -1 +1 @@
|
|||
import{f as x,a as b,s as j,e as T}from"./o8CdT7B0.js";import{i as Z}from"./ChJfoPF0.js";import{p as ee,o as te,q as ne,l as $,b as re,f as ae,t as L,a as se,s as k,c as i,d as a,m as v,r as l,h as c,u as p,g as r}from"./DUMcBckj.js";import{p as w,i as B}from"./i7pKks78.js";import{c as D,s as oe,d,i as ie}from"./By1mMPic.js";import{b as le}from"./DwF0DbKK.js";var ce=x('<div class="flex-shrink-0"><svg role="img" aria-label="Has description" class="w-4 h-4 text-gray-400 dark:text-gray-500 cursor-help" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"></path></svg></div>'),de=x('<div class="text-sm text-gray-500 dark:text-gray-400 truncate"> </div>'),ve=x('<div class="fixed z-50 w-64 pointer-events-none"><div class="bg-gray-900 dark:bg-gray-700 text-white text-xs rounded-md px-3 py-2 shadow-lg"><div class="font-semibold mb-1">Description:</div> <div class="whitespace-pre-wrap break-words max-h-32 overflow-y-auto"> </div></div></div>'),ue=x('<div class="w-full min-w-0 text-sm font-medium"><div class="flex items-center gap-1.5"><a> </a> <!></div> <!></div> <!>',1);function ge(N,u){ee(u,!1);const y=v(),C=v();let t=w(u,"item",8),s=w(u,"entityType",8,"repository"),O=w(u,"showOwner",8,!1),R=w(u,"showId",8,!1),Y=w(u,"fontMono",8,!1),h=v(null),_=v(!1),H=v(0),U=v(0),E=v(!1);function f(){if(r(h)){const e=r(h).getBoundingClientRect();a(H,e.left),window.innerHeight-e.bottom<150?(a(E,!0),a(U,e.top)):(a(E,!1),a(U,e.bottom+4))}}function q(){a(_,!0),f()}function A(){a(_,!1)}te(()=>{window.addEventListener("scroll",f,!0),window.addEventListener("resize",f)}),ne(()=>{window.removeEventListener("scroll",f,!0),window.removeEventListener("resize",f)});function P(){if(!t())return"Unknown";switch(s()){case"repository":return O()?`${t().owner||"Unknown"}/${t().name||"Unknown"}`:t().name||"Unknown";case"organization":case"enterprise":return t().name||"Unknown";case"pool":return R()?t().id||"Unknown":t().name||"Unknown";case"scaleset":return t().name||"Unknown";case"instance":return t().name||"Unknown";case"template":return t().name||"Unknown";case"object":return t().name||"Unknown";default:return t().name||t().id||"Unknown"}}function X(){if(!t())return"#";let e;switch(s()){case"instance":e=t().name;break;default:e=t().id||t().name;break}if(!e)return"#";switch(s()){case"repository":return d(`/repositories/${e}`);case"organization":return d(`/organizations/${e}`);case"enterprise":return d(`/enterprises/${e}`);case"pool":return d(`/pools/${e}`);case"scaleset":return d(`/scalesets/${e}`);case"instance":return d(`/instances/${encodeURIComponent(e)}`);case"template":return d(`/templates/${e}`);case"object":return d(`/objects/${e}`);default:return"#"}}$(()=>{},()=>{a(y,P())}),$(()=>{},()=>{a(C,X())}),re(),Z();var I=ue(),z=ae(I),M=i(z),m=i(M),F=i(m,!0);l(m);var G=k(m,2);{var J=e=>{var n=ce(),o=i(n);le(o,g=>a(h,g),()=>r(h)),l(n),T("mouseenter",o,q),T("mouseleave",o,A),b(e,n)};B(G,e=>{c(s()),c(t()),p(()=>s()==="object"&&t()?.description)&&e(J)})}l(M);var K=k(M,2);{var Q=e=>{var n=de(),o=i(n,!0);l(n),L(()=>j(o,(c(t()),p(()=>t().provider_id)))),b(e,n)};B(K,e=>{c(s()),c(t()),p(()=>s()==="instance"&&t()?.provider_id)&&e(Q)})}l(z);var S=k(z,2);{var V=e=>{var n=ve(),o=i(n),g=k(i(o),2),W=i(g,!0);l(g),l(o),l(n),L(()=>{ie(n,`left: ${r(H)??""}px; top: ${r(U)??""}px; transform: translateY(${r(E)?"-100%":"0"});`),j(W,(c(t()),p(()=>t().description)))}),b(e,n)};B(S,e=>{c(s()),c(t()),r(_),p(()=>s()==="object"&&t()?.description&&r(_))&&e(V)})}L(()=>{D(m,"href",r(C)),oe(m,1,`truncate text-blue-600 dark:text-blue-400 hover:text-blue-500 dark:hover:text-blue-300 ${Y()?"font-mono":""}`),D(m,"title",r(y)),j(F,r(y))}),b(N,I),se()}export{ge as E};
|
||||
import{f as x,a as b,s as j,e as T}from"./o8CdT7B0.js";import{i as Z}from"./ChJfoPF0.js";import{p as ee,o as te,q as ne,l as $,b as re,f as ae,t as L,a as se,s as k,c as i,d as a,m as v,r as l,h as c,u as p,g as r}from"./DUMcBckj.js";import{p as w,i as B}from"./i7pKks78.js";import{c as D,s as oe,d,i as ie}from"./BrpPrY5G.js";import{b as le}from"./DwF0DbKK.js";var ce=x('<div class="flex-shrink-0"><svg role="img" aria-label="Has description" class="w-4 h-4 text-gray-400 dark:text-gray-500 cursor-help" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"></path></svg></div>'),de=x('<div class="text-sm text-gray-500 dark:text-gray-400 truncate"> </div>'),ve=x('<div class="fixed z-50 w-64 pointer-events-none"><div class="bg-gray-900 dark:bg-gray-700 text-white text-xs rounded-md px-3 py-2 shadow-lg"><div class="font-semibold mb-1">Description:</div> <div class="whitespace-pre-wrap break-words max-h-32 overflow-y-auto"> </div></div></div>'),ue=x('<div class="w-full min-w-0 text-sm font-medium"><div class="flex items-center gap-1.5"><a> </a> <!></div> <!></div> <!>',1);function ge(N,u){ee(u,!1);const y=v(),C=v();let t=w(u,"item",8),s=w(u,"entityType",8,"repository"),O=w(u,"showOwner",8,!1),R=w(u,"showId",8,!1),Y=w(u,"fontMono",8,!1),h=v(null),_=v(!1),H=v(0),U=v(0),E=v(!1);function f(){if(r(h)){const e=r(h).getBoundingClientRect();a(H,e.left),window.innerHeight-e.bottom<150?(a(E,!0),a(U,e.top)):(a(E,!1),a(U,e.bottom+4))}}function q(){a(_,!0),f()}function A(){a(_,!1)}te(()=>{window.addEventListener("scroll",f,!0),window.addEventListener("resize",f)}),ne(()=>{window.removeEventListener("scroll",f,!0),window.removeEventListener("resize",f)});function P(){if(!t())return"Unknown";switch(s()){case"repository":return O()?`${t().owner||"Unknown"}/${t().name||"Unknown"}`:t().name||"Unknown";case"organization":case"enterprise":return t().name||"Unknown";case"pool":return R()?t().id||"Unknown":t().name||"Unknown";case"scaleset":return t().name||"Unknown";case"instance":return t().name||"Unknown";case"template":return t().name||"Unknown";case"object":return t().name||"Unknown";default:return t().name||t().id||"Unknown"}}function X(){if(!t())return"#";let e;switch(s()){case"instance":e=t().name;break;default:e=t().id||t().name;break}if(!e)return"#";switch(s()){case"repository":return d(`/repositories/${e}`);case"organization":return d(`/organizations/${e}`);case"enterprise":return d(`/enterprises/${e}`);case"pool":return d(`/pools/${e}`);case"scaleset":return d(`/scalesets/${e}`);case"instance":return d(`/instances/${encodeURIComponent(e)}`);case"template":return d(`/templates/${e}`);case"object":return d(`/objects/${e}`);default:return"#"}}$(()=>{},()=>{a(y,P())}),$(()=>{},()=>{a(C,X())}),re(),Z();var I=ue(),z=ae(I),M=i(z),m=i(M),F=i(m,!0);l(m);var G=k(m,2);{var J=e=>{var n=ce(),o=i(n);le(o,g=>a(h,g),()=>r(h)),l(n),T("mouseenter",o,q),T("mouseleave",o,A),b(e,n)};B(G,e=>{c(s()),c(t()),p(()=>s()==="object"&&t()?.description)&&e(J)})}l(M);var K=k(M,2);{var Q=e=>{var n=de(),o=i(n,!0);l(n),L(()=>j(o,(c(t()),p(()=>t().provider_id)))),b(e,n)};B(K,e=>{c(s()),c(t()),p(()=>s()==="instance"&&t()?.provider_id)&&e(Q)})}l(z);var S=k(z,2);{var V=e=>{var n=ve(),o=i(n),g=k(i(o),2),W=i(g,!0);l(g),l(o),l(n),L(()=>{ie(n,`left: ${r(H)??""}px; top: ${r(U)??""}px; transform: translateY(${r(E)?"-100%":"0"});`),j(W,(c(t()),p(()=>t().description)))}),b(e,n)};B(S,e=>{c(s()),c(t()),r(_),p(()=>s()==="object"&&t()?.description&&r(_))&&e(V)})}L(()=>{D(m,"href",r(C)),oe(m,1,`truncate text-blue-600 dark:text-blue-400 hover:text-blue-500 dark:hover:text-blue-300 ${Y()?"font-mono":""}`),D(m,"title",r(y)),j(F,r(y))}),b(N,I),se()}export{ge as E};
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -1 +1 @@
|
|||
import{p as r}from"./DGWAZRyz.js";import{s as t}from"./Dr-4DxOa.js";const e={get data(){return r.data},get error(){return r.error},get form(){return r.form},get params(){return r.params},get route(){return r.route},get state(){return r.state},get status(){return r.status},get url(){return r.url}};t.updated.check;const u=e;export{u as p};
|
||||
import{p as r}from"./D0NlQcNk.js";import{s as t}from"./D_0Q1Op_.js";const e={get data(){return r.data},get error(){return r.error},get form(){return r.form},get params(){return r.params},get route(){return r.route},get state(){return r.state},get status(){return r.status},get url(){return r.url}};t.updated.check;const u=e;export{u as p};
|
||||
|
|
@ -1 +1 @@
|
|||
import{f as l,s as w,a as r,c as h}from"./o8CdT7B0.js";import"./ChJfoPF0.js";import{s as x,c as n,r as f,t as N,f as y}from"./DUMcBckj.js";import{p as m,i as p}from"./i7pKks78.js";import{s as O}from"./By1mMPic.js";var P=l('<div class="absolute top-full left-1/2 transform -translate-x-1/2 border-4 border-transparent border-t-gray-900"></div>'),Q=l('<div class="absolute bottom-full left-1/2 transform -translate-x-1/2 border-4 border-transparent border-b-gray-900"></div>'),R=l('<div class="absolute right-full top-1/2 transform -translate-y-1/2 border-4 border-transparent border-l-gray-900"></div>'),S=l('<div class="absolute left-full top-1/2 transform -translate-y-1/2 border-4 border-transparent border-r-gray-900"></div>'),U=l('<div class="relative group"><svg class="w-3 h-3 text-gray-400 cursor-help" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"></path></svg> <div><div class="font-semibold mb-1"> </div> <div class="text-gray-300"> </div> <!></div></div>');function $(k,s){let z=m(s,"title",8),M=m(s,"content",8),t=m(s,"position",8,"top"),T=m(s,"width",8,"w-80");var b=U(),u=x(n(b),2),c=n(u),j=n(c,!0);f(c);var _=x(c,2),B=n(_,!0);f(_);var C=x(_,2);{var q=a=>{var i=P();r(a,i)},A=a=>{var i=h(),D=y(i);{var E=o=>{var v=Q();r(o,v)},F=o=>{var v=h(),G=y(v);{var H=e=>{var d=R();r(e,d)},I=e=>{var d=h(),J=y(d);{var K=g=>{var L=S();r(g,L)};p(J,g=>{t()==="right"&&g(K)},!0)}r(e,d)};p(G,e=>{t()==="left"?e(H):e(I,!1)},!0)}r(o,v)};p(D,o=>{t()==="bottom"?o(E):o(F,!1)},!0)}r(a,i)};p(C,a=>{t()==="top"?a(q):a(A,!1)})}f(u),f(b),N(()=>{O(u,1,`absolute ${t()==="top"?"bottom-full":t()==="bottom"?"top-full":t()==="left"?"right-full top-1/2 -translate-y-1/2":"left-full top-1/2 -translate-y-1/2"} left-1/2 transform -translate-x-1/2 ${t()==="top"?"mb-2":t()==="bottom"?"mt-2":"mx-2"} ${T()??""} p-3 bg-gray-900 text-white text-xs rounded-lg shadow-lg opacity-0 invisible group-hover:opacity-100 group-hover:visible transition-all duration-200 z-50`),w(j,z()),w(B,M())}),r(k,b)}export{$ as T};
|
||||
import{f as l,s as w,a as r,c as h}from"./o8CdT7B0.js";import"./ChJfoPF0.js";import{s as x,c as n,r as f,t as N,f as y}from"./DUMcBckj.js";import{p as m,i as p}from"./i7pKks78.js";import{s as O}from"./BrpPrY5G.js";var P=l('<div class="absolute top-full left-1/2 transform -translate-x-1/2 border-4 border-transparent border-t-gray-900"></div>'),Q=l('<div class="absolute bottom-full left-1/2 transform -translate-x-1/2 border-4 border-transparent border-b-gray-900"></div>'),R=l('<div class="absolute right-full top-1/2 transform -translate-y-1/2 border-4 border-transparent border-l-gray-900"></div>'),S=l('<div class="absolute left-full top-1/2 transform -translate-y-1/2 border-4 border-transparent border-r-gray-900"></div>'),U=l('<div class="relative group"><svg class="w-3 h-3 text-gray-400 cursor-help" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"></path></svg> <div><div class="font-semibold mb-1"> </div> <div class="text-gray-300"> </div> <!></div></div>');function $(k,s){let z=m(s,"title",8),M=m(s,"content",8),t=m(s,"position",8,"top"),T=m(s,"width",8,"w-80");var b=U(),u=x(n(b),2),c=n(u),j=n(c,!0);f(c);var _=x(c,2),B=n(_,!0);f(_);var C=x(_,2);{var q=a=>{var i=P();r(a,i)},A=a=>{var i=h(),D=y(i);{var E=o=>{var v=Q();r(o,v)},F=o=>{var v=h(),G=y(v);{var H=e=>{var d=R();r(e,d)},I=e=>{var d=h(),J=y(d);{var K=g=>{var L=S();r(g,L)};p(J,g=>{t()==="right"&&g(K)},!0)}r(e,d)};p(G,e=>{t()==="left"?e(H):e(I,!1)},!0)}r(o,v)};p(D,o=>{t()==="bottom"?o(E):o(F,!1)},!0)}r(a,i)};p(C,a=>{t()==="top"?a(q):a(A,!1)})}f(u),f(b),N(()=>{O(u,1,`absolute ${t()==="top"?"bottom-full":t()==="bottom"?"top-full":t()==="left"?"right-full top-1/2 -translate-y-1/2":"left-full top-1/2 -translate-y-1/2"} left-1/2 transform -translate-x-1/2 ${t()==="top"?"mb-2":t()==="bottom"?"mt-2":"mx-2"} ${T()??""} p-3 bg-gray-900 text-white text-xs rounded-lg shadow-lg opacity-0 invisible group-hover:opacity-100 group-hover:visible transition-all duration-200 z-50`),w(j,z()),w(B,M())}),r(k,b)}export{$ as T};
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -1 +1 @@
|
|||
import{f as b,a as m,s as F}from"./o8CdT7B0.js";import{i as B}from"./ChJfoPF0.js";import{p as G,l,d as u,m as c,h as d,g as t,b as L,c as g,i as T,s as q,r as _,a as D,u as H,t as N}from"./DUMcBckj.js";import{p as v,i as V}from"./i7pKks78.js";import{c as j}from"./By1mMPic.js";import{B as z}from"./D3LjnYSP.js";var A=b('<a target="_blank" rel="noopener noreferrer" class="text-sm text-blue-600 dark:text-blue-400 hover:text-blue-500 dark:hover:text-blue-300"> </a>'),E=b('<div class="flex items-center space-x-2"><!> <!></div>');function Q(h,n){G(n,!1);const a=c(),r=c(),f=c();let s=v(n,"item",8),x=v(n,"showUrl",8,!0);function w(e){switch(e?.toLowerCase()){case"github":return"gray";case"gitea":return"green";default:return"secondary"}}function k(e){switch(e?.toLowerCase()){case"github":return"GitHub";case"gitea":return"Gitea";default:return e||"Unknown"}}l(()=>d(s()),()=>{u(a,s()?.endpoint?.endpoint_type||"Unknown")}),l(()=>d(s()),()=>{u(r,s()?.endpoint?.base_url)}),l(()=>t(a),()=>{u(f,w(t(a)))}),L(),B();var i=E(),p=g(i);{let e=T(()=>(t(a),H(()=>k(t(a)))));z(p,{get variant(){return t(f)},get text(){return t(e)}})}var y=q(p,2);{var U=e=>{var o=A(),C=g(o,!0);_(o),N(()=>{j(o,"href",t(r)),F(C,t(r))}),m(e,o)};V(y,e=>{x()&&t(r)&&e(U)})}_(i),m(h,i),D()}export{Q as F};
|
||||
import{f as b,a as m,s as F}from"./o8CdT7B0.js";import{i as B}from"./ChJfoPF0.js";import{p as G,l,d as u,m as c,h as d,g as t,b as L,c as g,i as T,s as q,r as _,a as D,u as H,t as N}from"./DUMcBckj.js";import{p as v,i as V}from"./i7pKks78.js";import{c as j}from"./BrpPrY5G.js";import{B as z}from"./CVTuRyLt.js";var A=b('<a target="_blank" rel="noopener noreferrer" class="text-sm text-blue-600 dark:text-blue-400 hover:text-blue-500 dark:hover:text-blue-300"> </a>'),E=b('<div class="flex items-center space-x-2"><!> <!></div>');function Q(h,n){G(n,!1);const a=c(),r=c(),f=c();let s=v(n,"item",8),x=v(n,"showUrl",8,!0);function w(e){switch(e?.toLowerCase()){case"github":return"gray";case"gitea":return"green";default:return"secondary"}}function k(e){switch(e?.toLowerCase()){case"github":return"GitHub";case"gitea":return"Gitea";default:return e||"Unknown"}}l(()=>d(s()),()=>{u(a,s()?.endpoint?.endpoint_type||"Unknown")}),l(()=>d(s()),()=>{u(r,s()?.endpoint?.base_url)}),l(()=>t(a),()=>{u(f,w(t(a)))}),L(),B();var i=E(),p=g(i);{let e=T(()=>(t(a),H(()=>k(t(a)))));z(p,{get variant(){return t(f)},get text(){return t(e)}})}var y=q(p,2);{var U=e=>{var o=A(),C=g(o,!0);_(o),N(()=>{j(o,"href",t(r)),F(C,t(r))}),m(e,o)};V(y,e=>{x()&&t(r)&&e(U)})}_(i),m(h,i),D()}export{Q as F};
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -1 +1 @@
|
|||
import{s as e}from"./Dr-4DxOa.js";const r=()=>{const s=e;return{page:{subscribe:s.page.subscribe},navigating:{subscribe:s.navigating.subscribe},updated:s.updated}},b={subscribe(s){return r().page.subscribe(s)}};export{b as p};
|
||||
import{s as e}from"./D_0Q1Op_.js";const r=()=>{const s=e;return{page:{subscribe:s.page.subscribe},navigating:{subscribe:s.navigating.subscribe},updated:s.updated}},b={subscribe(s){return r().page.subscribe(s)}};export{b as p};
|
||||
|
|
@ -1 +1 @@
|
|||
import{f as b,s as f,a as k}from"./o8CdT7B0.js";import{i as E}from"./ChJfoPF0.js";import{p as C,t as P,u as i,h as t,a as j,s as z,c as l,r as o}from"./DUMcBckj.js";import{c as N}from"./By1mMPic.js";import{p as n}from"./i7pKks78.js";import{j as x,e as c,i as u}from"./BPOuWaSt.js";var T=b('<div class="flex flex-col"><a class="text-sm font-medium text-blue-600 dark:text-blue-400 hover:text-blue-500 dark:hover:text-blue-300"> </a> <span class="text-xs text-gray-500 dark:text-gray-400 capitalize"> </span></div>');function F(d,r){C(r,!1);let e=n(r,"item",8),m=n(r,"eagerCache",8,null);E();var s=T(),a=l(s),v=l(a,!0);o(a);var p=z(a,2),h=l(p,!0);o(p),o(s),P((g,y,_)=>{N(a,"href",g),f(v,y),f(h,_)},[()=>(t(x),t(e()),i(()=>x(e()))),()=>(t(c),t(e()),t(m()),i(()=>c(e(),m()))),()=>(t(u),t(e()),i(()=>u(e())))]),k(d,s),j()}export{F as P};
|
||||
import{f as b,s as f,a as k}from"./o8CdT7B0.js";import{i as E}from"./ChJfoPF0.js";import{p as C,t as P,u as i,h as t,a as j,s as z,c as l,r as o}from"./DUMcBckj.js";import{c as N}from"./BrpPrY5G.js";import{p as n}from"./i7pKks78.js";import{j as x,e as c,i as u}from"./CDFYnmbx.js";var T=b('<div class="flex flex-col"><a class="text-sm font-medium text-blue-600 dark:text-blue-400 hover:text-blue-500 dark:hover:text-blue-300"> </a> <span class="text-xs text-gray-500 dark:text-gray-400 capitalize"> </span></div>');function F(d,r){C(r,!1);let e=n(r,"item",8),m=n(r,"eagerCache",8,null);E();var s=T(),a=l(s),v=l(a,!0);o(a);var p=z(a,2),h=l(p,!0);o(p),o(s),P((g,y,_)=>{N(a,"href",g),f(v,y),f(h,_)},[()=>(t(x),t(e()),i(()=>x(e()))),()=>(t(c),t(e()),t(m()),i(()=>c(e(),m()))),()=>(t(u),t(e()),i(()=>u(e())))]),k(d,s),j()}export{F as P};
|
||||
File diff suppressed because one or more lines are too long
1
webapp/assets/_app/immutable/entry/start.CJBf80Eg.js
Normal file
1
webapp/assets/_app/immutable/entry/start.CJBf80Eg.js
Normal file
|
|
@ -0,0 +1 @@
|
|||
import{a as r}from"../chunks/D_0Q1Op_.js";import{w as t}from"../chunks/D0NlQcNk.js";export{t as load_css,r as start};
|
||||
|
|
@ -1 +0,0 @@
|
|||
import{a as r}from"../chunks/Dr-4DxOa.js";import{w as t}from"../chunks/DGWAZRyz.js";export{t as load_css,r as start};
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -1 +1 @@
|
|||
import{f as h,a as c,s}from"../chunks/o8CdT7B0.js";import{i as l}from"../chunks/ChJfoPF0.js";import{p as v,f as u,t as _,a as g,c as e,r as o,s as x}from"../chunks/DUMcBckj.js";import{p}from"../chunks/8ZmDn8ti.js";var d=h("<h1> </h1> <p> </p>",1);function q(m,f){v(f,!1),l();var a=d(),r=u(a),i=e(r,!0);o(r);var t=x(r,2),n=e(t,!0);o(t),_(()=>{s(i,p.status),s(n,p.error?.message)}),c(m,a),g()}export{q as component};
|
||||
import{f as h,a as c,s}from"../chunks/o8CdT7B0.js";import{i as l}from"../chunks/ChJfoPF0.js";import{p as v,f as u,t as _,a as g,c as e,r as o,s as x}from"../chunks/DUMcBckj.js";import{p}from"../chunks/DexHAbFp.js";var d=h("<h1> </h1> <p> </p>",1);function q(m,f){v(f,!1),l();var a=d(),r=u(a),i=e(r,!0);o(r);var t=x(r,2),n=e(t,!0);o(t),_(()=>{s(i,p.status),s(n,p.error?.message)}),c(m,a),g()}export{q as component};
|
||||
|
|
@ -1 +1 @@
|
|||
import{f as K,h as Z,e as _,a as k,t as ee,s as j}from"../chunks/o8CdT7B0.js";import{i as ae}from"../chunks/ChJfoPF0.js";import{p as re,o as te,l as se,b as de,t as w,g as a,a as oe,$ as ie,s as d,m as f,c as r,u as q,h as D,d as i,r as t,n as I}from"../chunks/DUMcBckj.js";import{i as le,s as ne,a as ce}from"../chunks/i7pKks78.js";import{B as me,d as l,c as T,r as U}from"../chunks/By1mMPic.js";import{b as C}from"../chunks/BtzOUN4g.js";import{p as ue}from"../chunks/CdEA5IGF.js";import{g as H}from"../chunks/Dr-4DxOa.js";import{a as pe,b as ve}from"../chunks/Dz-vWGor.js";import{e as fe}from"../chunks/BZiHL9L3.js";var ge=K('<div class="rounded-md bg-red-50 dark:bg-red-900 p-4"><div class="flex"><div class="flex-shrink-0"><svg class="h-5 w-5 text-red-400" viewBox="0 0 20 20" fill="currentColor"><path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z" clip-rule="evenodd"></path></svg></div> <div class="ml-3"><p class="text-sm font-medium text-red-800 dark:text-red-200"> </p></div></div></div>'),he=K('<div class="min-h-screen flex items-center justify-center bg-gray-50 dark:bg-gray-900 py-12 px-4 sm:px-6 lg:px-8"><div class="max-w-md w-full space-y-8"><div><div class="mx-auto h-48 w-auto flex justify-center"><img alt="GARM" class="h-48 w-auto dark:hidden"/> <img alt="GARM" class="h-48 w-auto hidden dark:block"/></div> <h2 class="mt-6 text-center text-3xl font-extrabold text-gray-900 dark:text-white">Sign in to GARM</h2> <p class="mt-2 text-center text-sm text-gray-600 dark:text-gray-400">GitHub Actions Runner Manager</p></div> <form class="mt-8 space-y-6"><div class="rounded-md shadow-sm -space-y-px"><div><label for="username" class="sr-only">Username</label> <input id="username" name="username" type="text" required class="appearance-none rounded-none relative block w-full px-3 py-2 border border-gray-300 dark:border-gray-600 placeholder-gray-500 dark:placeholder-gray-400 text-gray-900 dark:text-white bg-white dark:bg-gray-700 rounded-t-md focus:outline-none focus:ring-blue-500 focus:border-blue-500 focus:z-10 sm:text-sm" placeholder="Username"/></div> <div><label for="password" class="sr-only">Password</label> <input id="password" name="password" type="password" required class="appearance-none rounded-none relative block w-full px-3 py-2 border border-gray-300 dark:border-gray-600 placeholder-gray-500 dark:placeholder-gray-400 text-gray-900 dark:text-white bg-white dark:bg-gray-700 rounded-b-md focus:outline-none focus:ring-blue-500 focus:border-blue-500 focus:z-10 sm:text-sm" placeholder="Password"/></div></div> <!> <div><!></div></form></div></div>');function Se(W,F){re(F,!1);const[J,N]=ne(),$=()=>ce(pe,"$authStore",J);let m=f(""),u=f(""),o=f(!1),n=f("");te(()=>{O()});function O(){const e=localStorage.getItem("theme");let s=!1;e==="dark"?s=!0:e==="light"?s=!1:s=window.matchMedia("(prefers-color-scheme: dark)").matches,s?document.documentElement.classList.add("dark"):document.documentElement.classList.remove("dark")}async function M(){if(!a(m)||!a(u)){i(n,"Please enter both username and password");return}i(o,!0),i(n,"");try{await ve.login(a(m),a(u)),H(l("/"))}catch(e){i(n,fe(e))}finally{i(o,!1)}}function L(e){e.key==="Enter"&&M()}se(()=>($(),l),()=>{$().isAuthenticated&&H(l("/"))}),de(),ae();var g=he();Z(e=>{ie.title="Login - GARM"});var A=r(g),h=r(A),S=r(h),z=r(S),Q=d(z,2);t(S),I(4),t(h);var b=d(h,2),x=r(b),y=r(x),p=d(r(y),2);U(p),t(y);var P=d(y,2),v=d(r(P),2);U(v),t(P),t(x);var G=d(x,2);{var V=e=>{var s=ge(),c=r(s),E=d(r(c),2),B=r(E),Y=r(B,!0);t(B),t(E),t(c),t(s),w(()=>j(Y,a(n))),k(e,s)};le(G,e=>{a(n)&&e(V)})}var R=d(G,2),X=r(R);me(X,{type:"submit",variant:"primary",size:"md",fullWidth:!0,get disabled(){return a(o)},get loading(){return a(o)},children:(e,s)=>{I();var c=ee();w(()=>j(c,a(o)?"Signing in...":"Sign in")),k(e,c)},$$slots:{default:!0}}),t(R),t(b),t(A),t(g),w((e,s)=>{T(z,"src",e),T(Q,"src",s),p.disabled=a(o),v.disabled=a(o)},[()=>(D(l),q(()=>l("/assets/garm-light.svg"))),()=>(D(l),q(()=>l("/assets/garm-dark.svg")))]),C(p,()=>a(m),e=>i(m,e)),_("keypress",p,L),C(v,()=>a(u),e=>i(u,e)),_("keypress",v,L),_("submit",b,ue(M)),k(W,g),oe(),N()}export{Se as component};
|
||||
import{f as K,h as Z,e as _,a as k,t as ee,s as j}from"../chunks/o8CdT7B0.js";import{i as ae}from"../chunks/ChJfoPF0.js";import{p as re,o as te,l as se,b as de,t as w,g as a,a as oe,$ as ie,s as d,m as f,c as r,u as q,h as D,d as i,r as t,n as I}from"../chunks/DUMcBckj.js";import{i as le,s as ne,a as ce}from"../chunks/i7pKks78.js";import{B as me,d as l,c as T,r as U}from"../chunks/BrpPrY5G.js";import{b as C}from"../chunks/BtzOUN4g.js";import{p as ue}from"../chunks/CdEA5IGF.js";import{g as H}from"../chunks/D_0Q1Op_.js";import{a as pe,b as ve}from"../chunks/DCfljvB_.js";import{e as fe}from"../chunks/BZiHL9L3.js";var ge=K('<div class="rounded-md bg-red-50 dark:bg-red-900 p-4"><div class="flex"><div class="flex-shrink-0"><svg class="h-5 w-5 text-red-400" viewBox="0 0 20 20" fill="currentColor"><path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z" clip-rule="evenodd"></path></svg></div> <div class="ml-3"><p class="text-sm font-medium text-red-800 dark:text-red-200"> </p></div></div></div>'),he=K('<div class="min-h-screen flex items-center justify-center bg-gray-50 dark:bg-gray-900 py-12 px-4 sm:px-6 lg:px-8"><div class="max-w-md w-full space-y-8"><div><div class="mx-auto h-48 w-auto flex justify-center"><img alt="GARM" class="h-48 w-auto dark:hidden"/> <img alt="GARM" class="h-48 w-auto hidden dark:block"/></div> <h2 class="mt-6 text-center text-3xl font-extrabold text-gray-900 dark:text-white">Sign in to GARM</h2> <p class="mt-2 text-center text-sm text-gray-600 dark:text-gray-400">GitHub Actions Runner Manager</p></div> <form class="mt-8 space-y-6"><div class="rounded-md shadow-sm -space-y-px"><div><label for="username" class="sr-only">Username</label> <input id="username" name="username" type="text" required class="appearance-none rounded-none relative block w-full px-3 py-2 border border-gray-300 dark:border-gray-600 placeholder-gray-500 dark:placeholder-gray-400 text-gray-900 dark:text-white bg-white dark:bg-gray-700 rounded-t-md focus:outline-none focus:ring-blue-500 focus:border-blue-500 focus:z-10 sm:text-sm" placeholder="Username"/></div> <div><label for="password" class="sr-only">Password</label> <input id="password" name="password" type="password" required class="appearance-none rounded-none relative block w-full px-3 py-2 border border-gray-300 dark:border-gray-600 placeholder-gray-500 dark:placeholder-gray-400 text-gray-900 dark:text-white bg-white dark:bg-gray-700 rounded-b-md focus:outline-none focus:ring-blue-500 focus:border-blue-500 focus:z-10 sm:text-sm" placeholder="Password"/></div></div> <!> <div><!></div></form></div></div>');function Se(W,F){re(F,!1);const[J,N]=ne(),$=()=>ce(pe,"$authStore",J);let m=f(""),u=f(""),o=f(!1),n=f("");te(()=>{O()});function O(){const e=localStorage.getItem("theme");let s=!1;e==="dark"?s=!0:e==="light"?s=!1:s=window.matchMedia("(prefers-color-scheme: dark)").matches,s?document.documentElement.classList.add("dark"):document.documentElement.classList.remove("dark")}async function M(){if(!a(m)||!a(u)){i(n,"Please enter both username and password");return}i(o,!0),i(n,"");try{await ve.login(a(m),a(u)),H(l("/"))}catch(e){i(n,fe(e))}finally{i(o,!1)}}function L(e){e.key==="Enter"&&M()}se(()=>($(),l),()=>{$().isAuthenticated&&H(l("/"))}),de(),ae();var g=he();Z(e=>{ie.title="Login - GARM"});var A=r(g),h=r(A),S=r(h),z=r(S),Q=d(z,2);t(S),I(4),t(h);var b=d(h,2),x=r(b),y=r(x),p=d(r(y),2);U(p),t(y);var P=d(y,2),v=d(r(P),2);U(v),t(P),t(x);var G=d(x,2);{var V=e=>{var s=ge(),c=r(s),E=d(r(c),2),B=r(E),Y=r(B,!0);t(B),t(E),t(c),t(s),w(()=>j(Y,a(n))),k(e,s)};le(G,e=>{a(n)&&e(V)})}var R=d(G,2),X=r(R);me(X,{type:"submit",variant:"primary",size:"md",fullWidth:!0,get disabled(){return a(o)},get loading(){return a(o)},children:(e,s)=>{I();var c=ee();w(()=>j(c,a(o)?"Signing in...":"Sign in")),k(e,c)},$$slots:{default:!0}}),t(R),t(b),t(A),t(g),w((e,s)=>{T(z,"src",e),T(Q,"src",s),p.disabled=a(o),v.disabled=a(o)},[()=>(D(l),q(()=>l("/assets/garm-light.svg"))),()=>(D(l),q(()=>l("/assets/garm-dark.svg")))]),C(p,()=>a(m),e=>i(m,e)),_("keypress",p,L),C(v,()=>a(u),e=>i(u,e)),_("keypress",v,L),_("submit",b,ue(M)),k(W,g),oe(),N()}export{Se as component};
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
3
webapp/assets/_app/immutable/nodes/4.CmdL03WB.js
Normal file
3
webapp/assets/_app/immutable/nodes/4.CmdL03WB.js
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -1 +1 @@
|
|||
{"version":"1770502407719"}
|
||||
{"version":"1770621019940"}
|
||||
|
|
@ -71,12 +71,12 @@
|
|||
})();
|
||||
</script>
|
||||
|
||||
<link rel="modulepreload" href="/ui/_app/immutable/entry/start.tOYMXfr9.js">
|
||||
<link rel="modulepreload" href="/ui/_app/immutable/chunks/Dr-4DxOa.js">
|
||||
<link rel="modulepreload" href="/ui/_app/immutable/entry/start.CJBf80Eg.js">
|
||||
<link rel="modulepreload" href="/ui/_app/immutable/chunks/D_0Q1Op_.js">
|
||||
<link rel="modulepreload" href="/ui/_app/immutable/chunks/DUMcBckj.js">
|
||||
<link rel="modulepreload" href="/ui/_app/immutable/chunks/DGWAZRyz.js">
|
||||
<link rel="modulepreload" href="/ui/_app/immutable/chunks/BDMj7wjI.js">
|
||||
<link rel="modulepreload" href="/ui/_app/immutable/entry/app.D9dRxEdB.js">
|
||||
<link rel="modulepreload" href="/ui/_app/immutable/chunks/D0NlQcNk.js">
|
||||
<link rel="modulepreload" href="/ui/_app/immutable/chunks/Bd2kZdYg.js">
|
||||
<link rel="modulepreload" href="/ui/_app/immutable/entry/app.DLAhyT4I.js">
|
||||
<link rel="modulepreload" href="/ui/_app/immutable/chunks/o8CdT7B0.js">
|
||||
<link rel="modulepreload" href="/ui/_app/immutable/chunks/i7pKks78.js">
|
||||
<link rel="modulepreload" href="/ui/_app/immutable/chunks/B-bv0ihJ.js">
|
||||
|
|
@ -86,7 +86,7 @@
|
|||
<div style="display: contents">
|
||||
<script>
|
||||
{
|
||||
__sveltekit_1djifpb = {
|
||||
__sveltekit_1x9zgb8 = {
|
||||
base: "/ui",
|
||||
assets: "/ui"
|
||||
};
|
||||
|
|
@ -94,8 +94,8 @@
|
|||
const element = document.currentScript.parentElement;
|
||||
|
||||
Promise.all([
|
||||
import("/ui/_app/immutable/entry/start.tOYMXfr9.js"),
|
||||
import("/ui/_app/immutable/entry/app.D9dRxEdB.js")
|
||||
import("/ui/_app/immutable/entry/start.CJBf80Eg.js"),
|
||||
import("/ui/_app/immutable/entry/app.DLAhyT4I.js")
|
||||
]).then(([kit, app]) => {
|
||||
kit.start(app, element);
|
||||
});
|
||||
|
|
|
|||
|
|
@ -63,6 +63,7 @@ import Tooltip from '$lib/components/Tooltip.svelte';
|
|||
tools_metadata_url: '',
|
||||
use_internal_tools_metadata: false
|
||||
};
|
||||
let selectedCertFileName = '';
|
||||
// Track original values for comparison during updates
|
||||
let originalFormData: typeof formData = { ...formData };
|
||||
|
||||
|
|
@ -212,6 +213,8 @@ import Tooltip from '$lib/components/Tooltip.svelte';
|
|||
};
|
||||
// Store original values for comparison
|
||||
originalFormData = { ...formData };
|
||||
// Set certificate file name indication if a certificate exists
|
||||
selectedCertFileName = formData.ca_cert_bundle ? 'certificate.pem' : '';
|
||||
showEditModal = true;
|
||||
}
|
||||
|
||||
|
|
@ -233,6 +236,7 @@ import Tooltip from '$lib/components/Tooltip.svelte';
|
|||
use_internal_tools_metadata: false
|
||||
};
|
||||
originalFormData = { ...formData };
|
||||
selectedCertFileName = '';
|
||||
}
|
||||
|
||||
function handleKeydown(event: KeyboardEvent) {
|
||||
|
|
@ -419,12 +423,14 @@ import Tooltip from '$lib/components/Tooltip.svelte';
|
|||
function handleFileUpload(event: Event) {
|
||||
const target = event.target as HTMLInputElement;
|
||||
const file = target.files?.[0];
|
||||
|
||||
|
||||
if (!file) {
|
||||
formData.ca_cert_bundle = '';
|
||||
selectedCertFileName = '';
|
||||
return;
|
||||
}
|
||||
|
||||
selectedCertFileName = file.name;
|
||||
const reader = new FileReader();
|
||||
reader.onload = (e) => {
|
||||
const content = e.target?.result as string;
|
||||
|
|
@ -433,6 +439,16 @@ import Tooltip from '$lib/components/Tooltip.svelte';
|
|||
reader.readAsText(file);
|
||||
}
|
||||
|
||||
function clearCertificate() {
|
||||
formData.ca_cert_bundle = '';
|
||||
selectedCertFileName = '';
|
||||
// Reset the file input
|
||||
const fileInput = document.getElementById('ca_cert_file') as HTMLInputElement;
|
||||
if (fileInput) fileInput.value = '';
|
||||
const editFileInput = document.getElementById('edit_ca_cert_file') as HTMLInputElement;
|
||||
if (editFileInput) editFileInput.value = '';
|
||||
}
|
||||
|
||||
// Reactive form validation
|
||||
$: isFormValid = (() => {
|
||||
if (!formData.name || !formData.base_url) return false;
|
||||
|
|
@ -634,7 +650,7 @@ import Tooltip from '$lib/components/Tooltip.svelte';
|
|||
<!-- Gitea-specific tools metadata fields -->
|
||||
<div>
|
||||
<div class="flex items-center mb-1">
|
||||
<label for="tools_metadata_url" class="block text-sm font-medium text-gray-700 dark:text-gray-300">
|
||||
<label for="tools_metadata_url" class="block text-sm font-medium {formData.use_internal_tools_metadata ? 'text-gray-400 dark:text-gray-500' : 'text-gray-700 dark:text-gray-300'}">
|
||||
Tools Metadata URL <span class="text-xs text-gray-500">(optional)</span>
|
||||
</label>
|
||||
<div class="ml-2">
|
||||
|
|
@ -650,11 +666,12 @@ import Tooltip from '$lib/components/Tooltip.svelte';
|
|||
type="url"
|
||||
id="tools_metadata_url"
|
||||
bind:value={formData.tools_metadata_url}
|
||||
disabled={formData.use_internal_tools_metadata}
|
||||
autocomplete="off"
|
||||
class="w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:text-white"
|
||||
class="w-full px-3 py-2 border rounded-md focus:outline-none transition-colors {formData.use_internal_tools_metadata ? 'bg-gray-100 dark:bg-gray-800 border-gray-300 dark:border-gray-700 text-gray-400 dark:text-gray-500 cursor-not-allowed' : 'border-gray-300 dark:border-gray-600 focus:ring-2 focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:text-white'}"
|
||||
placeholder="https://gitea.com/api/v1/repos/gitea/act_runner/releases"
|
||||
/>
|
||||
<p class="text-xs text-gray-500 dark:text-gray-400 mt-1">Leave empty to use default Gitea releases URL</p>
|
||||
<p class="text-xs {formData.use_internal_tools_metadata ? 'text-gray-400 dark:text-gray-500' : 'text-gray-500 dark:text-gray-400'} mt-1">{formData.use_internal_tools_metadata ? 'Disabled when using internal tools metadata' : 'Leave empty to use default Gitea releases URL'}</p>
|
||||
</div>
|
||||
|
||||
<div class="flex items-center">
|
||||
|
|
@ -681,7 +698,7 @@ import Tooltip from '$lib/components/Tooltip.svelte';
|
|||
<!-- CA Certificate Upload -->
|
||||
<div class="space-y-3 border-t border-gray-200 dark:border-gray-700 pt-4">
|
||||
<label for="ca_cert_file" class="block text-sm font-medium text-gray-700 dark:text-gray-300">CA Certificate Bundle (Optional)</label>
|
||||
<div class="border-2 border-dashed border-gray-300 dark:border-gray-600 rounded-lg p-4 text-center hover:border-blue-400 dark:hover:border-blue-400 transition-colors">
|
||||
<div class="border-2 border-dashed rounded-lg p-4 text-center transition-colors {selectedCertFileName ? 'border-green-500 dark:border-green-400 bg-green-50 dark:bg-green-900/20' : 'border-gray-300 dark:border-gray-600 hover:border-blue-400 dark:hover:border-blue-400'}">
|
||||
<input
|
||||
type="file"
|
||||
id="ca_cert_file"
|
||||
|
|
@ -689,18 +706,38 @@ import Tooltip from '$lib/components/Tooltip.svelte';
|
|||
on:change={handleFileUpload}
|
||||
class="hidden"
|
||||
/>
|
||||
<div class="space-y-2">
|
||||
<svg class="mx-auto h-8 w-8 text-gray-400" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"></path>
|
||||
</svg>
|
||||
<p class="text-sm text-gray-600 dark:text-gray-400">
|
||||
<button type="button" on:click={() => document.getElementById('ca_cert_file')?.click()} class="text-gray-900 dark:text-white hover:text-gray-700 dark:hover:text-gray-300 hover:underline cursor-pointer">
|
||||
Choose a file
|
||||
</button>
|
||||
or drag and drop
|
||||
</p>
|
||||
<p class="text-xs text-gray-500 dark:text-gray-400">PEM, CRT, CER, CERT files only</p>
|
||||
</div>
|
||||
{#if selectedCertFileName}
|
||||
<div class="space-y-2">
|
||||
<svg class="mx-auto h-8 w-8 text-green-600 dark:text-green-400" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"></path>
|
||||
</svg>
|
||||
<p class="text-sm font-medium text-green-700 dark:text-green-300">
|
||||
{selectedCertFileName}
|
||||
</p>
|
||||
<div class="flex justify-center space-x-2">
|
||||
<button type="button" on:click={() => document.getElementById('ca_cert_file')?.click()} class="text-xs text-blue-600 dark:text-blue-400 hover:text-blue-800 dark:hover:text-blue-300 hover:underline cursor-pointer">
|
||||
Replace
|
||||
</button>
|
||||
<span class="text-xs text-gray-400">•</span>
|
||||
<button type="button" on:click={clearCertificate} class="text-xs text-red-600 dark:text-red-400 hover:text-red-800 dark:hover:text-red-300 hover:underline cursor-pointer">
|
||||
Remove
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
{:else}
|
||||
<div class="space-y-2">
|
||||
<svg class="mx-auto h-8 w-8 text-gray-400" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"></path>
|
||||
</svg>
|
||||
<p class="text-sm text-gray-600 dark:text-gray-400">
|
||||
<button type="button" on:click={() => document.getElementById('ca_cert_file')?.click()} class="text-gray-900 dark:text-white hover:text-gray-700 dark:hover:text-gray-300 hover:underline cursor-pointer">
|
||||
Choose a file
|
||||
</button>
|
||||
or drag and drop
|
||||
</p>
|
||||
<p class="text-xs text-gray-500 dark:text-gray-400">PEM, CRT, CER, CERT files only</p>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
@ -834,7 +871,7 @@ import Tooltip from '$lib/components/Tooltip.svelte';
|
|||
<!-- Gitea-specific tools metadata fields -->
|
||||
<div>
|
||||
<div class="flex items-center mb-1">
|
||||
<label for="edit_tools_metadata_url" class="block text-sm font-medium text-gray-700 dark:text-gray-300">
|
||||
<label for="edit_tools_metadata_url" class="block text-sm font-medium {formData.use_internal_tools_metadata ? 'text-gray-400 dark:text-gray-500' : 'text-gray-700 dark:text-gray-300'}">
|
||||
Tools Metadata URL <span class="text-xs text-gray-500">(optional)</span>
|
||||
</label>
|
||||
<div class="ml-2">
|
||||
|
|
@ -850,11 +887,12 @@ import Tooltip from '$lib/components/Tooltip.svelte';
|
|||
type="url"
|
||||
id="edit_tools_metadata_url"
|
||||
bind:value={formData.tools_metadata_url}
|
||||
disabled={formData.use_internal_tools_metadata}
|
||||
autocomplete="off"
|
||||
class="w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:text-white"
|
||||
class="w-full px-3 py-2 border rounded-md focus:outline-none transition-colors {formData.use_internal_tools_metadata ? 'bg-gray-100 dark:bg-gray-800 border-gray-300 dark:border-gray-700 text-gray-400 dark:text-gray-500 cursor-not-allowed' : 'border-gray-300 dark:border-gray-600 focus:ring-2 focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:text-white'}"
|
||||
placeholder="https://gitea.com/api/v1/repos/gitea/act_runner/releases"
|
||||
/>
|
||||
<p class="text-xs text-gray-500 dark:text-gray-400 mt-1">Leave empty to use default Gitea releases URL</p>
|
||||
<p class="text-xs {formData.use_internal_tools_metadata ? 'text-gray-400 dark:text-gray-500' : 'text-gray-500 dark:text-gray-400'} mt-1">{formData.use_internal_tools_metadata ? 'Disabled when using internal tools metadata' : 'Leave empty to use default Gitea releases URL'}</p>
|
||||
</div>
|
||||
|
||||
<div class="flex items-center">
|
||||
|
|
@ -881,7 +919,7 @@ import Tooltip from '$lib/components/Tooltip.svelte';
|
|||
<!-- CA Certificate Upload -->
|
||||
<div class="space-y-3 border-t border-gray-200 dark:border-gray-700 pt-4">
|
||||
<label for="edit_ca_cert_file" class="block text-sm font-medium text-gray-700 dark:text-gray-300">CA Certificate Bundle (Optional)</label>
|
||||
<div class="border-2 border-dashed border-gray-300 dark:border-gray-600 rounded-lg p-4 text-center hover:border-blue-400 dark:hover:border-blue-400 transition-colors">
|
||||
<div class="border-2 border-dashed rounded-lg p-4 text-center transition-colors {selectedCertFileName ? 'border-green-500 dark:border-green-400 bg-green-50 dark:bg-green-900/20' : 'border-gray-300 dark:border-gray-600 hover:border-blue-400 dark:hover:border-blue-400'}">
|
||||
<input
|
||||
type="file"
|
||||
id="edit_ca_cert_file"
|
||||
|
|
@ -889,18 +927,38 @@ import Tooltip from '$lib/components/Tooltip.svelte';
|
|||
on:change={handleFileUpload}
|
||||
class="hidden"
|
||||
/>
|
||||
<div class="space-y-2">
|
||||
<svg class="mx-auto h-8 w-8 text-gray-400" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"></path>
|
||||
</svg>
|
||||
<p class="text-sm text-gray-600 dark:text-gray-400">
|
||||
<button type="button" on:click={() => document.getElementById('edit_ca_cert_file')?.click()} class="text-gray-900 dark:text-white hover:text-gray-700 dark:hover:text-gray-300 hover:underline cursor-pointer">
|
||||
Choose a file
|
||||
</button>
|
||||
or drag and drop
|
||||
</p>
|
||||
<p class="text-xs text-gray-500 dark:text-gray-400">PEM, CRT, CER, CERT files only</p>
|
||||
</div>
|
||||
{#if selectedCertFileName}
|
||||
<div class="space-y-2">
|
||||
<svg class="mx-auto h-8 w-8 text-green-600 dark:text-green-400" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"></path>
|
||||
</svg>
|
||||
<p class="text-sm font-medium text-green-700 dark:text-green-300">
|
||||
{selectedCertFileName}
|
||||
</p>
|
||||
<div class="flex justify-center space-x-2">
|
||||
<button type="button" on:click={() => document.getElementById('edit_ca_cert_file')?.click()} class="text-xs text-blue-600 dark:text-blue-400 hover:text-blue-800 dark:hover:text-blue-300 hover:underline cursor-pointer">
|
||||
Replace
|
||||
</button>
|
||||
<span class="text-xs text-gray-400">•</span>
|
||||
<button type="button" on:click={clearCertificate} class="text-xs text-red-600 dark:text-red-400 hover:text-red-800 dark:hover:text-red-300 hover:underline cursor-pointer">
|
||||
Remove
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
{:else}
|
||||
<div class="space-y-2">
|
||||
<svg class="mx-auto h-8 w-8 text-gray-400" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"></path>
|
||||
</svg>
|
||||
<p class="text-sm text-gray-600 dark:text-gray-400">
|
||||
<button type="button" on:click={() => document.getElementById('edit_ca_cert_file')?.click()} class="text-gray-900 dark:text-white hover:text-gray-700 dark:hover:text-gray-300 hover:underline cursor-pointer">
|
||||
Choose a file
|
||||
</button>
|
||||
or drag and drop
|
||||
</p>
|
||||
<p class="text-xs text-gray-500 dark:text-gray-400">PEM, CRT, CER, CERT files only</p>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
9
workers/cache/gitea_tools.go
vendored
9
workers/cache/gitea_tools.go
vendored
|
|
@ -183,17 +183,10 @@ func getTools(ctx context.Context, metadataURL string, useInternal bool) ([]comm
|
|||
latest, err = getReleasesFromURL(ctx, metadataURL)
|
||||
if err != nil {
|
||||
slog.ErrorContext(ctx, "failed to get tools from metadata URL", "error", err)
|
||||
if metadataURL != appdefaults.GiteaRunnerReleasesURL {
|
||||
slog.InfoContext(ctx, "attempting to get tools from default upstream", "tools_url", appdefaults.GiteaRunnerReleasesURL)
|
||||
latest, err = getReleasesFromURL(ctx, appdefaults.GiteaRunnerReleasesURL)
|
||||
}
|
||||
return nil, fmt.Errorf("failed to get tools: %w", err)
|
||||
}
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("failed to get tools: %w", err)
|
||||
}
|
||||
|
||||
ret := []commonParams.RunnerApplicationDownload{}
|
||||
|
||||
for _, asset := range latest.Assets {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue