Fix init redirect state (#527)
On init, we were redirected to the proper URL, but the page would not render properly. Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
This commit is contained in:
parent
b5ece196b9
commit
572ebbf2c7
63 changed files with 152 additions and 121 deletions
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 @@
|
|||
const w=/^(\[)?(\.\.\.)?(\w+)(?:=(\w+))?(\])?$/;function x(t){const s=[];return{pattern:t==="/"?/^\/$/:new RegExp(`^${_(t).map(a=>{const i=/^\[\.\.\.(\w+)(?:=(\w+))?\]$/.exec(a);if(i)return s.push({name:i[1],matcher:i[2],optional:!1,rest:!0,chained:!0}),"(?:/([^]*))?";const c=/^\[\[(\w+)(?:=(\w+))?\]\]$/.exec(a);if(c)return s.push({name:c[1],matcher:c[2],optional:!0,rest:!1,chained:!0}),"(?:/([^/]+))?";if(!a)return;const n=a.split(/\[(.+?)\](?!\])/);return"/"+n.map((e,u)=>{if(u%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 o=w.exec(e),[,l,f,m,d]=o;return s.push({name:m,matcher:d,optional:!!l,rest:!!f,chained:f?u===1&&n[0]==="":!1}),f?"([^]*?)":l?"([^/]*)?":"([^/]+?)"}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,p){const a={},i=t.slice(1),c=i.filter(r=>r!==void 0);let n=0;for(let r=0;r<s.length;r+=1){const e=s[r];let u=i[r-n];if(e.chained&&e.rest&&n&&(u=i.slice(r-n,r+1).filter(o=>o).join("/"),n=0),u===void 0){e.rest&&(a[e.name]="");continue}if(!e.matcher||p[e.matcher](u)){a[e.name]=u;const o=s[r+1],l=i[r+1];o&&!o.rest&&o.optional&&l&&e.chained&&(n=0),!o&&!l&&Object.keys(a).length===c.length&&(n=0);continue}if(e.optional&&e.chained){n++;continue}return}if(!n)return a}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 k(t,s){return"/"+_(t).map(a=>a.replace(b,(i,c,n,r)=>{const e=s[r];if(!e){if(c||n&&e!==void 0)return"";throw new Error(`Missing parameter '${r}' in route ${t}`)}if(e.startsWith("/")||e.endsWith("/"))throw new Error(`Parameter '${r}' in route ${t} cannot start or end with a slash -- this would cause an invalid route like foo//bar`);return e})).filter(Boolean).join("/")}const v=globalThis.__sveltekit_ppz5de?.base??"/ui",C=globalThis.__sveltekit_ppz5de?.assets??v;export{C as a,v as b,j as e,x as p,k as r};
|
||||
const w=/^(\[)?(\.\.\.)?(\w+)(?:=(\w+))?(\])?$/;function x(t){const s=[];return{pattern:t==="/"?/^\/$/:new RegExp(`^${_(t).map(a=>{const i=/^\[\.\.\.(\w+)(?:=(\w+))?\]$/.exec(a);if(i)return s.push({name:i[1],matcher:i[2],optional:!1,rest:!0,chained:!0}),"(?:/([^]*))?";const c=/^\[\[(\w+)(?:=(\w+))?\]\]$/.exec(a);if(c)return s.push({name:c[1],matcher:c[2],optional:!0,rest:!1,chained:!0}),"(?:/([^/]+))?";if(!a)return;const n=a.split(/\[(.+?)\](?!\])/);return"/"+n.map((e,u)=>{if(u%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 o=w.exec(e),[,l,p,m,g]=o;return s.push({name:m,matcher:g,optional:!!l,rest:!!p,chained:p?u===1&&n[0]==="":!1}),p?"([^]*?)":l?"([^/]*)?":"([^/]+?)"}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 a={},i=t.slice(1),c=i.filter(r=>r!==void 0);let n=0;for(let r=0;r<s.length;r+=1){const e=s[r];let u=i[r-n];if(e.chained&&e.rest&&n&&(u=i.slice(r-n,r+1).filter(o=>o).join("/"),n=0),u===void 0){e.rest&&(a[e.name]="");continue}if(!e.matcher||f[e.matcher](u)){a[e.name]=u;const o=s[r+1],l=i[r+1];o&&!o.rest&&o.optional&&l&&e.chained&&(n=0),!o&&!l&&Object.keys(a).length===c.length&&(n=0);continue}if(e.optional&&e.chained){n++;continue}return}if(!n)return a}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 k(t,s){return"/"+_(t).map(a=>a.replace(b,(i,c,n,r)=>{const e=s[r];if(!e){if(c||n&&e!==void 0)return"";throw new Error(`Missing parameter '${r}' in route ${t}`)}if(e.startsWith("/")||e.endsWith("/"))throw new Error(`Parameter '${r}' in route ${t} cannot start or end with a slash -- this would cause an invalid route like foo//bar`);return e})).filter(Boolean).join("/")}const v=globalThis.__sveltekit_1gg6hf8?.base??"/ui",C=globalThis.__sveltekit_1gg6hf8?.assets??v;export{C as a,v as b,j as e,x as p,k as r};
|
||||
|
|
@ -1 +1 @@
|
|||
import"./DsnmJJEf.js";import{i as V}from"./C7KraPli.js";import{p as B,E as D,l as t,q as s,g as e,m as a,h as P,f as T,t as q,i as S,b as F,c as G,u as I,d as w,k as o,r as z}from"./cPTQ2Ibn.js";import{e as J,h as K,s as N,f as O}from"./DqbUkQgD.js";import{l as C,p as l}from"./DqFqoVWr.js";var Q=T('<button><svg fill="none" stroke="currentColor" viewBox="0 0 24 24"><!></svg></button>');function Z(j,i){const M=C(i,["children","$$slots","$$events","$$legacy"]),L=C(M,["action","disabled","title","ariaLabel","size"]);B(i,!1);const u=a(),h=a(),p=a(),v=a(),g=a(),f=a(),n=a(),m=a(),b=a(),A=D();let r=l(i,"action",8,"edit"),x=l(i,"disabled",8,!1),y=l(i,"title",8,""),_=l(i,"ariaLabel",8,""),c=l(i,"size",8,"md");function H(){x()||A("click")}t(()=>{},()=>{o(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()),()=>{o(h,{sm:"p-1",md:"p-2"}[c()])}),t(()=>s(r()),()=>{o(p,{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"}[r()])}),t(()=>s(c()),()=>{o(v,c()==="sm"?"h-4 w-4":"h-5 w-5")}),t(()=>(e(u),e(h),e(p)),()=>{o(g,[e(u),e(h),e(p)].join(" "))}),t(()=>{},()=>{o(f,{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" />'})}),t(()=>{},()=>{o(n,{edit:"Edit",delete:"Delete",view:"View",add:"Add",copy:"Clone"})}),t(()=>(s(y()),e(n),s(r())),()=>{o(m,y()||e(n)[r()])}),t(()=>(s(_()),e(n),s(r())),()=>{o(b,_()||`${e(n)[r()]} item`)}),P(),V();var d=Q();J(d,()=>({type:"button",class:e(g),disabled:x(),title:e(m),"aria-label":e(b),...L}));var k=w(d),E=w(k);K(E,()=>(e(f),s(r()),I(()=>e(f)[r()])),!0),z(k),z(d),q(()=>N(k,0,O(e(v)))),S("click",d,H),F(j,d),G()}export{Z as A};
|
||||
import"./DsnmJJEf.js";import{i as V}from"./C7KraPli.js";import{p as B,E as D,l as t,q as s,g as e,m as a,h as P,f as T,t as q,i as S,b as F,c as G,u as I,d as w,k as o,r as z}from"./cPTQ2Ibn.js";import{e as J,h as K,s as N,f as O}from"./yWyZZHPR.js";import{l as C,p as l}from"./DqFqoVWr.js";var Q=T('<button><svg fill="none" stroke="currentColor" viewBox="0 0 24 24"><!></svg></button>');function Z(j,i){const M=C(i,["children","$$slots","$$events","$$legacy"]),L=C(M,["action","disabled","title","ariaLabel","size"]);B(i,!1);const u=a(),h=a(),p=a(),v=a(),g=a(),f=a(),n=a(),m=a(),b=a(),A=D();let r=l(i,"action",8,"edit"),x=l(i,"disabled",8,!1),y=l(i,"title",8,""),_=l(i,"ariaLabel",8,""),c=l(i,"size",8,"md");function H(){x()||A("click")}t(()=>{},()=>{o(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()),()=>{o(h,{sm:"p-1",md:"p-2"}[c()])}),t(()=>s(r()),()=>{o(p,{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"}[r()])}),t(()=>s(c()),()=>{o(v,c()==="sm"?"h-4 w-4":"h-5 w-5")}),t(()=>(e(u),e(h),e(p)),()=>{o(g,[e(u),e(h),e(p)].join(" "))}),t(()=>{},()=>{o(f,{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" />'})}),t(()=>{},()=>{o(n,{edit:"Edit",delete:"Delete",view:"View",add:"Add",copy:"Clone"})}),t(()=>(s(y()),e(n),s(r())),()=>{o(m,y()||e(n)[r()])}),t(()=>(s(_()),e(n),s(r())),()=>{o(b,_()||`${e(n)[r()]} item`)}),P(),V();var d=Q();J(d,()=>({type:"button",class:e(g),disabled:x(),title:e(m),"aria-label":e(b),...L}));var k=w(d),E=w(k);K(E,()=>(e(f),s(r()),I(()=>e(f)[r()])),!0),z(k),z(d),q(()=>N(k,0,O(e(v)))),S("click",d,H),F(j,d),G()}export{Z as A};
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
import"./DsnmJJEf.js";import{i as g}from"./C7KraPli.js";import{p as x,l as k,k as d,m as w,q as y,h as J,f as b,d as z,x as L,s as j,g as c,r as q,t as B,b as f,c as C}from"./cPTQ2Ibn.js";import{p as o,i as E}from"./DqFqoVWr.js";import{c as n,s as M}from"./DqbUkQgD.js";import{b as N}from"./B-_QCM7E.js";var O=b('<div class="absolute top-2 right-2"><svg class="w-4 h-4 text-red-500" 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>'),S=b('<div class="relative"><textarea style="tab-size: 2;" spellcheck="false"></textarea> <!></div>');function I(m,r){x(r,!1);let t=o(r,"value",12,""),p=o(r,"placeholder",8,"{}"),u=o(r,"rows",8,4),i=o(r,"disabled",8,!1),a=w(!0);k(()=>y(t()),()=>{if(t().trim())try{JSON.parse(t()),d(a,!0)}catch{d(a,!1)}else d(a,!0)}),J(),g();var l=S(),e=z(l);L(e);var v=j(e,2);{var h=s=>{var _=O();f(s,_)};E(v,s=>{c(a)||s(h)})}q(l),B(()=>{n(e,"placeholder",p()),n(e,"rows",u()),e.disabled=i(),M(e,1,`w-full px-3 py-2 border rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500 font-mono text-sm resize-none
|
||||
import"./DsnmJJEf.js";import{i as g}from"./C7KraPli.js";import{p as x,l as k,k as d,m as w,q as y,h as J,f as b,d as z,x as L,s as j,g as c,r as q,t as B,b as f,c as C}from"./cPTQ2Ibn.js";import{p as o,i as E}from"./DqFqoVWr.js";import{c as n,s as M}from"./yWyZZHPR.js";import{b as N}from"./B-_QCM7E.js";var O=b('<div class="absolute top-2 right-2"><svg class="w-4 h-4 text-red-500" 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>'),S=b('<div class="relative"><textarea style="tab-size: 2;" spellcheck="false"></textarea> <!></div>');function I(m,r){x(r,!1);let t=o(r,"value",12,""),p=o(r,"placeholder",8,"{}"),u=o(r,"rows",8,4),i=o(r,"disabled",8,!1),a=w(!0);k(()=>y(t()),()=>{if(t().trim())try{JSON.parse(t()),d(a,!0)}catch{d(a,!1)}else d(a,!0)}),J(),g();var l=S(),e=z(l);L(e);var v=j(e,2);{var h=s=>{var _=O();f(s,_)};E(v,s=>{c(a)||s(h)})}q(l),B(()=>{n(e,"placeholder",p()),n(e,"rows",u()),e.disabled=i(),M(e,1,`w-full px-3 py-2 border rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500 font-mono text-sm resize-none
|
||||
${c(a)?"border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-700 text-gray-900 dark:text-white":"border-red-300 dark:border-red-600 bg-red-50 dark:bg-red-900/20 text-red-900 dark:text-red-100"}
|
||||
${i()?"opacity-50 cursor-not-allowed":""}
|
||||
`)}),N(e,t),f(m,l),C()}export{I as J};
|
||||
3
webapp/assets/_app/immutable/chunks/Br47IbuU.js
Normal file
3
webapp/assets/_app/immutable/chunks/Br47IbuU.js
Normal file
File diff suppressed because one or more lines are too long
|
|
@ -1 +1 @@
|
|||
import"./DsnmJJEf.js";import{i as E}from"./C7KraPli.js";import{p as H,E as L,f as h,t as f,b as c,c as z,d as e,r as a,s as x,e as d,z as M,D as q}from"./cPTQ2Ibn.js";import{p as i,i as C}from"./DqFqoVWr.js";import{B as F}from"./DqbUkQgD.js";var G=h('<div class="mt-4 sm:mt-0 flex items-center space-x-4"><!></div>'),I=h('<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 S(u,t){H(t,!1);const _=L();let b=i(t,"title",8),k=i(t,"description",8),v=i(t,"actionLabel",8,null),g=i(t,"showAction",8,!0);function w(){_("action")}E();var r=I(),s=e(r),o=e(s),y=e(o,!0);a(o);var m=x(o,2),A=e(m,!0);a(m),a(s);var P=x(s,2);{var j=n=>{var l=G(),B=e(l);F(B,{variant:"primary",icon:'<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 6v6m0 0v6m0-6h6m-6 0H6" />',$$events:{click:w},children:(D,J)=>{M();var p=q();f(()=>d(p,v())),c(D,p)},$$slots:{default:!0}}),a(l),c(n,l)};C(P,n=>{g()&&v()&&n(j)})}a(r),f(()=>{d(y,b()),d(A,k())}),c(u,r),z()}export{S as P};
|
||||
import"./DsnmJJEf.js";import{i as E}from"./C7KraPli.js";import{p as H,E as L,f as h,t as f,b as c,c as z,d as e,r as a,s as x,e as d,z as M,D as q}from"./cPTQ2Ibn.js";import{p as i,i as C}from"./DqFqoVWr.js";import{B as F}from"./yWyZZHPR.js";var G=h('<div class="mt-4 sm:mt-0 flex items-center space-x-4"><!></div>'),I=h('<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 S(u,t){H(t,!1);const _=L();let b=i(t,"title",8),k=i(t,"description",8),v=i(t,"actionLabel",8,null),g=i(t,"showAction",8,!0);function w(){_("action")}E();var r=I(),s=e(r),o=e(s),y=e(o,!0);a(o);var m=x(o,2),A=e(m,!0);a(m),a(s);var P=x(s,2);{var j=n=>{var l=G(),B=e(l);F(B,{variant:"primary",icon:'<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 6v6m0 0v6m0-6h6m-6 0H6" />',$$events:{click:w},children:(D,J)=>{M();var p=q();f(()=>d(p,v())),c(D,p)},$$slots:{default:!0}}),a(l),c(n,l)};C(P,n=>{g()&&v()&&n(j)})}a(r),f(()=>{d(y,b()),d(A,k())}),c(u,r),z()}export{S as P};
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -1 +1 @@
|
|||
import"./DsnmJJEf.js";import{i as _}from"./C7KraPli.js";import{p as h,f as x,t as u,b as g,c as k,s as w,d as o,u as d,q as e,r,e as y}from"./cPTQ2Ibn.js";import{h as b}from"./DqbUkQgD.js";import{p as m}from"./DqFqoVWr.js";import{g as l}from"./DJsB5Z5V.js";var z=x('<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 U(v,i){h(i,!1);let t=m(i,"item",8),s=m(i,"iconSize",8,"w-5 h-5");_();var a=z(),n=o(a),f=o(n);b(f,()=>(e(l),e(t()),e(s()),d(()=>l(t()?.endpoint?.endpoint_type||t()?.endpoint_type||"unknown",s())))),r(n);var p=w(n,2),c=o(p,!0);r(p),r(a),u(()=>y(c,(e(t()),d(()=>t()?.endpoint?.name||t()?.endpoint_name||t()?.endpoint_type||"Unknown")))),g(v,a),k()}export{U as E};
|
||||
import"./DsnmJJEf.js";import{i as _}from"./C7KraPli.js";import{p as h,f as x,t as u,b as g,c as k,s as w,d as o,u as d,q as e,r,e as y}from"./cPTQ2Ibn.js";import{h as b}from"./yWyZZHPR.js";import{p as m}from"./DqFqoVWr.js";import{g as l}from"./Cr2hBuns.js";var z=x('<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 U(v,i){h(i,!1);let t=m(i,"item",8),s=m(i,"iconSize",8,"w-5 h-5");_();var a=z(),n=o(a),f=o(n);b(f,()=>(e(l),e(t()),e(s()),d(()=>l(t()?.endpoint?.endpoint_type||t()?.endpoint_type||"unknown",s())))),r(n);var p=w(n,2),c=o(p,!0);r(p),r(a),u(()=>y(c,(e(t()),d(()=>t()?.endpoint?.name||t()?.endpoint_name||t()?.endpoint_type||"Unknown")))),g(v,a),k()}export{U as E};
|
||||
|
|
@ -1 +1 @@
|
|||
import"./DsnmJJEf.js";import"./C7KraPli.js";import{f as k,d as a,s as m,r as i,t as g,e as f,b as v,z as p,D as z}from"./cPTQ2Ibn.js";import{p as t,i as u}from"./DqFqoVWr.js";import{s as Y,h as Z,B as H}from"./DqbUkQgD.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(j,e){let E=t(e,"title",8),M=t(e,"subtitle",8),D=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(),y=a(_),w=a(y),b=a(w),I=a(b);{var N=l=>{var d=$(),c=a(d);Z(c,D),i(d),v(l,d)};u(I,l=>{D()&&l(N)})}var L=m(I,2),o=a(L),O=a(o,!0);i(o);var V=m(o,2),Q=a(V,!0);i(V),i(L),i(b);var R=m(b,2);{var S=l=>{var d=ee(),c=a(d);{var T=r=>{H(r,{get variant(){return P()},size:"md",get disabled(){return q()},get icon(){return G()},$$events:{click(...s){h()?.apply(this,s)}},children:(s,X)=>{p();var n=z();g(()=>f(n,B())),v(s,n)},$$slots:{default:!0}})};u(c,r=>{h()&&r(T)})}var U=m(c,2);{var W=r=>{H(r,{get variant(){return A()},size:"md",get disabled(){return F()},get icon(){return J()},$$events:{click(...s){x()?.apply(this,s)}},children:(s,X)=>{p();var n=z();g(()=>f(n,C())),v(s,n)},$$slots:{default:!0}})};u(U,r=>{x()&&r(W)})}i(d),v(l,d)};u(R,l=>{(h()||x())&&l(S)})}i(w),i(y),i(_),g(()=>{Y(o,1,`text-2xl font-bold text-gray-900 dark:text-white ${K()??""}`),f(O,E()),f(Q,M())}),v(j,_)}export{se as D};
|
||||
import"./DsnmJJEf.js";import"./C7KraPli.js";import{f as k,d as a,s as m,r as i,t as g,e as f,b as v,z as p,D as z}from"./cPTQ2Ibn.js";import{p as t,i as u}from"./DqFqoVWr.js";import{s as Y,h as Z,B as H}from"./yWyZZHPR.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(j,e){let E=t(e,"title",8),M=t(e,"subtitle",8),D=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(),y=a(_),w=a(y),b=a(w),I=a(b);{var N=l=>{var d=$(),c=a(d);Z(c,D),i(d),v(l,d)};u(I,l=>{D()&&l(N)})}var L=m(I,2),o=a(L),O=a(o,!0);i(o);var V=m(o,2),Q=a(V,!0);i(V),i(L),i(b);var R=m(b,2);{var S=l=>{var d=ee(),c=a(d);{var T=r=>{H(r,{get variant(){return P()},size:"md",get disabled(){return q()},get icon(){return G()},$$events:{click(...s){h()?.apply(this,s)}},children:(s,X)=>{p();var n=z();g(()=>f(n,B())),v(s,n)},$$slots:{default:!0}})};u(c,r=>{h()&&r(T)})}var U=m(c,2);{var W=r=>{H(r,{get variant(){return A()},size:"md",get disabled(){return F()},get icon(){return J()},$$events:{click(...s){x()?.apply(this,s)}},children:(s,X)=>{p();var n=z();g(()=>f(n,C())),v(s,n)},$$slots:{default:!0}})};u(U,r=>{x()&&r(W)})}i(d),v(l,d)};u(R,l=>{(h()||x())&&l(S)})}i(w),i(y),i(_),g(()=>{Y(o,1,`text-2xl font-bold text-gray-900 dark:text-white ${K()??""}`),f(O,E()),f(Q,M())}),v(j,_)}export{se as D};
|
||||
|
|
@ -1 +1 @@
|
|||
import"./DsnmJJEf.js";import{i as v}from"./C7KraPli.js";import{p as w,l as m,q as s,g as r,m as g,h as x,B as h,a as T,b as B,c as S,k,u}from"./cPTQ2Ibn.js";import{k as A}from"./Du50aAe5.js";import{p as d}from"./DqFqoVWr.js";import{k as b,B as C}from"./DJsB5Z5V.js";import{f as E}from"./ow_oMtSd.js";function j(_,i){w(i,!1);const c=g(),n=g();let e=d(i,"item",8),l=d(i,"statusType",8,"entity"),a=d(i,"statusField",8,"status");m(()=>(s(e()),s(a())),()=>{k(c,e()?.[a()]||"unknown")}),m(()=>(s(e()),s(l()),r(c),s(a())),()=>{k(n,(()=>{if(!e())return{variant:"error",text:"Unknown"};switch(l()){case"entity":return b(e());case"instance":let t="secondary";switch(r(c).toLowerCase()){case"running":t="success";break;case"stopped":t="info";break;case"creating":case"pending_create":t="warning";break;case"deleting":case"pending_delete":case"pending_force_delete":t="warning";break;case"error":case"deleted":t="error";break;case"active":case"online":t="success";break;case"idle":t="info";break;case"pending":case"installing":t="warning";break;case"failed":case"terminated":case"offline":t="error";break;case"unknown":default:t="secondary";break}return{variant:t,text:E(r(c))};case"enabled":return{variant:e().enabled?"success":"error",text:e().enabled?"Enabled":"Disabled"};case"custom":const o=e()[a()]||"Unknown";if(a()==="auth-type"){const f=o==="pat"||!o?"pat":"app";return{variant:f==="pat"?"success":"info",text:f==="pat"?"PAT":"App"}}return{variant:"info",text:o};default:return b(e())}})())}),x(),v();var p=h(),y=T(p);A(y,()=>(s(e()),s(a()),u(()=>`${e()?.name||"item"}-${e()?.[a()]||"status"}-${e()?.updated_at||"time"}`)),t=>{C(t,{get variant(){return r(n),u(()=>r(n).variant)},get text(){return r(n),u(()=>r(n).text)}})}),B(_,p),S()}export{j as S};
|
||||
import"./DsnmJJEf.js";import{i as v}from"./C7KraPli.js";import{p as w,l as m,q as s,g as r,m as g,h as x,B as h,a as T,b as B,c as S,k,u}from"./cPTQ2Ibn.js";import{k as A}from"./BIepGqC5.js";import{p as d}from"./DqFqoVWr.js";import{k as b,B as C}from"./Cr2hBuns.js";import{f as E}from"./ow_oMtSd.js";function j(_,i){w(i,!1);const c=g(),n=g();let e=d(i,"item",8),l=d(i,"statusType",8,"entity"),a=d(i,"statusField",8,"status");m(()=>(s(e()),s(a())),()=>{k(c,e()?.[a()]||"unknown")}),m(()=>(s(e()),s(l()),r(c),s(a())),()=>{k(n,(()=>{if(!e())return{variant:"error",text:"Unknown"};switch(l()){case"entity":return b(e());case"instance":let t="secondary";switch(r(c).toLowerCase()){case"running":t="success";break;case"stopped":t="info";break;case"creating":case"pending_create":t="warning";break;case"deleting":case"pending_delete":case"pending_force_delete":t="warning";break;case"error":case"deleted":t="error";break;case"active":case"online":t="success";break;case"idle":t="info";break;case"pending":case"installing":t="warning";break;case"failed":case"terminated":case"offline":t="error";break;case"unknown":default:t="secondary";break}return{variant:t,text:E(r(c))};case"enabled":return{variant:e().enabled?"success":"error",text:e().enabled?"Enabled":"Disabled"};case"custom":const o=e()[a()]||"Unknown";if(a()==="auth-type"){const f=o==="pat"||!o?"pat":"app";return{variant:f==="pat"?"success":"info",text:f==="pat"?"PAT":"App"}}return{variant:"info",text:o};default:return b(e())}})())}),x(),v();var p=h(),y=T(p);A(y,()=>(s(e()),s(a()),u(()=>`${e()?.name||"item"}-${e()?.[a()]||"status"}-${e()?.updated_at||"time"}`)),t=>{C(t,{get variant(){return r(n),u(()=>r(n).variant)},get text(){return r(n),u(()=>r(n).text)}})}),B(_,p),S()}export{j as S};
|
||||
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"./DsnmJJEf.js";import{i as R}from"./C7KraPli.js";import{p as j,l as w,h as A,f as g,t as k,b as v,c as B,s as D,d as u,k as _,m as y,r as m,q as f,u as h,g as d,e as U}from"./cPTQ2Ibn.js";import{p as o,i as F}from"./DqFqoVWr.js";import{c as b,s as G,d as n}from"./DqbUkQgD.js";var H=g('<div class="text-sm text-gray-500 dark:text-gray-400 truncate"> </div>'),J=g('<div class="w-full min-w-0 text-sm font-medium"><a> </a><!></div>');function V(x,a){j(a,!1);const i=y(),p=y();let e=o(a,"item",8),s=o(a,"entityType",8,"repository"),E=o(a,"showOwner",8,!1),I=o(a,"showId",8,!1),z=o(a,"fontMono",8,!1);function C(){if(!e())return"Unknown";switch(s()){case"repository":return E()?`${e().owner||"Unknown"}/${e().name||"Unknown"}`:e().name||"Unknown";case"organization":case"enterprise":return e().name||"Unknown";case"pool":return I()?e().id||"Unknown":e().name||"Unknown";case"scaleset":return e().name||"Unknown";case"instance":return e().name||"Unknown";case"template":return e().name||"Unknown";default:return e().name||e().id||"Unknown"}}function M(){if(!e())return"#";let t;switch(s()){case"instance":t=e().name;break;default:t=e().id||e().name;break}if(!t)return"#";switch(s()){case"repository":return n(`/repositories/${t}`);case"organization":return n(`/organizations/${t}`);case"enterprise":return n(`/enterprises/${t}`);case"pool":return n(`/pools/${t}`);case"scaleset":return n(`/scalesets/${t}`);case"instance":return n(`/instances/${encodeURIComponent(t)}`);case"template":return n(`/templates/${t}`);default:return"#"}}w(()=>{},()=>{_(i,C())}),w(()=>{},()=>{_(p,M())}),A(),R();var c=J(),r=u(c),N=u(r,!0);m(r);var O=D(r);{var T=t=>{var l=H(),q=u(l,!0);m(l),k(()=>U(q,(f(e()),h(()=>e().provider_id)))),v(t,l)};F(O,t=>{f(s()),f(e()),h(()=>s()==="instance"&&e()?.provider_id)&&t(T)})}m(c),k(()=>{b(r,"href",d(p)),G(r,1,`block w-full truncate text-blue-600 dark:text-blue-400 hover:text-blue-500 dark:hover:text-blue-300 ${z()?"font-mono":""}`),b(r,"title",d(i)),U(N,d(i))}),v(x,c),B()}export{V as E};
|
||||
import"./DsnmJJEf.js";import{i as R}from"./C7KraPli.js";import{p as j,l as w,h as A,f as g,t as k,b as v,c as B,s as D,d as u,k as _,m as y,r as m,q as f,u as h,g as d,e as U}from"./cPTQ2Ibn.js";import{p as o,i as F}from"./DqFqoVWr.js";import{c as b,s as G,d as n}from"./yWyZZHPR.js";var H=g('<div class="text-sm text-gray-500 dark:text-gray-400 truncate"> </div>'),J=g('<div class="w-full min-w-0 text-sm font-medium"><a> </a><!></div>');function V(x,a){j(a,!1);const i=y(),p=y();let e=o(a,"item",8),s=o(a,"entityType",8,"repository"),E=o(a,"showOwner",8,!1),I=o(a,"showId",8,!1),z=o(a,"fontMono",8,!1);function C(){if(!e())return"Unknown";switch(s()){case"repository":return E()?`${e().owner||"Unknown"}/${e().name||"Unknown"}`:e().name||"Unknown";case"organization":case"enterprise":return e().name||"Unknown";case"pool":return I()?e().id||"Unknown":e().name||"Unknown";case"scaleset":return e().name||"Unknown";case"instance":return e().name||"Unknown";case"template":return e().name||"Unknown";default:return e().name||e().id||"Unknown"}}function M(){if(!e())return"#";let t;switch(s()){case"instance":t=e().name;break;default:t=e().id||e().name;break}if(!t)return"#";switch(s()){case"repository":return n(`/repositories/${t}`);case"organization":return n(`/organizations/${t}`);case"enterprise":return n(`/enterprises/${t}`);case"pool":return n(`/pools/${t}`);case"scaleset":return n(`/scalesets/${t}`);case"instance":return n(`/instances/${encodeURIComponent(t)}`);case"template":return n(`/templates/${t}`);default:return"#"}}w(()=>{},()=>{_(i,C())}),w(()=>{},()=>{_(p,M())}),A(),R();var c=J(),r=u(c),N=u(r,!0);m(r);var O=D(r);{var T=t=>{var l=H(),q=u(l,!0);m(l),k(()=>U(q,(f(e()),h(()=>e().provider_id)))),v(t,l)};F(O,t=>{f(s()),f(e()),h(()=>s()==="instance"&&e()?.provider_id)&&t(T)})}m(c),k(()=>{b(r,"href",d(p)),G(r,1,`block w-full truncate text-blue-600 dark:text-blue-400 hover:text-blue-500 dark:hover:text-blue-300 ${z()?"font-mono":""}`),b(r,"title",d(i)),U(N,d(i))}),v(x,c),B()}export{V as E};
|
||||
|
|
@ -1 +1 @@
|
|||
import"./DsnmJJEf.js";import{i as q}from"./C7KraPli.js";import{p as A,E as F,f as y,s as l,d as t,r as a,z as $,D as b,b as o,t as p,e as n,c as G}from"./cPTQ2Ibn.js";import{p as v,i as H}from"./DqFqoVWr.js";import{M as I}from"./Bo3f8OIz.js";import{B as w}from"./DqbUkQgD.js";var J=y('<p class="mt-1 font-medium text-gray-900 dark:text-white"> </p>'),K=y('<div class="max-w-xl w-full p-6"><div class="mx-auto flex items-center justify-center h-12 w-12 rounded-full bg-red-100 dark:bg-red-900 mb-4"><svg class="h-6 w-6 text-red-600 dark:text-red-400" 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 W(D,s){A(s,!1);let M=v(s,"title",8),j=v(s,"message",8),g=v(s,"itemName",8,""),d=v(s,"loading",8,!1);const c=F();function B(){c("confirm")}q(),I(D,{$$events:{close:()=>c("close")},children:(C,O)=>{var m=K(),f=l(t(m),2),u=t(f),P=t(u,!0);a(u);var h=l(u,2),x=t(h),z=t(x,!0);a(x);var E=l(x,2);{var L=e=>{var i=J(),r=t(i,!0);a(i),p(()=>n(r,g())),o(e,i)};H(E,e=>{g()&&e(L)})}a(h),a(f);var _=l(f,2),k=t(_);w(k,{variant:"secondary",get disabled(){return d()},$$events:{click:()=>c("close")},children:(e,i)=>{$();var r=b("Cancel");o(e,r)},$$slots:{default:!0}});var N=l(k,2);w(N,{variant:"danger",get disabled(){return d()},get loading(){return d()},$$events:{click:B},children:(e,i)=>{$();var r=b();p(()=>n(r,d()?"Deleting...":"Delete")),o(e,r)},$$slots:{default:!0}}),a(_),a(m),p(()=>{n(P,M()),n(z,j())}),o(C,m)},$$slots:{default:!0}}),G()}export{W as D};
|
||||
import"./DsnmJJEf.js";import{i as q}from"./C7KraPli.js";import{p as A,E as F,f as y,s as l,d as t,r as a,z as $,D as b,b as o,t as p,e as n,c as G}from"./cPTQ2Ibn.js";import{p as v,i as H}from"./DqFqoVWr.js";import{M as I}from"./ao5EljEX.js";import{B as w}from"./yWyZZHPR.js";var J=y('<p class="mt-1 font-medium text-gray-900 dark:text-white"> </p>'),K=y('<div class="max-w-xl w-full p-6"><div class="mx-auto flex items-center justify-center h-12 w-12 rounded-full bg-red-100 dark:bg-red-900 mb-4"><svg class="h-6 w-6 text-red-600 dark:text-red-400" 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 W(D,s){A(s,!1);let M=v(s,"title",8),j=v(s,"message",8),g=v(s,"itemName",8,""),d=v(s,"loading",8,!1);const c=F();function B(){c("confirm")}q(),I(D,{$$events:{close:()=>c("close")},children:(C,O)=>{var m=K(),f=l(t(m),2),u=t(f),P=t(u,!0);a(u);var h=l(u,2),x=t(h),z=t(x,!0);a(x);var E=l(x,2);{var L=e=>{var i=J(),r=t(i,!0);a(i),p(()=>n(r,g())),o(e,i)};H(E,e=>{g()&&e(L)})}a(h),a(f);var _=l(f,2),k=t(_);w(k,{variant:"secondary",get disabled(){return d()},$$events:{click:()=>c("close")},children:(e,i)=>{$();var r=b("Cancel");o(e,r)},$$slots:{default:!0}});var N=l(k,2);w(N,{variant:"danger",get disabled(){return d()},get loading(){return d()},$$events:{click:B},children:(e,i)=>{$();var r=b();p(()=>n(r,d()?"Deleting...":"Delete")),o(e,r)},$$slots:{default:!0}}),a(_),a(m),p(()=>{n(P,M()),n(z,j())}),o(C,m)},$$slots:{default:!0}}),G()}export{W as D};
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
import{d,s as w,f as x}from"./DqbUkQgD.js";import"./DsnmJJEf.js";import{i as k}from"./C7KraPli.js";import{p as b,l as _,q as c,h as v,f as y,t as h,b as E,c as B,k as z,m as L,d as M,r as j,g as T,e as U}from"./cPTQ2Ibn.js";import{p as o}from"./DqFqoVWr.js";function q(e){if(!e)return"N/A";try{return(typeof e=="string"?new Date(e):e).toLocaleString()}catch{return"Invalid Date"}}function A(e,r="w-4 h-4"){return e==="gitea"?`<svg class="${r}" 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>`:e==="github"?`<div class="inline-flex ${r}"><svg class="${r} 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="${r} 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="${r} text-gray-400" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
import{d,s as w,f as x}from"./yWyZZHPR.js";import"./DsnmJJEf.js";import{i as k}from"./C7KraPli.js";import{p as b,l as _,q as c,h as v,f as y,t as h,b as E,c as B,k as z,m as L,d as M,r as j,g as T,e as U}from"./cPTQ2Ibn.js";import{p as o}from"./DqFqoVWr.js";function q(e){if(!e)return"N/A";try{return(typeof e=="string"?new Date(e):e).toLocaleString()}catch{return"Invalid Date"}}function A(e,r="w-4 h-4"){return e==="gitea"?`<svg class="${r}" 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>`:e==="github"?`<div class="inline-flex ${r}"><svg class="${r} 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="${r} 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="${r} 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 C(e,r){if(e.repo_name)return e.repo_name;if(e.org_name)return e.org_name;if(e.enterprise_name)return e.enterprise_name;if(e.repo_id&&!e.repo_name&&r?.repositories){const n=r.repositories.find(t=>t.id===e.repo_id);return n?`${n.owner}/${n.name}`:"Unknown Entity"}if(e.org_id&&!e.org_name&&r?.organizations){const n=r.organizations.find(t=>t.id===e.org_id);return n&&n.name?n.name:"Unknown Entity"}if(e.enterprise_id&&!e.enterprise_name&&r?.enterprises){const n=r.enterprises.find(t=>t.id===e.enterprise_id);return n&&n.name?n.name:"Unknown Entity"}return"Unknown Entity"}function H(e){return e.repo_id?"repository":e.org_id?"organization":e.enterprise_id?"enterprise":"unknown"}function P(e){return e.repo_id?d(`/repositories/${e.repo_id}`):e.org_id?d(`/organizations/${e.org_id}`):e.enterprise_id?d(`/enterprises/${e.enterprise_id}`):"#"}function V(e){e&&(e.scrollTop=e.scrollHeight)}function W(e){return{newPerPage:e,newCurrentPage:1}}function G(e){return e.pool_manager_status?.running?{text:"Running",variant:"success"}:{text:"Stopped",variant:"error"}}function J(e){switch(e.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:e,variant:"info"}}}function l(e,r,n){if(!r.trim())return e;const t=r.toLowerCase();return e.filter(a=>typeof n=="function"?n(a).toLowerCase().includes(t):n.some(i=>a[i]?.toString().toLowerCase().includes(t)))}function K(e,r){return l(e,r,["name","owner"])}function O(e,r){return l(e,r,["name"])}function Q(e,r){return l(e,r,n=>[n.name||"",n.description||"",n.endpoint?.name||""].join(" "))}function X(e,r){return l(e,r,["name","description","base_url","api_base_url"])}function Y(e,r,n){return e.slice((r-1)*n,r*n)}var I=y("<span> </span>");function Z(e,r){b(r,!1);const n=L();let t=o(r,"variant",8,"gray"),a=o(r,"size",8,"sm"),i=o(r,"text",8),g=o(r,"ring",8,!1);const u={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"},f={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"},p={sm:"px-2 py-1 text-xs",md:"px-2.5 py-0.5 text-xs"};_(()=>(c(t()),c(a()),c(g())),()=>{z(n,["inline-flex items-center rounded-full font-semibold",u[t()],p[a()],g()?`ring-1 ring-inset ${f[t()]}`:""].filter(Boolean).join(" "))}),v(),k();var s=I(),m=M(s,!0);j(s),h(()=>{w(s,1,x(T(n))),U(m,i())}),E(e,s),B()}export{Z as B,X as a,q as b,W as c,J as d,C as e,Q as f,A as g,l as h,H as i,P as j,G as k,O as l,K as m,Y as p,V as s};
|
||||
|
|
@ -1 +1 @@
|
|||
import{s as e}from"./CTvJf3dP.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"./Br47IbuU.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"./DsnmJJEf.js";import{i as j}from"./C7KraPli.js";import{p as E,E as G,f as S,d as t,r,s as g,u,q as p,z as m,t as q,e as z,i as f,b as D,c as H}from"./cPTQ2Ibn.js";import{h as y,s as h}from"./DqbUkQgD.js";import{p as v}from"./DqFqoVWr.js";import{g as o}from"./DJsB5Z5V.js";var I=S('<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=G();let i=v(s,"selectedForgeType",12,""),_=v(s,"label",8,"Select Forge Type");function n(c){i(c),k("select",c)}j();var d=I(),l=t(d),F=t(l,!0);r(l);var b=g(l,2),e=t(b),w=t(e);y(w,()=>(p(o),u(()=>o("github","w-8 h-8")))),m(2),r(e);var a=g(e,2),T=t(a);y(T,()=>(p(o),u(()=>o("gitea","w-8 h-8")))),m(2),r(a),r(b),r(d),q(()=>{z(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"}`)}),f("click",e,()=>n("github")),f("click",a,()=>n("gitea")),D(x,d),H()}export{M as F};
|
||||
import"./DsnmJJEf.js";import{i as j}from"./C7KraPli.js";import{p as E,E as G,f as S,d as t,r,s as g,u,q as p,z as m,t as q,e as z,i as f,b as D,c as H}from"./cPTQ2Ibn.js";import{h as y,s as h}from"./yWyZZHPR.js";import{p as v}from"./DqFqoVWr.js";import{g as o}from"./Cr2hBuns.js";var I=S('<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=G();let i=v(s,"selectedForgeType",12,""),_=v(s,"label",8,"Select Forge Type");function n(c){i(c),k("select",c)}j();var d=I(),l=t(d),F=t(l,!0);r(l);var b=g(l,2),e=t(b),w=t(e);y(w,()=>(p(o),u(()=>o("github","w-8 h-8")))),m(2),r(e);var a=g(e,2),T=t(a);y(T,()=>(p(o),u(()=>o("gitea","w-8 h-8")))),m(2),r(a),r(b),r(d),q(()=>{z(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"}`)}),f("click",e,()=>n("github")),f("click",a,()=>n("gitea")),D(x,d),H()}export{M as F};
|
||||
|
|
@ -1 +1 @@
|
|||
import{s as t,p as r}from"./CTvJf3dP.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 s=e;export{s as p};
|
||||
import{s as t,p as r}from"./Br47IbuU.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 s=e;export{s as p};
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -1 +1 @@
|
|||
import{F as w}from"./cPTQ2Ibn.js";import{g as r}from"./DqbUkQgD.js";const m=!0,z=m,I=()=>window.location.port==="5173",b={isAuthenticated:!1,user:null,loading:!0,needsInitialization:!1},n=w(b);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 o=e[i];for(;o.charAt(0)===" ";)o=o.substring(1,o.length);if(o.indexOf(a)===0)return o.substring(a.length,o.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{n.update(i=>({...i,loading:!0}));const e=await r.login({username:t,password:a});z&&(f("garm_token",e.token),f("garm_user",t)),r.setToken(e.token),n.set({isAuthenticated:!0,user:t,loading:!1,needsInitialization:!1})}catch(e){throw n.update(i=>({...i,loading:!1})),e}},logout(){g("garm_token"),g("garm_user"),n.set({isAuthenticated:!1,user:null,loading:!1,needsInitialization:!1})},async init(){try{n.update(e=>({...e,loading:!0})),await c.checkInitializationStatus();const t=d("garm_token"),a=d("garm_user");if(t&&a&&(r.setToken(t),await c.checkAuth())){n.set({isAuthenticated:!0,user:a,loading:!1,needsInitialization:!1});return}n.update(e=>({...e,loading:!1,needsInitialization:!1}))}catch{n.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 n.update(s=>({...s,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 r.getControllerInfo(),!0}catch(t){return t instanceof Error&&t.message==="Initialization required"?!1:t?.response?.status===409&&t?.response?.data?.error==="init_required"?(n.update(a=>({...a,needsInitialization:!0,loading:!1})),!1):(c.logout(),!1)}},async initialize(t,a,e,i,o){try{n.update(u=>({...u,loading:!0}));const s=await r.firstRun({username:t,email:a,password:e,full_name:i||t});await c.login(t,e);const l=window.location.origin,h=o?.metadataUrl||`${l}/api/v1/metadata`,p=o?.callbackUrl||`${l}/api/v1/callbacks`,k=o?.webhookUrl||`${l}/webhooks`;await r.updateController({metadata_url:h,callback_url:p,webhook_url:k}),n.update(u=>({...u,needsInitialization:!1}))}catch(s){throw n.update(l=>({...l,loading:!1})),s}}};export{n as a,c as b};
|
||||
import{F as w}from"./cPTQ2Ibn.js";import{g as r}from"./yWyZZHPR.js";const m=!0,z=m,I=()=>window.location.port==="5173",b={isAuthenticated:!1,user:null,loading:!0,needsInitialization:!1},n=w(b);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 o=e[i];for(;o.charAt(0)===" ";)o=o.substring(1,o.length);if(o.indexOf(a)===0)return o.substring(a.length,o.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{n.update(i=>({...i,loading:!0}));const e=await r.login({username:t,password:a});z&&(f("garm_token",e.token),f("garm_user",t)),r.setToken(e.token),n.set({isAuthenticated:!0,user:t,loading:!1,needsInitialization:!1})}catch(e){throw n.update(i=>({...i,loading:!1})),e}},logout(){g("garm_token"),g("garm_user"),n.set({isAuthenticated:!1,user:null,loading:!1,needsInitialization:!1})},async init(){try{n.update(e=>({...e,loading:!0})),await c.checkInitializationStatus();const t=d("garm_token"),a=d("garm_user");if(t&&a&&(r.setToken(t),await c.checkAuth())){n.set({isAuthenticated:!0,user:a,loading:!1,needsInitialization:!1});return}n.update(e=>({...e,loading:!1,needsInitialization:!1}))}catch{n.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 n.update(s=>({...s,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 r.getControllerInfo(),!0}catch(t){return t instanceof Error&&t.message==="Initialization required"?!1:t?.response?.status===409&&t?.response?.data?.error==="init_required"?(n.update(a=>({...a,needsInitialization:!0,loading:!1})),!1):(c.logout(),!1)}},async initialize(t,a,e,i,o){try{n.update(u=>({...u,loading:!0}));const s=await r.firstRun({username:t,email:a,password:e,full_name:i||t});await c.login(t,e);const l=window.location.origin,h=o?.metadataUrl||`${l}/api/v1/metadata`,p=o?.callbackUrl||`${l}/api/v1/callbacks`,k=o?.webhookUrl||`${l}/webhooks`;await r.updateController({metadata_url:h,callback_url:p,webhook_url:k}),n.update(u=>({...u,needsInitialization:!1}))}catch(s){throw n.update(l=>({...l,loading:!1})),s}}};export{n as a,c as b};
|
||||
|
|
@ -1 +1 @@
|
|||
import"./DsnmJJEf.js";import{i as _}from"./C7KraPli.js";import{p as k,f as E,t as C,u as i,q as t,e as f,b as P,c as j,s as q,d as l,r as o}from"./cPTQ2Ibn.js";import{c as z}from"./DqbUkQgD.js";import{p as n}from"./DqFqoVWr.js";import{j as x,e as c,i as u}from"./DJsB5Z5V.js";var N=E('<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){k(r,!1);let e=n(r,"item",8),m=n(r,"eagerCache",8,null);_();var s=N(),a=l(s),v=l(a,!0);o(a);var p=q(a,2),g=l(p,!0);o(p),o(s),C((h,b,y)=>{z(a,"href",h),f(v,b),f(g,y)},[()=>(t(x),t(e()),i(()=>x(e()))),()=>(t(c),t(e()),t(m()),i(()=>c(e(),m()))),()=>(t(u),t(e()),i(()=>u(e())))]),P(d,s),j()}export{F as P};
|
||||
import"./DsnmJJEf.js";import{i as _}from"./C7KraPli.js";import{p as k,f as E,t as C,u as i,q as t,e as f,b as P,c as j,s as q,d as l,r as o}from"./cPTQ2Ibn.js";import{c as z}from"./yWyZZHPR.js";import{p as n}from"./DqFqoVWr.js";import{j as x,e as c,i as u}from"./Cr2hBuns.js";var N=E('<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){k(r,!1);let e=n(r,"item",8),m=n(r,"eagerCache",8,null);_();var s=N(),a=l(s),v=l(a,!0);o(a);var p=q(a,2),g=l(p,!0);o(p),o(s),C((h,b,y)=>{z(a,"href",h),f(v,b),f(g,y)},[()=>(t(x),t(e()),i(()=>x(e()))),()=>(t(c),t(e()),t(m()),i(()=>c(e(),m()))),()=>(t(u),t(e()),i(()=>u(e())))]),P(d,s),j()}export{F as P};
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -1 +1 @@
|
|||
import"./DsnmJJEf.js";import{i as D}from"./C7KraPli.js";import{p as P,f as I,d as s,r as n,s as u,u as l,q as i,t as w,e as S,b as N,c as A}from"./cPTQ2Ibn.js";import{d as f,c as F}from"./DqbUkQgD.js";import{p as d}from"./DqFqoVWr.js";import{D as E,G,A as j}from"./Du50aAe5.js";import{E as q}from"./CPFytHjx.js";import{S as g}from"./BZ2WxPPD.js";var L=I('<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){P(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:q,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)}D();var r=L(),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),w(t=>{S(T,`Instances (${i(e()),l(()=>e().length)??""})`),F(_,"href",t)},[()=>(i(f),l(()=>f("/instances")))]),N(y,r),A()}export{O as I};
|
||||
import"./DsnmJJEf.js";import{i as D}from"./C7KraPli.js";import{p as P,f as I,d as s,r as n,s as u,u as l,q as i,t as w,e as S,b as N,c as A}from"./cPTQ2Ibn.js";import{d as f,c as F}from"./yWyZZHPR.js";import{p as d}from"./DqFqoVWr.js";import{D as E,G,A as j}from"./BIepGqC5.js";import{E as q}from"./CVL5tSYq.js";import{S as g}from"./CMG1iQmM.js";var L=I('<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){P(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:q,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)}D();var r=L(),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),w(t=>{S(T,`Instances (${i(e()),l(()=>e().length)??""})`),F(_,"href",t)},[()=>(i(f),l(()=>f("/instances")))]),N(y,r),A()}export{O as I};
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -1 +1 @@
|
|||
import"./DsnmJJEf.js";import{i as u}from"./C7KraPli.js";import{p as v,E as m,f as h,d as r,r as d,i,b as k,c as g}from"./cPTQ2Ibn.js";import{i as b}from"./DqbUkQgD.js";var w=h('<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(s,t){v(t,!1);const l=m();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,t,"default",{}),d(e),d(a),i("click",e,c),i("click",a,n),i("keydown",a,f),k(s,a),g()}export{M};
|
||||
import"./DsnmJJEf.js";import{i as u}from"./C7KraPli.js";import{p as v,E as m,f as h,d as r,r as d,i,b as k,c as g}from"./cPTQ2Ibn.js";import{i as b}from"./yWyZZHPR.js";var w=h('<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(s,t){v(t,!1);const l=m();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,t,"default",{}),d(e),d(a),i("click",e,c),i("click",a,n),i("keydown",a,f),k(s,a),g()}export{M};
|
||||
|
|
@ -1 +1 @@
|
|||
import"./DsnmJJEf.js";import{i as ae}from"./C7KraPli.js";import{p as se,E as re,l as M,q as ie,k as r,g as t,m as k,h as le,f as p,d as v,s as $,r as f,b as l,c as oe,B as T,a as E,z as q,D as V,t as F,e as N,u as ne}from"./cPTQ2Ibn.js";import{p as R,i as m}from"./DqFqoVWr.js";import{g as h,B as G}from"./DqbUkQgD.js";import{t as y}from"./Bgbd8SZ5.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=k();let u=R(g,"entityType",8),s=R(g,"entityId",8),A=R(g,"entityName",8),i=k(null),o=k(!1),b=k(!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()),y.success("Webhook Installed",`Webhook for ${u()} ${A()} has been installed successfully.`),await _(),O("webhookStatusChanged",{installed:!0})}catch(e){y.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()),y.success("Webhook Uninstalled",`Webhook for ${u()} ${A()} has been uninstalled successfully.`),await _(),O("webhookStatusChanged",{installed:!1})}catch(e){y.error("Webhook Uninstall Failed",de(e))}finally{r(o,!1)}}M(()=>ie(s()),()=>{s()&&_()}),M(()=>t(i),()=>{r(x,t(i)&&t(i).active)}),le(),ae();var w=ue(),P=v(w),j=v(P),W=v(j),D=$(v(W),2),Q=v(D);{var X=e=>{var d=ce();l(e,d)},Y=e=>{var d=T(),z=E(d);{var I=a=>{var n=fe(),B=$(E(n),2);{var c=C=>{var U=ve(),te=v(U);f(U),F(()=>N(te,`URL: ${t(i),ne(()=>t(i).url||"N/A")??""}`)),l(C,U)};m(B,C=>{t(i)&&C(c)})}l(a,n)},S=a=>{var n=he();l(a,n)};m(z,a=>{t(x)?a(I):a(S,!1)},!0)}l(e,d)};m(Q,e=>{t(b)?e(X):e(Y,!1)})}f(D),f(W);var L=$(W,2),Z=v(L);{var ee=e=>{var d=T(),z=E(d);{var I=a=>{G(a,{variant:"danger",size:"sm",get disabled(){return t(o)},$$events:{click:K},children:(n,B)=>{q();var c=V();F(()=>N(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,B)=>{q();var c=V();F(()=>N(c,t(o)?"Installing...":"Install Webhook")),l(n,c)},$$slots:{default:!0}})};m(z,a=>{t(x)?a(I):a(S,!1)})}l(e,d)};m(Z,e=>{t(b)||e(ee)})}f(L),f(j),f(P),f(w),l(H,w),oe()}export{_e as W};
|
||||
import"./DsnmJJEf.js";import{i as ae}from"./C7KraPli.js";import{p as se,E as re,l as M,q as ie,k as r,g as t,m as k,h as le,f as p,d as v,s as $,r as f,b as l,c as oe,B as T,a as E,z as q,D as V,t as F,e as N,u as ne}from"./cPTQ2Ibn.js";import{p as R,i as m}from"./DqFqoVWr.js";import{g as h,B as G}from"./yWyZZHPR.js";import{t as y}from"./Bgbd8SZ5.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=k();let u=R(g,"entityType",8),s=R(g,"entityId",8),A=R(g,"entityName",8),i=k(null),o=k(!1),b=k(!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()),y.success("Webhook Installed",`Webhook for ${u()} ${A()} has been installed successfully.`),await _(),O("webhookStatusChanged",{installed:!0})}catch(e){y.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()),y.success("Webhook Uninstalled",`Webhook for ${u()} ${A()} has been uninstalled successfully.`),await _(),O("webhookStatusChanged",{installed:!1})}catch(e){y.error("Webhook Uninstall Failed",de(e))}finally{r(o,!1)}}M(()=>ie(s()),()=>{s()&&_()}),M(()=>t(i),()=>{r(x,t(i)&&t(i).active)}),le(),ae();var w=ue(),P=v(w),j=v(P),W=v(j),D=$(v(W),2),Q=v(D);{var X=e=>{var d=ce();l(e,d)},Y=e=>{var d=T(),z=E(d);{var I=a=>{var n=fe(),B=$(E(n),2);{var c=C=>{var U=ve(),te=v(U);f(U),F(()=>N(te,`URL: ${t(i),ne(()=>t(i).url||"N/A")??""}`)),l(C,U)};m(B,C=>{t(i)&&C(c)})}l(a,n)},S=a=>{var n=he();l(a,n)};m(z,a=>{t(x)?a(I):a(S,!1)},!0)}l(e,d)};m(Q,e=>{t(b)?e(X):e(Y,!1)})}f(D),f(W);var L=$(W,2),Z=v(L);{var ee=e=>{var d=T(),z=E(d);{var I=a=>{G(a,{variant:"danger",size:"sm",get disabled(){return t(o)},$$events:{click:K},children:(n,B)=>{q();var c=V();F(()=>N(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,B)=>{q();var c=V();F(()=>N(c,t(o)?"Installing...":"Install Webhook")),l(n,c)},$$slots:{default:!0}})};m(z,a=>{t(x)?a(I):a(S,!1)})}l(e,d)};m(Z,e=>{t(b)||e(ee)})}f(L),f(j),f(P),f(w),l(H,w),oe()}export{_e as W};
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -1 +0,0 @@
|
|||
import{l as o,a as r}from"../chunks/CTvJf3dP.js";export{o as load_css,r as start};
|
||||
1
webapp/assets/_app/immutable/entry/start.C9b9f19p.js
Normal file
1
webapp/assets/_app/immutable/entry/start.C9b9f19p.js
Normal file
|
|
@ -0,0 +1 @@
|
|||
import{l as o,a as r}from"../chunks/Br47IbuU.js";export{o as load_css,r as start};
|
||||
13
webapp/assets/_app/immutable/nodes/0.CZrswIpC.js
Normal file
13
webapp/assets/_app/immutable/nodes/0.CZrswIpC.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
|
|
@ -1 +1 @@
|
|||
import"../chunks/DsnmJJEf.js";import{i as h}from"../chunks/C7KraPli.js";import{p as c,f as l,a as v,t as u,b as _,c as d,d as s,r as e,s as g,e as p}from"../chunks/cPTQ2Ibn.js";import{p as o}from"../chunks/BgSaD1r_.js";var x=l("<h1> </h1> <p> </p>",1);function q(i,m){c(m,!1),h();var t=x(),r=v(t),f=s(r,!0);e(r);var a=g(r,2),n=s(a,!0);e(a),u(()=>{p(f,o.status),p(n,o.error?.message)}),_(i,t),d()}export{q as component};
|
||||
import"../chunks/DsnmJJEf.js";import{i as h}from"../chunks/C7KraPli.js";import{p as c,f as l,a as v,t as u,b as _,c as d,d as s,r as e,s as g,e as p}from"../chunks/cPTQ2Ibn.js";import{p as o}from"../chunks/DMSCYqmZ.js";var x=l("<h1> </h1> <p> </p>",1);function q(i,m){c(m,!1),h();var t=x(),r=v(t),f=s(r,!0);e(r);var a=g(r,2),n=s(a,!0);e(a),u(()=>{p(f,o.status),p(n,o.error?.message)}),_(i,t),d()}export{q as component};
|
||||
|
|
@ -1 +1 @@
|
|||
import"../chunks/DsnmJJEf.js";import{i as Z}from"../chunks/C7KraPli.js";import{p as ee,o as ae,l as re,h as te,f as K,j as se,t as _,g as a,i as k,b as w,c as de,$ as oe,s as d,D as ie,m as f,d as r,u as q,q as B,k as i,r as t,z as D,e as I}from"../chunks/cPTQ2Ibn.js";import{i as le,s as ne,a as ce}from"../chunks/DqFqoVWr.js";import{B as me,d as l,c as T,r as U}from"../chunks/DqbUkQgD.js";import{b as C}from"../chunks/B-_QCM7E.js";import{p as ue}from"../chunks/D4Caz1gY.js";import{g as H}from"../chunks/CTvJf3dP.js";import{a as pe,b as ve}from"../chunks/BVyy60Ai.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 Ae(W,F){ee(F,!1);const[J,N]=ne(),$=()=>ce(pe,"$authStore",J);let m=f(""),u=f(""),o=f(!1),n=f("");ae(()=>{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()}re(()=>($(),l),()=>{$().isAuthenticated&&H(l("/"))}),te(),Z();var g=he();se(e=>{oe.title="Login - GARM"});var z=r(g),h=r(z),A=r(h),S=r(A),Q=d(S,2);t(A),D(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),j=r(E),Y=r(j,!0);t(j),t(E),t(c),t(s),_(()=>I(Y,a(n))),w(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)=>{D();var c=ie();_(()=>I(c,a(o)?"Signing in...":"Sign in")),w(e,c)},$$slots:{default:!0}}),t(R),t(b),t(z),t(g),_((e,s)=>{T(S,"src",e),T(Q,"src",s),p.disabled=a(o),v.disabled=a(o)},[()=>(B(l),q(()=>l("/assets/garm-light.svg"))),()=>(B(l),q(()=>l("/assets/garm-dark.svg")))]),C(p,()=>a(m),e=>i(m,e)),k("keypress",p,L),C(v,()=>a(u),e=>i(u,e)),k("keypress",v,L),k("submit",b,ue(M)),w(W,g),de(),N()}export{Ae as component};
|
||||
import"../chunks/DsnmJJEf.js";import{i as Z}from"../chunks/C7KraPli.js";import{p as ee,o as ae,l as re,h as te,f as K,j as se,t as _,g as a,i as k,b as w,c as de,$ as oe,s as d,D as ie,m as f,d as r,u as q,q as B,k as i,r as t,z as D,e as I}from"../chunks/cPTQ2Ibn.js";import{i as le,s as ne,a as ce}from"../chunks/DqFqoVWr.js";import{B as me,d as l,c as T,r as U}from"../chunks/yWyZZHPR.js";import{b as C}from"../chunks/B-_QCM7E.js";import{p as ue}from"../chunks/D4Caz1gY.js";import{g as H}from"../chunks/Br47IbuU.js";import{a as pe,b as ve}from"../chunks/DVwzA4-Q.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 Ae(W,F){ee(F,!1);const[J,N]=ne(),$=()=>ce(pe,"$authStore",J);let m=f(""),u=f(""),o=f(!1),n=f("");ae(()=>{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()}re(()=>($(),l),()=>{$().isAuthenticated&&H(l("/"))}),te(),Z();var g=he();se(e=>{oe.title="Login - GARM"});var z=r(g),h=r(z),A=r(h),S=r(A),Q=d(S,2);t(A),D(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),j=r(E),Y=r(j,!0);t(j),t(E),t(c),t(s),_(()=>I(Y,a(n))),w(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)=>{D();var c=ie();_(()=>I(c,a(o)?"Signing in...":"Sign in")),w(e,c)},$$slots:{default:!0}}),t(R),t(b),t(z),t(g),_((e,s)=>{T(S,"src",e),T(Q,"src",s),p.disabled=a(o),v.disabled=a(o)},[()=>(B(l),q(()=>l("/assets/garm-light.svg"))),()=>(B(l),q(()=>l("/assets/garm-dark.svg")))]),C(p,()=>a(m),e=>i(m,e)),k("keypress",p,L),C(v,()=>a(u),e=>i(u,e)),k("keypress",v,L),k("submit",b,ue(M)),w(W,g),de(),N()}export{Ae 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
File diff suppressed because one or more lines are too long
1
webapp/assets/_app/immutable/nodes/7.2oZviKjs.js
Normal file
1
webapp/assets/_app/immutable/nodes/7.2oZviKjs.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
|
|
@ -1 +1 @@
|
|||
{"version":"1758549499990"}
|
||||
{"version":"1758636468030"}
|
||||
|
|
@ -71,11 +71,11 @@
|
|||
})();
|
||||
</script>
|
||||
|
||||
<link rel="modulepreload" href="/ui/_app/immutable/entry/start.-FfRLqKC.js">
|
||||
<link rel="modulepreload" href="/ui/_app/immutable/chunks/CTvJf3dP.js">
|
||||
<link rel="modulepreload" href="/ui/_app/immutable/entry/start.C9b9f19p.js">
|
||||
<link rel="modulepreload" href="/ui/_app/immutable/chunks/Br47IbuU.js">
|
||||
<link rel="modulepreload" href="/ui/_app/immutable/chunks/cPTQ2Ibn.js">
|
||||
<link rel="modulepreload" href="/ui/_app/immutable/chunks/D7e9zx6w.js">
|
||||
<link rel="modulepreload" href="/ui/_app/immutable/entry/app.B4u5nxVj.js">
|
||||
<link rel="modulepreload" href="/ui/_app/immutable/chunks/BMOcKgHw.js">
|
||||
<link rel="modulepreload" href="/ui/_app/immutable/entry/app.C-ablTrw.js">
|
||||
<link rel="modulepreload" href="/ui/_app/immutable/chunks/DsnmJJEf.js">
|
||||
<link rel="modulepreload" href="/ui/_app/immutable/chunks/DqFqoVWr.js">
|
||||
<link rel="modulepreload" href="/ui/_app/immutable/chunks/41x1-UqF.js">
|
||||
|
|
@ -85,7 +85,7 @@
|
|||
<div style="display: contents">
|
||||
<script>
|
||||
{
|
||||
__sveltekit_ppz5de = {
|
||||
__sveltekit_1gg6hf8 = {
|
||||
base: "/ui",
|
||||
assets: "/ui"
|
||||
};
|
||||
|
|
@ -93,8 +93,8 @@
|
|||
const element = document.currentScript.parentElement;
|
||||
|
||||
Promise.all([
|
||||
import("/ui/_app/immutable/entry/start.-FfRLqKC.js"),
|
||||
import("/ui/_app/immutable/entry/app.B4u5nxVj.js")
|
||||
import("/ui/_app/immutable/entry/start.C9b9f19p.js"),
|
||||
import("/ui/_app/immutable/entry/app.C-ablTrw.js")
|
||||
]).then(([kit, app]) => {
|
||||
kit.start(app, element);
|
||||
});
|
||||
|
|
|
|||
|
|
@ -12,23 +12,9 @@
|
|||
onMount(() => {
|
||||
auth.init();
|
||||
themeStore.init();
|
||||
|
||||
// Check for redirect after auth state settles
|
||||
setTimeout(() => {
|
||||
const isLoginPage = page.url.pathname === resolve('/login');
|
||||
const isInitPage = page.url.pathname === resolve('/init');
|
||||
|
||||
if (!isLoginPage && !isInitPage && !$authStore.isAuthenticated && !$authStore.loading) {
|
||||
if ($authStore.needsInitialization) {
|
||||
goto(resolve('/init'));
|
||||
} else {
|
||||
goto(resolve('/login'));
|
||||
}
|
||||
}
|
||||
}, 200);
|
||||
});
|
||||
|
||||
// Reactive redirect logic
|
||||
// Reactive redirect logic - handles all redirects
|
||||
$: {
|
||||
if (!$authStore.loading) {
|
||||
const isLoginPage = page.url.pathname === resolve('/login');
|
||||
|
|
@ -36,9 +22,9 @@
|
|||
|
||||
if (!isLoginPage && !isInitPage && !$authStore.isAuthenticated) {
|
||||
if ($authStore.needsInitialization) {
|
||||
goto(resolve('/init'));
|
||||
goto(resolve('/init'), { replaceState: true });
|
||||
} else {
|
||||
goto(resolve('/login'));
|
||||
goto(resolve('/login'), { replaceState: true });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -46,7 +32,10 @@
|
|||
|
||||
$: isLoginPage = page.url.pathname === resolve('/login');
|
||||
$: isInitPage = page.url.pathname === resolve('/init');
|
||||
$: requiresAuth = !isLoginPage && !isInitPage;
|
||||
$: shouldShowInitPage = $authStore.needsInitialization && !$authStore.isAuthenticated && !$authStore.loading;
|
||||
$: shouldShowLoginPage = !$authStore.needsInitialization && !$authStore.isAuthenticated && !$authStore.loading;
|
||||
$: shouldShowMainLayout = $authStore.isAuthenticated && !$authStore.loading;
|
||||
$: shouldShowRedirect = !shouldShowInitPage && !shouldShowLoginPage && !shouldShowMainLayout;
|
||||
</script>
|
||||
|
||||
<svelte:head>
|
||||
|
|
@ -60,17 +49,10 @@
|
|||
<p class="mt-4 text-gray-500 dark:text-gray-400">Loading...</p>
|
||||
</div>
|
||||
</div>
|
||||
{:else if requiresAuth && !$authStore.isAuthenticated}
|
||||
<!-- Redirect to login handled by load function -->
|
||||
<div class="min-h-screen flex items-center justify-center bg-gray-50 dark:bg-gray-900">
|
||||
<div class="text-center">
|
||||
<p class="text-gray-600 dark:text-gray-400">Redirecting to login...</p>
|
||||
</div>
|
||||
</div>
|
||||
{:else if isLoginPage || isInitPage}
|
||||
{:else if shouldShowLoginPage || shouldShowInitPage}
|
||||
<!-- Login/Init page - no navigation -->
|
||||
<slot />
|
||||
{:else}
|
||||
{:else if shouldShowMainLayout}
|
||||
<!-- Main app layout with sidebar -->
|
||||
<div class="min-h-screen bg-gray-100 dark:bg-gray-900">
|
||||
<Navigation />
|
||||
|
|
@ -83,6 +65,20 @@
|
|||
</main>
|
||||
</div>
|
||||
</div>
|
||||
{:else if shouldShowRedirect}
|
||||
<!-- Redirect to login/init handled by reactive logic -->
|
||||
<div class="min-h-screen flex items-center justify-center bg-gray-50 dark:bg-gray-900">
|
||||
<div class="text-center">
|
||||
<div class="animate-spin rounded-full h-8 w-8 border-b-2 border-blue-600 mx-auto mb-4"></div>
|
||||
<p class="text-gray-600 dark:text-gray-400">
|
||||
{#if $authStore.needsInitialization}
|
||||
Redirecting to initialization...
|
||||
{:else}
|
||||
Redirecting to login...
|
||||
{/if}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
<!-- Toast notifications (rendered globally) -->
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<script lang="ts">
|
||||
import { onMount } from 'svelte';
|
||||
import { garmApi } from '$lib/api/client.js';
|
||||
import type { ForgeCredentials, ForgeEndpoint, CreateGithubCredentialsParams, GithubPAT, GithubApp } from '$lib/api/generated/api.js';
|
||||
import type { ForgeCredentials, ForgeEndpoint, CreateGithubCredentialsParams, CreateGiteaCredentialsParams, GithubPAT, GithubApp } from '$lib/api/generated/api.js';
|
||||
// AuthType constants
|
||||
const AuthType = {
|
||||
PAT: 'pat',
|
||||
|
|
@ -270,9 +270,43 @@
|
|||
try {
|
||||
// Use selected forge type to determine which API to call
|
||||
if (selectedForgeType === 'github') {
|
||||
await garmApi.createGithubCredentials(formData);
|
||||
// Build the correct nested structure for GitHub credentials
|
||||
const githubParams: CreateGithubCredentialsParams = {
|
||||
name: formData.name.trim(),
|
||||
description: formData.description.trim(),
|
||||
endpoint: formData.endpoint.trim(),
|
||||
auth_type: formData.auth_type
|
||||
};
|
||||
|
||||
if (formData.auth_type === AuthType.PAT) {
|
||||
githubParams.pat = {
|
||||
oauth2_token: formData.oauth2_token.trim()
|
||||
};
|
||||
githubParams.app = {}; // Empty app object for PAT
|
||||
} else {
|
||||
githubParams.app = {
|
||||
app_id: parseInt(formData.app_id.trim()),
|
||||
installation_id: parseInt(formData.installation_id.trim()),
|
||||
private_key_bytes: Array.from(atob(formData.private_key_bytes), char => char.charCodeAt(0))
|
||||
};
|
||||
githubParams.pat = {}; // Empty PAT object for App
|
||||
}
|
||||
|
||||
await garmApi.createGithubCredentials(githubParams);
|
||||
} else if (selectedForgeType === 'gitea') {
|
||||
await garmApi.createGiteaCredentials(formData);
|
||||
// Build the correct nested structure for Gitea credentials (PAT only)
|
||||
const giteaParams: CreateGiteaCredentialsParams = {
|
||||
name: formData.name.trim(),
|
||||
description: formData.description.trim(),
|
||||
endpoint: formData.endpoint.trim(),
|
||||
auth_type: AuthType.PAT, // Gitea only supports PAT
|
||||
pat: {
|
||||
oauth2_token: formData.oauth2_token.trim()
|
||||
},
|
||||
app: {} // Empty app object since Gitea only supports PAT
|
||||
};
|
||||
|
||||
await garmApi.createGiteaCredentials(giteaParams);
|
||||
} else {
|
||||
throw new Error('Please select a forge type');
|
||||
}
|
||||
|
|
|
|||
|
|
@ -66,8 +66,7 @@
|
|||
'GARM has been successfully initialized. Welcome!'
|
||||
);
|
||||
|
||||
// Redirect to dashboard
|
||||
goto(resolve('/'));
|
||||
// Redirect will happen automatically via reactive statement when auth state updates
|
||||
} catch (err) {
|
||||
error = extractAPIError(err);
|
||||
} finally {
|
||||
|
|
@ -89,12 +88,14 @@
|
|||
}
|
||||
});
|
||||
|
||||
// Redirect if auth state changes
|
||||
// Redirect if auth state changes (only if not currently submitting)
|
||||
$: {
|
||||
if ($authStore.isAuthenticated) {
|
||||
goto(resolve('/'));
|
||||
} else if (!$authStore.needsInitialization && !$authStore.loading) {
|
||||
goto(resolve('/login'));
|
||||
if (!loading) {
|
||||
if ($authStore.isAuthenticated) {
|
||||
goto(resolve('/'));
|
||||
} else if (!$authStore.needsInitialization && !$authStore.loading) {
|
||||
goto(resolve('/login'));
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -456,13 +456,13 @@ describe('Comprehensive Integration Tests for Init Page', () => {
|
|||
// Submit form
|
||||
await fireEvent.click(submitButton);
|
||||
|
||||
// Should show toast and redirect
|
||||
// Should show toast (redirect happens via layout reactive statements)
|
||||
await waitFor(() => {
|
||||
expect(toastStore.success).toHaveBeenCalledWith(
|
||||
'GARM Initialized',
|
||||
'GARM has been successfully initialized. Welcome!'
|
||||
);
|
||||
expect(goto).toHaveBeenCalledWith('/');
|
||||
// Note: redirect now happens via layout reactive statements, not direct goto() call
|
||||
});
|
||||
});
|
||||
|
||||
|
|
@ -838,9 +838,9 @@ describe('Comprehensive Integration Tests for Init Page', () => {
|
|||
// Submit form
|
||||
await fireEvent.click(submitButton);
|
||||
|
||||
// Should navigate to dashboard with resolved path
|
||||
// Should call auth.initialize successfully (navigation happens via layout reactive statements)
|
||||
await waitFor(() => {
|
||||
expect(goto).toHaveBeenCalledWith('/');
|
||||
expect(auth.initialize).toHaveBeenCalled();
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -338,7 +338,7 @@ describe('Init Page - Unit Tests', () => {
|
|||
'GARM Initialized',
|
||||
'GARM has been successfully initialized. Welcome!'
|
||||
);
|
||||
expect(goto).toHaveBeenCalledWith('/');
|
||||
// Note: redirect now happens via layout reactive statements, not direct goto() call
|
||||
});
|
||||
|
||||
it('should handle initialization errors', async () => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue