G[2]}else b=x>L;const A=Math.PI,M=[],Y=I+i===t;t=I,p=0,E=T,f=n[t],g=n[t+1];let F;if(Y){C(),F=Math.atan2(g-_,f-m),b&&(F+=F>0?-A:A);const G=(L+x)/2,P=(k+R)/2;return M[0]=[G,P,(v-r)/2,F,s],M}s=s.replace(/\n/g," ");for(let G=0,P=s.length;G0?-A:A),F!==void 0){let st=K-F;if(st+=st>A?-2*A:st<-A?2*A:0,Math.abs(st)>o)return null}F=K;const Z=G;let Q=0;for(;G
0&&n.push(`
diff --git a/src/static/dist/WGDashboardAdmin/assets/browser-LdOMKRZX.js b/src/static/dist/WGDashboardAdmin/assets/browser-D-jXNshq.js
similarity index 99%
rename from src/static/dist/WGDashboardAdmin/assets/browser-LdOMKRZX.js
rename to src/static/dist/WGDashboardAdmin/assets/browser-D-jXNshq.js
index 12aaf90a..7a36cb00 100644
--- a/src/static/dist/WGDashboardAdmin/assets/browser-LdOMKRZX.js
+++ b/src/static/dist/WGDashboardAdmin/assets/browser-D-jXNshq.js
@@ -1,4 +1,4 @@
-import{O as te}from"./index-DYYtDSji.js";import{r as ee}from"./galois-field-I2lBzzs-.js";var z={},Q,Bt;function ne(){return Bt||(Bt=1,Q=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then}),Q}var G={},U={},pt;function _(){if(pt)return U;pt=1;let r;const o=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];return U.getSymbolSize=function(n){if(!n)throw new Error('"version" cannot be null or undefined');if(n<1||n>40)throw new Error('"version" should be in range from 1 to 40');return n*4+17},U.getSymbolTotalCodewords=function(n){return o[n]},U.getBCHDigit=function(i){let n=0;for(;i!==0;)n++,i>>>=1;return n},U.setToSJISFunction=function(n){if(typeof n!="function")throw new Error('"toSJISFunc" is not a valid function.');r=n},U.isKanjiModeEnabled=function(){return typeof r<"u"},U.toSJIS=function(n){return r(n)},U}var $={},Rt;function wt(){return Rt||(Rt=1,(function(r){r.L={bit:1},r.M={bit:0},r.Q={bit:3},r.H={bit:2};function o(i){if(typeof i!="string")throw new Error("Param is not a string");switch(i.toLowerCase()){case"l":case"low":return r.L;case"m":case"medium":return r.M;case"q":case"quartile":return r.Q;case"h":case"high":return r.H;default:throw new Error("Unknown EC Level: "+i)}}r.isValid=function(n){return n&&typeof n.bit<"u"&&n.bit>=0&&n.bit<4},r.from=function(n,t){if(r.isValid(n))return n;try{return o(n)}catch{return t}}})($)),$}var W,At;function re(){if(At)return W;At=1;function r(){this.buffer=[],this.length=0}return r.prototype={get:function(o){const i=Math.floor(o/8);return(this.buffer[i]>>>7-o%8&1)===1},put:function(o,i){for(let n=0;n>>i-n-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(o){const i=Math.floor(this.length/8);this.buffer.length<=i&&this.buffer.push(0),o&&(this.buffer[i]|=128>>>this.length%8),this.length++}},W=r,W}var Z,It;function oe(){if(It)return Z;It=1;function r(o){if(!o||o<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=o,this.data=new Uint8Array(o*o),this.reservedBit=new Uint8Array(o*o)}return r.prototype.set=function(o,i,n,t){const e=o*this.size+i;this.data[e]=n,t&&(this.reservedBit[e]=!0)},r.prototype.get=function(o,i){return this.data[o*this.size+i]},r.prototype.xor=function(o,i,n){this.data[o*this.size+i]^=n},r.prototype.isReserved=function(o,i){return this.reservedBit[o*this.size+i]},Z=r,Z}var X={},Nt;function ie(){return Nt||(Nt=1,(function(r){const o=_().getSymbolSize;r.getRowColCoords=function(n){if(n===1)return[];const t=Math.floor(n/7)+2,e=o(n),s=e===145?26:Math.ceil((e-13)/(2*t-2))*2,a=[e-7];for(let u=1;u=0&&t<=7},r.from=function(t){return r.isValid(t)?parseInt(t,10):void 0},r.getPenaltyN1=function(t){const e=t.size;let s=0,a=0,u=0,c=null,d=null;for(let B=0;B=5&&(s+=o.N1+(a-5)),c=f,a=1),f=t.get(h,B),f===d?u++:(u>=5&&(s+=o.N1+(u-5)),d=f,u=1)}a>=5&&(s+=o.N1+(a-5)),u>=5&&(s+=o.N1+(u-5))}return s},r.getPenaltyN2=function(t){const e=t.size;let s=0;for(let a=0;a=10&&(a===1488||a===93)&&s++,u=u<<1&2047|t.get(d,c),d>=10&&(u===1488||u===93)&&s++}return s*o.N3},r.getPenaltyN4=function(t){let e=0;const s=t.data.length;for(let u=0;u=0;){const s=e[0];for(let u=0;u0){const a=new Uint8Array(this.degree);return a.set(e,s),a}return e},nt=o,nt}var rt={},ot={},it={},Lt;function Gt(){return Lt||(Lt=1,it.isValid=function(o){return!isNaN(o)&&o>=1&&o<=40}),it}var L={},Dt;function $t(){if(Dt)return L;Dt=1;const r="[0-9]+",o="[A-Z $%*+\\-./:]+";let i="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";i=i.replace(/u/g,"\\u");const n="(?:(?![A-Z0-9 $%*+\\-./:]|"+i+`)(?:.|[\r
+import{Q as te}from"./index-QGgWclm4.js";import{r as ee}from"./galois-field-I2lBzzs-.js";var z={},Q,Bt;function ne(){return Bt||(Bt=1,Q=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then}),Q}var G={},U={},pt;function _(){if(pt)return U;pt=1;let r;const o=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];return U.getSymbolSize=function(n){if(!n)throw new Error('"version" cannot be null or undefined');if(n<1||n>40)throw new Error('"version" should be in range from 1 to 40');return n*4+17},U.getSymbolTotalCodewords=function(n){return o[n]},U.getBCHDigit=function(i){let n=0;for(;i!==0;)n++,i>>>=1;return n},U.setToSJISFunction=function(n){if(typeof n!="function")throw new Error('"toSJISFunc" is not a valid function.');r=n},U.isKanjiModeEnabled=function(){return typeof r<"u"},U.toSJIS=function(n){return r(n)},U}var $={},Rt;function wt(){return Rt||(Rt=1,(function(r){r.L={bit:1},r.M={bit:0},r.Q={bit:3},r.H={bit:2};function o(i){if(typeof i!="string")throw new Error("Param is not a string");switch(i.toLowerCase()){case"l":case"low":return r.L;case"m":case"medium":return r.M;case"q":case"quartile":return r.Q;case"h":case"high":return r.H;default:throw new Error("Unknown EC Level: "+i)}}r.isValid=function(n){return n&&typeof n.bit<"u"&&n.bit>=0&&n.bit<4},r.from=function(n,t){if(r.isValid(n))return n;try{return o(n)}catch{return t}}})($)),$}var W,At;function re(){if(At)return W;At=1;function r(){this.buffer=[],this.length=0}return r.prototype={get:function(o){const i=Math.floor(o/8);return(this.buffer[i]>>>7-o%8&1)===1},put:function(o,i){for(let n=0;n>>i-n-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(o){const i=Math.floor(this.length/8);this.buffer.length<=i&&this.buffer.push(0),o&&(this.buffer[i]|=128>>>this.length%8),this.length++}},W=r,W}var Z,It;function oe(){if(It)return Z;It=1;function r(o){if(!o||o<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=o,this.data=new Uint8Array(o*o),this.reservedBit=new Uint8Array(o*o)}return r.prototype.set=function(o,i,n,t){const e=o*this.size+i;this.data[e]=n,t&&(this.reservedBit[e]=!0)},r.prototype.get=function(o,i){return this.data[o*this.size+i]},r.prototype.xor=function(o,i,n){this.data[o*this.size+i]^=n},r.prototype.isReserved=function(o,i){return this.reservedBit[o*this.size+i]},Z=r,Z}var X={},Nt;function ie(){return Nt||(Nt=1,(function(r){const o=_().getSymbolSize;r.getRowColCoords=function(n){if(n===1)return[];const t=Math.floor(n/7)+2,e=o(n),s=e===145?26:Math.ceil((e-13)/(2*t-2))*2,a=[e-7];for(let u=1;u=0&&t<=7},r.from=function(t){return r.isValid(t)?parseInt(t,10):void 0},r.getPenaltyN1=function(t){const e=t.size;let s=0,a=0,u=0,c=null,d=null;for(let B=0;B=5&&(s+=o.N1+(a-5)),c=f,a=1),f=t.get(h,B),f===d?u++:(u>=5&&(s+=o.N1+(u-5)),d=f,u=1)}a>=5&&(s+=o.N1+(a-5)),u>=5&&(s+=o.N1+(u-5))}return s},r.getPenaltyN2=function(t){const e=t.size;let s=0;for(let a=0;a=10&&(a===1488||a===93)&&s++,u=u<<1&2047|t.get(d,c),d>=10&&(u===1488||u===93)&&s++}return s*o.N3},r.getPenaltyN4=function(t){let e=0;const s=t.data.length;for(let u=0;u=0;){const s=e[0];for(let u=0;u0){const a=new Uint8Array(this.degree);return a.set(e,s),a}return e},nt=o,nt}var rt={},ot={},it={},Lt;function Gt(){return Lt||(Lt=1,it.isValid=function(o){return!isNaN(o)&&o>=1&&o<=40}),it}var L={},Dt;function $t(){if(Dt)return L;Dt=1;const r="[0-9]+",o="[A-Z $%*+\\-./:]+";let i="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";i=i.replace(/u/g,"\\u");const n="(?:(?![A-Z0-9 $%*+\\-./:]|"+i+`)(?:.|[\r
]))+`;L.KANJI=new RegExp(i,"g"),L.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),L.BYTE=new RegExp(n,"g"),L.NUMERIC=new RegExp(r,"g"),L.ALPHANUMERIC=new RegExp(o,"g");const t=new RegExp("^"+i+"$"),e=new RegExp("^"+r+"$"),s=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");return L.testKanji=function(u){return t.test(u)},L.testNumeric=function(u){return e.test(u)},L.testAlphanumeric=function(u){return s.test(u)},L}var qt;function F(){return qt||(qt=1,(function(r){const o=Gt(),i=$t();r.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},r.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},r.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},r.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},r.MIXED={bit:-1},r.getCharCountIndicator=function(e,s){if(!e.ccBits)throw new Error("Invalid mode: "+e);if(!o.isValid(s))throw new Error("Invalid version: "+s);return s>=1&&s<10?e.ccBits[0]:s<27?e.ccBits[1]:e.ccBits[2]},r.getBestModeForData=function(e){return i.testNumeric(e)?r.NUMERIC:i.testAlphanumeric(e)?r.ALPHANUMERIC:i.testKanji(e)?r.KANJI:r.BYTE},r.toString=function(e){if(e&&e.id)return e.id;throw new Error("Invalid mode")},r.isValid=function(e){return e&&e.bit&&e.ccBits};function n(t){if(typeof t!="string")throw new Error("Param is not a string");switch(t.toLowerCase()){case"numeric":return r.NUMERIC;case"alphanumeric":return r.ALPHANUMERIC;case"kanji":return r.KANJI;case"byte":return r.BYTE;default:throw new Error("Unknown mode: "+t)}}r.from=function(e,s){if(r.isValid(e))return e;try{return n(e)}catch{return s}}})(ot)),ot}var vt;function fe(){return vt||(vt=1,(function(r){const o=_(),i=Qt(),n=wt(),t=F(),e=Gt(),s=7973,a=o.getBCHDigit(s);function u(h,f,T){for(let M=1;M<=40;M++)if(f<=r.getCapacity(M,T,h))return M}function c(h,f){return t.getCharCountIndicator(h,f)+4}function d(h,f){let T=0;return h.forEach(function(M){const S=c(M.mode,f);T+=S+M.getBitsLength()}),T}function B(h,f){for(let T=1;T<=40;T++)if(d(h,T)<=r.getCapacity(T,f,t.MIXED))return T}r.from=function(f,T){return e.isValid(f)?parseInt(f,10):T},r.getCapacity=function(f,T,M){if(!e.isValid(f))throw new Error("Invalid QR Code version");typeof M>"u"&&(M=t.BYTE);const S=o.getSymbolTotalCodewords(f),A=i.getTotalCodewordsCount(f,T),P=(S-A)*8;if(M===t.MIXED)return P;const I=P-c(M,f);switch(M){case t.NUMERIC:return Math.floor(I/10*3);case t.ALPHANUMERIC:return Math.floor(I/11*2);case t.KANJI:return Math.floor(I/13);case t.BYTE:default:return Math.floor(I/8)}},r.getBestVersionForData=function(f,T){let M;const S=n.from(T,n.M);if(Array.isArray(f)){if(f.length>1)return B(f,S);if(f.length===0)return 1;M=f[0]}else M=f;return u(M.mode,M.getLength(),S)},r.getEncodedBits=function(f){if(!e.isValid(f)||f<7)throw new Error("Invalid QR Code version");let T=f<<12;for(;o.getBCHDigit(T)-a>=0;)T^=s<=0;)u^=o<0&&(e=this.data.substr(t),s=parseInt(e,10),n.put(s,a*3+1))},at=o,at}var ct,Ft;function ge(){if(Ft)return ct;Ft=1;const r=F(),o=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function i(n){this.mode=r.ALPHANUMERIC,this.data=n}return i.getBitsLength=function(t){return 11*Math.floor(t/2)+6*(t%2)},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(t){let e;for(e=0;e+2<=this.data.length;e+=2){let s=o.indexOf(this.data[e])*45;s+=o.indexOf(this.data[e+1]),t.put(s,11)}this.data.length%2&&t.put(o.indexOf(this.data[e]),6)},ct=i,ct}var ft,kt;function he(){if(kt)return ft;kt=1;const r=F();function o(i){this.mode=r.BYTE,typeof i=="string"?this.data=new TextEncoder().encode(i):this.data=new Uint8Array(i)}return o.getBitsLength=function(n){return n*8},o.prototype.getLength=function(){return this.data.length},o.prototype.getBitsLength=function(){return o.getBitsLength(this.data.length)},o.prototype.write=function(i){for(let n=0,t=this.data.length;n=33088&&e<=40956)e-=33088;else if(e>=57408&&e<=60351)e-=49472;else throw new Error("Invalid SJIS character: "+this.data[t]+`
Make sure your charset is UTF-8`);e=(e>>>8&255)*192+(e&255),n.put(e,13)}},lt=i,lt}var dt={exports:{}},Vt;function we(){return Vt||(Vt=1,(function(r){var o={single_source_shortest_paths:function(i,n,t){var e={},s={};s[n]=0;var a=o.PriorityQueue.make();a.push(n,0);for(var u,c,d,B,h,f,T,M,S;!a.empty();){u=a.pop(),c=u.value,B=u.cost,h=i[c]||{};for(d in h)h.hasOwnProperty(d)&&(f=h[d],T=B+f,M=s[d],S=typeof s[d]>"u",(S||M>T)&&(s[d]=T,a.push(d,T),e[d]=c))}if(typeof t<"u"&&typeof s[t]>"u"){var A=["Could not find a path from ",n," to ",t,"."].join("");throw new Error(A)}return e},extract_shortest_path_from_predecessor_list:function(i,n){for(var t=[],e=n;e;)t.push(e),i[e],e=i[e];return t.reverse(),t},find_path:function(i,n,t){var e=o.single_source_shortest_paths(i,n,t);return o.extract_shortest_path_from_predecessor_list(e,t)},PriorityQueue:{make:function(i){var n=o.PriorityQueue,t={},e;i=i||{};for(e in n)n.hasOwnProperty(e)&&(t[e]=n[e]);return t.queue=[],t.sorter=i.sorter||n.default_sorter,t},default_sorter:function(i,n){return i.cost-n.cost},push:function(i,n){var t={value:i,cost:n};this.queue.push(t),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};r.exports=o})(dt)),dt.exports}var Kt;function Ce(){return Kt||(Kt=1,(function(r){const o=F(),i=de(),n=ge(),t=he(),e=me(),s=$t(),a=_(),u=we();function c(A){return unescape(encodeURIComponent(A)).length}function d(A,P,I){const p=[];let b;for(;(b=A.exec(I))!==null;)p.push({data:b[0],index:b.index,mode:P,length:b[0].length});return p}function B(A){const P=d(s.NUMERIC,o.NUMERIC,A),I=d(s.ALPHANUMERIC,o.ALPHANUMERIC,A);let p,b;return a.isKanjiModeEnabled()?(p=d(s.BYTE,o.BYTE,A),b=d(s.KANJI,o.KANJI,A)):(p=d(s.BYTE_KANJI,o.BYTE,A),b=[]),P.concat(I,p,b).sort(function(y,C){return y.index-C.index}).map(function(y){return{data:y.data,mode:y.mode,length:y.length}})}function h(A,P){switch(P){case o.NUMERIC:return i.getBitsLength(A);case o.ALPHANUMERIC:return n.getBitsLength(A);case o.KANJI:return e.getBitsLength(A);case o.BYTE:return t.getBitsLength(A)}}function f(A){return A.reduce(function(P,I){const p=P.length-1>=0?P[P.length-1]:null;return p&&p.mode===I.mode?(P[P.length-1].data+=I.data,P):(P.push(I),P)},[])}function T(A){const P=[];for(let I=0;I=0&&w<=6&&(N===0||N===6)||N>=0&&N<=6&&(w===0||w===6)||w>=2&&w<=4&&N>=2&&N<=4?g.set(m+w,E+N,!0,!0):g.set(m+w,E+N,!1,!0))}}function T(g){const y=g.size;for(let C=8;C>w&1)===1,g.set(R,m,E,!0),g.set(m,R,E,!0)}function A(g,y,C){const l=g.size,R=d.getEncodedBits(y,C);let m,E;for(m=0;m<15;m++)E=(R>>m&1)===1,m<6?g.set(m,8,E,!0):m<8?g.set(m+1,8,E,!0):g.set(l-15+m,8,E,!0),m<8?g.set(8,l-m-1,E,!0):m<9?g.set(8,15-m-1+1,E,!0):g.set(8,15-m-1,E,!0);g.set(l-8,8,1,!0)}function P(g,y){const C=g.size;let l=-1,R=C-1,m=7,E=0;for(let w=C-1;w>0;w-=2)for(w===6&&w--;;){for(let N=0;N<2;N++)if(!g.isReserved(R,w-N)){let v=!1;E>>m&1)===1),g.set(R,w-N,v),m--,m===-1&&(E++,m=7)}if(R+=l,R<0||C<=R){R-=l,l=-l;break}}}function I(g,y,C){const l=new i;C.forEach(function(N){l.put(N.mode.bit,4),l.put(N.getLength(),B.getCharCountIndicator(N.mode,g)),N.write(l)});const R=r.getSymbolTotalCodewords(g),m=a.getTotalCodewordsCount(g,y),E=(R-m)*8;for(l.getLengthInBits()+4<=E&&l.put(0,4);l.getLengthInBits()%8!==0;)l.putBit(0);const w=(E-l.getLengthInBits())/8;for(let N=0;Na.clientAssignedPeers&&Object.keys(a.clientAssignedPeers).includes(a.configuration)?a.peers.filter(n=>!a.clientAssignedPeers[a.configuration].map(t=>t.id).includes(n.id)&&(!a.availablePeerSearchString||a.availablePeerSearchString&&(n.id.includes(a.availablePeerSearchString)||n.name.includes(a.availablePeerSearchString)))):a.availablePeerSearchString?a.peers.filter(n=>n.id.includes(a.availablePeerSearchString)||n.name.includes(a.availablePeerSearchString)):a.peers),p=h(!1),v=h(!1);return(n,t)=>{const g=M("RouterLink");return l(),i("div",H,[e("div",{onClick:t[0]||(t[0]=s=>v.value=!v.value),role:"button",class:"card-header rounded-0 sticky-top bg-body-secondary border-0 border-bottom text-white d-flex"},[e("small",null,[e("samp",null,x(c.configuration),1)]),e("a",Q,[v.value?(l(),i("i",X)):(l(),i("i",Z))])]),v.value?_("",!0):(l(),i("div",ee,[e("div",se,[(l(!0),i(C,null,N(b.value,s=>(l(),i("div",{class:"list-group-item d-flex border-bottom list-group-item-action d-flex align-items-center gap-3",key:s.id},[p.value?(l(),i("div",ie,[e("small",ae,[o(r,{t:"Are you sure to remove this peer?"})]),t[2]||(t[2]=e("br",null,null,-1)),e("small",oe,[e("samp",null,x(s.id),1)])])):(l(),i("div",te,[e("small",le,[o(g,{class:"text-decoration-none",target:"_blank",to:"/configuration/"+c.configuration+"/peers?id="+encodeURIComponent(s.id)},{default:B(()=>[e("samp",null,x(s.id),1)]),_:2},1032,["to"])]),t[1]||(t[1]=e("br",null,null,-1)),e("small",ne,x(s.name?s.name:"Untitled Peer"),1)])),c.clientAssignedPeers?(l(),i("button",{key:2,onClick:m=>f("assign",s.id),class:L([{disabled:w(d).assigning},"btn bg-success-subtle text-success-emphasis ms-auto"])},[...t[3]||(t[3]=[e("i",{class:"bi bi-plus-circle-fill"},null,-1)])],10,re)):(l(),i("button",{key:3,onClick:m=>f("unassign",s.assignment_id),class:L([{disabled:w(d).unassigning},"btn bg-danger-subtle text-danger-emphasis ms-auto"]),"aria-label":"Delete Assignment"},[...t[4]||(t[4]=[e("i",{class:"bi bi-trash-fill"},null,-1)])],10,de))]))),128))])]))])}}}),ce={key:0,class:"d-flex rounded-0 border-0 flex-column d-flex flex-column border-bottom pb-1"},ue={class:"d-flex flex-column p-3 gap-3"},me={class:"d-flex align-items-center"},be={class:"mb-0"},ge={class:"text-bg-primary badge ms-2"},ve={class:"text-bg-info badge ms-2"},fe={class:"rounded-3 availablePeers border h-100 overflow-scroll flex-grow-1 d-flex flex-column"},pe={key:0,class:"text-muted m-auto p-3"},he={key:0,style:{height:"500px"},class:"d-flex flex-column p-3"},xe={class:"availablePeers border h-100 card rounded-3"},ye={class:"card-header sticky-top p-3"},_e={class:"mb-0 d-flex align-items-center"},ke={class:"card-body p-0 overflow-scroll"},Ce={key:0,class:"text-muted m-auto"},Pe={class:"card-footer d-flex gap-2 p-3 align-items-center justify-content-end"},Se={key:1},$e=D({__name:"clientAssignedPeers",props:["client","clientAssignedPeers"],emits:["refresh"],setup(c,{emit:k}){const a=c,f=h(!1),d=j(),b=h(!1),p=k,v=async(g,s,m)=>{await d.assignClient(g,s,m,!1),p("refresh")},n=async g=>{await d.unassignClient(void 0,void 0,g),p("refresh")},t=h("");return(g,s)=>(l(),i("div",null,[f.value?(l(),i("div",Se,[...s[6]||(s[6]=[e("div",{class:"p-3 placeholder-glow border-bottom"},[e("h6",{class:"placeholder w-100 rounded-3"}),e("div",{class:"placeholder w-100 rounded-3",style:{height:"400px"}})],-1)])])):(l(),i("div",ce,[e("div",ue,[e("div",me,[e("h6",be,[o(r,{t:"Assigned Peers"}),e("span",ge,[I(x(Object.keys(c.clientAssignedPeers).length)+" ",1),o(r,{t:Object.keys(c.clientAssignedPeers).length>1?"Configurations":"Configuration"},null,8,["t"])]),e("span",ve,[I(x(Object.values(c.clientAssignedPeers).flat().length)+" ",1),o(r,{t:Object.values(c.clientAssignedPeers).flat().length>1?"Peers":"Peer"},null,8,["t"])])]),e("button",{class:"btn btn-sm bg-primary-subtle text-primary-emphasis rounded-3 ms-auto",onClick:s[0]||(s[0]=m=>b.value=!b.value)},[b.value?(l(),i(C,{key:1},[s[4]||(s[4]=e("i",{class:"bi bi-check me-2"},null,-1)),o(r,{t:"Done"})],64)):(l(),i(C,{key:0},[s[3]||(s[3]=e("i",{class:"bi bi-list-check me-2"},null,-1)),o(r,{t:"Manage"})],64))])]),e("div",fe,[(l(!0),i(C,null,N(c.clientAssignedPeers,(m,y)=>(l(),A(R,{configuration:y,peers:m,onUnassign:s[1]||(s[1]=async P=>await n(P))},null,8,["configuration","peers"]))),256)),Object.keys(c.clientAssignedPeers).length===0?(l(),i("h6",pe,[o(r,{t:"No peer assigned to this client"})])):_("",!0)])]),b.value?(l(),i("div",he,[e("div",xe,[e("div",ye,[e("h6",_e,[o(r,{t:"Available Peers"})])]),e("div",ke,[(l(!0),i(C,null,N(w(d).allConfigurationsPeers,(m,y)=>(l(),A(R,{availablePeerSearchString:t.value,configuration:y,clientAssignedPeers:c.clientAssignedPeers,peers:m,key:y,onAssign:async P=>await v(y,P,a.client.ClientID)},null,8,["availablePeerSearchString","configuration","clientAssignedPeers","peers","onAssign"]))),128)),Object.keys(w(d).allConfigurationsPeers).length===0?(l(),i("h6",Ce,[o(r,{t:"No peer is available to assign"})])):_("",!0)]),e("div",Pe,[s[5]||(s[5]=e("label",{for:"availablePeerSearchString"},[e("i",{class:"bi bi-search me-2"})],-1)),O(e("input",{id:"availablePeerSearchString","onUpdate:modelValue":s[2]||(s[2]=m=>t.value=m),class:"form-control form-control-sm rounded-3 w-auto",type:"text"},null,512),[[U,t.value]])])])])):_("",!0)]))]))}}),we={class:"p-3 d-flex gap-3 flex-column border-bottom"},Ae={class:"d-flex align-items-center gap-2"},De={class:"mb-0"},Ne=D({__name:"clientDelete",props:["client"],emits:["refresh"],setup(c,{emit:k}){const a=c,f=h(!1),d=h(!1),b=k,p=E(),v=async()=>{f.value=!0,await z("/api/clients/deleteClient",{ClientID:a.client.ClientID},n=>{f.value=!1,n.status?(b("deleteSuccess"),p.newMessage("Server","Delete client successfully","success")):p.newMessage("Server","Failed to delete client","danger")})};return(n,t)=>(l(),i("div",we,[e("div",Ae,[e("h6",De,[d.value?(l(),A(r,{key:1,t:"Are you sure to delete this client?"})):(l(),A(r,{key:0,t:"Delete Client"}))]),d.value?_("",!0):(l(),i("button",{key:0,class:"btn btn-sm bg-danger-subtle text-danger-emphasis rounded-3 ms-auto",onClick:t[0]||(t[0]=g=>d.value=!0)},[t[2]||(t[2]=e("i",{class:"bi bi-trash-fill me-2"},null,-1)),o(r,{t:"Delete"})])),d.value?(l(),i(C,{key:1},[e("button",{onClick:v,class:"btn btn-sm bg-danger-subtle text-danger-emphasis rounded-3 ms-auto"},[t[3]||(t[3]=e("i",{class:"bi bi-trash-fill me-2"},null,-1)),o(r,{t:"Yes"})]),d.value?(l(),i("button",{key:0,class:"btn btn-sm bg-secondary-subtle text-secondary-emphasis rounded-3",onClick:t[1]||(t[1]=g=>d.value=!1)},[t[4]||(t[4]=e("i",{class:"bi bi-x-lg me-2"},null,-1)),o(r,{t:"No"})])):_("",!0)],64)):_("",!0)])]))}}),Ie={class:"p-4 border-bottom bg-body-tertiary z-0"},je={class:"mb-3 backLink"},Le={class:"text-muted"},Re={class:"d-flex flex-column gap-2"},Ve={class:"d-flex align-items-center"},Be={class:"text-muted"},Me={class:"ms-auto"},Oe={class:"d-flex align-items-center gap-2"},Ue={class:"text-muted"},Ee={style:{flex:"1 0 0","overflow-y":"scroll"}},ze={key:1,class:"d-flex w-100 h-100 text-muted"},Fe={class:"m-auto text-center"},Ge=D({__name:"clientViewer",emits:["deleteSuccess"],async setup(c,{emit:k}){let a,f;const d=j(),b=E(),p=G(),v=K(),n=V(()=>d.getClientById(p.params.id)),t=h({}),g=async()=>{await W("/api/clients/assignedPeers",{ClientID:n.value.ClientID},S=>{t.value=S.data})},s=T({Name:void 0});n.value?(q(()=>n.value.ClientID,async()=>{s.Name=n.value.Name,await g()}),[a,f]=J(()=>g()),await a,f(),s.Name=n.value.Name):(v.push("/clients"),b.newMessage("WGDashboard","Client does not exist","danger"));const m=h(!1),y=async()=>{m.value=!0,await z("/api/clients/updateProfileName",{ClientID:n.value.ClientID,Name:s.Name},S=>{S.status?(n.value.Name=s.Name,b.newMessage("Server","Client name update success","success")):(s.Name=n.value.Name,b.newMessage("Server","Client name update failed","danger")),m.value=!1})},P=async()=>{await v.push("/clients"),await d.getClients()};return(S,u)=>{const F=M("RouterLink");return n.value?(l(),i("div",{class:"text-body d-flex flex-column overflow-y-scroll h-100",key:n.value.ClientID},[e("div",Ie,[e("div",je,[o(F,{to:"/clients",class:"text-body text-decoration-none"},{default:B(()=>[...u[4]||(u[4]=[e("i",{class:"bi bi-arrow-left me-2"},null,-1),I(" Back",-1)])]),_:1})]),e("small",Le,[o(r,{t:"Email"})]),e("h1",null,x(n.value.Email),1),e("div",Re,[e("div",Ve,[e("small",Be,[o(r,{t:"Client ID"})]),e("small",Me,[e("samp",null,x(n.value.ClientID),1)])]),e("div",Oe,[e("small",Ue,[o(r,{t:"Client Name"})]),O(e("input",{class:"form-control form-control-sm rounded-3 ms-auto",style:{width:"300px"},type:"text","onUpdate:modelValue":u[0]||(u[0]=$=>s.Name=$)},null,512),[[U,s.Name]]),e("button",{onClick:u[1]||(u[1]=$=>y()),"aria-label":"Save Client Name",class:"btn btn-sm rounded-3 bg-success-subtle border-success-subtle text-success-emphasis"},[...u[5]||(u[5]=[e("i",{class:"bi bi-save-fill"},null,-1)])])])])]),e("div",Ee,[o($e,{onRefresh:u[2]||(u[2]=$=>g()),clientAssignedPeers:t.value,client:n.value},null,8,["clientAssignedPeers","client"]),o(Ne,{onDeleteSuccess:u[3]||(u[3]=$=>P()),client:n.value},null,8,["client"])])])):(l(),i("div",ze,[e("div",Fe,[u[6]||(u[6]=e("h1",null,[e("i",{class:"bi bi-person-x"})],-1)),e("p",null,[o(r,{t:"Client does not exist"})])])]))}}}),Ke=Y(Ge,[["__scopeId","data-v-f874264d"]]);export{Ke as default};
diff --git a/src/static/dist/WGDashboardAdmin/assets/clientViewer-BYW0BPeu.css b/src/static/dist/WGDashboardAdmin/assets/clientViewer-BYW0BPeu.css
new file mode 100644
index 00000000..569b72e1
--- /dev/null
+++ b/src/static/dist/WGDashboardAdmin/assets/clientViewer-BYW0BPeu.css
@@ -0,0 +1 @@
+@media screen and (min-width:576px){.backLink[data-v-f874264d]{display:none}}
diff --git a/src/static/dist/WGDashboardAdmin/assets/clientViewer-C5axh9P7.css b/src/static/dist/WGDashboardAdmin/assets/clientViewer-C5axh9P7.css
deleted file mode 100644
index 32470502..00000000
--- a/src/static/dist/WGDashboardAdmin/assets/clientViewer-C5axh9P7.css
+++ /dev/null
@@ -1 +0,0 @@
-@media screen and (min-width: 576px){.backLink[data-v-f874264d]{display:none}}
diff --git a/src/static/dist/WGDashboardAdmin/assets/clientViewer-CkbrMAH4.js b/src/static/dist/WGDashboardAdmin/assets/clientViewer-CkbrMAH4.js
new file mode 100644
index 00000000..c6a1e913
--- /dev/null
+++ b/src/static/dist/WGDashboardAdmin/assets/clientViewer-CkbrMAH4.js
@@ -0,0 +1 @@
+import{E as D,x as R,r as h,c as i,a as e,d as _,t as x,F as C,k as N,b as o,w as V,j as B,n as L,u as w,f as l,e as I,q as O,A as U,l as A,D as E,B as F,N as T,L as z,K as q,I as K,M as W,g as Y,_ as H}from"./index-QGgWclm4.js";import{D as j}from"./DashboardClientAssignmentStore-BdQ0OkPO.js";import{L as r}from"./localeText-Cji_3w42.js";const J={class:"card rounded-0 border-0"},Q={role:"button",class:"ms-auto text-white"},X={key:0,class:"bi bi-chevron-compact-down"},Z={key:1,class:"bi bi-chevron-compact-up"},ee={key:0,class:"card-body p-0"},se={class:"list-group list-group-flush"},te={key:0},le={class:"text-body"},ne={class:"text-muted"},ie={key:1},ae={class:"text-body"},oe={class:"text-muted"},re=["onClick"],de=["onClick"],M=D({__name:"availablePeersGroup",props:["configuration","peers","clientAssignedPeers","availablePeerSearchString"],emits:["assign","unassign"],setup(c,{emit:k}){const a=c,f=k,d=j(),b=R(()=>a.clientAssignedPeers&&Object.keys(a.clientAssignedPeers).includes(a.configuration)?a.peers.filter(n=>!a.clientAssignedPeers[a.configuration].map(t=>t.id).includes(n.id)&&(!a.availablePeerSearchString||a.availablePeerSearchString&&(n.id.includes(a.availablePeerSearchString)||n.name.includes(a.availablePeerSearchString)))):a.availablePeerSearchString?a.peers.filter(n=>n.id.includes(a.availablePeerSearchString)||n.name.includes(a.availablePeerSearchString)):a.peers),p=h(!1),v=h(!1);return(n,t)=>{const g=B("RouterLink");return l(),i("div",J,[e("div",{onClick:t[0]||(t[0]=s=>v.value=!v.value),role:"button",class:"card-header rounded-0 sticky-top bg-body-secondary border-0 border-bottom text-white d-flex"},[e("small",null,[e("samp",null,x(c.configuration),1)]),e("a",Q,[v.value?(l(),i("i",X)):(l(),i("i",Z))])]),v.value?_("",!0):(l(),i("div",ee,[e("div",se,[(l(!0),i(C,null,N(b.value,s=>(l(),i("div",{class:"list-group-item d-flex border-bottom list-group-item-action d-flex align-items-center gap-3",key:s.id},[p.value?(l(),i("div",ie,[e("small",ae,[o(r,{t:"Are you sure to remove this peer?"})]),t[2]||(t[2]=e("br",null,null,-1)),e("small",oe,[e("samp",null,x(s.id),1)])])):(l(),i("div",te,[e("small",le,[o(g,{class:"text-decoration-none",target:"_blank",to:"/configuration/"+c.configuration+"/peers?id="+encodeURIComponent(s.id)},{default:V(()=>[e("samp",null,x(s.id),1)]),_:2},1032,["to"])]),t[1]||(t[1]=e("br",null,null,-1)),e("small",ne,x(s.name?s.name:"Untitled Peer"),1)])),c.clientAssignedPeers?(l(),i("button",{key:2,onClick:m=>f("assign",s.id),class:L([{disabled:w(d).assigning},"btn bg-success-subtle text-success-emphasis ms-auto"])},[...t[3]||(t[3]=[e("i",{class:"bi bi-plus-circle-fill"},null,-1)])],10,re)):(l(),i("button",{key:3,onClick:m=>f("unassign",s.assignment_id),class:L([{disabled:w(d).unassigning},"btn bg-danger-subtle text-danger-emphasis ms-auto"]),"aria-label":"Delete Assignment"},[...t[4]||(t[4]=[e("i",{class:"bi bi-trash-fill"},null,-1)])],10,de))]))),128))])]))])}}}),ce={key:0,class:"d-flex rounded-0 border-0 flex-column d-flex flex-column border-bottom pb-1"},ue={class:"d-flex flex-column p-3 gap-3"},me={class:"d-flex align-items-center"},be={class:"mb-0"},ge={class:"text-bg-primary badge ms-2"},ve={class:"text-bg-info badge ms-2"},fe={class:"rounded-3 availablePeers border h-100 overflow-scroll flex-grow-1 d-flex flex-column"},pe={key:0,class:"text-muted m-auto p-3"},he={key:0,style:{height:"500px"},class:"d-flex flex-column p-3"},xe={class:"availablePeers border h-100 card rounded-3"},ye={class:"card-header sticky-top p-3"},_e={class:"mb-0 d-flex align-items-center"},ke={class:"card-body p-0 overflow-scroll"},Ce={key:0,class:"text-muted m-auto"},Pe={class:"card-footer d-flex gap-2 p-3 align-items-center justify-content-end"},Se={key:1},$e=D({__name:"clientAssignedPeers",props:["client","clientAssignedPeers"],emits:["refresh"],setup(c,{emit:k}){const a=c,f=h(!1),d=j(),b=h(!1),p=k,v=async(g,s,m)=>{await d.assignClient(g,s,m,!1),p("refresh")},n=async g=>{await d.unassignClient(void 0,void 0,g),p("refresh")},t=h("");return(g,s)=>(l(),i("div",null,[f.value?(l(),i("div",Se,[...s[6]||(s[6]=[e("div",{class:"p-3 placeholder-glow border-bottom"},[e("h6",{class:"placeholder w-100 rounded-3"}),e("div",{class:"placeholder w-100 rounded-3",style:{height:"400px"}})],-1)])])):(l(),i("div",ce,[e("div",ue,[e("div",me,[e("h6",be,[o(r,{t:"Assigned Peers"}),e("span",ge,[I(x(Object.keys(c.clientAssignedPeers).length)+" ",1),o(r,{t:Object.keys(c.clientAssignedPeers).length>1?"Configurations":"Configuration"},null,8,["t"])]),e("span",ve,[I(x(Object.values(c.clientAssignedPeers).flat().length)+" ",1),o(r,{t:Object.values(c.clientAssignedPeers).flat().length>1?"Peers":"Peer"},null,8,["t"])])]),e("button",{class:"btn btn-sm bg-primary-subtle text-primary-emphasis rounded-3 ms-auto",onClick:s[0]||(s[0]=m=>b.value=!b.value)},[b.value?(l(),i(C,{key:1},[s[4]||(s[4]=e("i",{class:"bi bi-check me-2"},null,-1)),o(r,{t:"Done"})],64)):(l(),i(C,{key:0},[s[3]||(s[3]=e("i",{class:"bi bi-list-check me-2"},null,-1)),o(r,{t:"Manage"})],64))])]),e("div",fe,[(l(!0),i(C,null,N(c.clientAssignedPeers,(m,y)=>(l(),A(M,{configuration:y,peers:m,onUnassign:s[1]||(s[1]=async P=>await n(P))},null,8,["configuration","peers"]))),256)),Object.keys(c.clientAssignedPeers).length===0?(l(),i("h6",pe,[o(r,{t:"No peer assigned to this client"})])):_("",!0)])]),b.value?(l(),i("div",he,[e("div",xe,[e("div",ye,[e("h6",_e,[o(r,{t:"Available Peers"})])]),e("div",ke,[(l(!0),i(C,null,N(w(d).allConfigurationsPeers,(m,y)=>(l(),A(M,{availablePeerSearchString:t.value,configuration:y,clientAssignedPeers:c.clientAssignedPeers,peers:m,key:y,onAssign:async P=>await v(y,P,a.client.ClientID)},null,8,["availablePeerSearchString","configuration","clientAssignedPeers","peers","onAssign"]))),128)),Object.keys(w(d).allConfigurationsPeers).length===0?(l(),i("h6",Ce,[o(r,{t:"No peer is available to assign"})])):_("",!0)]),e("div",Pe,[s[5]||(s[5]=e("label",{for:"availablePeerSearchString"},[e("i",{class:"bi bi-search me-2"})],-1)),O(e("input",{id:"availablePeerSearchString","onUpdate:modelValue":s[2]||(s[2]=m=>t.value=m),class:"form-control form-control-sm rounded-3 w-auto",type:"text"},null,512),[[U,t.value]])])])])):_("",!0)]))]))}}),we={class:"p-3 d-flex gap-3 flex-column border-bottom"},Ae={class:"d-flex align-items-center gap-2"},De={class:"mb-0"},Ne=D({__name:"clientDelete",props:["client"],emits:["refresh"],setup(c,{emit:k}){const a=c,f=h(!1),d=h(!1),b=k,p=E(),v=async()=>{f.value=!0,await F("/api/clients/deleteClient",{ClientID:a.client.ClientID},n=>{f.value=!1,n.status?(b("deleteSuccess"),p.newMessage("Server","Delete client successfully","success")):p.newMessage("Server","Failed to delete client","danger")})};return(n,t)=>(l(),i("div",we,[e("div",Ae,[e("h6",De,[d.value?(l(),A(r,{key:1,t:"Are you sure to delete this client?"})):(l(),A(r,{key:0,t:"Delete Client"}))]),d.value?_("",!0):(l(),i("button",{key:0,class:"btn btn-sm bg-danger-subtle text-danger-emphasis rounded-3 ms-auto",onClick:t[0]||(t[0]=g=>d.value=!0)},[t[2]||(t[2]=e("i",{class:"bi bi-trash-fill me-2"},null,-1)),o(r,{t:"Delete"})])),d.value?(l(),i(C,{key:1},[e("button",{onClick:v,class:"btn btn-sm bg-danger-subtle text-danger-emphasis rounded-3 ms-auto"},[t[3]||(t[3]=e("i",{class:"bi bi-trash-fill me-2"},null,-1)),o(r,{t:"Yes"})]),d.value?(l(),i("button",{key:0,class:"btn btn-sm bg-secondary-subtle text-secondary-emphasis rounded-3",onClick:t[1]||(t[1]=g=>d.value=!1)},[t[4]||(t[4]=e("i",{class:"bi bi-x-lg me-2"},null,-1)),o(r,{t:"No"})])):_("",!0)],64)):_("",!0)])]))}}),Ie={class:"p-4 border-bottom bg-body-tertiary z-0"},je={class:"mb-3 backLink"},Le={class:"text-muted"},Me={class:"d-flex flex-column gap-2"},Re={class:"d-flex align-items-center"},Ve={class:"text-muted"},Be={class:"ms-auto"},Oe={class:"d-flex align-items-center gap-2"},Ue={class:"text-muted"},Ee={style:{flex:"1 0 0","overflow-y":"scroll"}},Fe={key:1,class:"d-flex w-100 h-100 text-muted"},Ge={class:"m-auto text-center"},Te=D({__name:"clientViewer",emits:["deleteSuccess"],async setup(c,{emit:k}){let a,f;const d=j(),b=E(),p=T(),v=W(),n=R(()=>d.getClientById(p.params.id)),t=h({}),g=async()=>{await Y("/api/clients/assignedPeers",{ClientID:n.value.ClientID},S=>{t.value=S.data})},s=z({Name:void 0});n.value?(q(()=>n.value.ClientID,async()=>{s.Name=n.value.Name,await g()}),[a,f]=K(()=>g()),await a,f(),s.Name=n.value.Name):(v.push("/clients"),b.newMessage("WGDashboard","Client does not exist","danger"));const m=h(!1),y=async()=>{m.value=!0,await F("/api/clients/updateProfileName",{ClientID:n.value.ClientID,Name:s.Name},S=>{S.status?(n.value.Name=s.Name,b.newMessage("Server","Client name update success","success")):(s.Name=n.value.Name,b.newMessage("Server","Client name update failed","danger")),m.value=!1})},P=async()=>{await v.push("/clients"),await d.getClients()};return(S,u)=>{const G=B("RouterLink");return n.value?(l(),i("div",{class:"text-body d-flex flex-column overflow-y-scroll h-100",key:n.value.ClientID},[e("div",Ie,[e("div",je,[o(G,{to:"/clients",class:"text-body text-decoration-none"},{default:V(()=>[...u[4]||(u[4]=[e("i",{class:"bi bi-arrow-left me-2"},null,-1),I(" Back",-1)])]),_:1})]),e("small",Le,[o(r,{t:"Email"})]),e("h1",null,x(n.value.Email),1),e("div",Me,[e("div",Re,[e("small",Ve,[o(r,{t:"Client ID"})]),e("small",Be,[e("samp",null,x(n.value.ClientID),1)])]),e("div",Oe,[e("small",Ue,[o(r,{t:"Client Name"})]),O(e("input",{class:"form-control form-control-sm rounded-3 ms-auto",style:{width:"300px"},type:"text","onUpdate:modelValue":u[0]||(u[0]=$=>s.Name=$)},null,512),[[U,s.Name]]),e("button",{onClick:u[1]||(u[1]=$=>y()),"aria-label":"Save Client Name",class:"btn btn-sm rounded-3 bg-success-subtle border-success-subtle text-success-emphasis"},[...u[5]||(u[5]=[e("i",{class:"bi bi-save-fill"},null,-1)])])])])]),e("div",Ee,[o($e,{onRefresh:u[2]||(u[2]=$=>g()),clientAssignedPeers:t.value,client:n.value},null,8,["clientAssignedPeers","client"]),o(Ne,{onDeleteSuccess:u[3]||(u[3]=$=>P()),client:n.value},null,8,["client"])])])):(l(),i("div",Fe,[e("div",Ge,[u[6]||(u[6]=e("h1",null,[e("i",{class:"bi bi-person-x"})],-1)),e("p",null,[o(r,{t:"Client does not exist"})])])]))}}}),We=H(Te,[["__scopeId","data-v-f874264d"]]);export{We as default};
diff --git a/src/static/dist/WGDashboardAdmin/assets/clients-B5XnFbd-.js b/src/static/dist/WGDashboardAdmin/assets/clients-BVeufNQI.js
similarity index 81%
rename from src/static/dist/WGDashboardAdmin/assets/clients-B5XnFbd-.js
rename to src/static/dist/WGDashboardAdmin/assets/clients-BVeufNQI.js
index 56dc2dbe..f5b363cf 100644
--- a/src/static/dist/WGDashboardAdmin/assets/clients-B5XnFbd-.js
+++ b/src/static/dist/WGDashboardAdmin/assets/clients-BVeufNQI.js
@@ -1 +1 @@
-import{B as C,q as L,o as B,c as g,a as e,t as y,b as d,F as D,i as N,j as v,w as V,h as I,L as E,f as r,D as z,r as b,E as O,m as x,v as j,g as w,J as R,k as G,y as M,u as f,G as T,n as $,d as S,_ as U}from"./index-DYYtDSji.js";import{D as q}from"./DashboardClientAssignmentStore-DDEBJ8Q3.js";import{L as p}from"./localeText-Cd7vLnRM.js";const F={class:"card rounded-0 border-0"},J={class:"card-header d-flex align-items-center rounded-0"},P={class:"my-2"},H={class:"badge text-bg-primary ms-auto"},K={class:"card-body p-0"},Q={class:"list-group list-group-flush clientList"},W={class:"text-body"},X={class:"text-muted"},k=C({__name:"clientGroup",props:["groupName","clients","searchString"],setup(h){const l=h,i=L(()=>{const a=l.searchString.toLowerCase();return l.searchString?l.clients.filter(s=>s.ClientID&&s.ClientID.toLowerCase().includes(a)||s.Email&&s.Email.toLowerCase().includes(a)||s.Name&&s.Name.toLowerCase().includes(a)):l.clients});return E(),B(()=>{document.querySelector(".clientList .active")?.scrollIntoView()}),(a,s)=>{const n=I("RouterLink");return r(),g("div",F,[e("div",J,[e("h6",P,y(h.groupName),1),e("span",H,[d(p,{t:i.value.length+" Client"+(i.value.length>1?"s":"")},null,8,["t"])])]),e("div",K,[e("div",Q,[(r(!0),g(D,null,N(i.value,o=>(r(),v(n,{key:o.ClientID,id:"client_"+o.ClientID,"active-class":"active",to:{name:"Client Viewer",params:{id:o.ClientID}},class:"list-group-item d-flex flex-column border-bottom list-group-item-action client"},{default:V(()=>[e("small",W,y(o.Email),1),e("small",X,y(o.Name?o.Name:"No Name"),1)]),_:2},1032,["id","to"]))),128))])])])}}}),Y={class:"d-flex flex-column gap-2"},Z={class:"d-flex align-items-center"},ee={class:"mb-0"},te={class:"form-check form-switch ms-auto"},se={class:"form-check-label",for:"oidc_switch"},oe=["disabled"],ae=C({__name:"oidcSettings",props:["mode"],async setup(h){let l,i;const a=h,s=z(),n=b(!1),o=b(!1),_=async()=>{await w("/api/oidc/status",{mode:a.mode},t=>{n.value=t.data,o.value=!1})};[l,i]=O(()=>_()),await l,i();const c=async()=>{o.value=!0,await w("/api/oidc/toggle",{mode:a.mode},t=>{t.status||(n.value=!n.value,s.newMessage("Server",t.message,"danger")),o.value=!1})};return(t,u)=>(r(),g("div",Y,[e("div",Z,[e("h6",ee,[d(p,{t:"OpenID Connect (OIDC)"})]),e("div",te,[e("label",se,[d(p,{t:n.value?"Enabled":"Disabled"},null,8,["t"])]),x(e("input",{disabled:o.value,"onUpdate:modelValue":u[0]||(u[0]=m=>n.value=m),onChange:u[1]||(u[1]=m=>c()),class:"form-check-input",type:"checkbox",role:"switch",id:"oidc_switch"},null,40,oe),[[j,n.value]])])])]))}}),ne={class:"position-absolute w-100 h-100 top-0 start-0 z-1 rounded-3 d-flex p-2",style:{"background-color":"#00000070","z-index":"9999"}},le={class:"card m-auto rounded-3",style:{width:"700px"}},ie={class:"card-header bg-transparent d-flex align-items-center gap-2 border-0 p-4 pb-2"},ce={class:"mb-0"},re={class:"card-body px-4 d-flex gap-3 flex-column"},de={class:"d-flex align-items-center"},ue={class:"mb-0"},me={class:"form-check form-switch ms-auto"},_e={class:"form-check-label",for:"oidc_switch"},pe=["disabled"],he=C({__name:"clientSettings",emits:["close"],setup(h,{emit:l}){const i=l,a=z();b(!1);const s=R({enableClients:a.Configuration.Clients.enable}),n=b(!1),o=async()=>{n.value=!0,await w("/api/clients/toggleStatus",{},_=>{s.enableClients=_.data}),n.value=!1};return(_,c)=>(r(),g("div",ne,[e("div",le,[e("div",ie,[e("h4",ce,[d(p,{t:"Clients Settings"})]),e("button",{type:"button",class:"btn-close ms-auto",onClick:c[0]||(c[0]=t=>i("close"))})]),e("div",re,[e("div",de,[e("h6",ue,[d(p,{t:"Client Side App"})]),e("div",me,[e("label",_e,[d(p,{t:s.enableClients?"Enabled":"Disabled"},null,8,["t"])]),x(e("input",{disabled:_.oidcStatusLoading,"onUpdate:modelValue":c[1]||(c[1]=t=>s.enableClients=t),onChange:c[2]||(c[2]=t=>o()),class:"form-check-input",type:"checkbox",role:"switch",id:"oidc_switch"},null,40,pe),[[j,s.enableClients]])])]),d(ae,{mode:"Client"})])])]))}}),ge={class:"text-body w-100 h-100 pb-2 position-relative"},be={class:"w-100 h-100 card rounded-3"},fe={class:"border-bottom z-0"},ve={class:"d-flex text-body align-items-center sticky-top p-3 bg-body-tertiary rounded-top-3",style:{"border-top-right-radius":"0 !important"}},Ce=["placeholder"],ye={class:"row h-100 g-0"},we={class:"d-flex flex-column overflow-y-scroll",style:{flex:"1 0 0"}},xe=C({__name:"clients",async setup(h){let l,i;const a=q();[l,i]=O(()=>a.getClients()),await l,i(),a.getAllConfigurationsPeers();const s=b(""),n=E(),o=b(!1),_=L(()=>Object.fromEntries(Object.entries(a.clients).filter(([c,t])=>Object.keys(a.clients).filter(u=>u!=="Local").includes(c))));return(c,t)=>{const u=I("RouterView");return r(),g("div",ge,[e("div",be,[d(G,{name:"zoom"},{default:V(()=>[o.value?(r(),v(he,{key:0,onClose:t[0]||(t[0]=m=>o.value=!1),class:"z-5"})):S("",!0)]),_:1}),e("div",fe,[e("div",ve,[t[4]||(t[4]=e("label",{for:"searchClient"},[e("i",{class:"bi bi-search me-2"})],-1)),x(e("input",{"onUpdate:modelValue":t[1]||(t[1]=m=>s.value=m),id:"searchClient",class:"form-control rounded-3 form-control-sm",placeholder:f(T)("Search Clients..."),type:"email",style:{width:"auto"}},null,8,Ce),[[M,s.value]]),e("button",{class:"btn btn-body ms-auto bg-body-secondary rounded-3 btn-sm",onClick:t[2]||(t[2]=m=>o.value=!o.value)},[t[3]||(t[3]=e("i",{class:"bi bi-gear-fill me-2"},null,-1)),d(p,{t:"Settings"})])])]),e("div",ye,[e("div",{class:$([{hide:f(n).params.id},"col-sm-4 border-end d-flex flex-column clientListContainer"])},[e("div",we,[Object.keys(f(a).clients).includes("Local")?(r(),v(k,{key:0,searchString:s.value,clients:f(a).clients.Local,groupName:"Local"},null,8,["searchString","clients"])):S("",!0),(r(!0),g(D,null,N(_.value,(m,A)=>(r(),v(k,{searchString:s.value,clients:m,groupName:A},null,8,["searchString","clients","groupName"]))),256))])],2),e("div",{class:$([{hide:!f(n).params.id},"col-sm-8 clientViewerContainer z-0"])},[d(u)],2)])])])}}}),Le=U(xe,[["__scopeId","data-v-a8650ee3"]]);export{Le as default};
+import{E as C,x as L,o as R,c as g,a as e,t as y,b as d,F as D,k as N,l as v,w as V,j as I,N as E,f as r,D as z,r as b,I as A,q as x,v as O,g as w,L as B,m as G,A as M,u as f,G as T,n as $,d as S,_ as U}from"./index-QGgWclm4.js";import{D as q}from"./DashboardClientAssignmentStore-BdQ0OkPO.js";import{L as p}from"./localeText-Cji_3w42.js";const F={class:"card rounded-0 border-0"},P={class:"card-header d-flex align-items-center rounded-0"},H={class:"my-2"},J={class:"badge text-bg-primary ms-auto"},K={class:"card-body p-0"},Q={class:"list-group list-group-flush clientList"},W={class:"text-body"},X={class:"text-muted"},k=C({__name:"clientGroup",props:["groupName","clients","searchString"],setup(h){const l=h,i=L(()=>{const a=l.searchString.toLowerCase();return l.searchString?l.clients.filter(s=>s.ClientID&&s.ClientID.toLowerCase().includes(a)||s.Email&&s.Email.toLowerCase().includes(a)||s.Name&&s.Name.toLowerCase().includes(a)):l.clients});return E(),R(()=>{document.querySelector(".clientList .active")?.scrollIntoView()}),(a,s)=>{const n=I("RouterLink");return r(),g("div",F,[e("div",P,[e("h6",H,y(h.groupName),1),e("span",J,[d(p,{t:i.value.length+" Client"+(i.value.length>1?"s":"")},null,8,["t"])])]),e("div",K,[e("div",Q,[(r(!0),g(D,null,N(i.value,o=>(r(),v(n,{key:o.ClientID,id:"client_"+o.ClientID,"active-class":"active",to:{name:"Client Viewer",params:{id:o.ClientID}},class:"list-group-item d-flex flex-column border-bottom list-group-item-action client"},{default:V(()=>[e("small",W,y(o.Email),1),e("small",X,y(o.Name?o.Name:"No Name"),1)]),_:2},1032,["id","to"]))),128))])])])}}}),Y={class:"d-flex flex-column gap-2"},Z={class:"d-flex align-items-center"},ee={class:"mb-0"},te={class:"form-check form-switch ms-auto"},se={class:"form-check-label",for:"oidc_switch"},oe=["disabled"],ae=C({__name:"oidcSettings",props:["mode"],async setup(h){let l,i;const a=h,s=z(),n=b(!1),o=b(!1),_=async()=>{await w("/api/oidc/status",{mode:a.mode},t=>{n.value=t.data,o.value=!1})};[l,i]=A(()=>_()),await l,i();const c=async()=>{o.value=!0,await w("/api/oidc/toggle",{mode:a.mode},t=>{t.status||(n.value=!n.value,s.newMessage("Server",t.message,"danger")),o.value=!1})};return(t,u)=>(r(),g("div",Y,[e("div",Z,[e("h6",ee,[d(p,{t:"OpenID Connect (OIDC)"})]),e("div",te,[e("label",se,[d(p,{t:n.value?"Enabled":"Disabled"},null,8,["t"])]),x(e("input",{disabled:o.value,"onUpdate:modelValue":u[0]||(u[0]=m=>n.value=m),onChange:u[1]||(u[1]=m=>c()),class:"form-check-input",type:"checkbox",role:"switch",id:"oidc_switch"},null,40,oe),[[O,n.value]])])])]))}}),ne={class:"position-absolute w-100 h-100 top-0 start-0 z-1 rounded-3 d-flex p-2",style:{"background-color":"#00000070","z-index":"9999"}},le={class:"card m-auto rounded-3",style:{width:"700px"}},ie={class:"card-header bg-transparent d-flex align-items-center gap-2 border-0 p-4 pb-2"},ce={class:"mb-0"},re={class:"card-body px-4 d-flex gap-3 flex-column"},de={class:"d-flex align-items-center"},ue={class:"mb-0"},me={class:"form-check form-switch ms-auto"},_e={class:"form-check-label",for:"oidc_switch"},pe=["disabled"],he=C({__name:"clientSettings",emits:["close"],setup(h,{emit:l}){const i=l,a=z();b(!1);const s=B({enableClients:a.Configuration.Clients.enable}),n=b(!1),o=async()=>{n.value=!0,await w("/api/clients/toggleStatus",{},_=>{s.enableClients=_.data}),n.value=!1};return(_,c)=>(r(),g("div",ne,[e("div",le,[e("div",ie,[e("h4",ce,[d(p,{t:"Clients Settings"})]),e("button",{type:"button",class:"btn-close ms-auto",onClick:c[0]||(c[0]=t=>i("close"))})]),e("div",re,[e("div",de,[e("h6",ue,[d(p,{t:"Client Side App"})]),e("div",me,[e("label",_e,[d(p,{t:s.enableClients?"Enabled":"Disabled"},null,8,["t"])]),x(e("input",{disabled:_.oidcStatusLoading,"onUpdate:modelValue":c[1]||(c[1]=t=>s.enableClients=t),onChange:c[2]||(c[2]=t=>o()),class:"form-check-input",type:"checkbox",role:"switch",id:"oidc_switch"},null,40,pe),[[O,s.enableClients]])])]),d(ae,{mode:"Client"})])])]))}}),ge={class:"text-body w-100 h-100 pb-2 position-relative"},be={class:"w-100 h-100 card rounded-3"},fe={class:"border-bottom z-0"},ve={class:"d-flex text-body align-items-center sticky-top p-3 bg-body-tertiary rounded-top-3",style:{"border-top-right-radius":"0 !important"}},Ce=["placeholder"],ye={class:"row h-100 g-0"},we={class:"d-flex flex-column overflow-y-scroll",style:{flex:"1 0 0"}},xe=C({__name:"clients",async setup(h){let l,i;const a=q();[l,i]=A(()=>a.getClients()),await l,i(),a.getAllConfigurationsPeers();const s=b(""),n=E(),o=b(!1),_=L(()=>Object.fromEntries(Object.entries(a.clients).filter(([c,t])=>Object.keys(a.clients).filter(u=>u!=="Local").includes(c))));return(c,t)=>{const u=I("RouterView");return r(),g("div",ge,[e("div",be,[d(G,{name:"zoom"},{default:V(()=>[o.value?(r(),v(he,{key:0,onClose:t[0]||(t[0]=m=>o.value=!1),class:"z-5"})):S("",!0)]),_:1}),e("div",fe,[e("div",ve,[t[4]||(t[4]=e("label",{for:"searchClient"},[e("i",{class:"bi bi-search me-2"})],-1)),x(e("input",{"onUpdate:modelValue":t[1]||(t[1]=m=>s.value=m),id:"searchClient",class:"form-control rounded-3 form-control-sm",placeholder:f(T)("Search Clients..."),type:"email",style:{width:"auto"}},null,8,Ce),[[M,s.value]]),e("button",{class:"btn btn-body ms-auto bg-body-secondary rounded-3 btn-sm",onClick:t[2]||(t[2]=m=>o.value=!o.value)},[t[3]||(t[3]=e("i",{class:"bi bi-gear-fill me-2"},null,-1)),d(p,{t:"Settings"})])])]),e("div",ye,[e("div",{class:$([{hide:f(n).params.id},"col-sm-4 border-end d-flex flex-column clientListContainer"])},[e("div",we,[Object.keys(f(a).clients).includes("Local")?(r(),v(k,{key:0,searchString:s.value,clients:f(a).clients.Local,groupName:"Local"},null,8,["searchString","clients"])):S("",!0),(r(!0),g(D,null,N(_.value,(m,j)=>(r(),v(k,{searchString:s.value,clients:m,groupName:j},null,8,["searchString","clients","groupName"]))),256))])],2),e("div",{class:$([{hide:!f(n).params.id},"col-sm-8 clientViewerContainer z-0"])},[d(u)],2)])])])}}}),Le=U(xe,[["__scopeId","data-v-a8650ee3"]]);export{Le as default};
diff --git a/src/static/dist/WGDashboardAdmin/assets/clients-CfS2KUuu.css b/src/static/dist/WGDashboardAdmin/assets/clients-CfS2KUuu.css
deleted file mode 100644
index ee12111c..00000000
--- a/src/static/dist/WGDashboardAdmin/assets/clients-CfS2KUuu.css
+++ /dev/null
@@ -1 +0,0 @@
-@media screen and (max-width: 576px){.clientListContainer.hide[data-v-a8650ee3],.clientViewerContainer.hide[data-v-a8650ee3]{display:none!important}.clientListContainer[data-v-a8650ee3]{border-right:none!important;animation:blurIn-a8650ee3 .2s ease-in-out forwards}.clientViewerContainer[data-v-a8650ee3]{animation:blurIn-a8650ee3 .2s ease-in-out forwards}}@keyframes blurIn-a8650ee3{0%{filter:blur(8px)}to{filter:blur(0px)}}
diff --git a/src/static/dist/WGDashboardAdmin/assets/clients-cOyFX4sh.css b/src/static/dist/WGDashboardAdmin/assets/clients-cOyFX4sh.css
new file mode 100644
index 00000000..88bca12d
--- /dev/null
+++ b/src/static/dist/WGDashboardAdmin/assets/clients-cOyFX4sh.css
@@ -0,0 +1 @@
+@media screen and (max-width:576px){.clientListContainer.hide[data-v-a8650ee3],.clientViewerContainer.hide[data-v-a8650ee3]{display:none!important}.clientListContainer[data-v-a8650ee3]{border-right:none!important;animation:blurIn-a8650ee3 .2s ease-in-out forwards}.clientViewerContainer[data-v-a8650ee3]{animation:blurIn-a8650ee3 .2s ease-in-out forwards}}@keyframes blurIn-a8650ee3{0%{filter:blur(8px)}to{filter:blur(0px)}}
diff --git a/src/static/dist/WGDashboardAdmin/assets/configuration-C3kbvqoL.js b/src/static/dist/WGDashboardAdmin/assets/configuration-C3kbvqoL.js
new file mode 100644
index 00000000..1b973905
--- /dev/null
+++ b/src/static/dist/WGDashboardAdmin/assets/configuration-C3kbvqoL.js
@@ -0,0 +1 @@
+import{_ as r,c as i,b as o,w as e,m as l,l as a,p as _,S as m,j as u,f as t}from"./index-QGgWclm4.js";const d={name:"configuration"},p={class:"mt-md-5 mt-3 text-body"};function f(x,h,k,w,$,v){const n=u("RouterView");return t(),i("div",p,[o(n,null,{default:e(({Component:s,route:c})=>[o(l,{name:"fade2",mode:"out-in"},{default:e(()=>[(t(),a(m,null,{default:e(()=>[(t(),a(_(s),{key:c.path,class:"z-1"}))]),_:2},1024))]),_:2},1024)]),_:1})])}const B=r(d,[["render",f]]);export{B as default};
diff --git a/src/static/dist/WGDashboardAdmin/assets/configuration-Day1LioO.js b/src/static/dist/WGDashboardAdmin/assets/configuration-Day1LioO.js
deleted file mode 100644
index 3e9731e5..00000000
--- a/src/static/dist/WGDashboardAdmin/assets/configuration-Day1LioO.js
+++ /dev/null
@@ -1 +0,0 @@
-import{_ as r,c as i,b as o,w as e,k as l,j as a,l as _,S as u,h as d,f as t}from"./index-DYYtDSji.js";const m={name:"configuration"},f={class:"mt-md-5 mt-3 text-body"};function p(h,k,x,w,$,v){const n=d("RouterView");return t(),i("div",f,[o(n,null,{default:e(({Component:s,route:c})=>[o(l,{name:"fade2",mode:"out-in"},{default:e(()=>[(t(),a(u,null,{default:e(()=>[(t(),a(_(s),{key:c.path,class:"z-1"}))]),_:2},1024))]),_:2},1024)]),_:1})])}const B=r(m,[["render",p]]);export{B as default};
diff --git a/src/static/dist/WGDashboardAdmin/assets/configurationList-BmBzibCH.js b/src/static/dist/WGDashboardAdmin/assets/configurationList-BmBzibCH.js
deleted file mode 100644
index 6fd4a158..00000000
--- a/src/static/dist/WGDashboardAdmin/assets/configurationList-BmBzibCH.js
+++ /dev/null
@@ -1 +0,0 @@
-import{_ as D,g as B,D as N,c as i,a as t,b as l,w as x,h as p,n as m,e as v,t as u,m as U,j as y,d as h,v as I,f as o,p as K,q as G,r as R,s as C,k as V,o as O,x as W,F as w,i as k,T as q,G as L,W as F,y as z}from"./index-DYYtDSji.js";import{L as S}from"./localeText-Cd7vLnRM.js";import{_ as j}from"./protocolBadge-DbN6X1oX.js";import{C as E}from"./storageMount.vue_vue_type_style_index_0_scoped_9509d7a0_lang-BsQN0eXp.js";const P={name:"configurationCard",components:{ProtocolBadge:j,LocaleText:S},props:{c:{Name:String,Status:Boolean,PublicKey:String,PrivateKey:String},delay:String,display:String},data(){return{configurationToggling:!1}},setup(){return{dashboardConfigurationStore:N()}},methods:{toggle(){this.configurationToggling=!0,B("/api/toggleWireguardConfiguration",{configurationName:this.c.Name},n=>{n.status?this.dashboardConfigurationStore.newMessage("Server",`${this.c.Name} ${n.data?"is on":"is off"}`):this.dashboardConfigurationStore.newMessage("Server",n.message,"danger"),this.c.Status=n.data,this.configurationToggling=!1})}}},T=()=>{K(n=>({v0d365bfc:n.delay}))},M=P.setup;P.setup=M?(n,s)=>(T(),M(n,s)):T;const H={class:"card conf_card rounded-3 shadow text-decoration-none"},Y={class:"mb-0"},A={class:"card-title mb-0 d-flex align-items-center gap-2"},J={key:0},Q={class:"badge text-bg-info rounded-3 shadow"},X={class:"card-footer d-flex gap-2 flex-column"},Z={class:"row"},tt={class:"d-flex gap-2 align-items-center"},et={class:"text-muted"},st={class:"mb-0 d-block d-lg-inline-block"},ot={style:{"line-break":"anywhere"}},nt={class:"form-check form-switch ms-auto"},at=["for"],it={key:4,class:"spinner-border spinner-border-sm ms-2","aria-hidden":"true"},rt=["disabled","id"];function lt(n,s,e,_,a,g){const d=p("ProtocolBadge"),r=p("RouterLink"),c=p("LocaleText");return o(),i("div",{class:m(["col-12",{"col-lg-6 col-xl-4":this.display==="Grid"}])},[t("div",H,[l(r,{to:"/configuration/"+e.c.Name+"/peers",class:"card-body d-flex align-items-center gap-3 flex-wrap text-decoration-none"},{default:x(()=>[t("h6",Y,[t("span",{class:m(["dot",{active:e.c.Status}])},null,2)]),t("h6",A,[t("samp",null,u(e.c.Name),1),t("small",null,[l(d,{protocol:e.c.Protocol,mini:!0},null,8,["protocol"])]),e.c.Info.Description?(o(),i("small",J,[t("span",Q,[s[2]||(s[2]=t("i",{class:"bi bi-pencil-fill me-2"},null,-1)),v(" "+u(e.c.Info.Description),1)])])):h("",!0)]),s[3]||(s[3]=t("h6",{class:"mb-0 ms-auto"},[t("i",{class:"bi bi-chevron-right"})],-1))]),_:1},8,["to"]),t("div",X,[t("div",Z,[t("small",{class:m(["col-6",{"col-md-3":this.display==="List"}])},[s[4]||(s[4]=t("i",{class:"bi bi-arrow-down-up me-2"},null,-1)),v(u(e.c.DataUsage.Total>0?e.c.DataUsage.Total.toFixed(4):0)+" GB ",1)],2),t("small",{class:m(["text-primary-emphasis col-6",{"col-md-3":this.display==="List"}])},[s[5]||(s[5]=t("i",{class:"bi bi-arrow-down me-2"},null,-1)),v(u(e.c.DataUsage.Receive>0?e.c.DataUsage.Receive.toFixed(4):0)+" GB ",1)],2),t("small",{class:m(["text-success-emphasis col-6",{"col-md-3":this.display==="List"}])},[s[6]||(s[6]=t("i",{class:"bi bi-arrow-up me-2"},null,-1)),v(u(e.c.DataUsage.Sent>0?e.c.DataUsage.Sent.toFixed(4):0)+" GB ",1)],2),t("small",{class:m(["col-6",{"col-md-3 text-md-end ":this.display==="List"}])},[t("span",{class:m(["dot me-2",{active:e.c.ConnectedPeers>0}])},null,2),v(" "+u(e.c.ConnectedPeers)+" / "+u(e.c.TotalPeers)+" ",1),l(c,{t:"Peers"})],2)]),t("div",{class:m(["d-flex gap-2",[this.display==="Grid"?"flex-column":"gap-lg-3 flex-column flex-lg-row"]])},[t("div",tt,[t("small",et,[t("strong",null,[l(c,{t:"Public Key"})])]),t("small",st,[t("samp",ot,u(e.c.PublicKey),1)])]),t("div",nt,[t("label",{class:"form-check-label",style:{cursor:"pointer"},for:"switch"+e.c.PrivateKey},[!e.c.Status&&this.configurationToggling?(o(),y(c,{key:0,t:"Turning Off..."})):e.c.Status&&this.configurationToggling?(o(),y(c,{key:1,t:"Turning On..."})):e.c.Status&&!this.configurationToggling?(o(),y(c,{key:2,t:"On"})):!e.c.Status&&!this.configurationToggling?(o(),y(c,{key:3,t:"Off"})):h("",!0),this.configurationToggling?(o(),i("span",it)):h("",!0)],8,at),U(t("input",{class:"form-check-input",style:{cursor:"pointer"},disabled:this.configurationToggling,type:"checkbox",role:"switch",id:"switch"+e.c.PrivateKey,onChange:s[0]||(s[0]=$=>this.toggle()),"onUpdate:modelValue":s[1]||(s[1]=$=>e.c.Status=$)},null,40,rt),[[I,e.c.Status]])])],2)])])],2)}const dt=D(P,[["render",lt],["__scopeId","data-v-9f596f5e"]]),ct={class:"text-muted me-2"},ut={class:"fw-bold"},mt={__name:"storageMount",props:{mount:Object,align:Boolean,square:Boolean},setup(n){K(a=>({v2dc8ab7e:_.value}));const s=n,e=R(!1),_=G(()=>s.square?"40px":"25px");return(a,g)=>(o(),i("div",{class:"flex-grow-1 square rounded-3 border position-relative",onMouseenter:g[0]||(g[0]=d=>e.value=!0),onMouseleave:g[1]||(g[1]=d=>e.value=!1),style:C({"background-color":`rgb(25 135 84 / ${n.mount.percent}%)`})},[l(V,{name:"zoomReversed"},{default:x(()=>[e.value?(o(),i("div",{key:0,style:C([{"white-space":"nowrap"},{top:_.value}]),class:m(["floatingLabel z-3 border position-absolute d-block p-1 px-2 bg-body text-body rounded-3 border shadow d-flex",[n.align?"end-0":"start-0"]])},[t("small",ct,[t("samp",null,u(n.mount.mountPoint),1)]),t("small",ut,u(n.mount.percent)+"% ",1)],6)):h("",!0)]),_:1})],36))}},gt=D(mt,[["__scopeId","data-v-9509d7a0"]]),ft={class:"row text-body g-3 mb-5"},_t={class:"col-md-6 col-sm-12 col-xl-3"},ht={class:"d-flex align-items-center"},pt={class:"text-muted"},yt={class:"ms-auto"},bt={key:0},vt={key:1,class:"spinner-border spinner-border-sm"},xt={class:"progress",role:"progressbar",style:{height:"6px"}},St={class:"d-flex mt-2 gap-1"},Ct={class:"col-md-6 col-sm-12 col-xl-3"},wt={class:"d-flex align-items-center"},kt={class:"text-muted"},$t={class:"ms-auto"},Dt={key:0},Lt={key:1,class:"spinner-border spinner-border-sm"},Pt={class:"progress",role:"progressbar",style:{height:"6px"}},Tt={class:"d-flex mt-2 gap-1"},Mt={class:"col-md-6 col-sm-12 col-xl-3"},Bt={class:"d-flex align-items-center"},Nt={class:"text-muted"},Ut={class:"ms-auto"},Kt={key:0},Gt={key:1,class:"spinner-border spinner-border-sm"},Vt={class:"progress",role:"progressbar",style:{height:"6px"}},It={class:"col-md-6 col-sm-12 col-xl-3"},Rt={class:"d-flex align-items-center"},Ot={class:"text-muted"},Wt={class:"ms-auto"},qt={key:0},Ft={key:1,class:"spinner-border spinner-border-sm"},zt={__name:"systemStatusWidget",setup(n){const s=N();let e=null;O(()=>{_(),e=setInterval(()=>{_()},5e3)}),W(()=>{clearInterval(e)});const _=()=>{B("/api/systemStatus",{},g=>{s.SystemStatus=g.data})},a=G(()=>s.SystemStatus);return(g,d)=>(o(),i("div",ft,[t("div",_t,[t("div",ht,[t("h6",pt,[d[0]||(d[0]=t("i",{class:"bi bi-cpu-fill me-2"},null,-1)),l(S,{t:"CPU"})]),t("h6",yt,[a.value?(o(),i("span",bt,u(a.value.CPU.cpu_percent)+"% ",1)):(o(),i("span",vt))])]),t("div",xt,[t("div",{class:"progress-bar",style:C({width:`${a.value?.CPU.cpu_percent}%`})},null,4)]),t("div",St,[(o(!0),i(w,null,k(a.value?.CPU.cpu_percent_per_cpu,(r,c)=>(o(),y(E,{key:c,align:c+1>Math.round(a.value?.CPU.cpu_percent_per_cpu.length/2),core_number:c,percentage:r},null,8,["align","core_number","percentage"]))),128))])]),t("div",Ct,[t("div",wt,[t("h6",kt,[d[1]||(d[1]=t("i",{class:"bi bi-device-ssd-fill me-2"},null,-1)),l(S,{t:"Storage"})]),t("h6",$t,[a.value?(o(),i("span",Dt,u(a.value.Disks.find(r=>r.mountPoint==="/")?a.value?.Disks.find(r=>r.mountPoint==="/").percent:a.value?.Disks[0].percent)+"% ",1)):(o(),i("span",Lt))])]),t("div",Pt,[t("div",{class:"progress-bar bg-success",style:C({width:`${a.value?.Disks.find(r=>r.mountPoint==="/")?a.value?.Disks.find(r=>r.mountPoint==="/").percent:a.value?.Disks[0].percent}%`})},null,4)]),t("div",Tt,[a.value?(o(!0),i(w,{key:0},k(a.value?.Disks,(r,c)=>(o(),y(gt,{key:r.mountPoint,align:c+1>Math.round(a.value?.Disks.length/2),mount:r},null,8,["align","mount"]))),128)):h("",!0)])]),t("div",Mt,[t("div",Bt,[t("h6",Nt,[d[2]||(d[2]=t("i",{class:"bi bi-memory me-2"},null,-1)),l(S,{t:"Memory"})]),t("h6",Ut,[a.value?(o(),i("span",Kt,u(a.value?.Memory.VirtualMemory.percent)+"% ",1)):(o(),i("span",Gt))])]),t("div",Vt,[t("div",{class:"progress-bar bg-info",style:C({width:`${a.value?.Memory.VirtualMemory.percent}%`})},null,4)])]),t("div",It,[t("div",Rt,[t("h6",Ot,[d[3]||(d[3]=t("i",{class:"bi bi-memory me-2"},null,-1)),l(S,{t:"Swap Memory"})]),t("h6",Wt,[a.value?(o(),i("span",qt,u(a.value?.Memory.SwapMemory.percent)+"% ",1)):(o(),i("span",Ft))])]),d[4]||(d[4]=t("div",{class:"progress",role:"progressbar",style:{height:"6px"}},[t("div",{class:"progress-bar bg-warning",style:{width:"$ data?.Memory.SwapMemory.percent}%"}})],-1))])]))}},jt=D(zt,[["__scopeId","data-v-851170e4"]]),Et={name:"configurationList",components:{SystemStatus:jt,LocaleText:S,ConfigurationCard:dt},async setup(){return{wireguardConfigurationsStore:F()}},data(){return{configurationLoaded:!1,sort:{Name:L("Name"),Status:L("Status"),"DataUsage.Total":L("Total Usage")},currentSort:{key:"Name",order:"asc"},currentDisplay:"List",searchKey:""}},computed:{configurations(){return this.wireguardConfigurationsStore.sortConfigurations.filter(n=>n.Name.toLowerCase().includes(this.searchKey)||n.PublicKey.includes(this.searchKey)||!this.searchKey)}},methods:{dotNotation(n,s){let e=s.split(".").reduce((_,a)=>_&&_[a],n);return typeof e=="string"?e.toLowerCase():e},updateSort(n){this.wireguardConfigurationsStore.CurrentSort.key===n?this.wireguardConfigurationsStore.CurrentSort.order=this.wireguardConfigurationsStore.CurrentSort.order==="asc"?"desc":"asc":this.wireguardConfigurationsStore.CurrentSort.key=n},updateDisplay(n){this.wireguardConfigurationsStore.CurrentDisplay!==n&&(this.wireguardConfigurationsStore.CurrentDisplay=n)}}},Ht={class:"mt-md-5 mt-3"},Yt={class:"container-fluid"},At={class:"d-flex mb-4 configurationListTitle align-items-md-center gap-2 flex-column flex-md-row"},Jt={class:"text-body d-flex mb-0"},Qt={key:0,class:"text-body filter mb-3 d-flex gap-2 flex-column flex-md-row"},Xt={class:"d-flex align-items-center gap-3 align-items-center mb-3 mb-md-0"},Zt={class:"text-muted"},te={class:"d-flex ms-auto ms-lg-0"},ee=["onClick"],se={class:"align-items-center gap-3 align-items-center mb-3 mb-md-0 d-none d-lg-flex"},oe={class:"text-muted"},ne={class:"d-flex ms-auto ms-lg-0"},ae=["onClick"],ie={class:"d-flex align-items-center ms-md-auto"},re={class:"row g-3 mb-2"},le={class:"text-muted col-12",key:"noConfiguration"};function de(n,s,e,_,a,g){const d=p("SystemStatus"),r=p("LocaleText"),c=p("RouterLink"),$=p("ConfigurationCard");return o(),i("div",Ht,[t("div",Yt,[l(d),t("div",At,[t("h2",Jt,[l(r,{t:"WireGuard Configurations"})]),l(c,{to:"/new_configuration",class:"ms-md-auto py-2 text-decoration-none btn text-primary-emphasis bg-primary-subtle rounded-3 border-1 border-primary-subtle"},{default:x(()=>[s[1]||(s[1]=t("i",{class:"bi bi-plus-circle me-2"},null,-1)),l(r,{t:"Configuration"})]),_:1}),l(c,{to:"/restore_configuration",class:"py-2 text-decoration-none btn text-primary-emphasis bg-primary-subtle rounded-3 border-1 border-primary-subtle"},{default:x(()=>[s[2]||(s[2]=t("i",{class:"bi bi-clock-history me-2"},null,-1)),l(r,{t:"Restore"})]),_:1})]),l(V,{name:"fade"},{default:x(()=>[this.wireguardConfigurationsStore.ConfigurationLoaded?(o(),i("div",Qt,[t("div",Xt,[t("small",Zt,[l(r,{t:"Sort By"})]),t("div",te,[(o(!0),i(w,null,k(this.wireguardConfigurationsStore.SortOptions,(f,b)=>(o(),i("a",{role:"button",onClick:ce=>g.updateSort(b),class:m([{"bg-primary-subtle text-primary-emphasis":this.wireguardConfigurationsStore.CurrentSort.key===b},"px-2 py-1 rounded-3"])},[t("small",null,[this.wireguardConfigurationsStore.CurrentSort.key===b?(o(),i("i",{key:0,class:m(["bi me-2",[this.wireguardConfigurationsStore.CurrentSort.order==="asc"?"bi-sort-up":"bi-sort-down"]])},null,2)):h("",!0),l(r,{t:f},null,8,["t"])])],10,ee))),256))])]),t("div",se,[t("small",oe,[l(r,{t:"Display as"})]),t("div",ne,[(o(),i(w,null,k([{name:"List",key:"list"},{name:"Grid",key:"grid"}],f=>t("a",{role:"button",onClick:b=>g.updateDisplay(f.name),class:m([{"bg-primary-subtle text-primary-emphasis":this.wireguardConfigurationsStore.CurrentDisplay===f.name},"px-2 py-1 rounded-3"])},[t("small",null,[t("i",{class:m(["bi me-2","bi-"+f.key])},null,2),s[3]||(s[3]=v()),l(r,{t:f.name},null,8,["t"])])],10,ae)),64))])]),t("div",ie,[s[4]||(s[4]=t("label",{for:"configurationSearch",class:"text-muted"},[t("i",{class:"bi bi-search me-2"})],-1)),U(t("input",{class:"form-control form-control-sm rounded-3","onUpdate:modelValue":s[0]||(s[0]=f=>this.searchKey=f),id:"configurationSearch"},null,512),[[z,this.searchKey]])])])):h("",!0)]),_:1}),t("div",re,[l(q,{name:"fade"},{default:x(()=>[this.wireguardConfigurationsStore.ConfigurationLoaded&&this.wireguardConfigurationsStore.Configurations.length===0?(o(),i("p",le,[l(r,{t:"You don't have any WireGuard configurations yet. Please check the configuration folder or change it in Settings. By default the folder is /etc/wireguard."})])):this.wireguardConfigurationsStore.ConfigurationLoaded?(o(!0),i(w,{key:1},k(g.configurations,(f,b)=>(o(),y($,{display:this.wireguardConfigurationsStore.CurrentDisplay,delay:b*.03+"s",key:f.Name,c:f},null,8,["display","delay","c"]))),128)):h("",!0)]),_:1})])])])}const _e=D(Et,[["render",de],["__scopeId","data-v-7ed053f0"]]);export{_e as default};
diff --git a/src/static/dist/WGDashboardAdmin/assets/configurationList-D62mSVvK.js b/src/static/dist/WGDashboardAdmin/assets/configurationList-D62mSVvK.js
new file mode 100644
index 00000000..ec994016
--- /dev/null
+++ b/src/static/dist/WGDashboardAdmin/assets/configurationList-D62mSVvK.js
@@ -0,0 +1 @@
+import{_ as D,g as B,D as N,c as i,a as t,b as l,w as x,j as p,n as m,e as v,t as u,q as U,l as y,d as h,v as I,f as o,s as K,x as G,r as R,y as C,m as V,o as O,z as W,F as w,k,T as q,G as L,W as z,A as F}from"./index-QGgWclm4.js";import{L as S}from"./localeText-Cji_3w42.js";import{_ as j}from"./protocolBadge--3ZxOK9G.js";import{C as A}from"./storageMount.vue_vue_type_style_index_0_scoped_9509d7a0_lang-BhAPboQ-.js";const P={name:"configurationCard",components:{ProtocolBadge:j,LocaleText:S},props:{c:{Name:String,Status:Boolean,PublicKey:String,PrivateKey:String},delay:String,display:String},data(){return{configurationToggling:!1}},setup(){return{dashboardConfigurationStore:N()}},methods:{toggle(){this.configurationToggling=!0,B("/api/toggleWireguardConfiguration",{configurationName:this.c.Name},n=>{n.status?this.dashboardConfigurationStore.newMessage("Server",`${this.c.Name} ${n.data?"is on":"is off"}`):this.dashboardConfigurationStore.newMessage("Server",n.message,"danger"),this.c.Status=n.data,this.configurationToggling=!1})}}},T=()=>{K(n=>({v0d365bfc:n.delay}))},M=P.setup;P.setup=M?(n,s)=>(T(),M(n,s)):T;const E={class:"card conf_card rounded-3 shadow text-decoration-none"},H={class:"mb-0"},Y={class:"card-title mb-0 d-flex align-items-center gap-2"},J={key:0},Q={class:"badge text-bg-info rounded-3 shadow"},X={class:"card-footer d-flex gap-2 flex-column"},Z={class:"row"},tt={class:"d-flex gap-2 align-items-center"},et={class:"text-muted"},st={class:"mb-0 d-block d-lg-inline-block"},ot={style:{"line-break":"anywhere"}},nt={class:"form-check form-switch ms-auto"},at=["for"],it={key:4,class:"spinner-border spinner-border-sm ms-2","aria-hidden":"true"},rt=["disabled","id"];function lt(n,s,e,_,a,g){const d=p("ProtocolBadge"),r=p("RouterLink"),c=p("LocaleText");return o(),i("div",{class:m(["col-12",{"col-lg-6 col-xl-4":this.display==="Grid"}])},[t("div",E,[l(r,{to:"/configuration/"+e.c.Name+"/peers",class:"card-body d-flex align-items-center gap-3 flex-wrap text-decoration-none"},{default:x(()=>[t("h6",H,[t("span",{class:m(["dot",{active:e.c.Status}])},null,2)]),t("h6",Y,[t("samp",null,u(e.c.Name),1),t("small",null,[l(d,{protocol:e.c.Protocol,mini:!0},null,8,["protocol"])]),e.c.Info.Description?(o(),i("small",J,[t("span",Q,[s[2]||(s[2]=t("i",{class:"bi bi-pencil-fill me-2"},null,-1)),v(" "+u(e.c.Info.Description),1)])])):h("",!0)]),s[3]||(s[3]=t("h6",{class:"mb-0 ms-auto"},[t("i",{class:"bi bi-chevron-right"})],-1))]),_:1},8,["to"]),t("div",X,[t("div",Z,[t("small",{class:m(["col-6",{"col-md-3":this.display==="List"}])},[s[4]||(s[4]=t("i",{class:"bi bi-arrow-down-up me-2"},null,-1)),v(u(e.c.DataUsage.Total>0?e.c.DataUsage.Total.toFixed(4):0)+" GB ",1)],2),t("small",{class:m(["text-primary-emphasis col-6",{"col-md-3":this.display==="List"}])},[s[5]||(s[5]=t("i",{class:"bi bi-arrow-down me-2"},null,-1)),v(u(e.c.DataUsage.Receive>0?e.c.DataUsage.Receive.toFixed(4):0)+" GB ",1)],2),t("small",{class:m(["text-success-emphasis col-6",{"col-md-3":this.display==="List"}])},[s[6]||(s[6]=t("i",{class:"bi bi-arrow-up me-2"},null,-1)),v(u(e.c.DataUsage.Sent>0?e.c.DataUsage.Sent.toFixed(4):0)+" GB ",1)],2),t("small",{class:m(["col-6",{"col-md-3 text-md-end ":this.display==="List"}])},[t("span",{class:m(["dot me-2",{active:e.c.ConnectedPeers>0}])},null,2),v(" "+u(e.c.ConnectedPeers)+" / "+u(e.c.TotalPeers)+" ",1),l(c,{t:"Peers"})],2)]),t("div",{class:m(["d-flex gap-2",[this.display==="Grid"?"flex-column":"gap-lg-3 flex-column flex-lg-row"]])},[t("div",tt,[t("small",et,[t("strong",null,[l(c,{t:"Public Key"})])]),t("small",st,[t("samp",ot,u(e.c.PublicKey),1)])]),t("div",nt,[t("label",{class:"form-check-label",style:{cursor:"pointer"},for:"switch"+e.c.PrivateKey},[!e.c.Status&&this.configurationToggling?(o(),y(c,{key:0,t:"Turning Off..."})):e.c.Status&&this.configurationToggling?(o(),y(c,{key:1,t:"Turning On..."})):e.c.Status&&!this.configurationToggling?(o(),y(c,{key:2,t:"On"})):!e.c.Status&&!this.configurationToggling?(o(),y(c,{key:3,t:"Off"})):h("",!0),this.configurationToggling?(o(),i("span",it)):h("",!0)],8,at),U(t("input",{class:"form-check-input",style:{cursor:"pointer"},disabled:this.configurationToggling,type:"checkbox",role:"switch",id:"switch"+e.c.PrivateKey,onChange:s[0]||(s[0]=$=>this.toggle()),"onUpdate:modelValue":s[1]||(s[1]=$=>e.c.Status=$)},null,40,rt),[[I,e.c.Status]])])],2)])])],2)}const dt=D(P,[["render",lt],["__scopeId","data-v-9f596f5e"]]),ct={class:"text-muted me-2"},ut={class:"fw-bold"},mt={__name:"storageMount",props:{mount:Object,align:Boolean,square:Boolean},setup(n){K(a=>({v2dc8ab7e:_.value}));const s=n,e=R(!1),_=G(()=>s.square?"40px":"25px");return(a,g)=>(o(),i("div",{class:"flex-grow-1 square rounded-3 border position-relative",onMouseenter:g[0]||(g[0]=d=>e.value=!0),onMouseleave:g[1]||(g[1]=d=>e.value=!1),style:C({"background-color":`rgb(25 135 84 / ${n.mount.percent}%)`})},[l(V,{name:"zoomReversed"},{default:x(()=>[e.value?(o(),i("div",{key:0,style:C([{"white-space":"nowrap"},{top:_.value}]),class:m(["floatingLabel z-3 border position-absolute d-block p-1 px-2 bg-body text-body rounded-3 border shadow d-flex",[n.align?"end-0":"start-0"]])},[t("small",ct,[t("samp",null,u(n.mount.mountPoint),1)]),t("small",ut,u(n.mount.percent)+"% ",1)],6)):h("",!0)]),_:1})],36))}},gt=D(mt,[["__scopeId","data-v-9509d7a0"]]),ft={class:"row text-body g-3 mb-5"},_t={class:"col-md-6 col-sm-12 col-xl-3"},ht={class:"d-flex align-items-center"},pt={class:"text-muted"},yt={class:"ms-auto"},bt={key:0},vt={key:1,class:"spinner-border spinner-border-sm"},xt={class:"progress",role:"progressbar",style:{height:"6px"}},St={class:"d-flex mt-2 gap-1"},Ct={class:"col-md-6 col-sm-12 col-xl-3"},wt={class:"d-flex align-items-center"},kt={class:"text-muted"},$t={class:"ms-auto"},Dt={key:0},Lt={key:1,class:"spinner-border spinner-border-sm"},Pt={class:"progress",role:"progressbar",style:{height:"6px"}},Tt={class:"d-flex mt-2 gap-1"},Mt={class:"col-md-6 col-sm-12 col-xl-3"},Bt={class:"d-flex align-items-center"},Nt={class:"text-muted"},Ut={class:"ms-auto"},Kt={key:0},Gt={key:1,class:"spinner-border spinner-border-sm"},Vt={class:"progress",role:"progressbar",style:{height:"6px"}},It={class:"col-md-6 col-sm-12 col-xl-3"},Rt={class:"d-flex align-items-center"},Ot={class:"text-muted"},Wt={class:"ms-auto"},qt={key:0},zt={key:1,class:"spinner-border spinner-border-sm"},Ft={__name:"systemStatusWidget",setup(n){const s=N();let e=null;O(()=>{_(),e=setInterval(()=>{_()},5e3)}),W(()=>{clearInterval(e)});const _=()=>{B("/api/systemStatus",{},g=>{s.SystemStatus=g.data})},a=G(()=>s.SystemStatus);return(g,d)=>(o(),i("div",ft,[t("div",_t,[t("div",ht,[t("h6",pt,[d[0]||(d[0]=t("i",{class:"bi bi-cpu-fill me-2"},null,-1)),l(S,{t:"CPU"})]),t("h6",yt,[a.value?(o(),i("span",bt,u(a.value.CPU.cpu_percent)+"% ",1)):(o(),i("span",vt))])]),t("div",xt,[t("div",{class:"progress-bar",style:C({width:`${a.value?.CPU.cpu_percent}%`})},null,4)]),t("div",St,[(o(!0),i(w,null,k(a.value?.CPU.cpu_percent_per_cpu,(r,c)=>(o(),y(A,{key:c,align:c+1>Math.round(a.value?.CPU.cpu_percent_per_cpu.length/2),core_number:c,percentage:r},null,8,["align","core_number","percentage"]))),128))])]),t("div",Ct,[t("div",wt,[t("h6",kt,[d[1]||(d[1]=t("i",{class:"bi bi-device-ssd-fill me-2"},null,-1)),l(S,{t:"Storage"})]),t("h6",$t,[a.value?(o(),i("span",Dt,u(a.value.Disks.find(r=>r.mountPoint==="/")?a.value?.Disks.find(r=>r.mountPoint==="/").percent:a.value?.Disks[0].percent)+"% ",1)):(o(),i("span",Lt))])]),t("div",Pt,[t("div",{class:"progress-bar bg-success",style:C({width:`${a.value?.Disks.find(r=>r.mountPoint==="/")?a.value?.Disks.find(r=>r.mountPoint==="/").percent:a.value?.Disks[0].percent}%`})},null,4)]),t("div",Tt,[a.value?(o(!0),i(w,{key:0},k(a.value?.Disks,(r,c)=>(o(),y(gt,{key:r.mountPoint,align:c+1>Math.round(a.value?.Disks.length/2),mount:r},null,8,["align","mount"]))),128)):h("",!0)])]),t("div",Mt,[t("div",Bt,[t("h6",Nt,[d[2]||(d[2]=t("i",{class:"bi bi-memory me-2"},null,-1)),l(S,{t:"Memory"})]),t("h6",Ut,[a.value?(o(),i("span",Kt,u(a.value?.Memory.VirtualMemory.percent)+"% ",1)):(o(),i("span",Gt))])]),t("div",Vt,[t("div",{class:"progress-bar bg-info",style:C({width:`${a.value?.Memory.VirtualMemory.percent}%`})},null,4)])]),t("div",It,[t("div",Rt,[t("h6",Ot,[d[3]||(d[3]=t("i",{class:"bi bi-memory me-2"},null,-1)),l(S,{t:"Swap Memory"})]),t("h6",Wt,[a.value?(o(),i("span",qt,u(a.value?.Memory.SwapMemory.percent)+"% ",1)):(o(),i("span",zt))])]),d[4]||(d[4]=t("div",{class:"progress",role:"progressbar",style:{height:"6px"}},[t("div",{class:"progress-bar bg-warning",style:{width:"$ data?.Memory.SwapMemory.percent}%"}})],-1))])]))}},jt=D(Ft,[["__scopeId","data-v-851170e4"]]),At={name:"configurationList",components:{SystemStatus:jt,LocaleText:S,ConfigurationCard:dt},async setup(){return{wireguardConfigurationsStore:z()}},data(){return{configurationLoaded:!1,sort:{Name:L("Name"),Status:L("Status"),"DataUsage.Total":L("Total Usage")},currentSort:{key:"Name",order:"asc"},currentDisplay:"List",searchKey:""}},computed:{configurations(){return this.wireguardConfigurationsStore.sortConfigurations.filter(n=>n.Name.toLowerCase().includes(this.searchKey)||n.PublicKey.includes(this.searchKey)||!this.searchKey)}},methods:{dotNotation(n,s){let e=s.split(".").reduce((_,a)=>_&&_[a],n);return typeof e=="string"?e.toLowerCase():e},updateSort(n){this.wireguardConfigurationsStore.CurrentSort.key===n?this.wireguardConfigurationsStore.CurrentSort.order=this.wireguardConfigurationsStore.CurrentSort.order==="asc"?"desc":"asc":this.wireguardConfigurationsStore.CurrentSort.key=n},updateDisplay(n){this.wireguardConfigurationsStore.CurrentDisplay!==n&&(this.wireguardConfigurationsStore.CurrentDisplay=n)}}},Et={class:"mt-md-5 mt-3"},Ht={class:"container-fluid"},Yt={class:"d-flex mb-4 configurationListTitle align-items-md-center gap-2 flex-column flex-md-row"},Jt={class:"text-body d-flex mb-0"},Qt={key:0,class:"text-body filter mb-3 d-flex gap-2 flex-column flex-md-row"},Xt={class:"d-flex align-items-center gap-3 align-items-center mb-3 mb-md-0"},Zt={class:"text-muted"},te={class:"d-flex ms-auto ms-lg-0"},ee=["onClick"],se={class:"align-items-center gap-3 align-items-center mb-3 mb-md-0 d-none d-lg-flex"},oe={class:"text-muted"},ne={class:"d-flex ms-auto ms-lg-0"},ae=["onClick"],ie={class:"d-flex align-items-center ms-md-auto"},re={class:"row g-3 mb-2"},le={class:"text-muted col-12",key:"noConfiguration"};function de(n,s,e,_,a,g){const d=p("SystemStatus"),r=p("LocaleText"),c=p("RouterLink"),$=p("ConfigurationCard");return o(),i("div",Et,[t("div",Ht,[l(d),t("div",Yt,[t("h2",Jt,[l(r,{t:"WireGuard Configurations"})]),l(c,{to:"/new_configuration",class:"ms-md-auto py-2 text-decoration-none btn text-primary-emphasis bg-primary-subtle rounded-3 border-1 border-primary-subtle"},{default:x(()=>[s[1]||(s[1]=t("i",{class:"bi bi-plus-circle me-2"},null,-1)),l(r,{t:"Configuration"})]),_:1}),l(c,{to:"/restore_configuration",class:"py-2 text-decoration-none btn text-primary-emphasis bg-primary-subtle rounded-3 border-1 border-primary-subtle"},{default:x(()=>[s[2]||(s[2]=t("i",{class:"bi bi-clock-history me-2"},null,-1)),l(r,{t:"Restore"})]),_:1})]),l(V,{name:"fade"},{default:x(()=>[this.wireguardConfigurationsStore.ConfigurationLoaded?(o(),i("div",Qt,[t("div",Xt,[t("small",Zt,[l(r,{t:"Sort By"})]),t("div",te,[(o(!0),i(w,null,k(this.wireguardConfigurationsStore.SortOptions,(f,b)=>(o(),i("a",{role:"button",onClick:ce=>g.updateSort(b),class:m([{"bg-primary-subtle text-primary-emphasis":this.wireguardConfigurationsStore.CurrentSort.key===b},"px-2 py-1 rounded-3"])},[t("small",null,[this.wireguardConfigurationsStore.CurrentSort.key===b?(o(),i("i",{key:0,class:m(["bi me-2",[this.wireguardConfigurationsStore.CurrentSort.order==="asc"?"bi-sort-up":"bi-sort-down"]])},null,2)):h("",!0),l(r,{t:f},null,8,["t"])])],10,ee))),256))])]),t("div",se,[t("small",oe,[l(r,{t:"Display as"})]),t("div",ne,[(o(),i(w,null,k([{name:"List",key:"list"},{name:"Grid",key:"grid"}],f=>t("a",{role:"button",onClick:b=>g.updateDisplay(f.name),class:m([{"bg-primary-subtle text-primary-emphasis":this.wireguardConfigurationsStore.CurrentDisplay===f.name},"px-2 py-1 rounded-3"])},[t("small",null,[t("i",{class:m(["bi me-2","bi-"+f.key])},null,2),s[3]||(s[3]=v()),l(r,{t:f.name},null,8,["t"])])],10,ae)),64))])]),t("div",ie,[s[4]||(s[4]=t("label",{for:"configurationSearch",class:"text-muted"},[t("i",{class:"bi bi-search me-2"})],-1)),U(t("input",{class:"form-control form-control-sm rounded-3","onUpdate:modelValue":s[0]||(s[0]=f=>this.searchKey=f),id:"configurationSearch"},null,512),[[F,this.searchKey]])])])):h("",!0)]),_:1}),t("div",re,[l(q,{name:"fade"},{default:x(()=>[this.wireguardConfigurationsStore.ConfigurationLoaded&&this.wireguardConfigurationsStore.Configurations.length===0?(o(),i("p",le,[l(r,{t:"You don't have any WireGuard configurations yet. Please check the configuration folder or change it in Settings. By default the folder is /etc/wireguard."})])):this.wireguardConfigurationsStore.ConfigurationLoaded?(o(!0),i(w,{key:1},k(g.configurations,(f,b)=>(o(),y($,{display:this.wireguardConfigurationsStore.CurrentDisplay,delay:b*.03+"s",key:f.Name,c:f},null,8,["display","delay","c"]))),128)):h("",!0)]),_:1})])])])}const _e=D(At,[["render",de],["__scopeId","data-v-7ed053f0"]]);export{_e as default};
diff --git a/src/static/dist/WGDashboardAdmin/assets/dashboardEmailSettings-BLi3ez-N.js b/src/static/dist/WGDashboardAdmin/assets/dashboardEmailSettings-BLi3ez-N.js
deleted file mode 100644
index 0bd62545..00000000
--- a/src/static/dist/WGDashboardAdmin/assets/dashboardEmailSettings-BLi3ez-N.js
+++ /dev/null
@@ -1 +0,0 @@
-import{_ as A,c as r,a as e,m as h,b as l,h as y,y as _,n as $,t as x,z as w,D as k,A as K,f as i,d as g,v as D,e as C,j as v,F as S,w as V,T as F,k as M,g as T,i as E,o as N,r as I,u as m,C as U}from"./index-DYYtDSji.js";import{L as c}from"./localeText-Cd7vLnRM.js";import{d as P}from"./dayjs.min-WRW_FTL4.js";import{Z as Y}from"./vue-datepicker-Cw5Y4tvU.js";const H={name:"accountSettingsInputUsername",components:{LocaleText:c},props:{targetData:String,title:String},setup(){const t=k(),s=`input_${K()}`;return{store:t,uuid:s}},data(){return{value:"",invalidFeedback:"",showInvalidFeedback:!1,isValid:!1,timeout:void 0,changed:!1,updating:!1}},mounted(){this.value=this.store.Configuration.Account[this.targetData]},methods:{async useValidation(t){this.changed&&(this.updating=!0,await w("/api/updateDashboardConfigurationItem",{section:"Account",key:this.targetData,value:this.value},s=>{s.status?(this.isValid=!0,this.showInvalidFeedback=!1,this.store.Configuration.Account[this.targetData]=this.value,clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.isValid=!1,5e3)):(this.isValid=!1,this.showInvalidFeedback=!0,this.invalidFeedback=s.message),this.changed=!1,this.updating=!1}))}}},R={class:"form-group mb-2"},j=["for"],q=["id","disabled"],B={class:"invalid-feedback"};function z(t,s,p,b,u,f){const o=y("LocaleText");return i(),r("div",R,[e("label",{for:this.uuid,class:"text-muted mb-1"},[e("strong",null,[e("small",null,[l(o,{t:this.title},null,8,["t"])])])],8,j),h(e("input",{type:"text",class:$(["form-control",{"is-invalid":u.showInvalidFeedback,"is-valid":u.isValid}]),id:this.uuid,"onUpdate:modelValue":s[0]||(s[0]=a=>this.value=a),onKeydown:s[1]||(s[1]=a=>this.changed=!0),onBlur:s[2]||(s[2]=a=>f.useValidation()),disabled:this.updating},null,42,q),[[_,this.value]]),e("div",B,x(this.invalidFeedback),1)])}const ft=A(H,[["render",z]]),G={name:"accountSettingsInputPassword",components:{LocaleText:c},props:{targetData:String,warning:!1,warningText:""},setup(){const t=k(),s=`input_${K()}`;return{store:t,uuid:s}},data(){return{value:{currentPassword:"",newPassword:"",repeatNewPassword:""},invalidFeedback:"",showInvalidFeedback:!1,isValid:!1,timeout:void 0}},methods:{async useValidation(){Object.values(this.value).find(t=>t.length===0)===void 0?this.value.newPassword===this.value.repeatNewPassword?await w("/api/updateDashboardConfigurationItem",{section:"Account",key:this.targetData,value:this.value},t=>{t.status?(this.isValid=!0,this.showInvalidFeedback=!1,this.store.Configuration.Account[this.targetData]=this.value,clearTimeout(this.timeout),this.timeout=setTimeout(()=>{this.isValid=!1,this.value={currentPassword:"",newPassword:"",repeatNewPassword:""}},5e3)):(this.isValid=!1,this.showInvalidFeedback=!0,this.invalidFeedback=t.message)}):(this.showInvalidFeedback=!0,this.invalidFeedback="New passwords does not match"):(this.showInvalidFeedback=!0,this.invalidFeedback="Please fill in all required fields.")}},computed:{passwordValid(){return Object.values(this.value).find(t=>t.length===0)===void 0&&this.value.newPassword===this.value.repeatNewPassword}}},W={class:"d-flex flex-column gap-2"},O={class:"row g-2"},Z={class:"col-sm"},J={class:"form-group"},Q=["for"],X=["id"],ee={key:0,class:"invalid-feedback d-block"},se={class:"col-sm"},te={class:"form-group"},ae=["for"],ie=["id"],oe={class:"col-sm"},ne={class:"form-group"},le=["for"],de=["id"],re=["disabled"];function ue(t,s,p,b,u,f){const o=y("LocaleText");return i(),r("div",null,[e("h6",null,[l(o,{t:"Update Password"})]),e("form",W,[e("div",O,[e("div",Z,[e("div",J,[e("label",{for:"currentPassword_"+this.uuid,class:"text-muted mb-1"},[e("strong",null,[e("small",null,[l(o,{t:"Current Password"})])])],8,Q),h(e("input",{type:"password",class:$(["form-control",{"is-invalid":u.showInvalidFeedback,"is-valid":u.isValid}]),autocomplete:"current-password","onUpdate:modelValue":s[0]||(s[0]=a=>this.value.currentPassword=a),id:"currentPassword_"+this.uuid},null,10,X),[[_,this.value.currentPassword]]),u.showInvalidFeedback?(i(),r("div",ee,x(this.invalidFeedback),1)):g("",!0)])]),e("div",se,[e("div",te,[e("label",{for:"newPassword_"+this.uuid,class:"text-muted mb-1"},[e("strong",null,[e("small",null,[l(o,{t:"New Password"})])])],8,ae),h(e("input",{type:"password",class:$(["form-control",{"is-invalid":u.showInvalidFeedback,"is-valid":u.isValid}]),autocomplete:"new-password","onUpdate:modelValue":s[1]||(s[1]=a=>this.value.newPassword=a),id:"newPassword_"+this.uuid},null,10,ie),[[_,this.value.newPassword]])])]),e("div",oe,[e("div",ne,[e("label",{for:"repeatNewPassword_"+this.uuid,class:"text-muted mb-1"},[e("strong",null,[e("small",null,[l(o,{t:"Repeat New Password"})])])],8,le),h(e("input",{type:"password",class:$(["form-control",{"is-invalid":u.showInvalidFeedback,"is-valid":u.isValid}]),autocomplete:"new-password","onUpdate:modelValue":s[2]||(s[2]=a=>this.value.repeatNewPassword=a),id:"repeatNewPassword_"+this.uuid},null,10,de),[[_,this.value.repeatNewPassword]])])])]),e("button",{disabled:!this.passwordValid,class:"ms-auto btn bg-success-subtle text-success-emphasis border-1 border-success-subtle rounded-3 shadow-sm",onClick:s[3]||(s[3]=a=>this.useValidation())},[s[4]||(s[4]=e("i",{class:"bi bi-save2-fill me-2"},null,-1)),l(o,{t:"Save"})],8,re)])])}const gt=A(G,[["render",ue]]),ce={name:"dashboardTheme",components:{LocaleText:c},setup(){return{dashboardConfigurationStore:k()}},methods:{async switchTheme(t){await w("/api/updateDashboardConfigurationItem",{section:"Server",key:"dashboard_theme",value:t},s=>{s.status&&(this.dashboardConfigurationStore.Configuration.Server.dashboard_theme=t)})}}},me={class:"text-muted mb-1 d-block"},he={class:"d-flex gap-1"};function pe(t,s,p,b,u,f){const o=y("LocaleText");return i(),r("div",null,[e("small",me,[e("strong",null,[l(o,{t:"Theme"})])]),e("div",he,[e("button",{class:$(["btn bg-primary-subtle text-primary-emphasis flex-grow-1",{active:this.dashboardConfigurationStore.Configuration.Server.dashboard_theme==="light"}]),onClick:s[0]||(s[0]=a=>this.switchTheme("light"))},[s[2]||(s[2]=e("i",{class:"bi bi-sun-fill me-2"},null,-1)),l(o,{t:"Light"})],2),e("button",{class:$(["btn bg-primary-subtle text-primary-emphasis flex-grow-1",{active:this.dashboardConfigurationStore.Configuration.Server.dashboard_theme==="dark"}]),onClick:s[1]||(s[1]=a=>this.switchTheme("dark"))},[s[3]||(s[3]=e("i",{class:"bi bi-moon-fill me-2"},null,-1)),l(o,{t:"Dark"})],2)])])}const _t=A(ce,[["render",pe]]),be={name:"newDashboardAPIKey",components:{LocaleText:c,VueDatePicker:Y},data(){return{newKeyData:{ExpiredAt:P().add(7,"d").format("YYYY-MM-DD HH:mm:ss"),NeverExpire:!1},submitting:!1}},setup(){return{store:k()}},mounted(){console.log(this.newKeyData.ExpiredAt)},methods:{submitNewAPIKey(){this.submitting=!0,w("/api/newDashboardAPIKey",this.newKeyData,t=>{t.status?(this.$emit("created",t.data),this.store.newMessage("Server","API Key created","success"),this.$emit("close")):this.store.newMessage("Server",t.message,"danger"),this.submitting=!1})},fixDate(t){return console.log(P(t).format("YYYY-MM-DDTHH:mm:ss")),P(t).format("YYYY-MM-DDTHH:mm:ss")},parseTime(t){t?this.newKeyData.ExpiredAt=P(t).format("YYYY-MM-DD HH:mm:ss"):this.newKeyData.ExpiredAt=void 0}}},fe={class:"position-absolute w-100 h-100 top-0 start-0 rounded-bottom-3 p-3 d-flex",style:{"background-color":"#00000060","backdrop-filter":"blur(3px)","z-index":"9999"}},ge={class:"card m-auto rounded-3 mt-5"},_e={class:"card-header bg-transparent d-flex align-items-center gap-2 border-0 p-4 pb-0"},ve={class:"mb-0"},ye={class:"card-body d-flex gap-2 p-4 flex-column"},we={class:"text-muted"},$e={class:"d-flex align-items-center gap-2"},ke={class:"form-check"},xe=["disabled"],Ae={class:"form-check-label",for:"neverExpire"},Pe={key:0,class:"bi bi-check-lg me-2"};function Ce(t,s,p,b,u,f){const o=y("LocaleText"),a=y("VueDatePicker");return i(),r("div",fe,[e("div",ge,[e("div",_e,[e("h6",ve,[l(o,{t:"Create API Key"})]),e("button",{type:"button",class:"btn-close ms-auto",onClick:s[0]||(s[0]=n=>this.$emit("close"))})]),e("div",ye,[e("small",we,[l(o,{t:"When should this API Key expire?"})]),e("div",$e,[l(a,{style:{"z-index":"9999"},is24:!0,"min-date":new Date,"model-value":this.newKeyData.ExpiredAt,"onUpdate:modelValue":this.parseTime,"time-picker-inline":"",format:"yyyy-MM-dd HH:mm:ss","preview-format":"yyyy-MM-dd HH:mm:ss",clearable:!1,disabled:this.newKeyData.NeverExpire||this.submitting,dark:this.store.Configuration.Server.dashboard_theme==="dark"},null,8,["min-date","model-value","onUpdate:modelValue","disabled","dark"])]),e("div",ke,[h(e("input",{class:"form-check-input",type:"checkbox","onUpdate:modelValue":s[1]||(s[1]=n=>this.newKeyData.NeverExpire=n),id:"neverExpire",disabled:this.submitting},null,8,xe),[[D,this.newKeyData.NeverExpire]]),e("label",Ae,[l(o,{t:"Never Expire"}),s[3]||(s[3]=C(" (",-1)),s[4]||(s[4]=e("i",{class:"bi bi-emoji-grimace-fill me-2"},null,-1)),l(o,{t:"Don't think that's a good idea"}),s[5]||(s[5]=C(") ",-1))])]),e("button",{class:$(["ms-auto btn bg-success-subtle text-success-emphasis border-1 border-success-subtle rounded-3 shadow-sm",{disabled:this.submitting}]),onClick:s[2]||(s[2]=n=>this.submitNewAPIKey())},[this.submitting?g("",!0):(i(),r("i",Pe)),this.submitting?(i(),v(o,{key:1,t:"Creating..."})):(i(),v(o,{key:2,t:"Create"}))],2)])])])}const De=A(be,[["render",Ce]]),Ie={name:"dashboardAPIKey",components:{LocaleText:c},props:{apiKey:Object},setup(){return{store:k()}},data(){return{confirmDelete:!1}},methods:{deleteAPIKey(){w("/api/deleteDashboardAPIKey",{Key:this.apiKey.Key},t=>{t.status?(this.$emit("deleted",t.data),this.store.newMessage("Server","API Key deleted","success")):this.store.newMessage("Server",t.message,"danger")})}}},Ke={class:"card rounded-3 shadow-sm"},Se={key:0,class:"card-body d-flex gap-3 align-items-center apiKey-card-body"},Te={class:"d-flex align-items-center gap-2"},Ve={class:"text-muted"},Ee={style:{"word-break":"break-all"}},Le={class:"d-flex align-items-center gap-2 ms-auto"},Fe={class:"text-muted"},Me={key:0,class:"card-body d-flex gap-3 align-items-center justify-content-end"};function Ne(t,s,p,b,u,f){const o=y("LocaleText");return i(),r("div",Ke,[this.confirmDelete?(i(),r(S,{key:1},[this.store.getActiveCrossServer()?g("",!0):(i(),r("div",Me,[l(o,{t:"Are you sure to delete this API key?"}),e("a",{role:"button",class:"btn btn-sm bg-success-subtle text-success-emphasis rounded-3",onClick:s[1]||(s[1]=a=>this.deleteAPIKey())},[...s[4]||(s[4]=[e("i",{class:"bi bi-check-lg"},null,-1)])]),e("a",{role:"button",class:"btn btn-sm bg-secondary-subtle text-secondary-emphasis rounded-3",onClick:s[2]||(s[2]=a=>this.confirmDelete=!1)},[...s[5]||(s[5]=[e("i",{class:"bi bi-x-lg"},null,-1)])])]))],64)):(i(),r("div",Se,[e("div",Te,[e("small",Ve,[l(o,{t:"Key"})]),e("span",Ee,x(this.apiKey.Key),1)]),e("div",Le,[e("small",Fe,[l(o,{t:"Expire At"})]),this.apiKey.ExpiredAt?g("",!0):(i(),v(o,{key:0,t:"Never Expire"})),e("span",null,x(this.apiKey.ExpiredAt),1)]),this.store.getActiveCrossServer()?g("",!0):(i(),r("a",{key:0,role:"button",class:"btn btn-sm bg-danger-subtle text-danger-emphasis rounded-3",onClick:s[0]||(s[0]=a=>this.confirmDelete=!0)},[...s[3]||(s[3]=[e("i",{class:"bi bi-trash-fill"},null,-1)])]))]))])}const Ue=A(Ie,[["render",Ne],["__scopeId","data-v-a76253c8"]]),Ye={name:"dashboardAPIKeys",components:{LocaleText:c,DashboardAPIKey:Ue,NewDashboardAPIKey:De},setup(){return{store:k()}},data(){return{value:this.store.Configuration.Server.dashboard_api_key,apiKeys:[],newDashboardAPIKey:!1}},methods:{async toggleDashboardAPIKeys(){await w("/api/updateDashboardConfigurationItem",{section:"Server",key:"dashboard_api_key",value:this.value},t=>{t.status?(this.store.Configuration.Peers[this.targetData]=this.value,this.store.newMessage("Server",`API Keys function is successfully ${this.value?"enabled":"disabled"}`,"success")):(this.value=this.store.Configuration.Peers[this.targetData],this.store.newMessage("Server",`API Keys function is failed to ${this.value?"enabled":"disabled"}`,"danger"))})}},watch:{value:{immediate:!0,handler(t){t?T("/api/getDashboardAPIKeys",{},s=>{s.status?this.apiKeys=s.data:(this.apiKeys=[],this.store.newMessage("Server",s.message,"danger"))}):this.apiKeys=[]}}}},He={class:"card rounded-3"},Re={class:"my-2"},je={key:0,class:"form-check form-switch ms-auto"},qe={class:"form-check-label",for:"allowAPIKeysSwitch"},Be={key:0,class:"card-body position-relative d-flex flex-column gap-2"},ze={key:1,class:"card",style:{height:"300px"}},Ge={class:"card-body d-flex text-muted"},We={class:"m-auto"},Oe={key:2,class:"d-flex flex-column gap-2 position-relative",style:{"min-height":"300px"}};function Ze(t,s,p,b,u,f){const o=y("LocaleText"),a=y("DashboardAPIKey"),n=y("NewDashboardAPIKey");return i(),r("div",He,[e("div",{class:$(["card-header d-flex align-items-center",{"border-bottom-0 rounded-3":!this.value}])},[e("h6",Re,[s[6]||(s[6]=e("i",{class:"bi bi-key-fill me-2"},null,-1)),l(o,{t:"API Keys"})]),this.store.getActiveCrossServer()?g("",!0):(i(),r("div",je,[h(e("input",{class:"form-check-input",type:"checkbox","onUpdate:modelValue":s[0]||(s[0]=d=>this.value=d),onChange:s[1]||(s[1]=d=>this.toggleDashboardAPIKeys()),role:"switch",id:"allowAPIKeysSwitch"},null,544),[[D,this.value]]),e("label",qe,[this.value?(i(),v(o,{key:0,t:"Enabled"})):(i(),v(o,{key:1,t:"Disabled"}))])]))],2),this.value?(i(),r("div",Be,[this.store.getActiveCrossServer()?g("",!0):(i(),r("button",{key:0,class:"btn bg-primary-subtle text-primary-emphasis border-1 border-primary-subtle rounded-3 shadow-sm",onClick:s[2]||(s[2]=d=>this.newDashboardAPIKey=!0)},[s[7]||(s[7]=e("i",{class:"bi bi-plus-circle-fill me-2"},null,-1)),l(o,{t:"API Key"})])),this.apiKeys.length===0?(i(),r("div",ze,[e("div",Ge,[e("span",We,[l(o,{t:"No WGDashboard API Key"})])])])):(i(),r("div",Oe,[l(F,{name:"apiKey"},{default:V(()=>[(i(!0),r(S,null,E(this.apiKeys,d=>(i(),v(a,{apiKey:d,key:d.Key,onDeleted:s[3]||(s[3]=L=>this.apiKeys=L)},null,8,["apiKey"]))),128))]),_:1})])),l(M,{name:"zoomReversed"},{default:V(()=>[this.newDashboardAPIKey?(i(),v(n,{key:0,onCreated:s[4]||(s[4]=d=>this.apiKeys=d),onClose:s[5]||(s[5]=d=>this.newDashboardAPIKey=!1)})):g("",!0)]),_:1})])):g("",!0)])}const vt=A(Ye,[["render",Ze],["__scopeId","data-v-f7e62927"]]),Je={name:"accountSettingsMFA",components:{LocaleText:c},setup(){const t=k(),s=`input_${K()}`;return{store:t,uuid:s}},data(){return{status:!1}},mounted(){this.status=this.store.Configuration.Account.enable_totp},methods:{async resetMFA(){await w("/api/updateDashboardConfigurationItem",{section:"Account",key:"totp_verified",value:"false"},async t=>{await w("/api/updateDashboardConfigurationItem",{section:"Account",key:"enable_totp",value:"false"},s=>{s.status&&this.$router.push("/2FASetup")})})}}},Qe={class:"d-flex align-items-center"},Xe={class:"form-check form-switch"},es={for:"allowMFAKeysSwitch"};function ss(t,s,p,b,u,f){const o=y("LocaleText");return i(),r("div",null,[e("div",Qe,[e("div",Xe,[h(e("input",{class:"form-check-input",type:"checkbox","onUpdate:modelValue":s[0]||(s[0]=a=>this.status=a),role:"switch",id:"allowMFAKeysSwitch"},null,512),[[D,this.status]]),e("label",es,[this.status?(i(),v(o,{key:0,t:"Enabled"})):(i(),v(o,{key:1,t:"Disabled"}))])]),this.status?(i(),r("button",{key:0,class:"btn bg-warning-subtle text-warning-emphasis border-1 border-warning-subtle ms-auto rounded-3 shadow-sm",onClick:s[1]||(s[1]=a=>this.resetMFA())},[s[2]||(s[2]=e("i",{class:"bi bi-shield-lock-fill me-2"},null,-1)),this.store.Configuration.Account.totp_verified?(i(),v(o,{key:0,t:"Reset"})):(i(),v(o,{key:1,t:"Setup"})),s[3]||(s[3]=C(" MFA ",-1))])):g("",!0)])])}const yt=A(Je,[["render",ss]]),ts={name:"dashboardLanguage",components:{LocaleText:c},setup(){return{store:k()}},data(){return{languages:void 0}},mounted(){T("/api/locale/available",{},t=>{this.languages=t.data})},methods:{changeLanguage(t){w("/api/locale/update",{lang_id:t},s=>{s.status?(this.store.Configuration.Server.dashboard_language=t,this.store.Locale=s.data):this.store.newMessage("Server","WGDashboard language update failed","danger")})}},computed:{currentLanguage(){let t=this.store.Configuration.Server.dashboard_language;return this.languages.find(s=>s.lang_id===t)}}},as={class:"text-muted d-block mb-1"},is={class:"d-flex gap-2"},os={class:"dropdown w-100"},ns=["disabled"],ls={key:1},ds={class:"dropdown-menu rounded-3 shadow",style:{"max-height":"500px","overflow-y":"scroll"}},rs=["onClick"],us={class:"me-auto mb-0"},cs={class:"d-block",style:{"font-size":"0.8rem"}},ms={key:0,class:"bi bi-check text-primary fs-5"};function hs(t,s,p,b,u,f){const o=y("LocaleText");return i(),r("div",null,[e("small",as,[e("strong",null,[l(o,{t:"Language"})])]),e("div",is,[e("div",os,[e("button",{class:"btn bg-primary-subtle text-primary-emphasis dropdown-toggle w-100 rounded-3",disabled:!this.languages,type:"button","data-bs-toggle":"dropdown","aria-expanded":"false"},[this.languages?(i(),r("span",ls,x(f.currentLanguage?.lang_name_localized),1)):(i(),v(o,{key:0,t:"Loading..."}))],8,ns),e("ul",ds,[(i(!0),r(S,null,E(this.languages,a=>(i(),r("li",null,[e("a",{class:"dropdown-item d-flex align-items-center",role:"button",onClick:n=>this.changeLanguage(a.lang_id)},[e("p",us,[C(x(a.lang_name_localized)+" ",1),e("small",cs,x(a.lang_name),1)]),f.currentLanguage?.lang_id===a.lang_id?(i(),r("i",ms)):g("",!0)],8,rs)]))),256))])])])])}const wt=A(ts,[["render",hs],["__scopeId","data-v-4e34593e"]]),ps={name:"dashboardIPPortInput",components:{LocaleText:c},setup(){return{store:k()}},data(){return{ipAddress:"",port:0,invalidFeedback:"",showInvalidFeedback:!1,isValid:!1,timeout:void 0,changed:!1,updating:!1}},mounted(){this.ipAddress=this.store.Configuration.Server.app_ip,this.port=this.store.Configuration.Server.app_port},methods:{async useValidation(t,s,p){this.changed&&(this.updating=!0,await w("/api/updateDashboardConfigurationItem",{section:"Server",key:s,value:p},b=>{b.status?(t.target.classList.add("is-valid"),this.showInvalidFeedback=!1,this.store.Configuration.Server[s]=p,clearTimeout(this.timeout),this.timeout=setTimeout(()=>{t.target.classList.remove("is-valid")},5e3)):(this.isValid=!1,this.showInvalidFeedback=!0,this.invalidFeedback=b.message),this.changed=!1,this.updating=!1}))}}},bs={class:"row g-2"},fs={class:"col-sm"},gs={class:"form-group"},_s={for:"input_dashboard_ip",class:"text-muted mb-1"},vs=["disabled"],ys={class:"invalid-feedback"},ws={class:"col-sm"},$s={class:"form-group"},ks={for:"input_dashboard_ip",class:"text-muted mb-1"},xs=["disabled"],As={class:"invalid-feedback"},Ps={class:"px-2 py-1 text-warning-emphasis bg-warning-subtle border border-warning-subtle rounded-2 d-inline-block mb-2 mt-2"};function Cs(t,s,p,b,u,f){const o=y("LocaleText");return i(),r("div",null,[e("div",bs,[e("div",fs,[e("div",gs,[e("label",_s,[e("strong",null,[e("small",null,[l(o,{t:"IP Address / Hostname"})])])]),h(e("input",{type:"text",class:$(["form-control",{"is-invalid":u.showInvalidFeedback,"is-valid":u.isValid}]),id:"input_dashboard_ip","onUpdate:modelValue":s[0]||(s[0]=a=>this.ipAddress=a),onKeydown:s[1]||(s[1]=a=>this.changed=!0),onBlur:s[2]||(s[2]=a=>f.useValidation(a,"app_ip",this.ipAddress)),disabled:this.updating},null,42,vs),[[_,this.ipAddress]]),e("div",ys,x(this.invalidFeedback),1)])]),e("div",ws,[e("div",$s,[e("label",ks,[e("strong",null,[e("small",null,[l(o,{t:"Listen Port"})])])]),h(e("input",{type:"number",class:$(["form-control",{"is-invalid":u.showInvalidFeedback,"is-valid":u.isValid}]),id:"input_dashboard_ip","onUpdate:modelValue":s[3]||(s[3]=a=>this.port=a),onKeydown:s[4]||(s[4]=a=>this.changed=!0),onBlur:s[5]||(s[5]=a=>f.useValidation(a,"app_port",this.port)),disabled:this.updating},null,42,xs),[[_,this.port]]),e("div",As,x(this.invalidFeedback),1)])])]),e("div",Ps,[e("small",null,[s[6]||(s[6]=e("i",{class:"bi bi-exclamation-triangle-fill me-2"},null,-1)),l(o,{t:"Manual restart of WGDashboard is needed to apply changes on IP Address and Listen Port"})])])])}const $t=A(ps,[["render",Cs]]),Ds={class:"card"},Is={class:"card-header"},Ks={class:"my-2 d-flex"},Ss={key:0,class:"text-success ms-auto"},Ts={class:"card-body d-flex flex-column gap-3"},Vs={class:"row gx-2 gy-2"},Es={class:"col-12"},Ls={class:"form-check mb-2 form-switch"},Fs={class:"form-check-label",for:"authentication_required"},Ms={class:"col-12 col-lg-4"},Ns={class:"form-group"},Us={for:"server",class:"text-muted mb-1"},Ys={class:"col-12 col-lg-4"},Hs={class:"form-group"},Rs={for:"port",class:"text-muted mb-1"},js={class:"col-12 col-lg-4"},qs={class:"form-group"},Bs={for:"encryption",class:"text-muted mb-1"},zs={value:"NOTLS"},Gs={key:0,class:"col-12 col-lg-4"},Ws={class:"form-group"},Os={for:"username",class:"text-muted mb-1"},Zs={key:1,class:"col-12 col-lg-4"},Js={class:"form-group"},Qs={for:"email_password",class:"text-muted mb-1"},Xs={class:"col-12 col-lg-4"},et={class:"form-group"},st={for:"send_from",class:"text-muted mb-1"},tt={key:0},at={key:1},it={class:"text-muted mb-1",for:"test_email"},ot={class:"fw-bold"},nt=["disabled"],lt=["disabled"],dt={key:0,class:"bi bi-send me-2"},rt={key:1,class:"spinner-border spinner-border-sm me-2"},ut={class:"text-muted mb-1",for:"email_template"},ct={class:"fw-bold"},kt={__name:"dashboardEmailSettings",setup(t){const s=k();N(()=>{f(),document.querySelectorAll("#emailAccount input, #emailAccount select, #email_template").forEach(a=>{a.addEventListener("change",async()=>{let n=a.attributes.getNamedItem("id").value;await w("/api/updateDashboardConfigurationItem",{section:"Email",key:n,value:s.Configuration.Email[n]},d=>{d.status?(a.classList.remove("is-invalid"),a.classList.add("is-valid")):(a.classList.remove("is-valid"),a.classList.add("is-invalid")),f()})})})});const p=I(!1),b=I(""),u=I(!1),f=async()=>{await T("/api/email/ready",{},a=>{p.value=a.status})},o=async()=>{u.value=!0,await w("/api/email/send",{Receiver:b.value,Subject:"WGDashboard Testing Email",Body:"Test 1, 2, 3! Hello World :)"},a=>{a.status?s.newMessage("Server","Test email sent successfully!","success"):s.newMessage("Server",`Test email sent failed! Reason: ${a.message}`,"danger"),u.value=!1})};return(a,n)=>(i(),r("div",Ds,[e("div",Is,[e("h6",Ks,[n[12]||(n[12]=e("i",{class:"bi bi-envelope-fill me-2"},null,-1)),l(c,{t:"Email Account"}),p.value?(i(),r("span",Ss,[n[11]||(n[11]=e("i",{class:"bi bi-check-circle-fill me-2"},null,-1)),l(c,{t:"Ready"})])):g("",!0)])]),e("div",Ts,[e("form",{onSubmit:n[7]||(n[7]=d=>d.preventDefault(d)),id:"emailAccount"},[e("div",Vs,[e("div",Es,[e("div",Ls,[h(e("input",{class:"form-check-input",type:"checkbox",role:"switch","onUpdate:modelValue":n[0]||(n[0]=d=>m(s).Configuration.Email.authentication_required=d),id:"authentication_required"},null,512),[[D,m(s).Configuration.Email.authentication_required]]),e("label",Fs,[l(c,{t:"Require SMTP Authentication"})])])]),e("div",Ms,[e("div",Ns,[e("label",Us,[e("strong",null,[e("small",null,[l(c,{t:"Server"})])])]),h(e("input",{id:"server","onUpdate:modelValue":n[1]||(n[1]=d=>m(s).Configuration.Email.server=d),type:"text",class:"form-control rounded-3"},null,512),[[_,m(s).Configuration.Email.server]])])]),e("div",Ys,[e("div",Hs,[e("label",Rs,[e("strong",null,[e("small",null,[l(c,{t:"Port"})])])]),h(e("input",{id:"port","onUpdate:modelValue":n[2]||(n[2]=d=>m(s).Configuration.Email.port=d),type:"text",class:"form-control rounded-3"},null,512),[[_,m(s).Configuration.Email.port]])])]),e("div",js,[e("div",qs,[e("label",Bs,[e("strong",null,[e("small",null,[l(c,{t:"Encryption"})])])]),h(e("select",{class:"form-select rounded-3","onUpdate:modelValue":n[3]||(n[3]=d=>m(s).Configuration.Email.encryption=d),id:"encryption"},[n[13]||(n[13]=e("option",{value:"STARTTLS"}," STARTTLS ",-1)),e("option",zs,[l(c,{t:"No Encryption"})])],512),[[U,m(s).Configuration.Email.encryption]])])]),m(s).Configuration.Email.authentication_required?(i(),r("div",Gs,[e("div",Ws,[e("label",Os,[e("strong",null,[e("small",null,[l(c,{t:"Username"})])])]),h(e("input",{id:"username","onUpdate:modelValue":n[4]||(n[4]=d=>m(s).Configuration.Email.username=d),type:"text",class:"form-control rounded-3"},null,512),[[_,m(s).Configuration.Email.username]])])])):g("",!0),m(s).Configuration.Email.authentication_required?(i(),r("div",Zs,[e("div",Js,[e("label",Qs,[e("strong",null,[e("small",null,[l(c,{t:"Password"})])])]),h(e("input",{id:"email_password","onUpdate:modelValue":n[5]||(n[5]=d=>m(s).Configuration.Email.email_password=d),type:"password",class:"form-control rounded-3"},null,512),[[_,m(s).Configuration.Email.email_password]])])])):g("",!0),e("div",Xs,[e("div",et,[e("label",st,[e("strong",null,[e("small",null,[l(c,{t:"Send From"})])])]),h(e("input",{id:"send_from","onUpdate:modelValue":n[6]||(n[6]=d=>m(s).Configuration.Email.send_from=d),type:"text",class:"form-control rounded-3"},null,512),[[_,m(s).Configuration.Email.send_from]])])])])],32),p.value?(i(),r("hr",tt)):g("",!0),p.value?(i(),r("div",at,[e("label",it,[e("small",ot,[l(c,{t:"Send Test Email"})])]),e("form",{onSubmit:n[9]||(n[9]=d=>{d.preventDefault(),o()}),class:"input-group"},[h(e("input",{type:"email",class:"form-control rounded-start-3",id:"test_email",placeholder:"john@example.com","onUpdate:modelValue":n[8]||(n[8]=d=>b.value=d),disabled:u.value},null,8,nt),[[_,b.value]]),e("button",{class:"btn bg-primary-subtle text-primary-emphasis border-primary-subtle rounded-end-3",type:"submit",value:"Submit",disabled:b.value.length===0||u.value,id:"button-addon2"},[u.value?(i(),r("span",rt)):(i(),r("i",dt)),l(c,{t:u.value?"Sending...":"Send"},null,8,["t"])],8,lt)],32)])):g("",!0),n[14]||(n[14]=e("hr",null,null,-1)),e("div",null,[e("label",ut,[e("small",ct,[l(c,{t:"Email Body Template"})])]),h(e("textarea",{class:"form-control rounded-3 font-monospace","onUpdate:modelValue":n[10]||(n[10]=d=>m(s).Configuration.Email.email_template=d),id:"email_template",style:{"min-height":"400px"}},null,512),[[_,m(s).Configuration.Email.email_template]])])])]))}};export{ft as A,_t as D,kt as _,gt as a,vt as b,yt as c,wt as d,$t as e};
diff --git a/src/static/dist/WGDashboardAdmin/assets/dashboardEmailSettings-BusQN-n1.js b/src/static/dist/WGDashboardAdmin/assets/dashboardEmailSettings-BusQN-n1.js
new file mode 100644
index 00000000..98552d17
--- /dev/null
+++ b/src/static/dist/WGDashboardAdmin/assets/dashboardEmailSettings-BusQN-n1.js
@@ -0,0 +1 @@
+import{_ as A,c as r,a as e,q as h,b as l,j as y,A as v,n as k,t as x,B as w,D as $,C as S,f as i,d as g,h as F,i as M,v as D,e as P,l as _,F as K,w as V,T as N,m as U,g as T,k as E,o as Y,r as I,u as m,H}from"./index-QGgWclm4.js";import{L as c}from"./localeText-Cji_3w42.js";import{d as C}from"./dayjs.min-DXJxaGlz.js";import{Z as R}from"./vue-datepicker-CvNIiyON.js";const q={name:"accountSettingsInputUsername",components:{LocaleText:c},props:{targetData:String,title:String},setup(){const t=$(),s=`input_${S()}`;return{store:t,uuid:s}},data(){return{value:"",invalidFeedback:"",showInvalidFeedback:!1,isValid:!1,timeout:void 0,changed:!1,updating:!1}},mounted(){this.value=this.store.Configuration.Account[this.targetData]},methods:{async useValidation(t){this.changed&&(this.updating=!0,await w("/api/updateDashboardConfigurationItem",{section:"Account",key:this.targetData,value:this.value},s=>{s.status?(this.isValid=!0,this.showInvalidFeedback=!1,this.store.Configuration.Account[this.targetData]=this.value,clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.isValid=!1,5e3)):(this.isValid=!1,this.showInvalidFeedback=!0,this.invalidFeedback=s.message),this.changed=!1,this.updating=!1}))}}},B={class:"form-group mb-2"},j=["for"],z=["id","disabled"],W={class:"invalid-feedback"};function G(t,s,b,f,u,p){const o=y("LocaleText");return i(),r("div",B,[e("label",{for:this.uuid,class:"text-muted mb-1"},[e("strong",null,[e("small",null,[l(o,{t:this.title},null,8,["t"])])])],8,j),h(e("input",{type:"text",class:k(["form-control",{"is-invalid":u.showInvalidFeedback,"is-valid":u.isValid}]),id:this.uuid,"onUpdate:modelValue":s[0]||(s[0]=a=>this.value=a),onKeydown:s[1]||(s[1]=a=>this.changed=!0),onBlur:s[2]||(s[2]=a=>p.useValidation()),disabled:this.updating},null,42,z),[[v,this.value]]),e("div",W,x(this.invalidFeedback),1)])}const vt=A(q,[["render",G]]),O={name:"accountSettingsInputPassword",components:{LocaleText:c},props:{targetData:String,warning:!1,warningText:""},setup(){const t=$(),s=`input_${S()}`;return{store:t,uuid:s}},data(){return{value:{currentPassword:"",newPassword:"",repeatNewPassword:""},invalidFeedback:"",showInvalidFeedback:!1,isValid:!1,timeout:void 0}},methods:{async useValidation(){Object.values(this.value).find(t=>t.length===0)===void 0?this.value.newPassword===this.value.repeatNewPassword?await w("/api/updateDashboardConfigurationItem",{section:"Account",key:this.targetData,value:this.value},t=>{t.status?(this.isValid=!0,this.showInvalidFeedback=!1,this.store.Configuration.Account[this.targetData]=this.value,clearTimeout(this.timeout),this.timeout=setTimeout(()=>{this.isValid=!1,this.value={currentPassword:"",newPassword:"",repeatNewPassword:""}},5e3)):(this.isValid=!1,this.showInvalidFeedback=!0,this.invalidFeedback=t.message)}):(this.showInvalidFeedback=!0,this.invalidFeedback="New passwords does not match"):(this.showInvalidFeedback=!0,this.invalidFeedback="Please fill in all required fields.")}},computed:{passwordValid(){return Object.values(this.value).find(t=>t.length===0)===void 0&&this.value.newPassword===this.value.repeatNewPassword}}},Z={class:"d-flex flex-column gap-2"},J={class:"row g-2"},Q={class:"col-sm"},X={class:"form-group"},ee=["for"],se=["id"],te={key:0,class:"invalid-feedback d-block"},ae={class:"col-sm"},ie={class:"form-group"},oe=["for"],ne=["id"],le={class:"col-sm"},de={class:"form-group"},re=["for"],ue=["id"],ce=["disabled"];function me(t,s,b,f,u,p){const o=y("LocaleText");return i(),r("div",null,[e("h6",null,[l(o,{t:"Update Password"})]),e("form",Z,[e("div",J,[e("div",Q,[e("div",X,[e("label",{for:"currentPassword_"+this.uuid,class:"text-muted mb-1"},[e("strong",null,[e("small",null,[l(o,{t:"Current Password"})])])],8,ee),h(e("input",{type:"password",class:k(["form-control",{"is-invalid":u.showInvalidFeedback,"is-valid":u.isValid}]),autocomplete:"current-password","onUpdate:modelValue":s[0]||(s[0]=a=>this.value.currentPassword=a),id:"currentPassword_"+this.uuid},null,10,se),[[v,this.value.currentPassword]]),u.showInvalidFeedback?(i(),r("div",te,x(this.invalidFeedback),1)):g("",!0)])]),e("div",ae,[e("div",ie,[e("label",{for:"newPassword_"+this.uuid,class:"text-muted mb-1"},[e("strong",null,[e("small",null,[l(o,{t:"New Password"})])])],8,oe),h(e("input",{type:"password",class:k(["form-control",{"is-invalid":u.showInvalidFeedback,"is-valid":u.isValid}]),autocomplete:"new-password","onUpdate:modelValue":s[1]||(s[1]=a=>this.value.newPassword=a),id:"newPassword_"+this.uuid},null,10,ne),[[v,this.value.newPassword]])])]),e("div",le,[e("div",de,[e("label",{for:"repeatNewPassword_"+this.uuid,class:"text-muted mb-1"},[e("strong",null,[e("small",null,[l(o,{t:"Repeat New Password"})])])],8,re),h(e("input",{type:"password",class:k(["form-control",{"is-invalid":u.showInvalidFeedback,"is-valid":u.isValid}]),autocomplete:"new-password","onUpdate:modelValue":s[2]||(s[2]=a=>this.value.repeatNewPassword=a),id:"repeatNewPassword_"+this.uuid},null,10,ue),[[v,this.value.repeatNewPassword]])])])]),e("button",{disabled:!this.passwordValid,class:"ms-auto btn bg-success-subtle text-success-emphasis border-1 border-success-subtle rounded-3 shadow-sm",onClick:s[3]||(s[3]=a=>this.useValidation())},[s[4]||(s[4]=e("i",{class:"bi bi-save2-fill me-2"},null,-1)),l(o,{t:"Save"})],8,ce)])])}const _t=A(O,[["render",me]]),he={name:"dashboardTheme",components:{LocaleText:c},setup(){return{dashboardConfigurationStore:$()}},methods:{async switchTheme(t){await w("/api/updateDashboardConfigurationItem",{section:"Server",key:"dashboard_theme",value:t},s=>{s.status&&(this.dashboardConfigurationStore.Configuration.Server.dashboard_theme=t)})}}},pe={class:"text-muted mb-1 d-block"},be={class:"d-flex gap-1"};function fe(t,s,b,f,u,p){const o=y("LocaleText");return i(),r("div",null,[e("small",pe,[e("strong",null,[l(o,{t:"Theme"})])]),e("div",be,[e("button",{class:k(["btn bg-primary-subtle text-primary-emphasis flex-grow-1",{active:this.dashboardConfigurationStore.Configuration.Server.dashboard_theme==="system"}]),onClick:s[0]||(s[0]=a=>this.switchTheme("system"))},[s[3]||(s[3]=e("i",{class:"bi bi-circle-half me-2"},null,-1)),l(o,{t:"System"})],2),e("button",{class:k(["btn bg-primary-subtle text-primary-emphasis flex-grow-1",{active:this.dashboardConfigurationStore.Configuration.Server.dashboard_theme==="light"}]),onClick:s[1]||(s[1]=a=>this.switchTheme("light"))},[s[4]||(s[4]=e("i",{class:"bi bi-sun-fill me-2"},null,-1)),l(o,{t:"Light"})],2),e("button",{class:k(["btn bg-primary-subtle text-primary-emphasis flex-grow-1",{active:this.dashboardConfigurationStore.Configuration.Server.dashboard_theme==="dark"}]),onClick:s[2]||(s[2]=a=>this.switchTheme("dark"))},[s[5]||(s[5]=e("i",{class:"bi bi-moon-fill me-2"},null,-1)),l(o,{t:"Dark"})],2)])])}const yt=A(he,[["render",fe]]),ge={name:"newDashboardAPIKey",components:{LocaleText:c,VueDatePicker:R},data(){return{newKeyData:{ExpiredAt:C().add(7,"d").format("YYYY-MM-DD HH:mm:ss"),NeverExpire:!1},submitting:!1}},setup(){return{store:$()}},mounted(){M(),console.log(this.newKeyData.ExpiredAt)},computed:{isDark(){return F(this.store.Configuration.Server.dashboard_theme)==="dark"}},methods:{submitNewAPIKey(){this.submitting=!0,w("/api/newDashboardAPIKey",this.newKeyData,t=>{t.status?(this.$emit("created",t.data),this.store.newMessage("Server","API Key created","success"),this.$emit("close")):this.store.newMessage("Server",t.message,"danger"),this.submitting=!1})},fixDate(t){return console.log(C(t).format("YYYY-MM-DDTHH:mm:ss")),C(t).format("YYYY-MM-DDTHH:mm:ss")},parseTime(t){t?this.newKeyData.ExpiredAt=C(t).format("YYYY-MM-DD HH:mm:ss"):this.newKeyData.ExpiredAt=void 0}}},ve={class:"position-absolute w-100 h-100 top-0 start-0 rounded-bottom-3 p-3 d-flex",style:{"background-color":"#00000060","backdrop-filter":"blur(3px)","z-index":"9999"}},_e={class:"card m-auto rounded-3 mt-5"},ye={class:"card-header bg-transparent d-flex align-items-center gap-2 border-0 p-4 pb-0"},we={class:"mb-0"},ke={class:"card-body d-flex gap-2 p-4 flex-column"},$e={class:"text-muted"},xe={class:"d-flex align-items-center gap-2"},Ae={class:"form-check"},Ce=["disabled"],Pe={class:"form-check-label",for:"neverExpire"},De={key:0,class:"bi bi-check-lg me-2"};function Ie(t,s,b,f,u,p){const o=y("LocaleText"),a=y("VueDatePicker");return i(),r("div",ve,[e("div",_e,[e("div",ye,[e("h6",we,[l(o,{t:"Create API Key"})]),e("button",{type:"button",class:"btn-close ms-auto",onClick:s[0]||(s[0]=n=>this.$emit("close"))})]),e("div",ke,[e("small",$e,[l(o,{t:"When should this API Key expire?"})]),e("div",xe,[l(a,{style:{"z-index":"9999"},is24:!0,"min-date":new Date,"model-value":this.newKeyData.ExpiredAt,"onUpdate:modelValue":this.parseTime,"time-picker-inline":"",format:"yyyy-MM-dd HH:mm:ss","preview-format":"yyyy-MM-dd HH:mm:ss",clearable:!1,disabled:this.newKeyData.NeverExpire||this.submitting,dark:p.isDark},null,8,["min-date","model-value","onUpdate:modelValue","disabled","dark"])]),e("div",Ae,[h(e("input",{class:"form-check-input",type:"checkbox","onUpdate:modelValue":s[1]||(s[1]=n=>this.newKeyData.NeverExpire=n),id:"neverExpire",disabled:this.submitting},null,8,Ce),[[D,this.newKeyData.NeverExpire]]),e("label",Pe,[l(o,{t:"Never Expire"}),s[3]||(s[3]=P(" (",-1)),s[4]||(s[4]=e("i",{class:"bi bi-emoji-grimace-fill me-2"},null,-1)),l(o,{t:"Don't think that's a good idea"}),s[5]||(s[5]=P(") ",-1))])]),e("button",{class:k(["ms-auto btn bg-success-subtle text-success-emphasis border-1 border-success-subtle rounded-3 shadow-sm",{disabled:this.submitting}]),onClick:s[2]||(s[2]=n=>this.submitNewAPIKey())},[this.submitting?g("",!0):(i(),r("i",De)),this.submitting?(i(),_(o,{key:1,t:"Creating..."})):(i(),_(o,{key:2,t:"Create"}))],2)])])])}const Se=A(ge,[["render",Ie]]),Ke={name:"dashboardAPIKey",components:{LocaleText:c},props:{apiKey:Object},setup(){return{store:$()}},data(){return{confirmDelete:!1}},methods:{deleteAPIKey(){w("/api/deleteDashboardAPIKey",{Key:this.apiKey.Key},t=>{t.status?(this.$emit("deleted",t.data),this.store.newMessage("Server","API Key deleted","success")):this.store.newMessage("Server",t.message,"danger")})}}},Te={class:"card rounded-3 shadow-sm"},Ve={key:0,class:"card-body d-flex gap-3 align-items-center apiKey-card-body"},Ee={class:"d-flex align-items-center gap-2"},Le={class:"text-muted"},Fe={style:{"word-break":"break-all"}},Me={class:"d-flex align-items-center gap-2 ms-auto"},Ne={class:"text-muted"},Ue={key:0,class:"card-body d-flex gap-3 align-items-center justify-content-end"};function Ye(t,s,b,f,u,p){const o=y("LocaleText");return i(),r("div",Te,[this.confirmDelete?(i(),r(K,{key:1},[this.store.getActiveCrossServer()?g("",!0):(i(),r("div",Ue,[l(o,{t:"Are you sure to delete this API key?"}),e("a",{role:"button",class:"btn btn-sm bg-success-subtle text-success-emphasis rounded-3",onClick:s[1]||(s[1]=a=>this.deleteAPIKey())},[...s[4]||(s[4]=[e("i",{class:"bi bi-check-lg"},null,-1)])]),e("a",{role:"button",class:"btn btn-sm bg-secondary-subtle text-secondary-emphasis rounded-3",onClick:s[2]||(s[2]=a=>this.confirmDelete=!1)},[...s[5]||(s[5]=[e("i",{class:"bi bi-x-lg"},null,-1)])])]))],64)):(i(),r("div",Ve,[e("div",Ee,[e("small",Le,[l(o,{t:"Key"})]),e("span",Fe,x(this.apiKey.Key),1)]),e("div",Me,[e("small",Ne,[l(o,{t:"Expire At"})]),this.apiKey.ExpiredAt?g("",!0):(i(),_(o,{key:0,t:"Never Expire"})),e("span",null,x(this.apiKey.ExpiredAt),1)]),this.store.getActiveCrossServer()?g("",!0):(i(),r("a",{key:0,role:"button",class:"btn btn-sm bg-danger-subtle text-danger-emphasis rounded-3",onClick:s[0]||(s[0]=a=>this.confirmDelete=!0)},[...s[3]||(s[3]=[e("i",{class:"bi bi-trash-fill"},null,-1)])]))]))])}const He=A(Ke,[["render",Ye],["__scopeId","data-v-a76253c8"]]),Re={name:"dashboardAPIKeys",components:{LocaleText:c,DashboardAPIKey:He,NewDashboardAPIKey:Se},setup(){return{store:$()}},data(){return{value:this.store.Configuration.Server.dashboard_api_key,apiKeys:[],newDashboardAPIKey:!1}},methods:{async toggleDashboardAPIKeys(){await w("/api/updateDashboardConfigurationItem",{section:"Server",key:"dashboard_api_key",value:this.value},t=>{t.status?(this.store.Configuration.Peers[this.targetData]=this.value,this.store.newMessage("Server",`API Keys function is successfully ${this.value?"enabled":"disabled"}`,"success")):(this.value=this.store.Configuration.Peers[this.targetData],this.store.newMessage("Server",`API Keys function is failed to ${this.value?"enabled":"disabled"}`,"danger"))})}},watch:{value:{immediate:!0,handler(t){t?T("/api/getDashboardAPIKeys",{},s=>{s.status?this.apiKeys=s.data:(this.apiKeys=[],this.store.newMessage("Server",s.message,"danger"))}):this.apiKeys=[]}}}},qe={class:"card rounded-3"},Be={class:"my-2"},je={key:0,class:"form-check form-switch ms-auto"},ze={class:"form-check-label",for:"allowAPIKeysSwitch"},We={key:0,class:"card-body position-relative d-flex flex-column gap-2"},Ge={key:1,class:"card",style:{height:"300px"}},Oe={class:"card-body d-flex text-muted"},Ze={class:"m-auto"},Je={key:2,class:"d-flex flex-column gap-2 position-relative",style:{"min-height":"300px"}};function Qe(t,s,b,f,u,p){const o=y("LocaleText"),a=y("DashboardAPIKey"),n=y("NewDashboardAPIKey");return i(),r("div",qe,[e("div",{class:k(["card-header d-flex align-items-center",{"border-bottom-0 rounded-3":!this.value}])},[e("h6",Be,[s[6]||(s[6]=e("i",{class:"bi bi-key-fill me-2"},null,-1)),l(o,{t:"API Keys"})]),this.store.getActiveCrossServer()?g("",!0):(i(),r("div",je,[h(e("input",{class:"form-check-input",type:"checkbox","onUpdate:modelValue":s[0]||(s[0]=d=>this.value=d),onChange:s[1]||(s[1]=d=>this.toggleDashboardAPIKeys()),role:"switch",id:"allowAPIKeysSwitch"},null,544),[[D,this.value]]),e("label",ze,[this.value?(i(),_(o,{key:0,t:"Enabled"})):(i(),_(o,{key:1,t:"Disabled"}))])]))],2),this.value?(i(),r("div",We,[this.store.getActiveCrossServer()?g("",!0):(i(),r("button",{key:0,class:"btn bg-primary-subtle text-primary-emphasis border-1 border-primary-subtle rounded-3 shadow-sm",onClick:s[2]||(s[2]=d=>this.newDashboardAPIKey=!0)},[s[7]||(s[7]=e("i",{class:"bi bi-plus-circle-fill me-2"},null,-1)),l(o,{t:"API Key"})])),this.apiKeys.length===0?(i(),r("div",Ge,[e("div",Oe,[e("span",Ze,[l(o,{t:"No WGDashboard API Key"})])])])):(i(),r("div",Je,[l(N,{name:"apiKey"},{default:V(()=>[(i(!0),r(K,null,E(this.apiKeys,d=>(i(),_(a,{apiKey:d,key:d.Key,onDeleted:s[3]||(s[3]=L=>this.apiKeys=L)},null,8,["apiKey"]))),128))]),_:1})])),l(U,{name:"zoomReversed"},{default:V(()=>[this.newDashboardAPIKey?(i(),_(n,{key:0,onCreated:s[4]||(s[4]=d=>this.apiKeys=d),onClose:s[5]||(s[5]=d=>this.newDashboardAPIKey=!1)})):g("",!0)]),_:1})])):g("",!0)])}const wt=A(Re,[["render",Qe],["__scopeId","data-v-f7e62927"]]),Xe={name:"accountSettingsMFA",components:{LocaleText:c},setup(){const t=$(),s=`input_${S()}`;return{store:t,uuid:s}},data(){return{status:!1}},mounted(){this.status=this.store.Configuration.Account.enable_totp},methods:{async resetMFA(){await w("/api/updateDashboardConfigurationItem",{section:"Account",key:"totp_verified",value:"false"},async t=>{await w("/api/updateDashboardConfigurationItem",{section:"Account",key:"enable_totp",value:"false"},s=>{s.status&&this.$router.push("/2FASetup")})})}}},es={class:"d-flex align-items-center"},ss={class:"form-check form-switch"},ts={for:"allowMFAKeysSwitch"};function as(t,s,b,f,u,p){const o=y("LocaleText");return i(),r("div",null,[e("div",es,[e("div",ss,[h(e("input",{class:"form-check-input",type:"checkbox","onUpdate:modelValue":s[0]||(s[0]=a=>this.status=a),role:"switch",id:"allowMFAKeysSwitch"},null,512),[[D,this.status]]),e("label",ts,[this.status?(i(),_(o,{key:0,t:"Enabled"})):(i(),_(o,{key:1,t:"Disabled"}))])]),this.status?(i(),r("button",{key:0,class:"btn bg-warning-subtle text-warning-emphasis border-1 border-warning-subtle ms-auto rounded-3 shadow-sm",onClick:s[1]||(s[1]=a=>this.resetMFA())},[s[2]||(s[2]=e("i",{class:"bi bi-shield-lock-fill me-2"},null,-1)),this.store.Configuration.Account.totp_verified?(i(),_(o,{key:0,t:"Reset"})):(i(),_(o,{key:1,t:"Setup"})),s[3]||(s[3]=P(" MFA ",-1))])):g("",!0)])])}const kt=A(Xe,[["render",as]]),is={name:"dashboardLanguage",components:{LocaleText:c},setup(){return{store:$()}},data(){return{languages:void 0}},mounted(){T("/api/locale/available",{},t=>{this.languages=t.data})},methods:{changeLanguage(t){w("/api/locale/update",{lang_id:t},s=>{s.status?(this.store.Configuration.Server.dashboard_language=t,this.store.Locale=s.data):this.store.newMessage("Server","WGDashboard language update failed","danger")})}},computed:{currentLanguage(){let t=this.store.Configuration.Server.dashboard_language;return this.languages.find(s=>s.lang_id===t)}}},os={class:"text-muted d-block mb-1"},ns={class:"d-flex gap-2"},ls={class:"dropdown w-100"},ds=["disabled"],rs={key:1},us={class:"dropdown-menu rounded-3 shadow",style:{"max-height":"500px","overflow-y":"scroll"}},cs=["onClick"],ms={class:"me-auto mb-0"},hs={class:"d-block",style:{"font-size":"0.8rem"}},ps={key:0,class:"bi bi-check text-primary fs-5"};function bs(t,s,b,f,u,p){const o=y("LocaleText");return i(),r("div",null,[e("small",os,[e("strong",null,[l(o,{t:"Language"})])]),e("div",ns,[e("div",ls,[e("button",{class:"btn bg-primary-subtle text-primary-emphasis dropdown-toggle w-100 rounded-3",disabled:!this.languages,type:"button","data-bs-toggle":"dropdown","aria-expanded":"false"},[this.languages?(i(),r("span",rs,x(p.currentLanguage?.lang_name_localized),1)):(i(),_(o,{key:0,t:"Loading..."}))],8,ds),e("ul",us,[(i(!0),r(K,null,E(this.languages,a=>(i(),r("li",null,[e("a",{class:"dropdown-item d-flex align-items-center",role:"button",onClick:n=>this.changeLanguage(a.lang_id)},[e("p",ms,[P(x(a.lang_name_localized)+" ",1),e("small",hs,x(a.lang_name),1)]),p.currentLanguage?.lang_id===a.lang_id?(i(),r("i",ps)):g("",!0)],8,cs)]))),256))])])])])}const $t=A(is,[["render",bs],["__scopeId","data-v-4e34593e"]]),fs={name:"dashboardIPPortInput",components:{LocaleText:c},setup(){return{store:$()}},data(){return{ipAddress:"",port:0,invalidFeedback:"",showInvalidFeedback:!1,isValid:!1,timeout:void 0,changed:!1,updating:!1}},mounted(){this.ipAddress=this.store.Configuration.Server.app_ip,this.port=this.store.Configuration.Server.app_port},methods:{async useValidation(t,s,b){this.changed&&(this.updating=!0,await w("/api/updateDashboardConfigurationItem",{section:"Server",key:s,value:b},f=>{f.status?(t.target.classList.add("is-valid"),this.showInvalidFeedback=!1,this.store.Configuration.Server[s]=b,clearTimeout(this.timeout),this.timeout=setTimeout(()=>{t.target.classList.remove("is-valid")},5e3)):(this.isValid=!1,this.showInvalidFeedback=!0,this.invalidFeedback=f.message),this.changed=!1,this.updating=!1}))}}},gs={class:"row g-2"},vs={class:"col-sm"},_s={class:"form-group"},ys={for:"input_dashboard_ip",class:"text-muted mb-1"},ws=["disabled"],ks={class:"invalid-feedback"},$s={class:"col-sm"},xs={class:"form-group"},As={for:"input_dashboard_ip",class:"text-muted mb-1"},Cs=["disabled"],Ps={class:"invalid-feedback"},Ds={class:"px-2 py-1 text-warning-emphasis bg-warning-subtle border border-warning-subtle rounded-2 d-inline-block mb-2 mt-2"};function Is(t,s,b,f,u,p){const o=y("LocaleText");return i(),r("div",null,[e("div",gs,[e("div",vs,[e("div",_s,[e("label",ys,[e("strong",null,[e("small",null,[l(o,{t:"IP Address / Hostname"})])])]),h(e("input",{type:"text",class:k(["form-control",{"is-invalid":u.showInvalidFeedback,"is-valid":u.isValid}]),id:"input_dashboard_ip","onUpdate:modelValue":s[0]||(s[0]=a=>this.ipAddress=a),onKeydown:s[1]||(s[1]=a=>this.changed=!0),onBlur:s[2]||(s[2]=a=>p.useValidation(a,"app_ip",this.ipAddress)),disabled:this.updating},null,42,ws),[[v,this.ipAddress]]),e("div",ks,x(this.invalidFeedback),1)])]),e("div",$s,[e("div",xs,[e("label",As,[e("strong",null,[e("small",null,[l(o,{t:"Listen Port"})])])]),h(e("input",{type:"number",class:k(["form-control",{"is-invalid":u.showInvalidFeedback,"is-valid":u.isValid}]),id:"input_dashboard_ip","onUpdate:modelValue":s[3]||(s[3]=a=>this.port=a),onKeydown:s[4]||(s[4]=a=>this.changed=!0),onBlur:s[5]||(s[5]=a=>p.useValidation(a,"app_port",this.port)),disabled:this.updating},null,42,Cs),[[v,this.port]]),e("div",Ps,x(this.invalidFeedback),1)])])]),e("div",Ds,[e("small",null,[s[6]||(s[6]=e("i",{class:"bi bi-exclamation-triangle-fill me-2"},null,-1)),l(o,{t:"Manual restart of WGDashboard is needed to apply changes on IP Address and Listen Port"})])])])}const xt=A(fs,[["render",Is]]),Ss={class:"card"},Ks={class:"card-header"},Ts={class:"my-2 d-flex"},Vs={key:0,class:"text-success ms-auto"},Es={class:"card-body d-flex flex-column gap-3"},Ls={class:"row gx-2 gy-2"},Fs={class:"col-12"},Ms={class:"form-check mb-2 form-switch"},Ns={class:"form-check-label",for:"authentication_required"},Us={class:"col-12 col-lg-4"},Ys={class:"form-group"},Hs={for:"server",class:"text-muted mb-1"},Rs={class:"col-12 col-lg-4"},qs={class:"form-group"},Bs={for:"port",class:"text-muted mb-1"},js={class:"col-12 col-lg-4"},zs={class:"form-group"},Ws={for:"encryption",class:"text-muted mb-1"},Gs={value:"NOTLS"},Os={key:0,class:"col-12 col-lg-4"},Zs={class:"form-group"},Js={for:"username",class:"text-muted mb-1"},Qs={key:1,class:"col-12 col-lg-4"},Xs={class:"form-group"},et={for:"email_password",class:"text-muted mb-1"},st={class:"col-12 col-lg-4"},tt={class:"form-group"},at={for:"send_from",class:"text-muted mb-1"},it={key:0},ot={key:1},nt={class:"text-muted mb-1",for:"test_email"},lt={class:"fw-bold"},dt=["disabled"],rt=["disabled"],ut={key:0,class:"bi bi-send me-2"},ct={key:1,class:"spinner-border spinner-border-sm me-2"},mt={class:"text-muted mb-1",for:"email_template"},ht={class:"fw-bold"},At={__name:"dashboardEmailSettings",setup(t){const s=$();Y(()=>{p(),document.querySelectorAll("#emailAccount input, #emailAccount select, #email_template").forEach(a=>{a.addEventListener("change",async()=>{let n=a.attributes.getNamedItem("id").value;await w("/api/updateDashboardConfigurationItem",{section:"Email",key:n,value:s.Configuration.Email[n]},d=>{d.status?(a.classList.remove("is-invalid"),a.classList.add("is-valid")):(a.classList.remove("is-valid"),a.classList.add("is-invalid")),p()})})})});const b=I(!1),f=I(""),u=I(!1),p=async()=>{await T("/api/email/ready",{},a=>{b.value=a.status})},o=async()=>{u.value=!0,await w("/api/email/send",{Receiver:f.value,Subject:"WGDashboard Testing Email",Body:"Test 1, 2, 3! Hello World :)"},a=>{a.status?s.newMessage("Server","Test email sent successfully!","success"):s.newMessage("Server",`Test email sent failed! Reason: ${a.message}`,"danger"),u.value=!1})};return(a,n)=>(i(),r("div",Ss,[e("div",Ks,[e("h6",Ts,[n[12]||(n[12]=e("i",{class:"bi bi-envelope-fill me-2"},null,-1)),l(c,{t:"Email Account"}),b.value?(i(),r("span",Vs,[n[11]||(n[11]=e("i",{class:"bi bi-check-circle-fill me-2"},null,-1)),l(c,{t:"Ready"})])):g("",!0)])]),e("div",Es,[e("form",{onSubmit:n[7]||(n[7]=d=>d.preventDefault(d)),id:"emailAccount"},[e("div",Ls,[e("div",Fs,[e("div",Ms,[h(e("input",{class:"form-check-input",type:"checkbox",role:"switch","onUpdate:modelValue":n[0]||(n[0]=d=>m(s).Configuration.Email.authentication_required=d),id:"authentication_required"},null,512),[[D,m(s).Configuration.Email.authentication_required]]),e("label",Ns,[l(c,{t:"Require SMTP Authentication"})])])]),e("div",Us,[e("div",Ys,[e("label",Hs,[e("strong",null,[e("small",null,[l(c,{t:"Server"})])])]),h(e("input",{id:"server","onUpdate:modelValue":n[1]||(n[1]=d=>m(s).Configuration.Email.server=d),type:"text",class:"form-control rounded-3"},null,512),[[v,m(s).Configuration.Email.server]])])]),e("div",Rs,[e("div",qs,[e("label",Bs,[e("strong",null,[e("small",null,[l(c,{t:"Port"})])])]),h(e("input",{id:"port","onUpdate:modelValue":n[2]||(n[2]=d=>m(s).Configuration.Email.port=d),type:"text",class:"form-control rounded-3"},null,512),[[v,m(s).Configuration.Email.port]])])]),e("div",js,[e("div",zs,[e("label",Ws,[e("strong",null,[e("small",null,[l(c,{t:"Encryption"})])])]),h(e("select",{class:"form-select rounded-3","onUpdate:modelValue":n[3]||(n[3]=d=>m(s).Configuration.Email.encryption=d),id:"encryption"},[n[13]||(n[13]=e("option",{value:"STARTTLS"}," STARTTLS ",-1)),e("option",Gs,[l(c,{t:"No Encryption"})])],512),[[H,m(s).Configuration.Email.encryption]])])]),m(s).Configuration.Email.authentication_required?(i(),r("div",Os,[e("div",Zs,[e("label",Js,[e("strong",null,[e("small",null,[l(c,{t:"Username"})])])]),h(e("input",{id:"username","onUpdate:modelValue":n[4]||(n[4]=d=>m(s).Configuration.Email.username=d),type:"text",class:"form-control rounded-3"},null,512),[[v,m(s).Configuration.Email.username]])])])):g("",!0),m(s).Configuration.Email.authentication_required?(i(),r("div",Qs,[e("div",Xs,[e("label",et,[e("strong",null,[e("small",null,[l(c,{t:"Password"})])])]),h(e("input",{id:"email_password","onUpdate:modelValue":n[5]||(n[5]=d=>m(s).Configuration.Email.email_password=d),type:"password",class:"form-control rounded-3"},null,512),[[v,m(s).Configuration.Email.email_password]])])])):g("",!0),e("div",st,[e("div",tt,[e("label",at,[e("strong",null,[e("small",null,[l(c,{t:"Send From"})])])]),h(e("input",{id:"send_from","onUpdate:modelValue":n[6]||(n[6]=d=>m(s).Configuration.Email.send_from=d),type:"text",class:"form-control rounded-3"},null,512),[[v,m(s).Configuration.Email.send_from]])])])])],32),b.value?(i(),r("hr",it)):g("",!0),b.value?(i(),r("div",ot,[e("label",nt,[e("small",lt,[l(c,{t:"Send Test Email"})])]),e("form",{onSubmit:n[9]||(n[9]=d=>{d.preventDefault(),o()}),class:"input-group"},[h(e("input",{type:"email",class:"form-control rounded-start-3",id:"test_email",placeholder:"john@example.com","onUpdate:modelValue":n[8]||(n[8]=d=>f.value=d),disabled:u.value},null,8,dt),[[v,f.value]]),e("button",{class:"btn bg-primary-subtle text-primary-emphasis border-primary-subtle rounded-end-3",type:"submit",value:"Submit",disabled:f.value.length===0||u.value,id:"button-addon2"},[u.value?(i(),r("span",ct)):(i(),r("i",ut)),l(c,{t:u.value?"Sending...":"Send"},null,8,["t"])],8,rt)],32)])):g("",!0),n[14]||(n[14]=e("hr",null,null,-1)),e("div",null,[e("label",mt,[e("small",ht,[l(c,{t:"Email Body Template"})])]),h(e("textarea",{class:"form-control rounded-3 font-monospace","onUpdate:modelValue":n[10]||(n[10]=d=>m(s).Configuration.Email.email_template=d),id:"email_template",style:{"min-height":"400px"}},null,512),[[v,m(s).Configuration.Email.email_template]])])])]))}};export{vt as A,yt as D,At as _,_t as a,wt as b,kt as c,$t as d,xt as e};
diff --git a/src/static/dist/WGDashboardAdmin/assets/dashboardEmailSettings-BxtXuVtX.css b/src/static/dist/WGDashboardAdmin/assets/dashboardEmailSettings-BxtXuVtX.css
deleted file mode 100644
index 0db0524c..00000000
--- a/src/static/dist/WGDashboardAdmin/assets/dashboardEmailSettings-BxtXuVtX.css
+++ /dev/null
@@ -1 +0,0 @@
-@media screen and (max-width: 992px){.apiKey-card-body{&[data-v-a76253c8]{flex-direction:column!important;align-items:start!important}div.ms-auto[data-v-a76253c8]{margin-left:0!important}div[data-v-a76253c8]{width:100%;align-items:start!important}small[data-v-a76253c8]{margin-right:auto}}}.apiKey-move[data-v-f7e62927],.apiKey-enter-active[data-v-f7e62927],.apiKey-leave-active[data-v-f7e62927]{transition:all .5s ease}.apiKey-enter-from[data-v-f7e62927],.apiKey-leave-to[data-v-f7e62927]{opacity:0;transform:translateY(30px) scale(.9)}.apiKey-leave-active[data-v-f7e62927]{position:absolute;width:100%}.dropdown-menu[data-v-4e34593e]{width:100%}
diff --git a/src/static/dist/WGDashboardAdmin/assets/dashboardEmailSettings-CDozOzQ3.css b/src/static/dist/WGDashboardAdmin/assets/dashboardEmailSettings-CDozOzQ3.css
new file mode 100644
index 00000000..0f1de562
--- /dev/null
+++ b/src/static/dist/WGDashboardAdmin/assets/dashboardEmailSettings-CDozOzQ3.css
@@ -0,0 +1 @@
+@media screen and (max-width:992px){.apiKey-card-body{&[data-v-a76253c8]{flex-direction:column!important;align-items:start!important}div.ms-auto[data-v-a76253c8]{margin-left:0!important}div[data-v-a76253c8]{width:100%;align-items:start!important}small[data-v-a76253c8]{margin-right:auto}}}.apiKey-move[data-v-f7e62927],.apiKey-enter-active[data-v-f7e62927],.apiKey-leave-active[data-v-f7e62927]{transition:all .5s ease}.apiKey-enter-from[data-v-f7e62927],.apiKey-leave-to[data-v-f7e62927]{opacity:0;transform:translateY(30px) scale(.9)}.apiKey-leave-active[data-v-f7e62927]{position:absolute;width:100%}.dropdown-menu[data-v-4e34593e]{width:100%}
diff --git a/src/static/dist/WGDashboardAdmin/assets/dashboardSettingsWireguardConfigurationAutostart-BQQ2fbhj.js b/src/static/dist/WGDashboardAdmin/assets/dashboardSettingsWireguardConfigurationAutostart-BQQ2fbhj.js
new file mode 100644
index 00000000..548d55ac
--- /dev/null
+++ b/src/static/dist/WGDashboardAdmin/assets/dashboardSettingsWireguardConfigurationAutostart-BQQ2fbhj.js
@@ -0,0 +1 @@
+import{_ as f,c as i,a as t,b as u,j as w,d as k,q as x,A as S,n as p,t as v,B as _,D as m,W as b,C as y,f as n,r as D,x as $,F as W,k as V}from"./index-QGgWclm4.js";import{L as C}from"./localeText-Cji_3w42.js";const F={name:"dashboardSettingsInputWireguardConfigurationPath",components:{LocaleText:C},props:{targetData:String,title:String,warning:!1,warningText:""},setup(){const o=m(),s=b(),r=`input_${y()}`;return{store:o,uuid:r,WireguardConfigurationStore:s}},data(){return{value:"",invalidFeedback:"",showInvalidFeedback:!1,isValid:!1,timeout:void 0,changed:!1,updating:!1}},mounted(){this.value=this.store.Configuration.Server[this.targetData]},methods:{async useValidation(){this.changed&&(this.updating=!0,await _("/api/updateDashboardConfigurationItem",{section:"Server",key:this.targetData,value:this.value},o=>{o.status?(this.isValid=!0,this.showInvalidFeedback=!1,this.store.Configuration.Account[this.targetData]=this.value,clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.isValid=!1,5e3),this.WireguardConfigurationStore.getConfigurations(),this.store.newMessage("Server","WireGuard configuration path saved","success")):(this.isValid=!1,this.showInvalidFeedback=!0,this.invalidFeedback=o.message),this.changed=!1,this.updating=!1}))}}},I={class:"card"},T={class:"card-header"},A={class:"my-2"},L={class:"card-body"},B={class:"form-group"},M=["for"],N={class:"d-flex gap-2 align-items-start"},P={class:"flex-grow-1"},G=["id","disabled"],U={class:"invalid-feedback fw-bold"},j=["disabled"],q={key:0,class:"bi bi-save2-fill"},z={key:1,class:"spinner-border spinner-border-sm"},E={key:0,class:"px-2 py-1 text-warning-emphasis bg-warning-subtle border border-warning-subtle rounded-2 d-inline-block mt-1 mb-2"};function K(o,s,r,a,c,g){const d=w("LocaleText");return n(),i("div",I,[t("div",T,[t("h6",A,[u(d,{t:"Path"})])]),t("div",L,[t("div",B,[t("label",{for:this.uuid,class:"text-muted mb-1"},[t("strong",null,[t("small",null,[u(d,{t:this.title},null,8,["t"])])])],8,M),t("div",N,[t("div",P,[x(t("input",{type:"text",class:p(["form-control rounded-3",{"is-invalid":this.showInvalidFeedback,"is-valid":this.isValid}]),id:this.uuid,"onUpdate:modelValue":s[0]||(s[0]=e=>this.value=e),onKeydown:s[1]||(s[1]=e=>this.changed=!0),disabled:this.updating},null,42,G),[[S,this.value]]),t("div",U,v(this.invalidFeedback),1)]),t("button",{onClick:s[2]||(s[2]=e=>this.useValidation()),disabled:!this.changed,class:"ms-auto btn rounded-3 border-success-subtle bg-success-subtle text-success-emphasis"},[this.updating?(n(),i("span",z)):(n(),i("i",q))],8,j)]),r.warning?(n(),i("div",E,[t("small",null,[s[3]||(s[3]=t("i",{class:"bi bi-exclamation-triangle-fill me-2"},null,-1)),u(d,{t:r.warningText},null,8,["t"])])])):k("",!0)])])])}const et=f(F,[["render",K]]),H={class:"card rounded-3"},J={class:"card-header"},O={class:"my-2"},Q={class:"card-body d-flex gap-2"},R={class:"list-group w-100"},X=["onClick"],Y={__name:"dashboardSettingsWireguardConfigurationAutostart",setup(o){const s=m(),r=b(),a=D(s.Configuration.WireGuardConfiguration.autostart),c=$(()=>r.Configurations.map(e=>e.Name)),g=async()=>{await _("/api/updateDashboardConfigurationItem",{section:"WireGuardConfiguration",key:"autostart",value:a.value},async e=>{e.status?(s.newMessage("Server","Start up configurations saved","success"),a.value=e.data):s.newMessage("Server","Start up configurations failed to save","danger")})},d=e=>{a.value.includes(e)?a.value=a.value.filter(h=>h!==e):a.value.push(e),g()};return(e,h)=>(n(),i("div",H,[t("div",J,[t("h6",O,[u(C,{t:"Toggle When Start Up"})])]),t("div",Q,[t("div",R,[(n(!0),i(W,null,V(c.value,l=>(n(),i("button",{type:"button",key:l,onClick:Z=>d(l),class:"list-group-item list-group-item-action py-2 w-100 d-flex align-items-center"},[t("samp",null,v(l),1),t("i",{class:p(["ms-auto",[a.value.includes(l)?"bi-check-circle-fill":"bi-circle"]])},null,2)],8,X))),128))])])]))}},at=f(Y,[["__scopeId","data-v-4aa2aed9"]]);export{et as D,at as a};
diff --git a/src/static/dist/WGDashboardAdmin/assets/dashboardSettingsWireguardConfigurationAutostart-Cw4a6e53.js b/src/static/dist/WGDashboardAdmin/assets/dashboardSettingsWireguardConfigurationAutostart-Cw4a6e53.js
deleted file mode 100644
index 8b763221..00000000
--- a/src/static/dist/WGDashboardAdmin/assets/dashboardSettingsWireguardConfigurationAutostart-Cw4a6e53.js
+++ /dev/null
@@ -1 +0,0 @@
-import{_ as f,c as i,a as t,b as u,h as w,d as k,m as x,y,n as p,t as v,z as _,D as m,W as b,A as S,f as n,r as D,q as $,F as W,i as V}from"./index-DYYtDSji.js";import{L as C}from"./localeText-Cd7vLnRM.js";const F={name:"dashboardSettingsInputWireguardConfigurationPath",components:{LocaleText:C},props:{targetData:String,title:String,warning:!1,warningText:""},setup(){const o=m(),s=b(),r=`input_${S()}`;return{store:o,uuid:r,WireguardConfigurationStore:s}},data(){return{value:"",invalidFeedback:"",showInvalidFeedback:!1,isValid:!1,timeout:void 0,changed:!1,updating:!1}},mounted(){this.value=this.store.Configuration.Server[this.targetData]},methods:{async useValidation(){this.changed&&(this.updating=!0,await _("/api/updateDashboardConfigurationItem",{section:"Server",key:this.targetData,value:this.value},o=>{o.status?(this.isValid=!0,this.showInvalidFeedback=!1,this.store.Configuration.Account[this.targetData]=this.value,clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.isValid=!1,5e3),this.WireguardConfigurationStore.getConfigurations(),this.store.newMessage("Server","WireGuard configuration path saved","success")):(this.isValid=!1,this.showInvalidFeedback=!0,this.invalidFeedback=o.message),this.changed=!1,this.updating=!1}))}}},I={class:"card"},T={class:"card-header"},A={class:"my-2"},L={class:"card-body"},M={class:"form-group"},N=["for"],P={class:"d-flex gap-2 align-items-start"},B={class:"flex-grow-1"},G=["id","disabled"],z={class:"invalid-feedback fw-bold"},U=["disabled"],q={key:0,class:"bi bi-save2-fill"},E={key:1,class:"spinner-border spinner-border-sm"},K={key:0,class:"px-2 py-1 text-warning-emphasis bg-warning-subtle border border-warning-subtle rounded-2 d-inline-block mt-1 mb-2"};function j(o,s,r,a,c,g){const d=w("LocaleText");return n(),i("div",I,[t("div",T,[t("h6",A,[u(d,{t:"Path"})])]),t("div",L,[t("div",M,[t("label",{for:this.uuid,class:"text-muted mb-1"},[t("strong",null,[t("small",null,[u(d,{t:this.title},null,8,["t"])])])],8,N),t("div",P,[t("div",B,[x(t("input",{type:"text",class:p(["form-control rounded-3",{"is-invalid":this.showInvalidFeedback,"is-valid":this.isValid}]),id:this.uuid,"onUpdate:modelValue":s[0]||(s[0]=e=>this.value=e),onKeydown:s[1]||(s[1]=e=>this.changed=!0),disabled:this.updating},null,42,G),[[y,this.value]]),t("div",z,v(this.invalidFeedback),1)]),t("button",{onClick:s[2]||(s[2]=e=>this.useValidation()),disabled:!this.changed,class:"ms-auto btn rounded-3 border-success-subtle bg-success-subtle text-success-emphasis"},[this.updating?(n(),i("span",E)):(n(),i("i",q))],8,U)]),r.warning?(n(),i("div",K,[t("small",null,[s[3]||(s[3]=t("i",{class:"bi bi-exclamation-triangle-fill me-2"},null,-1)),u(d,{t:r.warningText},null,8,["t"])])])):k("",!0)])])])}const et=f(F,[["render",j]]),H={class:"card rounded-3"},J={class:"card-header"},O={class:"my-2"},Q={class:"card-body d-flex gap-2"},R={class:"list-group w-100"},X=["onClick"],Y={__name:"dashboardSettingsWireguardConfigurationAutostart",setup(o){const s=m(),r=b(),a=D(s.Configuration.WireGuardConfiguration.autostart),c=$(()=>r.Configurations.map(e=>e.Name)),g=async()=>{await _("/api/updateDashboardConfigurationItem",{section:"WireGuardConfiguration",key:"autostart",value:a.value},async e=>{e.status?(s.newMessage("Server","Start up configurations saved","success"),a.value=e.data):s.newMessage("Server","Start up configurations failed to save","danger")})},d=e=>{a.value.includes(e)?a.value=a.value.filter(h=>h!==e):a.value.push(e),g()};return(e,h)=>(n(),i("div",H,[t("div",J,[t("h6",O,[u(C,{t:"Toggle When Start Up"})])]),t("div",Q,[t("div",R,[(n(!0),i(W,null,V(c.value,l=>(n(),i("button",{type:"button",key:l,onClick:Z=>d(l),class:"list-group-item list-group-item-action py-2 w-100 d-flex align-items-center"},[t("samp",null,v(l),1),t("i",{class:p(["ms-auto",[a.value.includes(l)?"bi-check-circle-fill":"bi-circle"]])},null,2)],8,X))),128))])])]))}},at=f(Y,[["__scopeId","data-v-4aa2aed9"]]);export{et as D,at as a};
diff --git a/src/static/dist/WGDashboardAdmin/assets/dashboardWebHooks-CEc1Rq-k.js b/src/static/dist/WGDashboardAdmin/assets/dashboardWebHooks-CEc1Rq-k.js
deleted file mode 100644
index 54a56490..00000000
--- a/src/static/dist/WGDashboardAdmin/assets/dashboardWebHooks-CEc1Rq-k.js
+++ /dev/null
@@ -1 +0,0 @@
-import{L as a}from"./localeText-Cd7vLnRM.js";import{B as D,r as p,E,G as A,D as F,c as o,d as f,a as e,b as l,m as w,e as V,y as U,C as O,v as I,F as C,i as L,n as _,u as J,A as K,t as h,g as R,z as T,f as t,q as N,j as $,x as Y,_ as j,o as Z,w as P,S as M}from"./index-DYYtDSji.js";const Q={class:"p-3"},X={key:0},ee={for:"PayloadURL",class:"form-label fw-bold text-muted"},se=["disabled"],te={for:"ContentType",class:"form-label fw-bold text-muted"},le=["disabled"],oe={class:"form-label fw-bold text-muted"},ne={class:"form-check form-switch mb-2"},ae=["disabled"],ie={class:"form-check-label",for:"VerifySSL"},de={key:0,class:"alert-danger alert rounded-3"},ue={class:"form-label fw-bold text-muted"},re={class:"card rounded-3"},ce={class:"card-body d-flex gap-2 flex-column"},be={class:"d-flex gap-2"},ve={class:"flex-grow-1"},me=["disabled","onUpdate:modelValue"],fe={class:"flex-grow-1"},pe=["disabled","onUpdate:modelValue"],ke=["onClick"],ye={class:"form-label fw-bold text-muted"},he={class:"form-check form-check-inline"},_e=["disabled","id","value"],xe=["for"],ge={class:"form-label fw-bold text-muted"},Se={class:"form-check form-switch mb-2"},we=["disabled"],$e={class:"form-check-label",for:"IsActive"},He={key:0,class:"alert alert-danger rounded-3"},We={class:"d-flex gap-2"},Ce={class:"d-flex align-items-center"},Le={class:"mb-0"},B=D({__name:"addWebHook",props:["webHook"],emits:["refresh","delete"],async setup(i,{emit:m}){let y,r;const s=p({ContentType:String,Headers:Object,IsActive:Boolean,Notes:String,PayloadURL:String,SubscribedActions:Array,VerifySSL:Boolean,WebHookID:String}),u=i;u.webHook?s.value={...u.webHook}:([y,r]=E(()=>R("/api/webHooks/createWebHook",{},g=>{s.value=g.data})),await y,r());const k=p({peer_created:A("Peer Created"),peer_deleted:A("Peer Deleted"),peer_updated:A("Peer Updated")}),x=m,d=F(),c=p(!1),S=p(""),v=p(!1),G=async g=>{g&&g.preventDefault(),v.value=!0,await T("/api/webHooks/updateWebHook",s.value,n=>{n.status?(x("refresh"),d.newMessage("Server","Webhook saved","success")):(c.value=!0,S.value=n.message,d.newMessage("Server","Webhook failed to save","danger")),v.value=!1})},z=async()=>{v.value=!0,await T("/api/webHooks/deleteWebHook",s.value,g=>{g.status?(x("delete"),d.newMessage("Server","Webhook deleted","success")):(c.value=!0,S.value=g.message,d.newMessage("Server","Webhook failed to delete","danger")),v.value=!1})};return(g,n)=>(t(),o("div",Q,[i.webHook?f("",!0):(t(),o("div",X,[e("h6",null,[l(a,{t:"Add Webhook"})]),e("p",null,[l(a,{t:"WGDashboard will sent a POST Request to the URL below with details of any subscribed events."})])])),e("form",{onSubmit:n[7]||(n[7]=b=>G(b)),class:"d-flex flex-column gap-2"},[e("div",null,[e("label",ee,[e("small",null,[l(a,{t:"Payload URL"}),n[8]||(n[8]=V("* ",-1))])]),w(e("input",{required:"",disabled:v.value,id:"PayloadURL","onUpdate:modelValue":n[0]||(n[0]=b=>s.value.PayloadURL=b),class:"form-control rounded-3",type:"url"},null,8,se),[[U,s.value.PayloadURL]])]),e("div",null,[e("label",te,[e("small",null,[l(a,{t:"Content Type"}),n[9]||(n[9]=V("* ",-1))])]),w(e("select",{disabled:v.value,id:"ContentType","onUpdate:modelValue":n[1]||(n[1]=b=>s.value.ContentType=b),class:"form-select rounded-3",required:""},[...n[10]||(n[10]=[e("option",{value:"application/json"}," application/json ",-1),e("option",{value:"application/x-www-form-urlencoded"}," application/x-www-form-urlencoded ",-1)])],8,le),[[O,s.value.ContentType]])]),e("div",null,[e("label",oe,[e("small",null,[l(a,{t:"Verify SSL"})])]),e("div",null,[e("div",ne,[w(e("input",{disabled:v.value,"onUpdate:modelValue":n[2]||(n[2]=b=>s.value.VerifySSL=b),class:"form-check-input",type:"checkbox",role:"switch",id:"VerifySSL"},null,8,ae),[[I,s.value.VerifySSL]]),e("label",ie,[l(a,{t:s.value.VerifySSL?"Enabled":"Disabled"},null,8,["t"])])]),s.value.VerifySSL?f("",!0):(t(),o("div",de,[n[11]||(n[11]=e("i",{class:"bi bi-exclamation-triangle-fill me-2"},null,-1)),l(a,{t:"We highly suggest to enable SSL verification"})]))])]),e("div",null,[e("label",ue,[e("small",null,[l(a,{t:"Custom Headers"})])]),e("div",re,[e("div",ce,[(t(!0),o(C,null,L(s.value.Headers,(b,H)=>(t(),o("div",be,[e("div",ve,[w(e("input",{class:"form-control rounded-3 form-control-sm",disabled:v.value,"onUpdate:modelValue":W=>b.key=W,placeholder:"Key"},null,8,me),[[U,b.key]])]),e("div",fe,[w(e("input",{class:"form-control rounded-3 form-control-sm",disabled:v.value,"onUpdate:modelValue":W=>b.value=W,placeholder:"Value"},null,8,pe),[[U,b.value]])]),e("button",{class:_([{disabled:v.value},"btn btn-sm bg-danger-subtle text-danger-emphasis border-danger-subtle rounded-3"]),type:"button",onClick:W=>delete s.value.Headers[H]},[...n[12]||(n[12]=[e("i",{class:"bi bi-trash-fill"},null,-1)])],10,ke)]))),256)),e("button",{type:"button",class:_([{disabled:v.value},"btn btn-sm bg-primary-subtle text-primary-emphasis border-primary-subtle rounded-3"]),onClick:n[3]||(n[3]=b=>s.value.Headers[J(K)().toString()]={key:"",value:""})},[n[13]||(n[13]=e("i",{class:"bi bi-plus-lg me-2"},null,-1)),l(a,{t:"Header"})],2)])])]),n[15]||(n[15]=e("hr",null,null,-1)),e("div",null,[e("label",ye,[e("small",null,[l(a,{t:"Subscribed Actions"})])]),e("div",null,[(t(!0),o(C,null,L(k.value,(b,H)=>(t(),o("div",he,[w(e("input",{class:"form-check-input",disabled:s.value.SubscribedActions.length===1&&s.value.SubscribedActions.includes(H)||v.value,type:"checkbox",id:H,value:H,"onUpdate:modelValue":n[4]||(n[4]=W=>s.value.SubscribedActions=W)},null,8,_e),[[I,s.value.SubscribedActions]]),e("label",{class:"form-check-label",for:H},h(b),9,xe)]))),256))])]),n[16]||(n[16]=e("hr",null,null,-1)),e("div",null,[e("label",ge,[e("small",null,[l(a,{t:"Enable Webhook"})])]),e("div",null,[e("div",Se,[w(e("input",{disabled:v.value,"onUpdate:modelValue":n[5]||(n[5]=b=>s.value.IsActive=b),class:"form-check-input",type:"checkbox",role:"switch",id:"IsActive"},null,8,we),[[I,s.value.IsActive]]),e("label",$e,[l(a,{t:s.value.IsActive?"Yes":"No"},null,8,["t"])])])])]),c.value?(t(),o("div",He,h(S.value),1)):f("",!0),e("div",We,[e("button",{type:"submit",class:_([{disabled:v.value},"ms-auto btn bg-success-subtle text-success-emphasis border-success-subtle rounded-3"])},[l(a,{t:"Save"})],2)]),i.webHook?(t(),o(C,{key:1},[n[14]||(n[14]=e("hr",null,null,-1)),e("div",Ce,[e("h6",Le,[l(a,{t:"Danger Zone"})]),e("button",{onClick:n[6]||(n[6]=b=>z()),type:"button",class:_([{disabled:v.value},"btn bg-danger-subtle text-danger-emphasis border-danger-subtle rounded-3 ms-auto"])},[l(a,{t:"Delete"})],2)])],64)):f("",!0)],32)]))}}),De={class:"d-flex flex-column gap-3"},Ve={class:"text-muted"},Ae={key:0},Ue={key:1},Ie={key:2},Pe={key:3},Re={class:"d-flex gap-4 align-items-center"},Te={class:"text-muted"},Me={key:0},Be={key:1},Ee={class:"text-muted"},Ne={class:"table-responsive"},je={class:"table"},qe={scope:"col"},Ge={scope:"col"},ze={scope:"col"},Fe={style:{"white-space":"nowrap"}},Oe={key:0},Je={key:1},Ke={key:2},Ye={style:{"white-space":"nowrap","overflow-x":"scroll"}},Ze={class:"bg-body-tertiary p-3 rounded-3"},Qe={class:"mb-0"},q=D({__name:"webHookSession",props:["session"],setup(i){const m=i,y=N(()=>JSON.stringify(m.session.Data,null,4));return(r,s)=>(t(),o("div",De,[e("div",null,[e("small",Ve,[l(a,{t:"Status"})]),e("h3",{class:_({"text-success":i.session.Status===0,"text-danger":i.session.Status===1,"text-warning":i.session.Status===2})},[i.session.Status===0?(t(),o("span",Ae,[s[0]||(s[0]=e("i",{class:"bi bi-check-circle-fill me-2"},null,-1)),l(a,{t:"Success"})])):f("",!0),i.session.Status===2?(t(),o("span",Ue,[s[1]||(s[1]=e("i",{class:"bi bi-trash3-fill me-2"},null,-1)),l(a,{t:"Timeout"})])):i.session.Status===1?(t(),o("span",Ie,[s[2]||(s[2]=e("i",{class:"bi bi-x-circle-fill me-2"},null,-1)),l(a,{t:"Failed"})])):i.session.Status===-1?(t(),o("span",Pe,[s[3]||(s[3]=e("i",{class:"spinner-border me-2"},null,-1)),l(a,{t:"Requesting..."})])):f("",!0)],2),e("div",Re,[e("div",null,[e("small",Te,[l(a,{t:"Started At"})]),e("h6",null,h(i.session.StartDate),1)]),i.session.EndDate?(t(),o("div",Me,[...s[4]||(s[4]=[e("i",{class:"bi bi-arrow-right"},null,-1)])])):f("",!0),i.session.EndDate?(t(),o("div",Be,[e("small",Ee,[l(a,{t:"Ended At"})]),e("h6",null,h(i.session.EndDate),1)])):f("",!0)])]),e("div",null,[e("h6",null,[l(a,{t:"Logs"})]),e("div",Ne,[e("table",je,[e("thead",null,[e("tr",null,[e("th",qe,[l(a,{t:"Datetime"})]),e("th",Ge,[l(a,{t:"Status"})]),e("th",ze,[l(a,{t:"Message"})])])]),e("tbody",null,[(t(!0),o(C,null,L([...i.session.Logs.Logs].reverse(),u=>(t(),o("tr",null,[e("td",Fe,h(u.LogTime),1),e("td",{style:{"white-space":"nowrap"},class:_({"text-success":u.Status===0,"text-danger":u.Status===1})},[u.Status===0?(t(),o("span",Oe,[...s[5]||(s[5]=[e("i",{class:"bi bi-check-circle-fill me-2"},null,-1)])])):u.Status===1?(t(),o("span",Je,[...s[6]||(s[6]=[e("i",{class:"bi bi-x-circle-fill me-2"},null,-1)])])):u.Status===-1?(t(),o("span",Ke,[...s[7]||(s[7]=[e("i",{class:"bi bi-circle me-2"},null,-1)])])):f("",!0)],2),e("td",Ye,h(u.Message),1)]))),256))])])])]),e("div",null,[e("h6",null,[l(a,{t:"Data"})]),e("div",Ze,[e("pre",Qe,[e("code",null,h(y.value),1)])])])]))}}),Xe={class:"card"},es={class:"card-body"},ss={key:0},ts={key:1},ls={key:2},os={key:3},ns=D({__name:"previousWebHookSession",props:["session"],setup(i){const m=p(!0);return(y,r)=>(t(),o("div",Xe,[e("div",es,[e("p",{class:"d-flex mb-0",role:"button",onClick:r[0]||(r[0]=s=>m.value=!m.value)},[e("span",{class:_({"text-success":i.session.Status===0,"text-danger":i.session.Status===1,"text-warning":i.session.Status===2})},[i.session.Status===0?(t(),o("span",ss,[...r[1]||(r[1]=[e("i",{class:"bi bi-check-circle-fill me-2"},null,-1)])])):i.session.Status===2?(t(),o("span",ts,[...r[2]||(r[2]=[e("i",{class:"bi bi-trash3-fill me-2"},null,-1)])])):i.session.Status===1?(t(),o("span",ls,[...r[3]||(r[3]=[e("i",{class:"bi bi-x-circle-fill me-2"},null,-1)])])):i.session.Status===-1?(t(),o("span",os,[...r[4]||(r[4]=[e("i",{class:"spinner-border spinner-border-sm me-2"},null,-1)])])):f("",!0)],2),V(" "+h(i.session.StartDate)+" ",1),r[5]||(r[5]=e("i",{class:"bi bi-chevron-right ms-auto"},null,-1))]),m.value?f("",!0):(t(),$(q,{key:0,session:i.session,class:"mt-2"},null,8,["session"]))])]))}}),as={key:0},is={class:"p-3"},ds={class:"mb-3"},us={key:0,class:"border-top p-3"},rs={class:"d-flex flex-column gap-2"},cs={key:1,class:"p-3"},bs=D({__name:"webHookSessions",props:["webHook"],async setup(i){let m,y;const r=i,s=p([]),u=p(void 0),k=async()=>{await R("/api/webHooks/getWebHookSessions",{WebHookID:r.webHook.WebHookID},d=>{s.value=d.data})};[m,y]=E(()=>k()),await m,y();const x=N(()=>{if(s.value)return s.value[0]});return u.value=setInterval(()=>{k()},5e3),Y(()=>{clearInterval(u.value)}),(d,c)=>x.value?(t(),o("div",as,[e("div",is,[e("h6",ds,[l(a,{t:"Latest Session"})]),(t(),$(q,{session:x.value,key:x.value.WebHookID},null,8,["session"]))]),s.value.length>1?(t(),o("div",us,[e("h6",null,[l(a,{t:"Previous Sessions"})]),e("div",rs,[(t(!0),o(C,null,L(s.value.slice(1),S=>(t(),$(ns,{session:S,key:S.WebHookSessionID},null,8,["session"]))),128))])])):f("",!0)])):(t(),o("div",cs,[...c[0]||(c[0]=[e("div",{class:"bg-body-tertiary p-3 w-100 d-flex rounded-3"},[e("h6",{class:"mb-0 m-auto"},"No Sessions")],-1)])]))}}),vs=j(bs,[["__scopeId","data-v-7b6e949e"]]),ms={class:"text-body w-100 h-100 pb-2 position-relative"},fs={class:"w-100 h-100 card rounded-3"},ps={class:"border-bottom z-0"},ks={class:"d-flex text-body align-items-center sticky-top p-3 bg-body-tertiary rounded-top-3",style:{"border-top-right-radius":"0 !important"}},ys={class:"my-2"},hs={key:0,class:"row h-100 g-0"},_s={class:"col-sm-4 border-end d-flex flex-column clientListContainer"},xs={class:"d-flex flex-column overflow-y-scroll",style:{flex:"1 0 0"}},gs={class:"list-group d-flex flex-column d-flex h-100"},Ss=["onClick"],ws={class:"mb-0 fw-bold text-body url"},$s={class:"url mb-0"},Hs={key:1,class:"flex-grow-1 d-flex text-muted"},Ws={key:0,class:"col-sm-8 clientViewerContainer d-flex flex-column"},Cs={class:"overflow-scroll",style:{flex:"1 0 0"}},Ls={class:"navbar navbar-expand-lg bg-body-tertiary sticky-top"},Ds={class:"container-fluid"},Vs={class:"navbar-nav gap-2"},As={class:"nav-item"},Us={class:"nav-item"},Is={class:"p-3"},Ps=D({__name:"dashboardWebHooks",setup(i){const m=p([]),y=p(!1);Z(async()=>{await r(),y.value=!0});const r=async()=>{await R("/api/webHooks/getWebHooks",{},x=>{m.value=x.data})},s=p(!1),u=p(void 0),k=p("edit");return(x,d)=>(t(),o("div",ms,[e("div",fs,[e("div",ps,[e("div",ks,[e("h6",ys,[d[7]||(d[7]=e("i",{class:"bi bi-plug-fill me-2"},null,-1)),l(a,{t:"Webhooks"})]),s.value?(t(),o("button",{key:1,class:"btn btn-sm bg-secondary-subtle text-secondary-emphasis border-1 border-secondary-subtle rounded-3 shadow-sm ms-auto",onClick:d[1]||(d[1]=c=>s.value=!1)},[d[9]||(d[9]=e("i",{class:"bi bi-chevron-left me-2"},null,-1)),l(a,{t:"Back"})])):(t(),o("button",{key:0,class:"btn btn-sm bg-primary-subtle text-primary-emphasis border-1 border-primary-subtle rounded-3 shadow-sm ms-auto",onClick:d[0]||(d[0]=c=>{s.value=!0,u.value=void 0})},[d[8]||(d[8]=e("i",{class:"bi bi-plus-circle-fill me-2"},null,-1)),l(a,{t:"Webhook"})]))])]),s.value?(t(),$(M,{key:1},{default:P(()=>[l(B,{onRefresh:d[6]||(d[6]=c=>{u.value=void 0,s.value=!1,r()})})]),_:1})):(t(),o("div",hs,[e("div",_s,[e("div",xs,[e("div",gs,[m.value.length>0?(t(!0),o(C,{key:0},L(m.value,c=>(t(),o("a",{role:"button",onClick:S=>u.value=c,class:_([{active:u.value?.WebHookID===c.WebHookID},"list-group-item list-group-item-action"]),"aria-current":"true"},[e("p",ws,h(c.PayloadURL),1),e("p",$s,[l(a,{t:"Subscribed Actions"}),V(": "+h(c.SubscribedActions.join(", ")),1)])],10,Ss))),256)):(t(),o("div",Hs,[l(a,{t:"No Webhooks",class:"m-auto"})]))])])]),u.value?(t(),o("div",Ws,[e("div",Cs,[e("nav",Ls,[e("div",Ds,[e("div",null,[e("ul",Vs,[e("li",As,[e("a",{onClick:d[2]||(d[2]=c=>k.value="edit"),class:_([{active:k.value==="edit"},"nav-link rounded-3"]),role:"button"},[l(a,{t:"Edit"})],2)]),e("li",Us,[e("a",{class:_([{active:k.value==="sessions"},"nav-link rounded-3"]),onClick:d[3]||(d[3]=c=>k.value="sessions"),role:"button"},[l(a,{t:"Sessions"})],2)])])])])]),k.value==="edit"?(t(),$(B,{key:u.value,onDelete:d[4]||(d[4]=c=>{r(),u.value=void 0}),webHook:u.value,onRefresh:d[5]||(d[5]=c=>r())},null,8,["webHook"])):k.value==="sessions"?(t(),$(M,{key:1},{fallback:P(()=>[e("div",Is,[l(a,{t:"Loading..."})])]),default:P(()=>[(t(),$(vs,{key:u.value,webHook:u.value},null,8,["webHook"]))]),_:1})):f("",!0)])])):f("",!0)]))])]))}}),Ms=j(Ps,[["__scopeId","data-v-e0f0e683"]]);export{Ms as default};
diff --git a/src/static/dist/WGDashboardAdmin/assets/dashboardWebHooks-okqrHjWv.js b/src/static/dist/WGDashboardAdmin/assets/dashboardWebHooks-okqrHjWv.js
new file mode 100644
index 00000000..5c1620b1
--- /dev/null
+++ b/src/static/dist/WGDashboardAdmin/assets/dashboardWebHooks-okqrHjWv.js
@@ -0,0 +1 @@
+import{L as a}from"./localeText-Cji_3w42.js";import{E as D,r as p,I as E,G as A,D as F,c as o,d as f,a as e,b as l,q as w,e as V,A as I,H as O,v as U,F as C,k as L,n as _,u as J,C as K,t as h,g as R,B as T,f as t,x as N,l as $,z as Y,_ as q,o as Z,w as P,S as M}from"./index-QGgWclm4.js";const Q={class:"p-3"},X={key:0},ee={for:"PayloadURL",class:"form-label fw-bold text-muted"},se=["disabled"],te={for:"ContentType",class:"form-label fw-bold text-muted"},le=["disabled"],oe={class:"form-label fw-bold text-muted"},ne={class:"form-check form-switch mb-2"},ae=["disabled"],ie={class:"form-check-label",for:"VerifySSL"},de={key:0,class:"alert-danger alert rounded-3"},ue={class:"form-label fw-bold text-muted"},re={class:"card rounded-3"},ce={class:"card-body d-flex gap-2 flex-column"},be={class:"d-flex gap-2"},ve={class:"flex-grow-1"},me=["disabled","onUpdate:modelValue"],fe={class:"flex-grow-1"},pe=["disabled","onUpdate:modelValue"],ke=["onClick"],ye={class:"form-label fw-bold text-muted"},he={class:"form-check form-check-inline"},_e=["disabled","id","value"],xe=["for"],ge={class:"form-label fw-bold text-muted"},Se={class:"form-check form-switch mb-2"},we=["disabled"],$e={class:"form-check-label",for:"IsActive"},He={key:0,class:"alert alert-danger rounded-3"},We={class:"d-flex gap-2"},Ce={class:"d-flex align-items-center"},Le={class:"mb-0"},B=D({__name:"addWebHook",props:["webHook"],emits:["refresh","delete"],async setup(i,{emit:m}){let y,r;const s=p({ContentType:String,Headers:Object,IsActive:Boolean,Notes:String,PayloadURL:String,SubscribedActions:Array,VerifySSL:Boolean,WebHookID:String}),u=i;u.webHook?s.value={...u.webHook}:([y,r]=E(()=>R("/api/webHooks/createWebHook",{},g=>{s.value=g.data})),await y,r());const k=p({peer_created:A("Peer Created"),peer_deleted:A("Peer Deleted"),peer_updated:A("Peer Updated")}),x=m,d=F(),c=p(!1),S=p(""),v=p(!1),G=async g=>{g&&g.preventDefault(),v.value=!0,await T("/api/webHooks/updateWebHook",s.value,n=>{n.status?(x("refresh"),d.newMessage("Server","Webhook saved","success")):(c.value=!0,S.value=n.message,d.newMessage("Server","Webhook failed to save","danger")),v.value=!1})},z=async()=>{v.value=!0,await T("/api/webHooks/deleteWebHook",s.value,g=>{g.status?(x("delete"),d.newMessage("Server","Webhook deleted","success")):(c.value=!0,S.value=g.message,d.newMessage("Server","Webhook failed to delete","danger")),v.value=!1})};return(g,n)=>(t(),o("div",Q,[i.webHook?f("",!0):(t(),o("div",X,[e("h6",null,[l(a,{t:"Add Webhook"})]),e("p",null,[l(a,{t:"WGDashboard will sent a POST Request to the URL below with details of any subscribed events."})])])),e("form",{onSubmit:n[7]||(n[7]=b=>G(b)),class:"d-flex flex-column gap-2"},[e("div",null,[e("label",ee,[e("small",null,[l(a,{t:"Payload URL"}),n[8]||(n[8]=V("* ",-1))])]),w(e("input",{required:"",disabled:v.value,id:"PayloadURL","onUpdate:modelValue":n[0]||(n[0]=b=>s.value.PayloadURL=b),class:"form-control rounded-3",type:"url"},null,8,se),[[I,s.value.PayloadURL]])]),e("div",null,[e("label",te,[e("small",null,[l(a,{t:"Content Type"}),n[9]||(n[9]=V("* ",-1))])]),w(e("select",{disabled:v.value,id:"ContentType","onUpdate:modelValue":n[1]||(n[1]=b=>s.value.ContentType=b),class:"form-select rounded-3",required:""},[...n[10]||(n[10]=[e("option",{value:"application/json"}," application/json ",-1),e("option",{value:"application/x-www-form-urlencoded"}," application/x-www-form-urlencoded ",-1)])],8,le),[[O,s.value.ContentType]])]),e("div",null,[e("label",oe,[e("small",null,[l(a,{t:"Verify SSL"})])]),e("div",null,[e("div",ne,[w(e("input",{disabled:v.value,"onUpdate:modelValue":n[2]||(n[2]=b=>s.value.VerifySSL=b),class:"form-check-input",type:"checkbox",role:"switch",id:"VerifySSL"},null,8,ae),[[U,s.value.VerifySSL]]),e("label",ie,[l(a,{t:s.value.VerifySSL?"Enabled":"Disabled"},null,8,["t"])])]),s.value.VerifySSL?f("",!0):(t(),o("div",de,[n[11]||(n[11]=e("i",{class:"bi bi-exclamation-triangle-fill me-2"},null,-1)),l(a,{t:"We highly suggest to enable SSL verification"})]))])]),e("div",null,[e("label",ue,[e("small",null,[l(a,{t:"Custom Headers"})])]),e("div",re,[e("div",ce,[(t(!0),o(C,null,L(s.value.Headers,(b,H)=>(t(),o("div",be,[e("div",ve,[w(e("input",{class:"form-control rounded-3 form-control-sm",disabled:v.value,"onUpdate:modelValue":W=>b.key=W,placeholder:"Key"},null,8,me),[[I,b.key]])]),e("div",fe,[w(e("input",{class:"form-control rounded-3 form-control-sm",disabled:v.value,"onUpdate:modelValue":W=>b.value=W,placeholder:"Value"},null,8,pe),[[I,b.value]])]),e("button",{class:_([{disabled:v.value},"btn btn-sm bg-danger-subtle text-danger-emphasis border-danger-subtle rounded-3"]),type:"button",onClick:W=>delete s.value.Headers[H]},[...n[12]||(n[12]=[e("i",{class:"bi bi-trash-fill"},null,-1)])],10,ke)]))),256)),e("button",{type:"button",class:_([{disabled:v.value},"btn btn-sm bg-primary-subtle text-primary-emphasis border-primary-subtle rounded-3"]),onClick:n[3]||(n[3]=b=>s.value.Headers[J(K)().toString()]={key:"",value:""})},[n[13]||(n[13]=e("i",{class:"bi bi-plus-lg me-2"},null,-1)),l(a,{t:"Header"})],2)])])]),n[15]||(n[15]=e("hr",null,null,-1)),e("div",null,[e("label",ye,[e("small",null,[l(a,{t:"Subscribed Actions"})])]),e("div",null,[(t(!0),o(C,null,L(k.value,(b,H)=>(t(),o("div",he,[w(e("input",{class:"form-check-input",disabled:s.value.SubscribedActions.length===1&&s.value.SubscribedActions.includes(H)||v.value,type:"checkbox",id:H,value:H,"onUpdate:modelValue":n[4]||(n[4]=W=>s.value.SubscribedActions=W)},null,8,_e),[[U,s.value.SubscribedActions]]),e("label",{class:"form-check-label",for:H},h(b),9,xe)]))),256))])]),n[16]||(n[16]=e("hr",null,null,-1)),e("div",null,[e("label",ge,[e("small",null,[l(a,{t:"Enable Webhook"})])]),e("div",null,[e("div",Se,[w(e("input",{disabled:v.value,"onUpdate:modelValue":n[5]||(n[5]=b=>s.value.IsActive=b),class:"form-check-input",type:"checkbox",role:"switch",id:"IsActive"},null,8,we),[[U,s.value.IsActive]]),e("label",$e,[l(a,{t:s.value.IsActive?"Yes":"No"},null,8,["t"])])])])]),c.value?(t(),o("div",He,h(S.value),1)):f("",!0),e("div",We,[e("button",{type:"submit",class:_([{disabled:v.value},"ms-auto btn bg-success-subtle text-success-emphasis border-success-subtle rounded-3"])},[l(a,{t:"Save"})],2)]),i.webHook?(t(),o(C,{key:1},[n[14]||(n[14]=e("hr",null,null,-1)),e("div",Ce,[e("h6",Le,[l(a,{t:"Danger Zone"})]),e("button",{onClick:n[6]||(n[6]=b=>z()),type:"button",class:_([{disabled:v.value},"btn bg-danger-subtle text-danger-emphasis border-danger-subtle rounded-3 ms-auto"])},[l(a,{t:"Delete"})],2)])],64)):f("",!0)],32)]))}}),De={class:"d-flex flex-column gap-3"},Ve={class:"text-muted"},Ae={key:0},Ie={key:1},Ue={key:2},Pe={key:3},Re={class:"d-flex gap-4 align-items-center"},Te={class:"text-muted"},Me={key:0},Be={key:1},Ee={class:"text-muted"},Ne={class:"table-responsive"},qe={class:"table"},je={scope:"col"},Ge={scope:"col"},ze={scope:"col"},Fe={style:{"white-space":"nowrap"}},Oe={key:0},Je={key:1},Ke={key:2},Ye={style:{"white-space":"nowrap","overflow-x":"scroll"}},Ze={class:"bg-body-tertiary p-3 rounded-3"},Qe={class:"mb-0"},j=D({__name:"webHookSession",props:["session"],setup(i){const m=i,y=N(()=>JSON.stringify(m.session.Data,null,4));return(r,s)=>(t(),o("div",De,[e("div",null,[e("small",Ve,[l(a,{t:"Status"})]),e("h3",{class:_({"text-success":i.session.Status===0,"text-danger":i.session.Status===1,"text-warning":i.session.Status===2})},[i.session.Status===0?(t(),o("span",Ae,[s[0]||(s[0]=e("i",{class:"bi bi-check-circle-fill me-2"},null,-1)),l(a,{t:"Success"})])):f("",!0),i.session.Status===2?(t(),o("span",Ie,[s[1]||(s[1]=e("i",{class:"bi bi-trash3-fill me-2"},null,-1)),l(a,{t:"Timeout"})])):i.session.Status===1?(t(),o("span",Ue,[s[2]||(s[2]=e("i",{class:"bi bi-x-circle-fill me-2"},null,-1)),l(a,{t:"Failed"})])):i.session.Status===-1?(t(),o("span",Pe,[s[3]||(s[3]=e("i",{class:"spinner-border me-2"},null,-1)),l(a,{t:"Requesting..."})])):f("",!0)],2),e("div",Re,[e("div",null,[e("small",Te,[l(a,{t:"Started At"})]),e("h6",null,h(i.session.StartDate),1)]),i.session.EndDate?(t(),o("div",Me,[...s[4]||(s[4]=[e("i",{class:"bi bi-arrow-right"},null,-1)])])):f("",!0),i.session.EndDate?(t(),o("div",Be,[e("small",Ee,[l(a,{t:"Ended At"})]),e("h6",null,h(i.session.EndDate),1)])):f("",!0)])]),e("div",null,[e("h6",null,[l(a,{t:"Logs"})]),e("div",Ne,[e("table",qe,[e("thead",null,[e("tr",null,[e("th",je,[l(a,{t:"Datetime"})]),e("th",Ge,[l(a,{t:"Status"})]),e("th",ze,[l(a,{t:"Message"})])])]),e("tbody",null,[(t(!0),o(C,null,L([...i.session.Logs.Logs].reverse(),u=>(t(),o("tr",null,[e("td",Fe,h(u.LogTime),1),e("td",{style:{"white-space":"nowrap"},class:_({"text-success":u.Status===0,"text-danger":u.Status===1})},[u.Status===0?(t(),o("span",Oe,[...s[5]||(s[5]=[e("i",{class:"bi bi-check-circle-fill me-2"},null,-1)])])):u.Status===1?(t(),o("span",Je,[...s[6]||(s[6]=[e("i",{class:"bi bi-x-circle-fill me-2"},null,-1)])])):u.Status===-1?(t(),o("span",Ke,[...s[7]||(s[7]=[e("i",{class:"bi bi-circle me-2"},null,-1)])])):f("",!0)],2),e("td",Ye,h(u.Message),1)]))),256))])])])]),e("div",null,[e("h6",null,[l(a,{t:"Data"})]),e("div",Ze,[e("pre",Qe,[e("code",null,h(y.value),1)])])])]))}}),Xe={class:"card"},es={class:"card-body"},ss={key:0},ts={key:1},ls={key:2},os={key:3},ns=D({__name:"previousWebHookSession",props:["session"],setup(i){const m=p(!0);return(y,r)=>(t(),o("div",Xe,[e("div",es,[e("p",{class:"d-flex mb-0",role:"button",onClick:r[0]||(r[0]=s=>m.value=!m.value)},[e("span",{class:_({"text-success":i.session.Status===0,"text-danger":i.session.Status===1,"text-warning":i.session.Status===2})},[i.session.Status===0?(t(),o("span",ss,[...r[1]||(r[1]=[e("i",{class:"bi bi-check-circle-fill me-2"},null,-1)])])):i.session.Status===2?(t(),o("span",ts,[...r[2]||(r[2]=[e("i",{class:"bi bi-trash3-fill me-2"},null,-1)])])):i.session.Status===1?(t(),o("span",ls,[...r[3]||(r[3]=[e("i",{class:"bi bi-x-circle-fill me-2"},null,-1)])])):i.session.Status===-1?(t(),o("span",os,[...r[4]||(r[4]=[e("i",{class:"spinner-border spinner-border-sm me-2"},null,-1)])])):f("",!0)],2),V(" "+h(i.session.StartDate)+" ",1),r[5]||(r[5]=e("i",{class:"bi bi-chevron-right ms-auto"},null,-1))]),m.value?f("",!0):(t(),$(j,{key:0,session:i.session,class:"mt-2"},null,8,["session"]))])]))}}),as={key:0},is={class:"p-3"},ds={class:"mb-3"},us={key:0,class:"border-top p-3"},rs={class:"d-flex flex-column gap-2"},cs={key:1,class:"p-3"},bs=D({__name:"webHookSessions",props:["webHook"],async setup(i){let m,y;const r=i,s=p([]),u=p(void 0),k=async()=>{await R("/api/webHooks/getWebHookSessions",{WebHookID:r.webHook.WebHookID},d=>{s.value=d.data})};[m,y]=E(()=>k()),await m,y();const x=N(()=>{if(s.value)return s.value[0]});return u.value=setInterval(()=>{k()},5e3),Y(()=>{clearInterval(u.value)}),(d,c)=>x.value?(t(),o("div",as,[e("div",is,[e("h6",ds,[l(a,{t:"Latest Session"})]),(t(),$(j,{session:x.value,key:x.value.WebHookID},null,8,["session"]))]),s.value.length>1?(t(),o("div",us,[e("h6",null,[l(a,{t:"Previous Sessions"})]),e("div",rs,[(t(!0),o(C,null,L(s.value.slice(1),S=>(t(),$(ns,{session:S,key:S.WebHookSessionID},null,8,["session"]))),128))])])):f("",!0)])):(t(),o("div",cs,[...c[0]||(c[0]=[e("div",{class:"bg-body-tertiary p-3 w-100 d-flex rounded-3"},[e("h6",{class:"mb-0 m-auto"},"No Sessions")],-1)])]))}}),vs=q(bs,[["__scopeId","data-v-7b6e949e"]]),ms={class:"text-body w-100 h-100 pb-2 position-relative"},fs={class:"w-100 h-100 card rounded-3"},ps={class:"border-bottom z-0"},ks={class:"d-flex text-body align-items-center sticky-top p-3 bg-body-tertiary rounded-top-3",style:{"border-top-right-radius":"0 !important"}},ys={class:"my-2"},hs={key:0,class:"row h-100 g-0"},_s={class:"col-sm-4 border-end d-flex flex-column clientListContainer"},xs={class:"d-flex flex-column overflow-y-scroll",style:{flex:"1 0 0"}},gs={class:"list-group d-flex flex-column d-flex h-100"},Ss=["onClick"],ws={class:"mb-0 fw-bold text-body url"},$s={class:"url mb-0"},Hs={key:1,class:"flex-grow-1 d-flex text-muted"},Ws={key:0,class:"col-sm-8 clientViewerContainer d-flex flex-column"},Cs={class:"overflow-scroll",style:{flex:"1 0 0"}},Ls={class:"navbar navbar-expand-lg bg-body-tertiary sticky-top"},Ds={class:"container-fluid"},Vs={class:"navbar-nav gap-2"},As={class:"nav-item"},Is={class:"nav-item"},Us={class:"p-3"},Ps=D({__name:"dashboardWebHooks",setup(i){const m=p([]),y=p(!1);Z(async()=>{await r(),y.value=!0});const r=async()=>{await R("/api/webHooks/getWebHooks",{},x=>{m.value=x.data})},s=p(!1),u=p(void 0),k=p("edit");return(x,d)=>(t(),o("div",ms,[e("div",fs,[e("div",ps,[e("div",ks,[e("h6",ys,[d[7]||(d[7]=e("i",{class:"bi bi-plug-fill me-2"},null,-1)),l(a,{t:"Webhooks"})]),s.value?(t(),o("button",{key:1,class:"btn btn-sm bg-secondary-subtle text-secondary-emphasis border-1 border-secondary-subtle rounded-3 shadow-sm ms-auto",onClick:d[1]||(d[1]=c=>s.value=!1)},[d[9]||(d[9]=e("i",{class:"bi bi-chevron-left me-2"},null,-1)),l(a,{t:"Back"})])):(t(),o("button",{key:0,class:"btn btn-sm bg-primary-subtle text-primary-emphasis border-1 border-primary-subtle rounded-3 shadow-sm ms-auto",onClick:d[0]||(d[0]=c=>{s.value=!0,u.value=void 0})},[d[8]||(d[8]=e("i",{class:"bi bi-plus-circle-fill me-2"},null,-1)),l(a,{t:"Webhook"})]))])]),s.value?(t(),$(M,{key:1},{default:P(()=>[l(B,{onRefresh:d[6]||(d[6]=c=>{u.value=void 0,s.value=!1,r()})})]),_:1})):(t(),o("div",hs,[e("div",_s,[e("div",xs,[e("div",gs,[m.value.length>0?(t(!0),o(C,{key:0},L(m.value,c=>(t(),o("a",{role:"button",onClick:S=>u.value=c,class:_([{active:u.value?.WebHookID===c.WebHookID},"list-group-item list-group-item-action"]),"aria-current":"true"},[e("p",ws,h(c.PayloadURL),1),e("p",$s,[l(a,{t:"Subscribed Actions"}),V(": "+h(c.SubscribedActions.join(", ")),1)])],10,Ss))),256)):(t(),o("div",Hs,[l(a,{t:"No Webhooks",class:"m-auto"})]))])])]),u.value?(t(),o("div",Ws,[e("div",Cs,[e("nav",Ls,[e("div",Ds,[e("div",null,[e("ul",Vs,[e("li",As,[e("a",{onClick:d[2]||(d[2]=c=>k.value="edit"),class:_([{active:k.value==="edit"},"nav-link rounded-3"]),role:"button"},[l(a,{t:"Edit"})],2)]),e("li",Is,[e("a",{class:_([{active:k.value==="sessions"},"nav-link rounded-3"]),onClick:d[3]||(d[3]=c=>k.value="sessions"),role:"button"},[l(a,{t:"Sessions"})],2)])])])])]),k.value==="edit"?(t(),$(B,{key:u.value,onDelete:d[4]||(d[4]=c=>{r(),u.value=void 0}),webHook:u.value,onRefresh:d[5]||(d[5]=c=>r())},null,8,["webHook"])):k.value==="sessions"?(t(),$(M,{key:1},{fallback:P(()=>[e("div",Us,[l(a,{t:"Loading..."})])]),default:P(()=>[(t(),$(vs,{key:u.value,webHook:u.value},null,8,["webHook"]))]),_:1})):f("",!0)])])):f("",!0)]))])]))}}),Ms=q(Ps,[["__scopeId","data-v-e0f0e683"]]);export{Ms as default};
diff --git a/src/static/dist/WGDashboardAdmin/assets/dayjs.min-WRW_FTL4.js b/src/static/dist/WGDashboardAdmin/assets/dayjs.min-DXJxaGlz.js
similarity index 84%
rename from src/static/dist/WGDashboardAdmin/assets/dayjs.min-WRW_FTL4.js
rename to src/static/dist/WGDashboardAdmin/assets/dayjs.min-DXJxaGlz.js
index 96ec03dc..b4a53d91 100644
--- a/src/static/dist/WGDashboardAdmin/assets/dayjs.min-WRW_FTL4.js
+++ b/src/static/dist/WGDashboardAdmin/assets/dayjs.min-DXJxaGlz.js
@@ -1 +1 @@
-import{O as G}from"./index-DYYtDSji.js";var W={exports:{}},K=W.exports,E;function X(){return E||(E=1,(function(V,et){(function(A,x){V.exports=x()})(K,(function(){var A=1e3,x=6e4,U=36e5,I="millisecond",S="second",w="minute",O="hour",M="day",H="week",m="month",J="quarter",y="year",_="date",Z="Invalid Date",B=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,P=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,Q={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(s){var n=["th","st","nd","rd"],t=s%100;return"["+s+(n[(t-20)%10]||n[t]||n[0])+"]"}},F=function(s,n,t){var r=String(s);return!r||r.length>=n?s:""+Array(n+1-r.length).join(t)+s},R={s:F,z:function(s){var n=-s.utcOffset(),t=Math.abs(n),r=Math.floor(t/60),e=t%60;return(n<=0?"+":"-")+F(r,2,"0")+":"+F(e,2,"0")},m:function s(n,t){if(n.date()1)return s(u[0])}else{var o=n.name;D[o]=n,e=o}return!r&&e&&(k=e),e||!r&&k},f=function(s,n){if(N(s))return s.clone();var t=typeof n=="object"?n:{};return t.date=s,t.args=arguments,new C(t)},a=R;a.l=T,a.i=N,a.w=function(s,n){return f(s,{locale:n.$L,utc:n.$u,x:n.$x,$offset:n.$offset})};var C=(function(){function s(t){this.$L=T(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[q]=!0}var n=s.prototype;return n.parse=function(t){this.$d=(function(r){var e=r.date,i=r.utc;if(e===null)return new Date(NaN);if(a.u(e))return new Date;if(e instanceof Date)return new Date(e);if(typeof e=="string"&&!/Z$/i.test(e)){var u=e.match(B);if(u){var o=u[2]-1||0,c=(u[7]||"0").substring(0,3);return i?new Date(Date.UTC(u[1],o,u[3]||1,u[4]||0,u[5]||0,u[6]||0,c)):new Date(u[1],o,u[3]||1,u[4]||0,u[5]||0,u[6]||0,c)}}return new Date(e)})(t),this.init()},n.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},n.$utils=function(){return a},n.isValid=function(){return this.$d.toString()!==Z},n.isSame=function(t,r){var e=f(t);return this.startOf(r)<=e&&e<=this.endOf(r)},n.isAfter=function(t,r){return f(t)