@gameap/frontend 4.1.0-dev1 → 4.1.0-dev11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/AdminClientCertificatesView-Bg8X_Ouc.js +370 -0
- package/dist/AdminDaemonTaskListView-DbJp0aqQ.js +316 -0
- package/dist/AdminDaemonTaskOutputView-DNCHQfxx.js +87 -0
- package/dist/AdminGamesEdit-jco7cBfk.js +473 -0
- package/dist/AdminGamesList-CMjsgEpx.js +518 -0
- package/dist/AdminModEdit-BlRu_09M.js +529 -0
- package/dist/AdminNodeShowView-BHxJkjYJ.js +175 -0
- package/dist/AdminNodesCreateView-DihmM46W.js +87 -0
- package/dist/AdminNodesEditView-CVACSido.js +65 -0
- package/dist/AdminNodesView-CHtiU6dZ.js +167 -0
- package/dist/AdminPluginsView-CRjF3BPs.js +984 -0
- package/dist/AdminServersCreate-5f8x6eZO.js +342 -0
- package/dist/AdminServersEdit-CA7711nJ.js +400 -0
- package/dist/AdminServersList-De5ZMEGZ.js +168 -0
- package/dist/AdminUsersEditView-DeYo98vi.js +308 -0
- package/dist/AdminUsersView-C8fKEhpr.js +446 -0
- package/dist/CreateModForm-CqkvVLfN.js +123 -0
- package/dist/CreateNodeModal-DOXVtVLQ.js +100 -0
- package/dist/DsIpSelector-C676Y19X.js +90 -0
- package/dist/EmptyView-Bf6zmQQt.js +9 -0
- package/dist/FileManager-DSa9v4Ex.js +5932 -0
- package/dist/GameIcon-DaYNlnur.js +87 -0
- package/dist/GameModSelector-CQBT8ZLu.js +95 -0
- package/dist/InputManyList-DUOtepb8.js +110 -0
- package/dist/InputTextList-lPhVIV04.js +63 -0
- package/dist/PluginPendingView-DaDaN30Q.js +34 -0
- package/dist/ProfileView-Dw2T3X8m.js +295 -0
- package/dist/RconConsole-CvxNBv0B.js +74 -0
- package/dist/RconPlayers-odUKa0Ps.js +424 -0
- package/dist/ServerConsole-B9v2PcWb.js +99 -0
- package/dist/ServerControlButton-D_zJbxr6.js +186 -0
- package/dist/ServerIdView-_vGQRk7y.js +609 -0
- package/dist/ServerSelector-6fCqL3e9.js +52 -0
- package/dist/ServerSettings-C6-tkLTH.js +84 -0
- package/dist/ServerStatus-CcqB0h1r.js +63 -0
- package/dist/ServerTasks-BcaZzvz7.js +857 -0
- package/dist/ServersView-S_G_kuGj.js +313 -0
- package/dist/SettingsParameters-u3Awy4Vf.js +89 -0
- package/dist/SmartPortSelector-BRSQFVqT.js +174 -0
- package/dist/TokensView-C1RFJSB5.js +392 -0
- package/dist/UpdateNodeForm-BAhzQLt-.js +652 -0
- package/dist/UserServerPrivileges-Q2wQMyHi.js +319 -0
- package/dist/_createCompounder-CXjx5-CF.js +241 -0
- package/dist/camelCase-CSrB2MWj.js +8 -0
- package/dist/capitalize-BZSBvd6d.js +40 -0
- package/dist/clientCertificates-C0FlDwsb.js +53 -0
- package/dist/favicon-32x32.png +0 -0
- package/dist/favicon-96x96.png +0 -0
- package/dist/favicon.ico +0 -0
- package/dist/fonts/gicon.eot +0 -0
- package/dist/fonts/gicon.svg +33 -0
- package/dist/fonts/gicon.ttf +0 -0
- package/dist/fonts/gicon.woff +0 -0
- package/dist/fonts/gicon.woff2 +0 -0
- package/dist/frontend.css +6 -0
- package/dist/gameList-kucszmx0.js +115 -0
- package/dist/gameap.svg +3 -0
- package/dist/gameap_full.svg +9 -0
- package/dist/images/gap_logo_white.png +0 -0
- package/dist/images/gap_logo_white_mini.png +0 -0
- package/dist/images/gicon.svg +18 -0
- package/dist/images/icons/save-white.svg +1 -0
- package/dist/images/icons/save.svg +1 -0
- package/dist/index-9fvX7FD-.js +3840 -0
- package/dist/index.js +1 -0
- package/dist/isEmpty-D0Z8Rneq.js +263 -0
- package/dist/join-CmlzL0H9.js +7 -0
- package/dist/loader-qtG-Lf6M.js +131 -0
- package/dist/mockServiceWorker.js +349 -0
- package/dist/snakeCase-nnM4dAra.js +7 -0
- package/dist/validators-ChBGsKft.js +65 -0
- package/package.json +6 -4
|
@@ -0,0 +1,3840 @@
|
|
|
1
|
+
import { resolveComponent as Q, createElementBlock as c, openBlock as a, createElementVNode as o, Fragment as F, renderList as N, createBlock as $, createCommentVNode as A, normalizeClass as V, toDisplayString as b, withCtx as M, createVNode as y, reactive as Re, computed as w, resolveDynamicComponent as pe, normalizeStyle as vt, createTextVNode as L, ref as k, onMounted as re, Transition as _t, onUnmounted as bt, provide as Ge, renderSlot as Y, inject as He, unref as u, withDirectives as be, vShow as Ht, createStaticVNode as Ke, normalizeProps as Kt, guardReactiveProps as Xt, h as Wt, watch as Zt, mergeProps as xt, vModelText as ot, vModelCheckbox as Jt, defineAsyncComponent as D, createApp as Yt } from "vue";
|
|
2
|
+
import { defineStore as q, createPinia as Qt } from "pinia";
|
|
3
|
+
import { useRouter as Xe, useRoute as xe, createRouter as es, createWebHistory as ts } from "vue-router";
|
|
4
|
+
import yt from "axios";
|
|
5
|
+
import { useMessage as ss, useDialog as ns, darkTheme as os, lightTheme as rs, NConfigProvider as as, ruRU as is, enUS as ls, NDialogProvider as cs, NMessageProvider as us, NSelect as ds } from "naive-ui";
|
|
6
|
+
import wt from "/images/gap_logo_white.png";
|
|
7
|
+
window.addEventListener("load", function() {
|
|
8
|
+
document.querySelectorAll(".custom-file-input").forEach(function(e) {
|
|
9
|
+
e.addEventListener("change", function() {
|
|
10
|
+
this.nextElementSibling.innerHTML = this.value.replace(/^.*\\/, "");
|
|
11
|
+
});
|
|
12
|
+
});
|
|
13
|
+
});
|
|
14
|
+
const ce = {
|
|
15
|
+
en: {
|
|
16
|
+
second: ["second", "seconds"],
|
|
17
|
+
minute: ["minute", "minutes"],
|
|
18
|
+
hour: ["hour", "hours"],
|
|
19
|
+
day: ["day", "days"],
|
|
20
|
+
week: ["week", "weeks"],
|
|
21
|
+
month: ["month", "months"],
|
|
22
|
+
year: ["year", "years"]
|
|
23
|
+
},
|
|
24
|
+
ru: {
|
|
25
|
+
second: ["секунда", "секунды", "секунд"],
|
|
26
|
+
minute: ["минута", "минуты", "минут"],
|
|
27
|
+
hour: ["час", "часа", "часов"],
|
|
28
|
+
day: ["день", "дня", "дней"],
|
|
29
|
+
week: ["неделя", "недели", "недель"],
|
|
30
|
+
month: ["месяц", "месяца", "месяцев"],
|
|
31
|
+
year: ["год", "года", "лет"]
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
var kt = typeof global == "object" && global && global.Object === Object && global, fs = typeof self == "object" && self && self.Object === Object && self, ye = kt || fs || Function("return this")(), oe = ye.Symbol, Ct = Object.prototype, ms = Ct.hasOwnProperty, ps = Ct.toString, ue = oe ? oe.toStringTag : void 0;
|
|
35
|
+
function hs(e) {
|
|
36
|
+
var t = ms.call(e, ue), s = e[ue];
|
|
37
|
+
try {
|
|
38
|
+
e[ue] = void 0;
|
|
39
|
+
var n = !0;
|
|
40
|
+
} catch {
|
|
41
|
+
}
|
|
42
|
+
var i = ps.call(e);
|
|
43
|
+
return n && (t ? e[ue] = s : delete e[ue]), i;
|
|
44
|
+
}
|
|
45
|
+
var gs = Object.prototype, vs = gs.toString;
|
|
46
|
+
function _s(e) {
|
|
47
|
+
return vs.call(e);
|
|
48
|
+
}
|
|
49
|
+
var bs = "[object Null]", xs = "[object Undefined]", rt = oe ? oe.toStringTag : void 0;
|
|
50
|
+
function we(e) {
|
|
51
|
+
return e == null ? e === void 0 ? xs : bs : rt && rt in Object(e) ? hs(e) : _s(e);
|
|
52
|
+
}
|
|
53
|
+
function ke(e) {
|
|
54
|
+
return e != null && typeof e == "object";
|
|
55
|
+
}
|
|
56
|
+
var ys = "[object Symbol]";
|
|
57
|
+
function We(e) {
|
|
58
|
+
return typeof e == "symbol" || ke(e) && we(e) == ys;
|
|
59
|
+
}
|
|
60
|
+
function ws(e, t) {
|
|
61
|
+
for (var s = -1, n = e == null ? 0 : e.length, i = Array(n); ++s < n; )
|
|
62
|
+
i[s] = t(e[s], s, e);
|
|
63
|
+
return i;
|
|
64
|
+
}
|
|
65
|
+
var he = Array.isArray, at = oe ? oe.prototype : void 0, it = at ? at.toString : void 0;
|
|
66
|
+
function $t(e) {
|
|
67
|
+
if (typeof e == "string")
|
|
68
|
+
return e;
|
|
69
|
+
if (he(e))
|
|
70
|
+
return ws(e, $t) + "";
|
|
71
|
+
if (We(e))
|
|
72
|
+
return it ? it.call(e) : "";
|
|
73
|
+
var t = e + "";
|
|
74
|
+
return t == "0" && 1 / e == -1 / 0 ? "-0" : t;
|
|
75
|
+
}
|
|
76
|
+
function St(e) {
|
|
77
|
+
var t = typeof e;
|
|
78
|
+
return e != null && (t == "object" || t == "function");
|
|
79
|
+
}
|
|
80
|
+
function ks(e) {
|
|
81
|
+
return e;
|
|
82
|
+
}
|
|
83
|
+
var Cs = "[object AsyncFunction]", $s = "[object Function]", Ss = "[object GeneratorFunction]", Ps = "[object Proxy]";
|
|
84
|
+
function Pt(e) {
|
|
85
|
+
if (!St(e))
|
|
86
|
+
return !1;
|
|
87
|
+
var t = we(e);
|
|
88
|
+
return t == $s || t == Ss || t == Cs || t == Ps;
|
|
89
|
+
}
|
|
90
|
+
var Le = ye["__core-js_shared__"], lt = (function() {
|
|
91
|
+
var e = /[^.]+$/.exec(Le && Le.keys && Le.keys.IE_PROTO || "");
|
|
92
|
+
return e ? "Symbol(src)_1." + e : "";
|
|
93
|
+
})();
|
|
94
|
+
function Ts(e) {
|
|
95
|
+
return !!lt && lt in e;
|
|
96
|
+
}
|
|
97
|
+
var As = Function.prototype, Is = As.toString;
|
|
98
|
+
function Fs(e) {
|
|
99
|
+
if (e != null) {
|
|
100
|
+
try {
|
|
101
|
+
return Is.call(e);
|
|
102
|
+
} catch {
|
|
103
|
+
}
|
|
104
|
+
try {
|
|
105
|
+
return e + "";
|
|
106
|
+
} catch {
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
return "";
|
|
110
|
+
}
|
|
111
|
+
var Ms = /[\\^$.*+?()[\]{}|]/g, Es = /^\[object .+?Constructor\]$/, js = Function.prototype, Os = Object.prototype, Ls = js.toString, zs = Os.hasOwnProperty, Ns = RegExp(
|
|
112
|
+
"^" + Ls.call(zs).replace(Ms, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
|
113
|
+
);
|
|
114
|
+
function Rs(e) {
|
|
115
|
+
if (!St(e) || Ts(e))
|
|
116
|
+
return !1;
|
|
117
|
+
var t = Pt(e) ? Ns : Es;
|
|
118
|
+
return t.test(Fs(e));
|
|
119
|
+
}
|
|
120
|
+
function Gs(e, t) {
|
|
121
|
+
return e?.[t];
|
|
122
|
+
}
|
|
123
|
+
function Tt(e, t) {
|
|
124
|
+
var s = Gs(e, t);
|
|
125
|
+
return Rs(s) ? s : void 0;
|
|
126
|
+
}
|
|
127
|
+
var Vs = 9007199254740991, Bs = /^(?:0|[1-9]\d*)$/;
|
|
128
|
+
function Ds(e, t) {
|
|
129
|
+
var s = typeof e;
|
|
130
|
+
return t = t ?? Vs, !!t && (s == "number" || s != "symbol" && Bs.test(e)) && e > -1 && e % 1 == 0 && e < t;
|
|
131
|
+
}
|
|
132
|
+
function Us(e, t) {
|
|
133
|
+
return e === t || e !== e && t !== t;
|
|
134
|
+
}
|
|
135
|
+
var qs = 9007199254740991;
|
|
136
|
+
function At(e) {
|
|
137
|
+
return typeof e == "number" && e > -1 && e % 1 == 0 && e <= qs;
|
|
138
|
+
}
|
|
139
|
+
function It(e) {
|
|
140
|
+
return e != null && At(e.length) && !Pt(e);
|
|
141
|
+
}
|
|
142
|
+
var Hs = Object.prototype;
|
|
143
|
+
function Ks(e) {
|
|
144
|
+
var t = e && e.constructor, s = typeof t == "function" && t.prototype || Hs;
|
|
145
|
+
return e === s;
|
|
146
|
+
}
|
|
147
|
+
function Xs(e, t) {
|
|
148
|
+
for (var s = -1, n = Array(e); ++s < e; )
|
|
149
|
+
n[s] = t(s);
|
|
150
|
+
return n;
|
|
151
|
+
}
|
|
152
|
+
var Ws = "[object Arguments]";
|
|
153
|
+
function ct(e) {
|
|
154
|
+
return ke(e) && we(e) == Ws;
|
|
155
|
+
}
|
|
156
|
+
var Ft = Object.prototype, Zs = Ft.hasOwnProperty, Js = Ft.propertyIsEnumerable, Ys = ct(/* @__PURE__ */ (function() {
|
|
157
|
+
return arguments;
|
|
158
|
+
})()) ? ct : function(e) {
|
|
159
|
+
return ke(e) && Zs.call(e, "callee") && !Js.call(e, "callee");
|
|
160
|
+
};
|
|
161
|
+
function Qs() {
|
|
162
|
+
return !1;
|
|
163
|
+
}
|
|
164
|
+
var Mt = typeof exports == "object" && exports && !exports.nodeType && exports, ut = Mt && typeof module == "object" && module && !module.nodeType && module, en = ut && ut.exports === Mt, dt = en ? ye.Buffer : void 0, tn = dt ? dt.isBuffer : void 0, sn = tn || Qs, nn = "[object Arguments]", on = "[object Array]", rn = "[object Boolean]", an = "[object Date]", ln = "[object Error]", cn = "[object Function]", un = "[object Map]", dn = "[object Number]", fn = "[object Object]", mn = "[object RegExp]", pn = "[object Set]", hn = "[object String]", gn = "[object WeakMap]", vn = "[object ArrayBuffer]", _n = "[object DataView]", bn = "[object Float32Array]", xn = "[object Float64Array]", yn = "[object Int8Array]", wn = "[object Int16Array]", kn = "[object Int32Array]", Cn = "[object Uint8Array]", $n = "[object Uint8ClampedArray]", Sn = "[object Uint16Array]", Pn = "[object Uint32Array]", z = {};
|
|
165
|
+
z[bn] = z[xn] = z[yn] = z[wn] = z[kn] = z[Cn] = z[$n] = z[Sn] = z[Pn] = !0;
|
|
166
|
+
z[nn] = z[on] = z[vn] = z[rn] = z[_n] = z[an] = z[ln] = z[cn] = z[un] = z[dn] = z[fn] = z[mn] = z[pn] = z[hn] = z[gn] = !1;
|
|
167
|
+
function Tn(e) {
|
|
168
|
+
return ke(e) && At(e.length) && !!z[we(e)];
|
|
169
|
+
}
|
|
170
|
+
function An(e) {
|
|
171
|
+
return function(t) {
|
|
172
|
+
return e(t);
|
|
173
|
+
};
|
|
174
|
+
}
|
|
175
|
+
var Et = typeof exports == "object" && exports && !exports.nodeType && exports, de = Et && typeof module == "object" && module && !module.nodeType && module, In = de && de.exports === Et, ze = In && kt.process, ft = (function() {
|
|
176
|
+
try {
|
|
177
|
+
var e = de && de.require && de.require("util").types;
|
|
178
|
+
return e || ze && ze.binding && ze.binding("util");
|
|
179
|
+
} catch {
|
|
180
|
+
}
|
|
181
|
+
})(), mt = ft && ft.isTypedArray, Fn = mt ? An(mt) : Tn, Mn = Object.prototype, En = Mn.hasOwnProperty;
|
|
182
|
+
function jn(e, t) {
|
|
183
|
+
var s = he(e), n = !s && Ys(e), i = !s && !n && sn(e), r = !s && !n && !i && Fn(e), d = s || n || i || r, m = d ? Xs(e.length, String) : [], x = m.length;
|
|
184
|
+
for (var f in e)
|
|
185
|
+
En.call(e, f) && !(d && // Safari 9 has enumerable `arguments.length` in strict mode.
|
|
186
|
+
(f == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
|
|
187
|
+
i && (f == "offset" || f == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
|
|
188
|
+
r && (f == "buffer" || f == "byteLength" || f == "byteOffset") || // Skip index properties.
|
|
189
|
+
Ds(f, x))) && m.push(f);
|
|
190
|
+
return m;
|
|
191
|
+
}
|
|
192
|
+
function On(e, t) {
|
|
193
|
+
return function(s) {
|
|
194
|
+
return e(t(s));
|
|
195
|
+
};
|
|
196
|
+
}
|
|
197
|
+
var Ln = On(Object.keys, Object), zn = Object.prototype, Nn = zn.hasOwnProperty;
|
|
198
|
+
function Rn(e) {
|
|
199
|
+
if (!Ks(e))
|
|
200
|
+
return Ln(e);
|
|
201
|
+
var t = [];
|
|
202
|
+
for (var s in Object(e))
|
|
203
|
+
Nn.call(e, s) && s != "constructor" && t.push(s);
|
|
204
|
+
return t;
|
|
205
|
+
}
|
|
206
|
+
function Gn(e) {
|
|
207
|
+
return It(e) ? jn(e) : Rn(e);
|
|
208
|
+
}
|
|
209
|
+
var Vn = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, Bn = /^\w*$/;
|
|
210
|
+
function Dn(e, t) {
|
|
211
|
+
if (he(e))
|
|
212
|
+
return !1;
|
|
213
|
+
var s = typeof e;
|
|
214
|
+
return s == "number" || s == "symbol" || s == "boolean" || e == null || We(e) ? !0 : Bn.test(e) || !Vn.test(e) || t != null && e in Object(t);
|
|
215
|
+
}
|
|
216
|
+
var fe = Tt(Object, "create");
|
|
217
|
+
function Un() {
|
|
218
|
+
this.__data__ = fe ? fe(null) : {}, this.size = 0;
|
|
219
|
+
}
|
|
220
|
+
function qn(e) {
|
|
221
|
+
var t = this.has(e) && delete this.__data__[e];
|
|
222
|
+
return this.size -= t ? 1 : 0, t;
|
|
223
|
+
}
|
|
224
|
+
var Hn = "__lodash_hash_undefined__", Kn = Object.prototype, Xn = Kn.hasOwnProperty;
|
|
225
|
+
function Wn(e) {
|
|
226
|
+
var t = this.__data__;
|
|
227
|
+
if (fe) {
|
|
228
|
+
var s = t[e];
|
|
229
|
+
return s === Hn ? void 0 : s;
|
|
230
|
+
}
|
|
231
|
+
return Xn.call(t, e) ? t[e] : void 0;
|
|
232
|
+
}
|
|
233
|
+
var Zn = Object.prototype, Jn = Zn.hasOwnProperty;
|
|
234
|
+
function Yn(e) {
|
|
235
|
+
var t = this.__data__;
|
|
236
|
+
return fe ? t[e] !== void 0 : Jn.call(t, e);
|
|
237
|
+
}
|
|
238
|
+
var Qn = "__lodash_hash_undefined__";
|
|
239
|
+
function eo(e, t) {
|
|
240
|
+
var s = this.__data__;
|
|
241
|
+
return this.size += this.has(e) ? 0 : 1, s[e] = fe && t === void 0 ? Qn : t, this;
|
|
242
|
+
}
|
|
243
|
+
function ee(e) {
|
|
244
|
+
var t = -1, s = e == null ? 0 : e.length;
|
|
245
|
+
for (this.clear(); ++t < s; ) {
|
|
246
|
+
var n = e[t];
|
|
247
|
+
this.set(n[0], n[1]);
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
ee.prototype.clear = Un;
|
|
251
|
+
ee.prototype.delete = qn;
|
|
252
|
+
ee.prototype.get = Wn;
|
|
253
|
+
ee.prototype.has = Yn;
|
|
254
|
+
ee.prototype.set = eo;
|
|
255
|
+
function to() {
|
|
256
|
+
this.__data__ = [], this.size = 0;
|
|
257
|
+
}
|
|
258
|
+
function Ce(e, t) {
|
|
259
|
+
for (var s = e.length; s--; )
|
|
260
|
+
if (Us(e[s][0], t))
|
|
261
|
+
return s;
|
|
262
|
+
return -1;
|
|
263
|
+
}
|
|
264
|
+
var so = Array.prototype, no = so.splice;
|
|
265
|
+
function oo(e) {
|
|
266
|
+
var t = this.__data__, s = Ce(t, e);
|
|
267
|
+
if (s < 0)
|
|
268
|
+
return !1;
|
|
269
|
+
var n = t.length - 1;
|
|
270
|
+
return s == n ? t.pop() : no.call(t, s, 1), --this.size, !0;
|
|
271
|
+
}
|
|
272
|
+
function ro(e) {
|
|
273
|
+
var t = this.__data__, s = Ce(t, e);
|
|
274
|
+
return s < 0 ? void 0 : t[s][1];
|
|
275
|
+
}
|
|
276
|
+
function ao(e) {
|
|
277
|
+
return Ce(this.__data__, e) > -1;
|
|
278
|
+
}
|
|
279
|
+
function io(e, t) {
|
|
280
|
+
var s = this.__data__, n = Ce(s, e);
|
|
281
|
+
return n < 0 ? (++this.size, s.push([e, t])) : s[n][1] = t, this;
|
|
282
|
+
}
|
|
283
|
+
function ae(e) {
|
|
284
|
+
var t = -1, s = e == null ? 0 : e.length;
|
|
285
|
+
for (this.clear(); ++t < s; ) {
|
|
286
|
+
var n = e[t];
|
|
287
|
+
this.set(n[0], n[1]);
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
ae.prototype.clear = to;
|
|
291
|
+
ae.prototype.delete = oo;
|
|
292
|
+
ae.prototype.get = ro;
|
|
293
|
+
ae.prototype.has = ao;
|
|
294
|
+
ae.prototype.set = io;
|
|
295
|
+
var lo = Tt(ye, "Map");
|
|
296
|
+
function co() {
|
|
297
|
+
this.size = 0, this.__data__ = {
|
|
298
|
+
hash: new ee(),
|
|
299
|
+
map: new (lo || ae)(),
|
|
300
|
+
string: new ee()
|
|
301
|
+
};
|
|
302
|
+
}
|
|
303
|
+
function uo(e) {
|
|
304
|
+
var t = typeof e;
|
|
305
|
+
return t == "string" || t == "number" || t == "symbol" || t == "boolean" ? e !== "__proto__" : e === null;
|
|
306
|
+
}
|
|
307
|
+
function $e(e, t) {
|
|
308
|
+
var s = e.__data__;
|
|
309
|
+
return uo(t) ? s[typeof t == "string" ? "string" : "hash"] : s.map;
|
|
310
|
+
}
|
|
311
|
+
function fo(e) {
|
|
312
|
+
var t = $e(this, e).delete(e);
|
|
313
|
+
return this.size -= t ? 1 : 0, t;
|
|
314
|
+
}
|
|
315
|
+
function mo(e) {
|
|
316
|
+
return $e(this, e).get(e);
|
|
317
|
+
}
|
|
318
|
+
function po(e) {
|
|
319
|
+
return $e(this, e).has(e);
|
|
320
|
+
}
|
|
321
|
+
function ho(e, t) {
|
|
322
|
+
var s = $e(this, e), n = s.size;
|
|
323
|
+
return s.set(e, t), this.size += s.size == n ? 0 : 1, this;
|
|
324
|
+
}
|
|
325
|
+
function te(e) {
|
|
326
|
+
var t = -1, s = e == null ? 0 : e.length;
|
|
327
|
+
for (this.clear(); ++t < s; ) {
|
|
328
|
+
var n = e[t];
|
|
329
|
+
this.set(n[0], n[1]);
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
te.prototype.clear = co;
|
|
333
|
+
te.prototype.delete = fo;
|
|
334
|
+
te.prototype.get = mo;
|
|
335
|
+
te.prototype.has = po;
|
|
336
|
+
te.prototype.set = ho;
|
|
337
|
+
var go = "Expected a function";
|
|
338
|
+
function Ze(e, t) {
|
|
339
|
+
if (typeof e != "function" || t != null && typeof t != "function")
|
|
340
|
+
throw new TypeError(go);
|
|
341
|
+
var s = function() {
|
|
342
|
+
var n = arguments, i = t ? t.apply(this, n) : n[0], r = s.cache;
|
|
343
|
+
if (r.has(i))
|
|
344
|
+
return r.get(i);
|
|
345
|
+
var d = e.apply(this, n);
|
|
346
|
+
return s.cache = r.set(i, d) || r, d;
|
|
347
|
+
};
|
|
348
|
+
return s.cache = new (Ze.Cache || te)(), s;
|
|
349
|
+
}
|
|
350
|
+
Ze.Cache = te;
|
|
351
|
+
var vo = 500;
|
|
352
|
+
function _o(e) {
|
|
353
|
+
var t = Ze(e, function(n) {
|
|
354
|
+
return s.size === vo && s.clear(), n;
|
|
355
|
+
}), s = t.cache;
|
|
356
|
+
return t;
|
|
357
|
+
}
|
|
358
|
+
var bo = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, xo = /\\(\\)?/g, yo = _o(function(e) {
|
|
359
|
+
var t = [];
|
|
360
|
+
return e.charCodeAt(0) === 46 && t.push(""), e.replace(bo, function(s, n, i, r) {
|
|
361
|
+
t.push(i ? r.replace(xo, "$1") : n || s);
|
|
362
|
+
}), t;
|
|
363
|
+
});
|
|
364
|
+
function jt(e) {
|
|
365
|
+
return e == null ? "" : $t(e);
|
|
366
|
+
}
|
|
367
|
+
function wo(e, t) {
|
|
368
|
+
return he(e) ? e : Dn(e, t) ? [e] : yo(jt(e));
|
|
369
|
+
}
|
|
370
|
+
function ko(e) {
|
|
371
|
+
if (typeof e == "string" || We(e))
|
|
372
|
+
return e;
|
|
373
|
+
var t = e + "";
|
|
374
|
+
return t == "0" && 1 / e == -1 / 0 ? "-0" : t;
|
|
375
|
+
}
|
|
376
|
+
function Co(e, t) {
|
|
377
|
+
t = wo(t, e);
|
|
378
|
+
for (var s = 0, n = t.length; e != null && s < n; )
|
|
379
|
+
e = e[ko(t[s++])];
|
|
380
|
+
return s && s == n ? e : void 0;
|
|
381
|
+
}
|
|
382
|
+
function $o(e, t, s) {
|
|
383
|
+
var n = e == null ? void 0 : Co(e, t);
|
|
384
|
+
return n === void 0 ? s : n;
|
|
385
|
+
}
|
|
386
|
+
function So(e) {
|
|
387
|
+
return function(t, s, n) {
|
|
388
|
+
for (var i = -1, r = Object(t), d = n(t), m = d.length; m--; ) {
|
|
389
|
+
var x = d[e ? m : ++i];
|
|
390
|
+
if (s(r[x], x, r) === !1)
|
|
391
|
+
break;
|
|
392
|
+
}
|
|
393
|
+
return t;
|
|
394
|
+
};
|
|
395
|
+
}
|
|
396
|
+
function Po(e, t) {
|
|
397
|
+
return function(s, n) {
|
|
398
|
+
if (s == null)
|
|
399
|
+
return s;
|
|
400
|
+
if (!It(s))
|
|
401
|
+
return e(s, n);
|
|
402
|
+
for (var i = s.length, r = t ? i : -1, d = Object(s); (t ? r-- : ++r < i) && n(d[r], r, d) !== !1; )
|
|
403
|
+
;
|
|
404
|
+
return s;
|
|
405
|
+
};
|
|
406
|
+
}
|
|
407
|
+
function To(e) {
|
|
408
|
+
return typeof e == "function" ? e : ks;
|
|
409
|
+
}
|
|
410
|
+
function Ao(e, t) {
|
|
411
|
+
for (var s = e == null ? 0 : e.length; s-- && t(e[s], s, e) !== !1; )
|
|
412
|
+
;
|
|
413
|
+
return e;
|
|
414
|
+
}
|
|
415
|
+
var Io = So(!0);
|
|
416
|
+
function Fo(e, t) {
|
|
417
|
+
return e && Io(e, t, Gn);
|
|
418
|
+
}
|
|
419
|
+
var Mo = Po(Fo, !0);
|
|
420
|
+
function Eo(e, t) {
|
|
421
|
+
var s = he(e) ? Ao : Mo;
|
|
422
|
+
return s(e, To(t));
|
|
423
|
+
}
|
|
424
|
+
function jo() {
|
|
425
|
+
var e = arguments, t = jt(e[0]);
|
|
426
|
+
return e.length < 3 ? t : t.replace(e[1], e[2]);
|
|
427
|
+
}
|
|
428
|
+
const Oo = {
|
|
429
|
+
default: (e) => e !== 1 ? 1 : 0,
|
|
430
|
+
en: (e) => e !== 1 ? 1 : 0,
|
|
431
|
+
ru: (e) => e % 10 === 1 && e % 100 !== 11 ? 0 : e % 10 >= 2 && e % 10 <= 4 && (e % 100 < 10 || e % 100 >= 20) ? 1 : 2
|
|
432
|
+
}, Lo = (e, t) => {
|
|
433
|
+
let s = document.documentElement.lang;
|
|
434
|
+
if (ce.hasOwnProperty(s) || (s = "default"), !ce[s].hasOwnProperty(e))
|
|
435
|
+
return e;
|
|
436
|
+
const n = Oo[s](t);
|
|
437
|
+
return ce[s][e][n] === void 0 ? ce[s][e][0] : ce[s][e][n];
|
|
438
|
+
}, p = (e, t) => {
|
|
439
|
+
let s = $o(window.i18n, e);
|
|
440
|
+
return s ? (Eo(t, (n, i) => {
|
|
441
|
+
s = jo(s, `:${i}`, n);
|
|
442
|
+
}), s) : e;
|
|
443
|
+
};
|
|
444
|
+
let X = null;
|
|
445
|
+
const me = () => {
|
|
446
|
+
if (X)
|
|
447
|
+
return X;
|
|
448
|
+
const e = document.getElementsByTagName("html");
|
|
449
|
+
if (e.length === 0)
|
|
450
|
+
return X = navigator.language ?? "en", X;
|
|
451
|
+
const t = e[0].getAttribute("lang");
|
|
452
|
+
return t === null ? (X = navigator.language ?? "en", X) : (X = t ?? "en", X);
|
|
453
|
+
}, zo = (e) => {
|
|
454
|
+
if (!["en", "ru"].includes(e)) {
|
|
455
|
+
console.error("[i18n] Unsupported language:", e);
|
|
456
|
+
return;
|
|
457
|
+
}
|
|
458
|
+
}, No = () => window.gameapLang || me(), se = function(e, t) {
|
|
459
|
+
if (e.__CANCEL__)
|
|
460
|
+
return;
|
|
461
|
+
let s = p("main.error"), n = "";
|
|
462
|
+
switch (typeof e) {
|
|
463
|
+
case "string":
|
|
464
|
+
n = e;
|
|
465
|
+
break;
|
|
466
|
+
case "object":
|
|
467
|
+
({ title: s, content: n } = Ro(e));
|
|
468
|
+
break;
|
|
469
|
+
default:
|
|
470
|
+
n = "Something went wrong.";
|
|
471
|
+
}
|
|
472
|
+
Go({
|
|
473
|
+
title: s,
|
|
474
|
+
content: n,
|
|
475
|
+
type: "error"
|
|
476
|
+
});
|
|
477
|
+
}, Ro = function(e) {
|
|
478
|
+
const t = {
|
|
479
|
+
title: p("main.error"),
|
|
480
|
+
content: "Something went wrong."
|
|
481
|
+
};
|
|
482
|
+
return "message" in e && (t.content = e.message), "response" in e ? ("statusText" in e.response && (t.title = e.response.statusText), "data" in e.response && e.response.data && typeof e.response.data == "object" && "message" in e.response.data && (t.content = e.response.data.message)) : ("title" in e ? t.title = e.title : "name" in e && (t.title = e.name), "content" in e ? t.content = e.content : "message" in e && (t.content = e.message)), t;
|
|
483
|
+
}, Go = function(e, t) {
|
|
484
|
+
let s = e;
|
|
485
|
+
if (typeof e == "string" && (s = {
|
|
486
|
+
content: s,
|
|
487
|
+
type: "info"
|
|
488
|
+
}), !s.title)
|
|
489
|
+
switch (s.type) {
|
|
490
|
+
case "error":
|
|
491
|
+
s.title = p("main.error");
|
|
492
|
+
break;
|
|
493
|
+
case "success":
|
|
494
|
+
s.title = p("main.success");
|
|
495
|
+
break;
|
|
496
|
+
default:
|
|
497
|
+
s.title = p("main.info");
|
|
498
|
+
break;
|
|
499
|
+
}
|
|
500
|
+
switch (s.type) {
|
|
501
|
+
case "error":
|
|
502
|
+
window.$dialog.error({
|
|
503
|
+
title: s.title,
|
|
504
|
+
content: s.content,
|
|
505
|
+
style: s.style,
|
|
506
|
+
maskClosable: s.maskClosable ?? !0,
|
|
507
|
+
positiveText: p("main.close"),
|
|
508
|
+
closable: !1,
|
|
509
|
+
onMaskClick: s.maskClosable ?? (() => {
|
|
510
|
+
typeof t == "function" && t();
|
|
511
|
+
}),
|
|
512
|
+
onPositiveClick: () => {
|
|
513
|
+
typeof t == "function" && t();
|
|
514
|
+
}
|
|
515
|
+
});
|
|
516
|
+
break;
|
|
517
|
+
case "success":
|
|
518
|
+
window.$dialog.success({
|
|
519
|
+
title: s.title,
|
|
520
|
+
content: s.content,
|
|
521
|
+
style: s.style,
|
|
522
|
+
maskClosable: s.maskClosable ?? !0,
|
|
523
|
+
positiveText: p("main.close"),
|
|
524
|
+
closable: !1,
|
|
525
|
+
onMaskClick: s.maskClosable ?? (() => {
|
|
526
|
+
typeof t == "function" && t();
|
|
527
|
+
}),
|
|
528
|
+
onPositiveClick: () => {
|
|
529
|
+
typeof t == "function" && t();
|
|
530
|
+
}
|
|
531
|
+
});
|
|
532
|
+
break;
|
|
533
|
+
default:
|
|
534
|
+
window.$dialog.info({
|
|
535
|
+
title: s.title,
|
|
536
|
+
content: s.content,
|
|
537
|
+
style: s.style,
|
|
538
|
+
maskClosable: s.maskClosable ?? !0,
|
|
539
|
+
positiveText: p("main.close"),
|
|
540
|
+
closable: !1,
|
|
541
|
+
onMaskClick: s.maskClosable ?? (() => {
|
|
542
|
+
typeof t == "function" && t();
|
|
543
|
+
}),
|
|
544
|
+
onPositiveClick: () => {
|
|
545
|
+
typeof t == "function" && t();
|
|
546
|
+
}
|
|
547
|
+
});
|
|
548
|
+
break;
|
|
549
|
+
}
|
|
550
|
+
}, Vo = function(e, t, s = "") {
|
|
551
|
+
window.$dialog.info({
|
|
552
|
+
title: e,
|
|
553
|
+
content: s,
|
|
554
|
+
positiveText: p("main.close"),
|
|
555
|
+
closable: !1,
|
|
556
|
+
onPositiveClick: () => {
|
|
557
|
+
typeof t == "function" && t();
|
|
558
|
+
}
|
|
559
|
+
});
|
|
560
|
+
};
|
|
561
|
+
let Ve = !1;
|
|
562
|
+
const Bo = (e, t) => {
|
|
563
|
+
Ve || (e.preventDefault(), Ot(t, () => {
|
|
564
|
+
const s = new e.constructor(e.type, e);
|
|
565
|
+
e.target.dispatchEvent(s);
|
|
566
|
+
}));
|
|
567
|
+
}, Ot = (e, t) => {
|
|
568
|
+
window.$dialog.success({
|
|
569
|
+
title: e,
|
|
570
|
+
content: "",
|
|
571
|
+
positiveText: p("main.yes"),
|
|
572
|
+
negativeText: p("main.no"),
|
|
573
|
+
closable: !1,
|
|
574
|
+
onPositiveClick: () => {
|
|
575
|
+
Ve = !0, typeof t == "function" && t();
|
|
576
|
+
},
|
|
577
|
+
onNegativeClick: () => {
|
|
578
|
+
Ve = !1;
|
|
579
|
+
}
|
|
580
|
+
});
|
|
581
|
+
};
|
|
582
|
+
class Do {
|
|
583
|
+
constructor() {
|
|
584
|
+
this.controllers = /* @__PURE__ */ new Map(), this.currentRoute = null;
|
|
585
|
+
}
|
|
586
|
+
createController(t) {
|
|
587
|
+
return this.controllers.has(t) || this.controllers.set(t, new AbortController()), this.controllers.get(t);
|
|
588
|
+
}
|
|
589
|
+
getController(t) {
|
|
590
|
+
return this.controllers.get(t);
|
|
591
|
+
}
|
|
592
|
+
abortRequests(t) {
|
|
593
|
+
const s = this.controllers.get(t);
|
|
594
|
+
s && (s.abort(), this.controllers.delete(t));
|
|
595
|
+
}
|
|
596
|
+
abortAllRequests() {
|
|
597
|
+
this.controllers.forEach((t, s) => {
|
|
598
|
+
t.abort();
|
|
599
|
+
}), this.controllers.clear();
|
|
600
|
+
}
|
|
601
|
+
setCurrentRoute(t) {
|
|
602
|
+
this.currentRoute && this.currentRoute !== t && this.abortRequests(this.currentRoute), this.currentRoute = t;
|
|
603
|
+
}
|
|
604
|
+
getCurrentController() {
|
|
605
|
+
return this.currentRoute ? this.getController(this.currentRoute) : null;
|
|
606
|
+
}
|
|
607
|
+
}
|
|
608
|
+
const Be = new Do(), S = yt.create({
|
|
609
|
+
baseURL: "",
|
|
610
|
+
withCredentials: !0
|
|
611
|
+
});
|
|
612
|
+
S.interceptors.request.use(
|
|
613
|
+
(e) => {
|
|
614
|
+
const t = Be.getCurrentController();
|
|
615
|
+
return t && !e.signal && (e.signal = t.signal), e;
|
|
616
|
+
},
|
|
617
|
+
(e) => Promise.reject(e)
|
|
618
|
+
);
|
|
619
|
+
S.interceptors.response.use(
|
|
620
|
+
(e) => e,
|
|
621
|
+
(e) => yt.isCancel(e) ? Promise.reject({ ...e, __CANCEL__: !0 }) : (e.response?.status === 401 && (localStorage.removeItem("auth_token"), delete S.defaults.headers.common.Authorization, window.location.pathname !== "/login" && (window.location.href = "/login")), Promise.reject(e))
|
|
622
|
+
);
|
|
623
|
+
const W = q("auth", {
|
|
624
|
+
state: () => ({
|
|
625
|
+
profile: null,
|
|
626
|
+
serversAbilities: {},
|
|
627
|
+
// This is a counter to keep track of how many API processes are running
|
|
628
|
+
apiProcesses: 0,
|
|
629
|
+
authToken: null
|
|
630
|
+
}),
|
|
631
|
+
getters: {
|
|
632
|
+
loading: (e) => e.apiProcesses > 0,
|
|
633
|
+
isAdmin: (e) => e.profile && e.profile.roles && e.profile.roles.includes("admin"),
|
|
634
|
+
isAuthenticated: (e) => e.authToken !== null,
|
|
635
|
+
user: (e) => e.profile,
|
|
636
|
+
canServerAbility: (e) => (t, s) => e.isAdmin ? !0 : e.serversAbilities[t] ? e.serversAbilities[t][s] : !1
|
|
637
|
+
},
|
|
638
|
+
actions: {
|
|
639
|
+
async fetchProfile() {
|
|
640
|
+
this.apiProcesses++;
|
|
641
|
+
try {
|
|
642
|
+
const e = await S.get("/api/profile");
|
|
643
|
+
this.profile = e.data;
|
|
644
|
+
} catch (e) {
|
|
645
|
+
throw e;
|
|
646
|
+
} finally {
|
|
647
|
+
this.apiProcesses--;
|
|
648
|
+
}
|
|
649
|
+
},
|
|
650
|
+
async saveProfile(e) {
|
|
651
|
+
this.apiProcesses++;
|
|
652
|
+
try {
|
|
653
|
+
await S.put("/api/profile", e);
|
|
654
|
+
} catch (t) {
|
|
655
|
+
throw t;
|
|
656
|
+
} finally {
|
|
657
|
+
this.apiProcesses--;
|
|
658
|
+
}
|
|
659
|
+
},
|
|
660
|
+
async fetchServersAbilities() {
|
|
661
|
+
this.apiProcesses++;
|
|
662
|
+
try {
|
|
663
|
+
const e = await S.get("/api/user/servers_abilities");
|
|
664
|
+
this.serversAbilities = e.data;
|
|
665
|
+
} catch (e) {
|
|
666
|
+
throw e;
|
|
667
|
+
} finally {
|
|
668
|
+
this.apiProcesses--;
|
|
669
|
+
}
|
|
670
|
+
},
|
|
671
|
+
async login(e) {
|
|
672
|
+
this.apiProcesses++;
|
|
673
|
+
try {
|
|
674
|
+
const t = await S.post(
|
|
675
|
+
"/api/auth/login",
|
|
676
|
+
e,
|
|
677
|
+
{ withCredentials: !0 }
|
|
678
|
+
), { token: s, user: n } = t.data;
|
|
679
|
+
this.authToken = s, localStorage.setItem("auth_token", s), S.defaults.headers.common.Authorization = `Bearer ${s}`, this.profile = n;
|
|
680
|
+
} catch (t) {
|
|
681
|
+
throw t;
|
|
682
|
+
} finally {
|
|
683
|
+
this.apiProcesses--;
|
|
684
|
+
}
|
|
685
|
+
},
|
|
686
|
+
async logout() {
|
|
687
|
+
this.authToken = null, localStorage.removeItem("auth_token"), delete S.defaults.headers.common.Authorization, this.profile = null;
|
|
688
|
+
},
|
|
689
|
+
async initializeAuth() {
|
|
690
|
+
const e = localStorage.getItem("auth_token");
|
|
691
|
+
if (e) {
|
|
692
|
+
this.authToken = e, S.defaults.headers.common.Authorization = `Bearer ${e}`;
|
|
693
|
+
try {
|
|
694
|
+
await this.fetchProfile();
|
|
695
|
+
} catch (t) {
|
|
696
|
+
if (t.response?.status !== 401 && t.response?.status !== 403 && t.response?.status !== 404) {
|
|
697
|
+
console.error("Failed to fetch user profile during auth initialization:", t), window.location.pathname !== "/500" && (window.location.href = "/500");
|
|
698
|
+
return;
|
|
699
|
+
}
|
|
700
|
+
this.profile = null, this.authToken = null, localStorage.removeItem("auth_token"), delete S.defaults.headers.common.Authorization;
|
|
701
|
+
}
|
|
702
|
+
}
|
|
703
|
+
}
|
|
704
|
+
}
|
|
705
|
+
}), Uo = {
|
|
706
|
+
class: "flex pt-3 pb-3 py-4 px-4 mb-4 text-stone-700 border border-stone-200 rounded-lg bg-stone-100 dark:bg-stone-800 dark:border-stone-700",
|
|
707
|
+
"aria-label": "Breadcrumb"
|
|
708
|
+
}, qo = { class: "inline-flex items-center space-x-1 md:space-x-2 rtl:space-x-reverse" }, Ho = { class: "inline-flex items-center" }, Ko = ["href"], Xo = { class: "align-middle" }, Wo = { class: "align-middle" }, Zo = {
|
|
709
|
+
key: 2,
|
|
710
|
+
class: "ms-1 text-sm font-medium text-stone-500 md:ms-2 dark:text-stone-400"
|
|
711
|
+
}, Jo = { class: "flex items-center" }, Yo = ["href"], Qo = { class: "align-middle" }, er = { class: "align-middle" }, tr = {
|
|
712
|
+
key: 2,
|
|
713
|
+
class: "ms-1 text-sm font-medium text-stone-500 md:ms-2 dark:text-stone-400"
|
|
714
|
+
}, sr = {
|
|
715
|
+
key: 3,
|
|
716
|
+
class: "ms-1 text-sm font-medium text-stone-500 md:ms-2 dark:text-stone-400"
|
|
717
|
+
}, Je = {
|
|
718
|
+
__name: "GBreadcrumbs",
|
|
719
|
+
props: {
|
|
720
|
+
items: null
|
|
721
|
+
},
|
|
722
|
+
setup(e) {
|
|
723
|
+
const t = (s) => s.render();
|
|
724
|
+
return (s, n) => {
|
|
725
|
+
const i = Q("router-link");
|
|
726
|
+
return a(), c("nav", Uo, [
|
|
727
|
+
o("ol", qo, [
|
|
728
|
+
(a(!0), c(F, null, N(e.items.slice(0, 1), (r) => (a(), c("li", Ho, [
|
|
729
|
+
r.link ? (a(), c("a", {
|
|
730
|
+
key: 0,
|
|
731
|
+
href: r.link,
|
|
732
|
+
class: "inline-flex items-center text-sm font-medium text-stone-700 hover:text-blue-600 dark:text-stone-400 dark:hover:text-white"
|
|
733
|
+
}, [
|
|
734
|
+
r.icon ? (a(), c("i", {
|
|
735
|
+
key: 0,
|
|
736
|
+
class: V([r.icon, "align-middle mr-0.5"])
|
|
737
|
+
}, null, 2)) : A("", !0),
|
|
738
|
+
o("span", Xo, b(r.text), 1)
|
|
739
|
+
], 8, Ko)) : r.route ? (a(), $(i, {
|
|
740
|
+
key: 1,
|
|
741
|
+
to: r.route,
|
|
742
|
+
class: "ms-1 text-sm font-medium text-stone-700 hover:text-blue-600 md:ms-2 dark:text-stone-400 dark:hover:text-white"
|
|
743
|
+
}, {
|
|
744
|
+
default: M(() => [
|
|
745
|
+
r.icon ? (a(), c("i", {
|
|
746
|
+
key: 0,
|
|
747
|
+
class: V([r.icon, "align-middle mr-0.5"])
|
|
748
|
+
}, null, 2)) : A("", !0),
|
|
749
|
+
o("span", Wo, b(r.text), 1)
|
|
750
|
+
]),
|
|
751
|
+
_: 2
|
|
752
|
+
}, 1032, ["to"])) : (a(), c("span", Zo, b(r.text), 1))
|
|
753
|
+
]))), 256)),
|
|
754
|
+
(a(!0), c(F, null, N(e.items.slice(1), (r) => (a(), c("li", null, [
|
|
755
|
+
o("div", Jo, [
|
|
756
|
+
n[0] || (n[0] = o("i", { class: "fa-solid fa-chevron-right align-middle w-3 h-3 mx-2 text-stone-400" }, null, -1)),
|
|
757
|
+
r.link ? (a(), c("a", {
|
|
758
|
+
key: 0,
|
|
759
|
+
href: r.link,
|
|
760
|
+
class: "ms-1 text-sm font-medium text-stone-700 hover:text-blue-600 md:ms-2 dark:text-stone-400 dark:hover:text-white"
|
|
761
|
+
}, [
|
|
762
|
+
r.icon !== "" ? (a(), c("i", {
|
|
763
|
+
key: 0,
|
|
764
|
+
class: V([r.icon, "align-middle mr-0.5"])
|
|
765
|
+
}, null, 2)) : A("", !0),
|
|
766
|
+
o("span", Qo, b(r.text), 1)
|
|
767
|
+
], 8, Yo)) : r.route ? (a(), $(i, {
|
|
768
|
+
key: 1,
|
|
769
|
+
to: r.route,
|
|
770
|
+
class: "ms-1 text-sm font-medium text-stone-700 hover:text-blue-600 md:ms-2 dark:text-stone-400 dark:hover:text-white"
|
|
771
|
+
}, {
|
|
772
|
+
default: M(() => [
|
|
773
|
+
r.icon !== "" ? (a(), c("i", {
|
|
774
|
+
key: 0,
|
|
775
|
+
class: V([r.icon, "align-middle mr-0.5"])
|
|
776
|
+
}, null, 2)) : A("", !0),
|
|
777
|
+
o("span", er, b(r.text), 1)
|
|
778
|
+
]),
|
|
779
|
+
_: 2
|
|
780
|
+
}, 1032, ["to"])) : r.render ? (a(), c("span", tr, [
|
|
781
|
+
y(t, {
|
|
782
|
+
render: r.render
|
|
783
|
+
}, null, 8, ["render"])
|
|
784
|
+
])) : (a(), c("span", sr, b(r.text), 1))
|
|
785
|
+
])
|
|
786
|
+
]))), 256))
|
|
787
|
+
])
|
|
788
|
+
]);
|
|
789
|
+
};
|
|
790
|
+
}
|
|
791
|
+
}, nr = {
|
|
792
|
+
// ===== Action Icons =====
|
|
793
|
+
delete: "fa-solid fa-trash-can",
|
|
794
|
+
trash: "fa-solid fa-trash",
|
|
795
|
+
"trash-can": "fa-solid fa-trash-can",
|
|
796
|
+
edit: "fa-solid fa-pen-to-square",
|
|
797
|
+
pen: "fa-solid fa-pen",
|
|
798
|
+
"pen-ruler": "fa-solid fa-pen-ruler",
|
|
799
|
+
save: "fa-solid fa-floppy-disk",
|
|
800
|
+
add: "fa-solid fa-plus",
|
|
801
|
+
plus: "fa-solid fa-plus",
|
|
802
|
+
"add-square": "fa-solid fa-square-plus",
|
|
803
|
+
"add-folder": "fa-solid fa-folder-plus",
|
|
804
|
+
close: "fa-solid fa-xmark",
|
|
805
|
+
xmark: "fa-solid fa-xmark",
|
|
806
|
+
times: "fa-solid fa-times",
|
|
807
|
+
copy: "fa-regular fa-copy",
|
|
808
|
+
paste: "fa-regular fa-paste",
|
|
809
|
+
cut: "fa-solid fa-scissors",
|
|
810
|
+
scissors: "fa-solid fa-scissors",
|
|
811
|
+
refresh: "fa-solid fa-rotate",
|
|
812
|
+
rotate: "fa-solid fa-rotate",
|
|
813
|
+
sync: "fa-solid fa-sync",
|
|
814
|
+
redo: "fa-solid fa-redo",
|
|
815
|
+
download: "fa-solid fa-download",
|
|
816
|
+
upload: "fa-solid fa-upload",
|
|
817
|
+
search: "fa-solid fa-magnifying-glass",
|
|
818
|
+
"magnifying-glass": "fa-solid fa-magnifying-glass",
|
|
819
|
+
view: "fa-solid fa-eye",
|
|
820
|
+
eye: "fa-solid fa-eye",
|
|
821
|
+
clear: "fa-solid fa-broom",
|
|
822
|
+
broom: "fa-solid fa-broom",
|
|
823
|
+
eraser: "fa-solid fa-eraser",
|
|
824
|
+
ban: "fa-solid fa-ban",
|
|
825
|
+
move: "fa-solid fa-dolly",
|
|
826
|
+
// ===== Navigation Icons =====
|
|
827
|
+
"chevron-left": "fa-solid fa-chevron-left",
|
|
828
|
+
"chevron-right": "fa-solid fa-chevron-right",
|
|
829
|
+
"chevron-up": "fa-solid fa-chevron-up",
|
|
830
|
+
"chevron-down": "fa-solid fa-chevron-down",
|
|
831
|
+
"arrow-up": "fa-solid fa-arrow-up",
|
|
832
|
+
"arrow-down": "fa-solid fa-arrow-down",
|
|
833
|
+
"arrow-turn-up": "fa-solid fa-arrow-turn-up",
|
|
834
|
+
"sort-asc": "fa-solid fa-arrow-up-wide-short",
|
|
835
|
+
"sort-desc": "fa-solid fa-arrow-down-wide-short",
|
|
836
|
+
"external-link": "fa-solid fa-external-link",
|
|
837
|
+
"angle-double-right": "fa-solid fa-angle-double-right",
|
|
838
|
+
"chevron-double-right": "fa-solid fa-angle-double-right",
|
|
839
|
+
// ===== Status Icons =====
|
|
840
|
+
check: "fa-solid fa-check",
|
|
841
|
+
warning: "fa-solid fa-triangle-exclamation",
|
|
842
|
+
error: "fa-solid fa-skull",
|
|
843
|
+
skull: "fa-solid fa-skull",
|
|
844
|
+
info: "fa-solid fa-circle-info",
|
|
845
|
+
question: "fa-regular fa-circle-question",
|
|
846
|
+
help: "fa-regular fa-circle-question",
|
|
847
|
+
online: "fa-solid fa-heart-pulse",
|
|
848
|
+
health: "fa-solid fa-heart-pulse",
|
|
849
|
+
"heart-pulse": "fa-solid fa-heart-pulse",
|
|
850
|
+
offline: "fa-solid fa-power-off",
|
|
851
|
+
"power-off": "fa-solid fa-power-off",
|
|
852
|
+
certificate: "fa-solid fa-certificate",
|
|
853
|
+
// ===== UI/State Icons =====
|
|
854
|
+
loading: "fa-solid fa-gear fa-spin",
|
|
855
|
+
spinner: "fa-solid fa-spinner fa-spin",
|
|
856
|
+
play: "fa-solid fa-play",
|
|
857
|
+
pause: "fa-solid fa-pause",
|
|
858
|
+
stop: "fa-solid fa-stop",
|
|
859
|
+
restart: "fa-solid fa-redo",
|
|
860
|
+
// ===== Server/Infrastructure Icons =====
|
|
861
|
+
server: "fa-solid fa-server",
|
|
862
|
+
node: "fa-solid fa-hard-drive",
|
|
863
|
+
"hard-drive": "fa-solid fa-hard-drive",
|
|
864
|
+
hdd: "fa-solid fa-hard-drive",
|
|
865
|
+
terminal: "fa-solid fa-terminal",
|
|
866
|
+
console: "fa-solid fa-terminal",
|
|
867
|
+
gamepad: "fa-solid fa-gamepad",
|
|
868
|
+
tasks: "fa-solid fa-tasks",
|
|
869
|
+
plug: "fa-solid fa-plug",
|
|
870
|
+
memory: "fa-solid fa-memory",
|
|
871
|
+
cpu: "fa-solid fa-microchip",
|
|
872
|
+
microchip: "fa-solid fa-microchip",
|
|
873
|
+
// ===== User/Auth Icons =====
|
|
874
|
+
user: "fa-solid fa-user",
|
|
875
|
+
"user-edit": "fa-solid fa-user-pen",
|
|
876
|
+
"user-pen": "fa-solid fa-user-pen",
|
|
877
|
+
users: "fa-solid fa-users",
|
|
878
|
+
"user-astronaut": "fa-solid fa-user-astronaut",
|
|
879
|
+
login: "fa-solid fa-right-to-bracket",
|
|
880
|
+
"sign-in": "fa-solid fa-right-to-bracket",
|
|
881
|
+
logout: "fa-solid fa-sign-out-alt",
|
|
882
|
+
key: "fa-solid fa-key",
|
|
883
|
+
lock: "fa-solid fa-lock",
|
|
884
|
+
"address-card": "fa-regular fa-address-card",
|
|
885
|
+
profile: "fa-regular fa-address-card",
|
|
886
|
+
// ===== File Icons =====
|
|
887
|
+
file: "fa-regular fa-file",
|
|
888
|
+
"file-code": "fa-regular fa-file-code",
|
|
889
|
+
"file-lines": "fa-regular fa-file-lines",
|
|
890
|
+
"file-text": "fa-regular fa-file-lines",
|
|
891
|
+
"file-pdf": "fa-regular fa-file-pdf",
|
|
892
|
+
"file-word": "fa-regular fa-file-word",
|
|
893
|
+
"file-excel": "fa-regular fa-file-excel",
|
|
894
|
+
"file-powerpoint": "fa-solid fa-file-powerpoint",
|
|
895
|
+
"file-image": "fa-regular fa-file-image",
|
|
896
|
+
"file-video": "fa-regular fa-file-video",
|
|
897
|
+
"file-audio": "fa-regular fa-file-audio",
|
|
898
|
+
"file-archive": "fa-solid fa-file-zipper",
|
|
899
|
+
"file-zipper": "fa-solid fa-file-zipper",
|
|
900
|
+
folder: "fa-regular fa-folder",
|
|
901
|
+
"folder-solid": "fa-solid fa-folder",
|
|
902
|
+
"folder-open": "fa-regular fa-folder-open",
|
|
903
|
+
"folder-plus": "fa-solid fa-folder-plus",
|
|
904
|
+
clipboard: "fa-regular fa-clipboard",
|
|
905
|
+
// ===== Content/UI Icons =====
|
|
906
|
+
book: "fa-solid fa-book",
|
|
907
|
+
comments: "fa-regular fa-comments",
|
|
908
|
+
heart: "fa-regular fa-heart",
|
|
909
|
+
favorite: "fa-regular fa-heart",
|
|
910
|
+
star: "fa-solid fa-star",
|
|
911
|
+
"star-outline": "fa-regular fa-star",
|
|
912
|
+
crown: "fa-solid fa-crown",
|
|
913
|
+
"puzzle-piece": "fa-solid fa-puzzle-piece",
|
|
914
|
+
plugin: "fa-solid fa-puzzle-piece",
|
|
915
|
+
box: "fa-solid fa-box",
|
|
916
|
+
package: "fa-solid fa-box",
|
|
917
|
+
cogs: "fa-solid fa-cogs",
|
|
918
|
+
settings: "fa-solid fa-gear",
|
|
919
|
+
gear: "fa-solid fa-gear",
|
|
920
|
+
hammer: "fa-solid fa-hammer",
|
|
921
|
+
"laptop-code": "fa-solid fa-laptop-code",
|
|
922
|
+
"admin-panel": "fa-solid fa-laptop-code",
|
|
923
|
+
calendar: "fa-solid fa-calendar",
|
|
924
|
+
"scale-balanced": "fa-solid fa-scale-balanced",
|
|
925
|
+
license: "fa-solid fa-scale-balanced",
|
|
926
|
+
list: "fa-regular fa-rectangle-list",
|
|
927
|
+
rcon: "fa-solid fa-reply-all",
|
|
928
|
+
"reply-all": "fa-solid fa-reply-all",
|
|
929
|
+
// ===== Theme Icons =====
|
|
930
|
+
sun: "fa-solid fa-sun",
|
|
931
|
+
moon: "fa-solid fa-moon",
|
|
932
|
+
// ===== Game Icons =====
|
|
933
|
+
dice: "fa-solid fa-dice",
|
|
934
|
+
"dice-one": "fa-solid fa-dice-one",
|
|
935
|
+
"dice-two": "fa-solid fa-dice-two",
|
|
936
|
+
"dice-three": "fa-solid fa-dice-three",
|
|
937
|
+
"dice-four": "fa-solid fa-dice-four",
|
|
938
|
+
"dice-five": "fa-solid fa-dice-five",
|
|
939
|
+
"dice-six": "fa-solid fa-dice-six",
|
|
940
|
+
7: "fa-solid fa-7",
|
|
941
|
+
cat: "fa-solid fa-cat",
|
|
942
|
+
mods: "fa-solid fa-cat",
|
|
943
|
+
// ===== Brand Icons =====
|
|
944
|
+
linux: "fa-brands fa-linux",
|
|
945
|
+
windows: "fa-brands fa-windows",
|
|
946
|
+
apple: "fa-brands fa-apple",
|
|
947
|
+
telegram: "fa-brands fa-telegram",
|
|
948
|
+
discord: "fa-brands fa-discord",
|
|
949
|
+
vk: "fa-brands fa-vk",
|
|
950
|
+
reddit: "fa-brands fa-reddit",
|
|
951
|
+
patreon: "fa-brands fa-patreon",
|
|
952
|
+
teamspeak: "fa-brands fa-teamspeak"
|
|
953
|
+
}, Lt = Re({ ...nr });
|
|
954
|
+
function or(e) {
|
|
955
|
+
return Lt[e];
|
|
956
|
+
}
|
|
957
|
+
function rr(e) {
|
|
958
|
+
return e in Lt;
|
|
959
|
+
}
|
|
960
|
+
const O = {
|
|
961
|
+
__name: "GIcon",
|
|
962
|
+
props: {
|
|
963
|
+
name: {
|
|
964
|
+
type: String,
|
|
965
|
+
required: !0
|
|
966
|
+
},
|
|
967
|
+
size: {
|
|
968
|
+
type: String,
|
|
969
|
+
default: "md",
|
|
970
|
+
validator: (e) => ["sm", "md", "lg", "xl"].includes(e)
|
|
971
|
+
},
|
|
972
|
+
class: {
|
|
973
|
+
type: String,
|
|
974
|
+
default: ""
|
|
975
|
+
}
|
|
976
|
+
},
|
|
977
|
+
setup(e) {
|
|
978
|
+
const t = e, s = w(() => rr(t.name) ? or(t.name) : (console.warn(`GIcon: Unknown icon "${t.name}"`), "fa-solid fa-circle-question")), n = w(() => typeof s.value == "object" || typeof s.value == "function"), i = {
|
|
979
|
+
sm: "fa-sm",
|
|
980
|
+
md: "",
|
|
981
|
+
lg: "fa-lg",
|
|
982
|
+
xl: "fa-2x"
|
|
983
|
+
}, r = {
|
|
984
|
+
sm: "0.875em",
|
|
985
|
+
md: "1em",
|
|
986
|
+
lg: "1.25em",
|
|
987
|
+
xl: "2em"
|
|
988
|
+
}, d = w(() => i[t.size] || ""), m = w(() => ({
|
|
989
|
+
width: r[t.size],
|
|
990
|
+
height: r[t.size]
|
|
991
|
+
}));
|
|
992
|
+
return (x, f) => n.value ? (a(), $(pe(s.value), {
|
|
993
|
+
key: 0,
|
|
994
|
+
class: V(t.class),
|
|
995
|
+
style: vt(m.value)
|
|
996
|
+
}, null, 8, ["class", "style"])) : (a(), c("i", {
|
|
997
|
+
key: 1,
|
|
998
|
+
class: V([s.value, d.value, t.class])
|
|
999
|
+
}, null, 2));
|
|
1000
|
+
}
|
|
1001
|
+
}, ar = { class: "flex mb-1 md:w-full" }, ir = ["onClick"], lr = ["onClick"], cr = {
|
|
1002
|
+
__name: "GDeletableList",
|
|
1003
|
+
props: {
|
|
1004
|
+
items: Array,
|
|
1005
|
+
clickCallback: Function,
|
|
1006
|
+
deleteCallback: Function
|
|
1007
|
+
},
|
|
1008
|
+
setup(e) {
|
|
1009
|
+
const t = e, s = (i) => {
|
|
1010
|
+
t.deleteCallback(i);
|
|
1011
|
+
}, n = (i, r) => {
|
|
1012
|
+
t.clickCallback(i, r);
|
|
1013
|
+
};
|
|
1014
|
+
return (i, r) => (a(), c("div", {
|
|
1015
|
+
class: V(i.$attrs.class)
|
|
1016
|
+
}, [
|
|
1017
|
+
(a(!0), c(F, null, N(e.items, (d) => (a(), c("div", ar, [
|
|
1018
|
+
o("div", {
|
|
1019
|
+
class: "text-xs text-center h-full md:w-full inline-flex px-2 py-1 bg-stone-500 hover:bg-stone-600 text-white rounded-s cursor-pointer",
|
|
1020
|
+
onClick: (m) => n(d.gameCode, d.id)
|
|
1021
|
+
}, b(d.name), 9, ir),
|
|
1022
|
+
o("div", {
|
|
1023
|
+
class: "ml-[2px] text-xs h-full inline-flex items-center px-2 py-1 bg-red-500 hover:bg-red-600 text-white rounded-e cursor-pointer",
|
|
1024
|
+
onClick: (m) => s(d.id)
|
|
1025
|
+
}, [
|
|
1026
|
+
y(O, { name: "delete" }),
|
|
1027
|
+
r[0] || (r[0] = L(" ", -1))
|
|
1028
|
+
], 8, lr)
|
|
1029
|
+
]))), 256))
|
|
1030
|
+
], 2));
|
|
1031
|
+
}
|
|
1032
|
+
}, ur = {
|
|
1033
|
+
__name: "GStatusBadge",
|
|
1034
|
+
props: {
|
|
1035
|
+
status: {
|
|
1036
|
+
type: String,
|
|
1037
|
+
required: !0
|
|
1038
|
+
},
|
|
1039
|
+
text: {
|
|
1040
|
+
type: String
|
|
1041
|
+
}
|
|
1042
|
+
},
|
|
1043
|
+
setup(e) {
|
|
1044
|
+
const t = e, s = {
|
|
1045
|
+
waiting: "badge-light",
|
|
1046
|
+
working: "badge-blue",
|
|
1047
|
+
error: "badge-red",
|
|
1048
|
+
success: "badge-green",
|
|
1049
|
+
canceled: "badge-stone"
|
|
1050
|
+
}, n = w(() => s[t.status] ?? "badge-light"), i = w(() => t.text ? t.text : t.status);
|
|
1051
|
+
return (r, d) => (a(), c("span", {
|
|
1052
|
+
class: V(n.value)
|
|
1053
|
+
}, b(i.value), 3));
|
|
1054
|
+
}
|
|
1055
|
+
}, dr = { class: "flex justify-center" }, fr = {
|
|
1056
|
+
key: 0,
|
|
1057
|
+
class: "fa-3x"
|
|
1058
|
+
}, mr = {
|
|
1059
|
+
__name: "Loading",
|
|
1060
|
+
setup(e) {
|
|
1061
|
+
const t = k(!1);
|
|
1062
|
+
return re(() => {
|
|
1063
|
+
setTimeout(() => {
|
|
1064
|
+
t.value = !0;
|
|
1065
|
+
}, 10);
|
|
1066
|
+
}), (s, n) => (a(), c("div", dr, [
|
|
1067
|
+
y(_t, {
|
|
1068
|
+
"enter-active-class": "transition-opacity duration-[2000ms]",
|
|
1069
|
+
"enter-from-class": "opacity-0",
|
|
1070
|
+
"enter-to-class": "opacity-100",
|
|
1071
|
+
"leave-active-class": "transition-opacity duration-150",
|
|
1072
|
+
"leave-from-class": "opacity-100",
|
|
1073
|
+
"leave-to-class": "opacity-0"
|
|
1074
|
+
}, {
|
|
1075
|
+
default: M(() => [
|
|
1076
|
+
t.value ? (a(), c("div", fr, [...n[0] || (n[0] = [
|
|
1077
|
+
o("i", { class: "fa-solid fa-gear fa-spin" }, null, -1)
|
|
1078
|
+
])])) : A("", !0)
|
|
1079
|
+
]),
|
|
1080
|
+
_: 1
|
|
1081
|
+
})
|
|
1082
|
+
]));
|
|
1083
|
+
}
|
|
1084
|
+
}, pr = { class: "progress" }, hr = ["aria-valuenow"], gr = {
|
|
1085
|
+
__name: "Progressbar",
|
|
1086
|
+
props: {
|
|
1087
|
+
progress: {
|
|
1088
|
+
type: Number,
|
|
1089
|
+
default: 0
|
|
1090
|
+
}
|
|
1091
|
+
},
|
|
1092
|
+
setup(e) {
|
|
1093
|
+
return (t, s) => (a(), c("div", pr, [
|
|
1094
|
+
o("div", {
|
|
1095
|
+
class: "progress-bar progress-bar-info",
|
|
1096
|
+
role: "progressbar",
|
|
1097
|
+
"aria-valuenow": e.progress,
|
|
1098
|
+
"aria-valuemin": "0",
|
|
1099
|
+
"aria-valuemax": "100",
|
|
1100
|
+
style: vt({ width: e.progress + "%" })
|
|
1101
|
+
}, b(e.progress) + "% ", 13, hr)
|
|
1102
|
+
]));
|
|
1103
|
+
}
|
|
1104
|
+
}, vr = {
|
|
1105
|
+
__name: "GMenu",
|
|
1106
|
+
props: {
|
|
1107
|
+
as: { type: String, default: "div" }
|
|
1108
|
+
},
|
|
1109
|
+
setup(e) {
|
|
1110
|
+
const t = k(!1), s = k(null), n = k(-1), i = k([]), r = () => {
|
|
1111
|
+
t.value = !t.value, t.value || (n.value = -1);
|
|
1112
|
+
}, d = () => {
|
|
1113
|
+
t.value = !1, n.value = -1;
|
|
1114
|
+
}, m = (l) => (i.value.push(l), i.value.length - 1), x = (l) => {
|
|
1115
|
+
const v = i.value.indexOf(l);
|
|
1116
|
+
v > -1 && i.value.splice(v, 1);
|
|
1117
|
+
}, f = (l) => {
|
|
1118
|
+
n.value = l;
|
|
1119
|
+
}, _ = (l) => {
|
|
1120
|
+
s.value && !s.value.contains(l.target) && d();
|
|
1121
|
+
};
|
|
1122
|
+
return re(() => {
|
|
1123
|
+
document.addEventListener("click", _, !0);
|
|
1124
|
+
}), bt(() => {
|
|
1125
|
+
document.removeEventListener("click", _, !0);
|
|
1126
|
+
}), Ge("menu", {
|
|
1127
|
+
isOpen: t,
|
|
1128
|
+
toggle: r,
|
|
1129
|
+
close: d,
|
|
1130
|
+
activeIndex: n,
|
|
1131
|
+
items: i,
|
|
1132
|
+
registerItem: m,
|
|
1133
|
+
unregisterItem: x,
|
|
1134
|
+
setActiveIndex: f
|
|
1135
|
+
}), (l, v) => (a(), $(pe(e.as), {
|
|
1136
|
+
ref_key: "menuRef",
|
|
1137
|
+
ref: s
|
|
1138
|
+
}, {
|
|
1139
|
+
default: M(() => [
|
|
1140
|
+
Y(l.$slots, "default")
|
|
1141
|
+
]),
|
|
1142
|
+
_: 3
|
|
1143
|
+
}, 512));
|
|
1144
|
+
}
|
|
1145
|
+
}, _r = ["aria-expanded"], pt = {
|
|
1146
|
+
__name: "GMenuButton",
|
|
1147
|
+
setup(e) {
|
|
1148
|
+
const { isOpen: t, toggle: s } = He("menu"), n = () => {
|
|
1149
|
+
s();
|
|
1150
|
+
}, i = (r) => {
|
|
1151
|
+
["Enter", " ", "ArrowDown"].includes(r.key) && (r.preventDefault(), s());
|
|
1152
|
+
};
|
|
1153
|
+
return (r, d) => (a(), c("button", {
|
|
1154
|
+
type: "button",
|
|
1155
|
+
"aria-expanded": u(t),
|
|
1156
|
+
"aria-haspopup": "true",
|
|
1157
|
+
onClick: n,
|
|
1158
|
+
onKeydown: i
|
|
1159
|
+
}, [
|
|
1160
|
+
Y(r.$slots, "default")
|
|
1161
|
+
], 40, _r));
|
|
1162
|
+
}
|
|
1163
|
+
}, br = {
|
|
1164
|
+
__name: "GMenuItems",
|
|
1165
|
+
props: {
|
|
1166
|
+
unmount: { type: Boolean, default: !0 }
|
|
1167
|
+
},
|
|
1168
|
+
setup(e) {
|
|
1169
|
+
const t = e, { isOpen: s, close: n } = He("menu"), i = (m) => {
|
|
1170
|
+
m.key === "Escape" && (m.preventDefault(), n());
|
|
1171
|
+
}, r = w(() => t.unmount ? s.value : !0), d = w(() => s.value);
|
|
1172
|
+
return (m, x) => r.value ? be((a(), c("div", {
|
|
1173
|
+
key: 0,
|
|
1174
|
+
role: "menu",
|
|
1175
|
+
tabindex: "-1",
|
|
1176
|
+
onKeydown: i
|
|
1177
|
+
}, [
|
|
1178
|
+
Y(m.$slots, "default")
|
|
1179
|
+
], 544)), [
|
|
1180
|
+
[Ht, d.value]
|
|
1181
|
+
]) : A("", !0);
|
|
1182
|
+
}
|
|
1183
|
+
}, xr = {
|
|
1184
|
+
__name: "GMenuItem",
|
|
1185
|
+
setup(e) {
|
|
1186
|
+
const { close: t, activeIndex: s, registerItem: n, unregisterItem: i, setActiveIndex: r } = He("menu"), d = Symbol(), m = k(-1);
|
|
1187
|
+
re(() => {
|
|
1188
|
+
m.value = n(d);
|
|
1189
|
+
}), bt(() => {
|
|
1190
|
+
i(d);
|
|
1191
|
+
});
|
|
1192
|
+
const x = w(() => s.value === m.value), f = () => {
|
|
1193
|
+
r(m.value);
|
|
1194
|
+
}, _ = () => {
|
|
1195
|
+
r(-1);
|
|
1196
|
+
};
|
|
1197
|
+
return (l, v) => (a(), c("div", {
|
|
1198
|
+
role: "menuitem",
|
|
1199
|
+
onMouseenter: f,
|
|
1200
|
+
onMouseleave: _
|
|
1201
|
+
}, [
|
|
1202
|
+
Y(l.$slots, "default", {
|
|
1203
|
+
active: x.value,
|
|
1204
|
+
close: u(t)
|
|
1205
|
+
})
|
|
1206
|
+
], 32));
|
|
1207
|
+
}
|
|
1208
|
+
}, yr = ["href", "disabled"], wr = ["disabled"], kr = "inline-block align-middle text-center select-none font-normal whitespace-no-wrap rounded leading-normal no-underline", Cr = "cursor-not-allowed", ne = {
|
|
1209
|
+
__name: "GButton",
|
|
1210
|
+
props: {
|
|
1211
|
+
color: "white",
|
|
1212
|
+
size: "middle",
|
|
1213
|
+
link: null,
|
|
1214
|
+
route: null,
|
|
1215
|
+
class: "",
|
|
1216
|
+
disabled: !1
|
|
1217
|
+
},
|
|
1218
|
+
emits: ["click"],
|
|
1219
|
+
setup(e, { emit: t }) {
|
|
1220
|
+
const s = {
|
|
1221
|
+
black: "bg-stone-700 text-white hover:bg-stone-800 dark:bg-stone-900 dark:hover:bg-stone-950",
|
|
1222
|
+
white: "text-black bg-white hover:bg-stone-100 dark:bg-stone-800 dark:text-white dark:border-stone-600 dark:hover:bg-stone-700 dark:hover:border-stone-600",
|
|
1223
|
+
green: "bg-lime-500 text-white hover:bg-lime-600 dark:bg-lime-800 dark:hover:bg-lime-900 dark:text-stone-200",
|
|
1224
|
+
red: "bg-red-500 text-white hover:bg-red-600 dark:bg-red-800 dark:hover:bg-red-900 dark:text-stone-200",
|
|
1225
|
+
orange: "bg-orange-400 text-white hover:bg-orange-500 dark:bg-orange-800 dark:hover:bg-orange-900 dark:text-stone-200",
|
|
1226
|
+
blue: "bg-sky-500 text-white hover:bg-sky-600 dark:bg-sky-800 dark:hover:bg-sky-900 dark:text-stone-200"
|
|
1227
|
+
}, n = {
|
|
1228
|
+
black: "bg-stone-600 text-stone-400 dark:bg-stone-900 dark:text-stone-600",
|
|
1229
|
+
white: "bg-stone-300 text-stone-400",
|
|
1230
|
+
green: "bg-lime-300 text-lime-100 dark:bg-lime-900 dark:text-lime-950",
|
|
1231
|
+
red: "bg-red-400 text-red-200 dark:bg-red-900 dark:text-red-950",
|
|
1232
|
+
orange: "bg-orange-300 text-orange-200 dark:bg-orange-900 dark:text-orange-950",
|
|
1233
|
+
blue: "bg-sky-400 text-sky-200 dark:bg-sky-900 dark:text-sky-950"
|
|
1234
|
+
}, i = {
|
|
1235
|
+
small: "text-xs py-1.5 px-2",
|
|
1236
|
+
middle: "py-2 px-3",
|
|
1237
|
+
large: "text-lg py-3 px-4"
|
|
1238
|
+
}, r = e, d = w(() => {
|
|
1239
|
+
const f = r.disabled ? n[r.color] || n.white : s[r.color] || s.white, _ = i[r.size] || i.middle;
|
|
1240
|
+
let l = [];
|
|
1241
|
+
return l.push(kr), r.disabled && l.push(Cr), l.push(f), l.push(_), r.class && l.push(r.class), l.join(" ");
|
|
1242
|
+
}), m = t, x = () => {
|
|
1243
|
+
m("click");
|
|
1244
|
+
};
|
|
1245
|
+
return (f, _) => {
|
|
1246
|
+
const l = Q("router-link");
|
|
1247
|
+
return e.link ? (a(), c("a", {
|
|
1248
|
+
key: 0,
|
|
1249
|
+
class: V(d.value),
|
|
1250
|
+
href: e.link,
|
|
1251
|
+
disabled: e.disabled
|
|
1252
|
+
}, [
|
|
1253
|
+
Y(f.$slots, "default")
|
|
1254
|
+
], 10, yr)) : e.route ? (a(), $(l, {
|
|
1255
|
+
key: 1,
|
|
1256
|
+
to: e.route,
|
|
1257
|
+
class: V(d.value),
|
|
1258
|
+
disabled: e.disabled
|
|
1259
|
+
}, {
|
|
1260
|
+
default: M(() => [
|
|
1261
|
+
Y(f.$slots, "default")
|
|
1262
|
+
]),
|
|
1263
|
+
_: 3
|
|
1264
|
+
}, 8, ["to", "class", "disabled"])) : (a(), c("button", {
|
|
1265
|
+
key: 2,
|
|
1266
|
+
class: V(d.value),
|
|
1267
|
+
onClick: x,
|
|
1268
|
+
disabled: e.disabled
|
|
1269
|
+
}, [
|
|
1270
|
+
Y(f.$slots, "default")
|
|
1271
|
+
], 10, wr));
|
|
1272
|
+
};
|
|
1273
|
+
}
|
|
1274
|
+
}, $r = { class: "sm:hidden" }, Sr = { class: "sm:visible invisible" }, Pr = { class: "md:visible collapse" }, Tr = { class: "py-1" }, Ar = ["onClick"], Ir = ["href"], Fr = ["href", "onClick"], ht = {
|
|
1275
|
+
__name: "MainNavbarDropdown",
|
|
1276
|
+
props: {
|
|
1277
|
+
buttonText: {
|
|
1278
|
+
type: String,
|
|
1279
|
+
required: !0
|
|
1280
|
+
},
|
|
1281
|
+
buttonIcon: {
|
|
1282
|
+
type: String,
|
|
1283
|
+
required: !1
|
|
1284
|
+
},
|
|
1285
|
+
items: {
|
|
1286
|
+
type: Array,
|
|
1287
|
+
required: !1
|
|
1288
|
+
}
|
|
1289
|
+
},
|
|
1290
|
+
setup(e) {
|
|
1291
|
+
const t = Xe(), s = e, n = k(!0), i = k(!1), r = () => {
|
|
1292
|
+
i.value = !i.value;
|
|
1293
|
+
}, d = (x, f) => {
|
|
1294
|
+
i.value = !1, f(), x.route && t.push(x.route);
|
|
1295
|
+
}, m = () => {
|
|
1296
|
+
i.value = !1;
|
|
1297
|
+
};
|
|
1298
|
+
return (x, f) => (a(), $(u(vr), {
|
|
1299
|
+
as: "div",
|
|
1300
|
+
class: V([x.$attrs.class, "relative inline-block text-left"])
|
|
1301
|
+
}, {
|
|
1302
|
+
default: M(() => [
|
|
1303
|
+
o("div", $r, [
|
|
1304
|
+
y(u(pt), {
|
|
1305
|
+
onClick: r,
|
|
1306
|
+
class: "gap-x-1.5 mt-4 text-white hover:bg-stone-800 px-4 py-2 rounded"
|
|
1307
|
+
}, {
|
|
1308
|
+
default: M(() => [
|
|
1309
|
+
e.buttonIcon ? (a(), $(u(O), {
|
|
1310
|
+
key: 0,
|
|
1311
|
+
name: e.buttonIcon
|
|
1312
|
+
}, null, 8, ["name"])) : A("", !0)
|
|
1313
|
+
]),
|
|
1314
|
+
_: 1
|
|
1315
|
+
})
|
|
1316
|
+
]),
|
|
1317
|
+
o("div", Sr, [
|
|
1318
|
+
y(u(pt), {
|
|
1319
|
+
onClick: r,
|
|
1320
|
+
class: "w-full gap-x-1.5 text-white hover:bg-stone-800 md:px-4 md:py-2 rounded"
|
|
1321
|
+
}, {
|
|
1322
|
+
default: M(() => [
|
|
1323
|
+
e.buttonIcon ? (a(), $(u(O), {
|
|
1324
|
+
key: 0,
|
|
1325
|
+
name: e.buttonIcon,
|
|
1326
|
+
class: "mr-1"
|
|
1327
|
+
}, null, 8, ["name"])) : A("", !0),
|
|
1328
|
+
o("span", Pr, b(s.buttonText), 1),
|
|
1329
|
+
i.value ? (a(), $(u(O), {
|
|
1330
|
+
key: 2,
|
|
1331
|
+
name: "chevron-up",
|
|
1332
|
+
class: "ml-4 md:visible collapse"
|
|
1333
|
+
})) : (a(), $(u(O), {
|
|
1334
|
+
key: 1,
|
|
1335
|
+
name: "chevron-down",
|
|
1336
|
+
class: "ml-4 md:visible collapse"
|
|
1337
|
+
}))
|
|
1338
|
+
]),
|
|
1339
|
+
_: 1
|
|
1340
|
+
})
|
|
1341
|
+
]),
|
|
1342
|
+
y(_t, {
|
|
1343
|
+
onAfterLeave: m,
|
|
1344
|
+
"enter-active-class": "transition ease-out duration-100",
|
|
1345
|
+
"enter-from-class": "transform opacity-0 scale-95",
|
|
1346
|
+
"enter-to-class": "transform opacity-100 scale-100",
|
|
1347
|
+
"leave-active-class": "transition ease-in duration-75",
|
|
1348
|
+
"leave-from-class": "transform opacity-100 scale-100",
|
|
1349
|
+
"leave-to-class": "transform opacity-0 scale-95"
|
|
1350
|
+
}, {
|
|
1351
|
+
default: M(() => [
|
|
1352
|
+
y(u(br), {
|
|
1353
|
+
unmount: n.value,
|
|
1354
|
+
class: "absolute right-0 z-10 mt-2 w-56 origin-top-right divide-y divide-stone-100 rounded bg-white dark:bg-stone-900 shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none"
|
|
1355
|
+
}, {
|
|
1356
|
+
default: M(() => [
|
|
1357
|
+
(a(!0), c(F, null, N(e.items, (_) => (a(), c("div", Tr, [
|
|
1358
|
+
(a(!0), c(F, null, N(_, (l) => (a(), $(u(xr), null, {
|
|
1359
|
+
default: M(({ active: v, close: j }) => [
|
|
1360
|
+
l.route ? (a(), c("a", {
|
|
1361
|
+
key: 0,
|
|
1362
|
+
onClick: (h) => d(l, j),
|
|
1363
|
+
class: V([
|
|
1364
|
+
v ? "bg-stone-100 text-stone-900 dark:bg-stone-950 dark:text-stone-300" : "text-stone-700 dark:text-stone-200",
|
|
1365
|
+
"block px-4 py-2 text-sm cursor-pointer"
|
|
1366
|
+
])
|
|
1367
|
+
}, [
|
|
1368
|
+
l.icon ? (a(), $(u(O), {
|
|
1369
|
+
key: 0,
|
|
1370
|
+
name: l.icon
|
|
1371
|
+
}, null, 8, ["name"])) : A("", !0),
|
|
1372
|
+
L(" " + b(l.label), 1)
|
|
1373
|
+
], 10, Ar)) : l.link ? (a(), c("a", {
|
|
1374
|
+
key: 1,
|
|
1375
|
+
href: l.link,
|
|
1376
|
+
onClick: r,
|
|
1377
|
+
class: V([
|
|
1378
|
+
v ? "bg-stone-100 text-stone-900 dark:bg-stone-950 dark:text-stone-300" : "text-stone-700 dark:text-stone-200",
|
|
1379
|
+
"block px-4 py-2 text-sm"
|
|
1380
|
+
])
|
|
1381
|
+
}, [
|
|
1382
|
+
l.icon ? (a(), $(u(O), {
|
|
1383
|
+
key: 0,
|
|
1384
|
+
name: l.icon
|
|
1385
|
+
}, null, 8, ["name"])) : A("", !0),
|
|
1386
|
+
L(" " + b(l.label), 1)
|
|
1387
|
+
], 10, Ir)) : l.onClick ? (a(), c("a", {
|
|
1388
|
+
key: 2,
|
|
1389
|
+
href: l.link,
|
|
1390
|
+
onClick: l.onClick,
|
|
1391
|
+
class: V([
|
|
1392
|
+
v ? "bg-stone-100 text-stone-900 dark:bg-stone-950 dark:text-stone-300" : "text-stone-700 dark:text-stone-200",
|
|
1393
|
+
"block px-4 py-2 text-sm cursor-pointer"
|
|
1394
|
+
])
|
|
1395
|
+
}, [
|
|
1396
|
+
l.icon ? (a(), $(u(O), {
|
|
1397
|
+
key: 0,
|
|
1398
|
+
name: l.icon
|
|
1399
|
+
}, null, 8, ["name"])) : A("", !0),
|
|
1400
|
+
L(" " + b(l.label), 1)
|
|
1401
|
+
], 10, Fr)) : A("", !0)
|
|
1402
|
+
]),
|
|
1403
|
+
_: 2
|
|
1404
|
+
}, 1024))), 256))
|
|
1405
|
+
]))), 256))
|
|
1406
|
+
]),
|
|
1407
|
+
_: 1
|
|
1408
|
+
}, 8, ["unmount"])
|
|
1409
|
+
]),
|
|
1410
|
+
_: 1
|
|
1411
|
+
})
|
|
1412
|
+
]),
|
|
1413
|
+
_: 1
|
|
1414
|
+
}, 8, ["class"]));
|
|
1415
|
+
}
|
|
1416
|
+
}, De = [
|
|
1417
|
+
{
|
|
1418
|
+
icon: "play",
|
|
1419
|
+
text: p("sidebar.servers"),
|
|
1420
|
+
route: { name: "servers" }
|
|
1421
|
+
}
|
|
1422
|
+
], Ue = [
|
|
1423
|
+
{
|
|
1424
|
+
icon: "node",
|
|
1425
|
+
text: p("sidebar.dedicated_servers"),
|
|
1426
|
+
route: { name: "admin.nodes.index" }
|
|
1427
|
+
},
|
|
1428
|
+
{
|
|
1429
|
+
icon: "server",
|
|
1430
|
+
text: p("sidebar.game_servers"),
|
|
1431
|
+
route: { name: "admin.servers.index" }
|
|
1432
|
+
},
|
|
1433
|
+
{
|
|
1434
|
+
icon: "gamepad",
|
|
1435
|
+
text: p("sidebar.games"),
|
|
1436
|
+
route: { name: "admin.games.index" }
|
|
1437
|
+
},
|
|
1438
|
+
{
|
|
1439
|
+
icon: "tasks",
|
|
1440
|
+
text: p("sidebar.gdaemon_tasks"),
|
|
1441
|
+
route: { name: "admin.gdaemon_tasks.index" }
|
|
1442
|
+
},
|
|
1443
|
+
{
|
|
1444
|
+
icon: "users",
|
|
1445
|
+
text: p("sidebar.users"),
|
|
1446
|
+
route: { name: "admin.users.index" }
|
|
1447
|
+
},
|
|
1448
|
+
{
|
|
1449
|
+
icon: "plug",
|
|
1450
|
+
text: p("plugins.plugins"),
|
|
1451
|
+
route: { name: "admin.plugins.index" }
|
|
1452
|
+
}
|
|
1453
|
+
], zt = "gameap_ui_settings";
|
|
1454
|
+
function Mr() {
|
|
1455
|
+
try {
|
|
1456
|
+
const e = localStorage.getItem(zt);
|
|
1457
|
+
if (e)
|
|
1458
|
+
return JSON.parse(e);
|
|
1459
|
+
} catch (e) {
|
|
1460
|
+
console.error("Failed to load UI settings from localStorage:", e);
|
|
1461
|
+
}
|
|
1462
|
+
return {};
|
|
1463
|
+
}
|
|
1464
|
+
function Er(e) {
|
|
1465
|
+
try {
|
|
1466
|
+
localStorage.setItem(zt, JSON.stringify(e));
|
|
1467
|
+
} catch (t) {
|
|
1468
|
+
console.error("Failed to save UI settings to localStorage:", t);
|
|
1469
|
+
}
|
|
1470
|
+
}
|
|
1471
|
+
const Ne = Mr(), Ye = q("uiSettings", {
|
|
1472
|
+
state: () => ({
|
|
1473
|
+
language: Ne.language || null,
|
|
1474
|
+
leftMenuMinimized: Ne.leftMenuMinimized || !1,
|
|
1475
|
+
theme: Ne.theme || "light"
|
|
1476
|
+
}),
|
|
1477
|
+
getters: {
|
|
1478
|
+
currentLanguage: (e) => e.language,
|
|
1479
|
+
isMenuMinimized: (e) => e.leftMenuMinimized,
|
|
1480
|
+
currentTheme: (e) => e.theme
|
|
1481
|
+
},
|
|
1482
|
+
actions: {
|
|
1483
|
+
setLanguage(e) {
|
|
1484
|
+
this.language = e, this._saveToStorage();
|
|
1485
|
+
},
|
|
1486
|
+
setMenuMinimized(e) {
|
|
1487
|
+
this.leftMenuMinimized = e, this._saveToStorage();
|
|
1488
|
+
},
|
|
1489
|
+
toggleMenuMinimized() {
|
|
1490
|
+
this.leftMenuMinimized = !this.leftMenuMinimized, this._saveToStorage();
|
|
1491
|
+
},
|
|
1492
|
+
setTheme(e) {
|
|
1493
|
+
this.theme = e, this._saveToStorage();
|
|
1494
|
+
},
|
|
1495
|
+
toggleTheme() {
|
|
1496
|
+
this.theme = this.theme === "dark" ? "light" : "dark", this._saveToStorage();
|
|
1497
|
+
},
|
|
1498
|
+
_saveToStorage() {
|
|
1499
|
+
Er({
|
|
1500
|
+
language: this.language,
|
|
1501
|
+
leftMenuMinimized: this.leftMenuMinimized,
|
|
1502
|
+
theme: this.theme
|
|
1503
|
+
});
|
|
1504
|
+
}
|
|
1505
|
+
}
|
|
1506
|
+
}), jr = { class: "fixed z-50 top-0 w-full bg-stone-900" }, Or = { class: "w-full px-2 sm:px-6 lg:px-8" }, Lr = { class: "relative flex h-16 items-center justify-between" }, zr = { class: "absolute inset-y-0 left-0 flex items-center sm:hidden" }, Nr = {
|
|
1507
|
+
key: 0,
|
|
1508
|
+
class: "sm:hidden"
|
|
1509
|
+
}, Rr = { class: "space-y-1 px-2 pb-3 pt-2" }, Nt = {
|
|
1510
|
+
__name: "MainNavbar",
|
|
1511
|
+
setup(e) {
|
|
1512
|
+
const t = W(), s = Ye(), n = w(() => t.user), i = w(() => s.currentTheme), r = k(!1), d = () => {
|
|
1513
|
+
s.toggleTheme();
|
|
1514
|
+
}, m = () => {
|
|
1515
|
+
t.logout().then(() => {
|
|
1516
|
+
window.location.href = "/";
|
|
1517
|
+
}).catch((x) => {
|
|
1518
|
+
se(x);
|
|
1519
|
+
});
|
|
1520
|
+
};
|
|
1521
|
+
return (x, f) => {
|
|
1522
|
+
const _ = Q("GIcon"), l = Q("router-link");
|
|
1523
|
+
return a(), c("nav", jr, [
|
|
1524
|
+
o("div", Or, [
|
|
1525
|
+
o("div", Lr, [
|
|
1526
|
+
o("div", zr, [
|
|
1527
|
+
o("button", {
|
|
1528
|
+
type: "button",
|
|
1529
|
+
onClick: f[0] || (f[0] = (v) => r.value = !r.value),
|
|
1530
|
+
class: "relative inline-flex items-center justify-center rounded-md p-2 text-stone-400 hover:bg-stone-700 hover:text-white focus:outline-none focus:ring-2 focus:ring-inset focus:ring-white",
|
|
1531
|
+
"aria-controls": "mobile-menu",
|
|
1532
|
+
"aria-expanded": "false"
|
|
1533
|
+
}, [...f[4] || (f[4] = [
|
|
1534
|
+
Ke('<span class="absolute -inset-0.5"></span><span class="sr-only">Open main menu</span><svg class="block h-6 w-6" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5"></path></svg><svg class="hidden h-6 w-6" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M6 18L18 6M6 6l12 12"></path></svg>', 4)
|
|
1535
|
+
])])
|
|
1536
|
+
]),
|
|
1537
|
+
f[5] || (f[5] = o("div", { class: "flex flex-1 items-center justify-center sm:items-stretch sm:justify-start" }, [
|
|
1538
|
+
o("div", { class: "flex flex-shrink-0 items-center" }, [
|
|
1539
|
+
o("a", {
|
|
1540
|
+
id: "brand-link",
|
|
1541
|
+
class: "navbar-brand",
|
|
1542
|
+
href: "/"
|
|
1543
|
+
}, [
|
|
1544
|
+
o("img", {
|
|
1545
|
+
id: "brand-logo",
|
|
1546
|
+
src: wt,
|
|
1547
|
+
class: "logo",
|
|
1548
|
+
alt: "GameAP"
|
|
1549
|
+
})
|
|
1550
|
+
])
|
|
1551
|
+
])
|
|
1552
|
+
], -1)),
|
|
1553
|
+
o("div", {
|
|
1554
|
+
class: "md:mr-4 gap-x-1.5 text-white hover:bg-stone-800 px-5 py-2 rounded",
|
|
1555
|
+
onClick: f[1] || (f[1] = (v) => d())
|
|
1556
|
+
}, [
|
|
1557
|
+
i.value === "dark" ? (a(), $(_, {
|
|
1558
|
+
key: 0,
|
|
1559
|
+
name: "sun",
|
|
1560
|
+
class: "px-2 w-full"
|
|
1561
|
+
})) : A("", !0),
|
|
1562
|
+
i.value === "light" ? (a(), $(_, {
|
|
1563
|
+
key: 1,
|
|
1564
|
+
name: "moon",
|
|
1565
|
+
class: "px-2 w-full"
|
|
1566
|
+
})) : A("", !0)
|
|
1567
|
+
]),
|
|
1568
|
+
y(ht, {
|
|
1569
|
+
class: "md:mr-4",
|
|
1570
|
+
"button-text": u(p)("navbar.help"),
|
|
1571
|
+
"button-icon": "help",
|
|
1572
|
+
items: [
|
|
1573
|
+
[
|
|
1574
|
+
{
|
|
1575
|
+
icon: "book",
|
|
1576
|
+
label: u(p)("navbar.documentation"),
|
|
1577
|
+
link: u(me) === "ru" ? "https://docs.gameap.com/ru/" : "https://docs.gameap.com/en/"
|
|
1578
|
+
},
|
|
1579
|
+
{
|
|
1580
|
+
icon: "admin-panel",
|
|
1581
|
+
label: u(p)("navbar.api_documentation"),
|
|
1582
|
+
link: "https://openapi.gameap.io/"
|
|
1583
|
+
}
|
|
1584
|
+
]
|
|
1585
|
+
]
|
|
1586
|
+
}, null, 8, ["button-text", "items"]),
|
|
1587
|
+
y(ht, {
|
|
1588
|
+
class: "md:mr-4",
|
|
1589
|
+
"button-text": n.value.name,
|
|
1590
|
+
"button-icon": "user",
|
|
1591
|
+
items: [
|
|
1592
|
+
[
|
|
1593
|
+
{
|
|
1594
|
+
icon: "profile",
|
|
1595
|
+
label: u(p)("navbar.profile"),
|
|
1596
|
+
route: { name: "profile" }
|
|
1597
|
+
},
|
|
1598
|
+
{
|
|
1599
|
+
icon: "key",
|
|
1600
|
+
label: u(p)("tokens.tokens"),
|
|
1601
|
+
route: { name: "tokens" }
|
|
1602
|
+
}
|
|
1603
|
+
],
|
|
1604
|
+
[
|
|
1605
|
+
{
|
|
1606
|
+
icon: "logout",
|
|
1607
|
+
label: u(p)("navbar.sign_out"),
|
|
1608
|
+
onClick: m
|
|
1609
|
+
}
|
|
1610
|
+
]
|
|
1611
|
+
]
|
|
1612
|
+
}, null, 8, ["button-text", "items"])
|
|
1613
|
+
])
|
|
1614
|
+
]),
|
|
1615
|
+
r.value ? (a(), c("div", Nr, [
|
|
1616
|
+
o("div", Rr, [
|
|
1617
|
+
(a(!0), c(F, null, N(u(De), (v) => (a(), $(l, {
|
|
1618
|
+
onClick: f[2] || (f[2] = (j) => r.value = !r.value),
|
|
1619
|
+
to: v.route,
|
|
1620
|
+
class: "bg-stone-800 text-white block rounded px-3 py-2 font-medium",
|
|
1621
|
+
"aria-current": "page"
|
|
1622
|
+
}, {
|
|
1623
|
+
default: M(() => [
|
|
1624
|
+
y(_, {
|
|
1625
|
+
name: v.icon,
|
|
1626
|
+
class: "ml-1"
|
|
1627
|
+
}, null, 8, ["name"]),
|
|
1628
|
+
L(" " + b(v.text), 1)
|
|
1629
|
+
]),
|
|
1630
|
+
_: 2
|
|
1631
|
+
}, 1032, ["to"]))), 256)),
|
|
1632
|
+
(a(!0), c(F, null, N(u(Ue), (v) => (a(), $(l, {
|
|
1633
|
+
onClick: f[3] || (f[3] = (j) => r.value = !r.value),
|
|
1634
|
+
to: v.route,
|
|
1635
|
+
class: "bg-stone-800 text-white block rounded px-3 py-2 font-medium",
|
|
1636
|
+
"aria-current": "page"
|
|
1637
|
+
}, {
|
|
1638
|
+
default: M(() => [
|
|
1639
|
+
y(_, {
|
|
1640
|
+
name: v.icon,
|
|
1641
|
+
class: "ml-1"
|
|
1642
|
+
}, null, 8, ["name"]),
|
|
1643
|
+
L(" " + b(v.text), 1)
|
|
1644
|
+
]),
|
|
1645
|
+
_: 2
|
|
1646
|
+
}, 1032, ["to"]))), 256))
|
|
1647
|
+
])
|
|
1648
|
+
])) : A("", !0)
|
|
1649
|
+
]);
|
|
1650
|
+
};
|
|
1651
|
+
}
|
|
1652
|
+
}, Qe = (e, t) => {
|
|
1653
|
+
const s = e.__vccOpts || e;
|
|
1654
|
+
for (const [n, i] of t)
|
|
1655
|
+
s[n] = i;
|
|
1656
|
+
return s;
|
|
1657
|
+
}, Gr = {}, Vr = { class: "fixed z-50 top-0 w-full bg-stone-900" };
|
|
1658
|
+
function Br(e, t) {
|
|
1659
|
+
return a(), c("nav", Vr, [...t[0] || (t[0] = [
|
|
1660
|
+
Ke('<div class="w-full px-2 sm:px-6 lg:px-8"><div class="relative flex h-16 items-center justify-between"><div class="flex flex-1 items-center justify-center sm:items-stretch sm:justify-start"><div class="flex flex-shrink-0 items-center"><a id="brand-link" class="navbar-brand" href="/"><img id="brand-logo" src="' + wt + '" class="logo" alt="GameAP"></a></div></div></div></div>', 1)
|
|
1661
|
+
])]);
|
|
1662
|
+
}
|
|
1663
|
+
const Rt = /* @__PURE__ */ Qe(Gr, [["render", Br]]), Gt = q("server", () => {
|
|
1664
|
+
const e = k([]), t = k(0), s = k({
|
|
1665
|
+
"game-server-common": !1,
|
|
1666
|
+
"game-server-start": !1,
|
|
1667
|
+
"game-server-stop": !1,
|
|
1668
|
+
"game-server-restart": !1,
|
|
1669
|
+
"game-server-pause": !1,
|
|
1670
|
+
"game-server-update": !1,
|
|
1671
|
+
"game-server-files": !1,
|
|
1672
|
+
"game-server-tasks": !1,
|
|
1673
|
+
"game-server-settings": !1,
|
|
1674
|
+
"game-server-console-view": !1,
|
|
1675
|
+
"game-server-console-send": !1,
|
|
1676
|
+
"game-server-rcon-console": !1,
|
|
1677
|
+
"game-server-rcon-players": !1
|
|
1678
|
+
}), n = k({
|
|
1679
|
+
id: 0,
|
|
1680
|
+
uuid: "",
|
|
1681
|
+
uuid_short: "",
|
|
1682
|
+
enabled: !1,
|
|
1683
|
+
installed: !1,
|
|
1684
|
+
blocked: !1,
|
|
1685
|
+
name: "",
|
|
1686
|
+
ds_id: 0,
|
|
1687
|
+
game_id: 0,
|
|
1688
|
+
game_mod_id: 0,
|
|
1689
|
+
server_ip: "",
|
|
1690
|
+
server_port: 0,
|
|
1691
|
+
query_port: 0,
|
|
1692
|
+
rcon_port: 0,
|
|
1693
|
+
game: {},
|
|
1694
|
+
online: !1,
|
|
1695
|
+
rcon: "",
|
|
1696
|
+
dir: "",
|
|
1697
|
+
su_user: "",
|
|
1698
|
+
start_command: "",
|
|
1699
|
+
aliases: null
|
|
1700
|
+
}), i = k([]), r = k(0), d = k(""), m = k(0), x = k(0), f = k(0), _ = w(() => r.value > 0), l = w(() => !!s.value["game-server-start"]), v = w(() => !!s.value["game-server-stop"]), j = w(() => !!s.value["game-server-restart"]), h = w(() => !!s.value["game-server-update"]), R = w(() => !!s.value["game-server-console-view"]), G = w(() => !!s.value["game-server-console-send"]), ie = w(() => !!s.value["game-server-files"]), ve = w(() => !!s.value["game-server-tasks"]), le = w(() => !!s.value["game-server-settings"]), Z = w(() => n.value);
|
|
1701
|
+
function Se(I) {
|
|
1702
|
+
t.value = I;
|
|
1703
|
+
}
|
|
1704
|
+
async function Pe() {
|
|
1705
|
+
r.value++;
|
|
1706
|
+
try {
|
|
1707
|
+
const I = await S.get("/api/servers/" + t.value);
|
|
1708
|
+
n.value = I.data;
|
|
1709
|
+
} catch (I) {
|
|
1710
|
+
if (I.__CANCEL__)
|
|
1711
|
+
return;
|
|
1712
|
+
throw I;
|
|
1713
|
+
} finally {
|
|
1714
|
+
r.value--;
|
|
1715
|
+
}
|
|
1716
|
+
}
|
|
1717
|
+
async function Te() {
|
|
1718
|
+
r.value++;
|
|
1719
|
+
try {
|
|
1720
|
+
const I = await S.get("/api/servers/" + t.value + "/abilities");
|
|
1721
|
+
s.value = I.data;
|
|
1722
|
+
} catch (I) {
|
|
1723
|
+
if (I.__CANCEL__)
|
|
1724
|
+
return;
|
|
1725
|
+
throw I;
|
|
1726
|
+
} finally {
|
|
1727
|
+
r.value--;
|
|
1728
|
+
}
|
|
1729
|
+
}
|
|
1730
|
+
async function Ae() {
|
|
1731
|
+
r.value++;
|
|
1732
|
+
try {
|
|
1733
|
+
const I = await S.get("/api/servers/" + t.value + "/settings");
|
|
1734
|
+
i.value = I.data;
|
|
1735
|
+
} catch (I) {
|
|
1736
|
+
if (I.__CANCEL__)
|
|
1737
|
+
return;
|
|
1738
|
+
throw I;
|
|
1739
|
+
} finally {
|
|
1740
|
+
r.value--;
|
|
1741
|
+
}
|
|
1742
|
+
}
|
|
1743
|
+
async function Ie(I) {
|
|
1744
|
+
r.value++;
|
|
1745
|
+
try {
|
|
1746
|
+
await S.put("/api/servers/" + t.value, I);
|
|
1747
|
+
} catch (J) {
|
|
1748
|
+
if (J.__CANCEL__)
|
|
1749
|
+
return;
|
|
1750
|
+
throw J;
|
|
1751
|
+
} finally {
|
|
1752
|
+
r.value--;
|
|
1753
|
+
}
|
|
1754
|
+
}
|
|
1755
|
+
async function Fe(I) {
|
|
1756
|
+
r.value++;
|
|
1757
|
+
try {
|
|
1758
|
+
await S.put("/api/servers/" + t.value + "/settings", I);
|
|
1759
|
+
} catch (J) {
|
|
1760
|
+
if (J.__CANCEL__)
|
|
1761
|
+
return;
|
|
1762
|
+
throw J;
|
|
1763
|
+
} finally {
|
|
1764
|
+
r.value--;
|
|
1765
|
+
}
|
|
1766
|
+
}
|
|
1767
|
+
function Me(I) {
|
|
1768
|
+
d.value = I;
|
|
1769
|
+
}
|
|
1770
|
+
function Ee(I) {
|
|
1771
|
+
m.value = I;
|
|
1772
|
+
}
|
|
1773
|
+
function je(I) {
|
|
1774
|
+
x.value = I;
|
|
1775
|
+
}
|
|
1776
|
+
function Oe(I) {
|
|
1777
|
+
f.value = I;
|
|
1778
|
+
}
|
|
1779
|
+
return {
|
|
1780
|
+
// State
|
|
1781
|
+
errors: e,
|
|
1782
|
+
serverId: t,
|
|
1783
|
+
abilities: s,
|
|
1784
|
+
server: n,
|
|
1785
|
+
settings: i,
|
|
1786
|
+
apiProcesses: r,
|
|
1787
|
+
formIp: d,
|
|
1788
|
+
formPort: m,
|
|
1789
|
+
formQueryPort: x,
|
|
1790
|
+
formRconPort: f,
|
|
1791
|
+
// Getters
|
|
1792
|
+
loading: _,
|
|
1793
|
+
canStart: l,
|
|
1794
|
+
canStop: v,
|
|
1795
|
+
canRestart: j,
|
|
1796
|
+
canUpdate: h,
|
|
1797
|
+
canReadConsole: R,
|
|
1798
|
+
canSendConsole: G,
|
|
1799
|
+
canManageFiles: ie,
|
|
1800
|
+
canManageTasks: ve,
|
|
1801
|
+
canManageSettings: le,
|
|
1802
|
+
getServer: Z,
|
|
1803
|
+
// Actions
|
|
1804
|
+
setServerId: Se,
|
|
1805
|
+
fetchServer: Pe,
|
|
1806
|
+
fetchAbilities: Te,
|
|
1807
|
+
fetchSettings: Ae,
|
|
1808
|
+
save: Ie,
|
|
1809
|
+
saveSettings: Fe,
|
|
1810
|
+
setFormIp: Me,
|
|
1811
|
+
setFormPort: Ee,
|
|
1812
|
+
setFormQueryPort: je,
|
|
1813
|
+
setFormRconPort: Oe
|
|
1814
|
+
};
|
|
1815
|
+
}), Dr = "pluginContext", Ur = "pluginI18n";
|
|
1816
|
+
function Vt(e = {}) {
|
|
1817
|
+
const t = qr(e);
|
|
1818
|
+
Ge(Dr, t);
|
|
1819
|
+
const s = Hr();
|
|
1820
|
+
return Ge(Ur, s), t;
|
|
1821
|
+
}
|
|
1822
|
+
function qr(e = {}) {
|
|
1823
|
+
const t = xe(), s = W(), n = Gt(), i = ge();
|
|
1824
|
+
return {
|
|
1825
|
+
route: w(() => ({
|
|
1826
|
+
name: t.name,
|
|
1827
|
+
path: t.path,
|
|
1828
|
+
params: t.params,
|
|
1829
|
+
query: t.query,
|
|
1830
|
+
pluginId: t.meta?.pluginId
|
|
1831
|
+
})),
|
|
1832
|
+
server: w(() => ({
|
|
1833
|
+
id: n.serverId,
|
|
1834
|
+
data: n.server,
|
|
1835
|
+
abilities: n.abilities
|
|
1836
|
+
})),
|
|
1837
|
+
user: w(() => ({
|
|
1838
|
+
id: s.profile?.id,
|
|
1839
|
+
login: s.profile?.login ?? "",
|
|
1840
|
+
name: s.profile?.name ?? "",
|
|
1841
|
+
roles: s.profile?.roles ?? [],
|
|
1842
|
+
isAdmin: s.isAdmin,
|
|
1843
|
+
isAuthenticated: s.isAuthenticated
|
|
1844
|
+
})),
|
|
1845
|
+
stores: {
|
|
1846
|
+
auth: s,
|
|
1847
|
+
server: n,
|
|
1848
|
+
plugins: i
|
|
1849
|
+
},
|
|
1850
|
+
...e
|
|
1851
|
+
};
|
|
1852
|
+
}
|
|
1853
|
+
function Hr() {
|
|
1854
|
+
const e = xe(), t = ge(), s = window.gameapLang || "en";
|
|
1855
|
+
return { trans: (i, r) => {
|
|
1856
|
+
const d = e.meta?.pluginId, m = d ? t.getPluginTranslations(d) : null;
|
|
1857
|
+
let f = (m?.[s] || m?.en || {})[i] ?? p(i);
|
|
1858
|
+
return r && Object.entries(r).forEach(([_, l]) => {
|
|
1859
|
+
f = f.replace(`:${_}`, String(l));
|
|
1860
|
+
}), f;
|
|
1861
|
+
}, locale: s };
|
|
1862
|
+
}
|
|
1863
|
+
const Kr = {
|
|
1864
|
+
__name: "PluginRouteWrapper",
|
|
1865
|
+
props: {
|
|
1866
|
+
routeComponent: {
|
|
1867
|
+
type: [Object, Function],
|
|
1868
|
+
required: !0
|
|
1869
|
+
}
|
|
1870
|
+
},
|
|
1871
|
+
setup(e) {
|
|
1872
|
+
return Vt(), (t, s) => (a(), $(pe(e.routeComponent), Kt(Xt(t.$attrs)), null, 16));
|
|
1873
|
+
}
|
|
1874
|
+
}, Xr = ["1.0"], ge = q("plugins", () => {
|
|
1875
|
+
const e = k(/* @__PURE__ */ new Map()), t = Re({
|
|
1876
|
+
"server-tabs": [],
|
|
1877
|
+
"dashboard-widgets": [],
|
|
1878
|
+
"sidebar-sections": [],
|
|
1879
|
+
"admin-pages": [],
|
|
1880
|
+
"home-buttons": []
|
|
1881
|
+
}), s = k([]), n = k([]), i = Re({
|
|
1882
|
+
servers: [],
|
|
1883
|
+
admin: [],
|
|
1884
|
+
custom: []
|
|
1885
|
+
}), r = k(!1), d = k(!1), m = k([]), x = k(/* @__PURE__ */ new Map()), f = k([]), _ = w(() => r.value), l = w(() => d.value), v = w(() => m.value.length > 0), j = w(() => Array.from(e.value.values()).filter((g) => g.enabled));
|
|
1886
|
+
function h(g) {
|
|
1887
|
+
return t[g] || [];
|
|
1888
|
+
}
|
|
1889
|
+
function R(g) {
|
|
1890
|
+
return i[g] || [];
|
|
1891
|
+
}
|
|
1892
|
+
function G(g) {
|
|
1893
|
+
return e.value.get(g);
|
|
1894
|
+
}
|
|
1895
|
+
function ie(g) {
|
|
1896
|
+
return Xr.includes(g);
|
|
1897
|
+
}
|
|
1898
|
+
function ve(g) {
|
|
1899
|
+
if (!ie(g.apiVersion || "1.0"))
|
|
1900
|
+
throw new Error(`Unsupported API version: ${g.apiVersion}`);
|
|
1901
|
+
return e.value.set(g.id, {
|
|
1902
|
+
id: g.id,
|
|
1903
|
+
name: g.name,
|
|
1904
|
+
version: g.version,
|
|
1905
|
+
apiVersion: g.apiVersion || "1.0",
|
|
1906
|
+
enabled: !0,
|
|
1907
|
+
loadError: null,
|
|
1908
|
+
loadedAt: /* @__PURE__ */ new Date()
|
|
1909
|
+
}), g.id;
|
|
1910
|
+
}
|
|
1911
|
+
function le(g, C, E, P = {}) {
|
|
1912
|
+
if (!t[g]) {
|
|
1913
|
+
console.warn(`Unknown slot: ${g}`);
|
|
1914
|
+
return;
|
|
1915
|
+
}
|
|
1916
|
+
t[g].push({
|
|
1917
|
+
pluginId: C,
|
|
1918
|
+
component: E,
|
|
1919
|
+
props: P.props || {},
|
|
1920
|
+
order: P.order || 0,
|
|
1921
|
+
label: P.label || "",
|
|
1922
|
+
icon: P.icon || null,
|
|
1923
|
+
name: P.name || "",
|
|
1924
|
+
checkPermission: P.checkPermission || null
|
|
1925
|
+
}), t[g].sort((B, U) => B.order - U.order);
|
|
1926
|
+
}
|
|
1927
|
+
function Z(g, C, E) {
|
|
1928
|
+
const P = i[g] ? g : "custom";
|
|
1929
|
+
i[P].push({
|
|
1930
|
+
pluginId: C,
|
|
1931
|
+
icon: E.icon || "fas fa-puzzle-piece",
|
|
1932
|
+
text: E.text,
|
|
1933
|
+
route: E.route,
|
|
1934
|
+
order: E.order || 100,
|
|
1935
|
+
section: E.section
|
|
1936
|
+
}), i[P].sort((B, U) => B.order - U.order);
|
|
1937
|
+
}
|
|
1938
|
+
function Se(g, C) {
|
|
1939
|
+
s.value.push({
|
|
1940
|
+
pluginId: g,
|
|
1941
|
+
...C,
|
|
1942
|
+
path: `/plugins/${g}${C.path}`,
|
|
1943
|
+
name: `plugin.${g}.${C.name || "index"}`,
|
|
1944
|
+
meta: {
|
|
1945
|
+
...C.meta,
|
|
1946
|
+
pluginId: g,
|
|
1947
|
+
requiresAuth: C.meta?.requiresAuth !== !1
|
|
1948
|
+
}
|
|
1949
|
+
});
|
|
1950
|
+
}
|
|
1951
|
+
function Pe(g) {
|
|
1952
|
+
for (const C of s.value)
|
|
1953
|
+
try {
|
|
1954
|
+
const E = C.component, P = {
|
|
1955
|
+
name: `PluginRoute_${C.name}`,
|
|
1956
|
+
render() {
|
|
1957
|
+
return Wt(Kr, {
|
|
1958
|
+
routeComponent: E
|
|
1959
|
+
});
|
|
1960
|
+
}
|
|
1961
|
+
};
|
|
1962
|
+
g.addRoute({
|
|
1963
|
+
path: C.path,
|
|
1964
|
+
name: C.name,
|
|
1965
|
+
component: P,
|
|
1966
|
+
meta: C.meta
|
|
1967
|
+
}), n.value.push(C.name);
|
|
1968
|
+
} catch (E) {
|
|
1969
|
+
console.error(`Failed to register route ${C.path}:`, E);
|
|
1970
|
+
}
|
|
1971
|
+
s.value = [];
|
|
1972
|
+
}
|
|
1973
|
+
function Te(g) {
|
|
1974
|
+
r.value = g;
|
|
1975
|
+
}
|
|
1976
|
+
function Ae(g) {
|
|
1977
|
+
d.value = g;
|
|
1978
|
+
}
|
|
1979
|
+
function Ie(g) {
|
|
1980
|
+
m.value.push(g);
|
|
1981
|
+
}
|
|
1982
|
+
function Fe(g, C) {
|
|
1983
|
+
x.value.set(g, C);
|
|
1984
|
+
}
|
|
1985
|
+
function Me(g) {
|
|
1986
|
+
return x.value.get(g);
|
|
1987
|
+
}
|
|
1988
|
+
function Ee(g, C) {
|
|
1989
|
+
if (typeof C != "string" || !C.startsWith("@:"))
|
|
1990
|
+
return C;
|
|
1991
|
+
const E = C.slice(2), P = x.value.get(g), B = window.gameapLang || "en";
|
|
1992
|
+
return (P?.[B] || P?.en || {})[E] ?? p(E);
|
|
1993
|
+
}
|
|
1994
|
+
function je(g, C) {
|
|
1995
|
+
f.value.push({
|
|
1996
|
+
pluginId: g,
|
|
1997
|
+
editor: {
|
|
1998
|
+
...C,
|
|
1999
|
+
_compiledRegexp: C.match.fileNameRegexp ? new RegExp(C.match.fileNameRegexp) : null
|
|
2000
|
+
}
|
|
2001
|
+
});
|
|
2002
|
+
}
|
|
2003
|
+
function Oe(g, C, E) {
|
|
2004
|
+
const { match: P } = g, { fileName: B, filePath: U, extension: qt } = C, { gameCode: tt, gameName: st } = E || {};
|
|
2005
|
+
let H = 0, K = !1;
|
|
2006
|
+
if (P.gameCode && P.gameCode !== tt || P.gameName && P.gameName !== st)
|
|
2007
|
+
return 0;
|
|
2008
|
+
if (P.gameCode && P.gameCode === tt && (H += 50, K = !0), P.gameName && P.gameName === st && (H += 40, K = !0), P.allFiles)
|
|
2009
|
+
return H + 1;
|
|
2010
|
+
if (P.fullPath) {
|
|
2011
|
+
const _e = P.fullPath.replace(/^\//, "");
|
|
2012
|
+
if (U.replace(/^\//, "") === _e)
|
|
2013
|
+
H += 1e3, K = !0;
|
|
2014
|
+
else
|
|
2015
|
+
return 0;
|
|
2016
|
+
}
|
|
2017
|
+
if (P.pathContains)
|
|
2018
|
+
if (U.includes(P.pathContains))
|
|
2019
|
+
H += 500, K = !0;
|
|
2020
|
+
else
|
|
2021
|
+
return 0;
|
|
2022
|
+
if (P.fileName)
|
|
2023
|
+
if (B === P.fileName)
|
|
2024
|
+
H += 200, K = !0;
|
|
2025
|
+
else
|
|
2026
|
+
return 0;
|
|
2027
|
+
if (g._compiledRegexp)
|
|
2028
|
+
if (g._compiledRegexp.test(B))
|
|
2029
|
+
H += 100, K = !0;
|
|
2030
|
+
else
|
|
2031
|
+
return 0;
|
|
2032
|
+
if (P.extensions && P.extensions.length > 0) {
|
|
2033
|
+
const _e = qt?.toLowerCase();
|
|
2034
|
+
if (_e && P.extensions.map((nt) => nt.toLowerCase()).includes(_e))
|
|
2035
|
+
H += 10, K = !0;
|
|
2036
|
+
else if (!K)
|
|
2037
|
+
return 0;
|
|
2038
|
+
}
|
|
2039
|
+
return K ? H : 0;
|
|
2040
|
+
}
|
|
2041
|
+
function I(g, C = null) {
|
|
2042
|
+
const E = [];
|
|
2043
|
+
for (const { pluginId: P, editor: B } of f.value) {
|
|
2044
|
+
const U = Oe(B, g, C);
|
|
2045
|
+
U > 0 && E.push({
|
|
2046
|
+
pluginId: P,
|
|
2047
|
+
editor: B,
|
|
2048
|
+
score: U,
|
|
2049
|
+
isDefault: !1
|
|
2050
|
+
});
|
|
2051
|
+
}
|
|
2052
|
+
return E.sort((P, B) => B.score - P.score), E.length > 0 && (E[0].isDefault = !0), E;
|
|
2053
|
+
}
|
|
2054
|
+
function J(g, C = null) {
|
|
2055
|
+
const E = I(g, C);
|
|
2056
|
+
return E.length > 0 ? E[0] : null;
|
|
2057
|
+
}
|
|
2058
|
+
function Ut(g) {
|
|
2059
|
+
e.value.delete(g);
|
|
2060
|
+
for (const C of Object.keys(t))
|
|
2061
|
+
t[C] = t[C].filter((E) => E.pluginId !== g);
|
|
2062
|
+
for (const C of Object.keys(i))
|
|
2063
|
+
i[C] = i[C].filter((E) => E.pluginId !== g);
|
|
2064
|
+
f.value = f.value.filter((C) => C.pluginId !== g);
|
|
2065
|
+
}
|
|
2066
|
+
return {
|
|
2067
|
+
// State
|
|
2068
|
+
plugins: e,
|
|
2069
|
+
slots: t,
|
|
2070
|
+
pendingRoutes: s,
|
|
2071
|
+
registeredRoutes: n,
|
|
2072
|
+
menuItems: i,
|
|
2073
|
+
loading: r,
|
|
2074
|
+
initialized: d,
|
|
2075
|
+
loadErrors: m,
|
|
2076
|
+
pluginTranslations: x,
|
|
2077
|
+
fileEditors: f,
|
|
2078
|
+
// Getters
|
|
2079
|
+
isLoading: _,
|
|
2080
|
+
isInitialized: l,
|
|
2081
|
+
hasErrors: v,
|
|
2082
|
+
enabledPlugins: j,
|
|
2083
|
+
getSlotComponents: h,
|
|
2084
|
+
getMenuItems: R,
|
|
2085
|
+
getPlugin: G,
|
|
2086
|
+
getPluginTranslations: Me,
|
|
2087
|
+
resolvePluginText: Ee,
|
|
2088
|
+
getMatchingEditors: I,
|
|
2089
|
+
getDefaultEditor: J,
|
|
2090
|
+
// Actions
|
|
2091
|
+
checkApiVersion: ie,
|
|
2092
|
+
registerPlugin: ve,
|
|
2093
|
+
registerSlotComponent: le,
|
|
2094
|
+
registerMenuItem: Z,
|
|
2095
|
+
registerFileEditor: je,
|
|
2096
|
+
addPendingRoute: Se,
|
|
2097
|
+
registerRoutes: Pe,
|
|
2098
|
+
setLoading: Te,
|
|
2099
|
+
setInitialized: Ae,
|
|
2100
|
+
addLoadError: Ie,
|
|
2101
|
+
setPluginTranslations: Fe,
|
|
2102
|
+
unregisterPlugin: Ut
|
|
2103
|
+
};
|
|
2104
|
+
}), Wr = {
|
|
2105
|
+
key: 0,
|
|
2106
|
+
class: "items-center w-16 mr-5"
|
|
2107
|
+
}, Zr = {
|
|
2108
|
+
key: 1,
|
|
2109
|
+
class: "sidebar-menu fixed items-center w-16 h-full overflow-y-scroll no-scrollbar text-stone-400 bg-stone-900"
|
|
2110
|
+
}, Jr = { class: "w-full px-2" }, Yr = { class: "flex flex-col items-center w-full mb-3 border-stone-700" }, Qr = {
|
|
2111
|
+
key: 0,
|
|
2112
|
+
class: "flex items-center w-full px-3 mt-3",
|
|
2113
|
+
href: "#"
|
|
2114
|
+
}, ea = {
|
|
2115
|
+
key: 1,
|
|
2116
|
+
class: "w-full px-2"
|
|
2117
|
+
}, ta = { class: "flex flex-col items-center w-full mb-3 border-stone-700" }, sa = { class: "w-full px-2" }, na = { class: "flex flex-col items-center w-full mb-3 border-stone-700" }, oa = { class: "w-full px-2 mt-3" }, ra = { class: "flex flex-col items-center w-full mb-3 border-stone-700" }, aa = {
|
|
2118
|
+
key: 2,
|
|
2119
|
+
class: "items-center w-56 mr-5"
|
|
2120
|
+
}, ia = {
|
|
2121
|
+
key: 3,
|
|
2122
|
+
class: "sidebar-menu fixed items-center w-56 h-full overflow-y-scroll no-scrollbar text-stone-400 bg-stone-900"
|
|
2123
|
+
}, la = {
|
|
2124
|
+
class: "flex items-center w-full px-3 mt-3",
|
|
2125
|
+
href: "#"
|
|
2126
|
+
}, ca = { class: "ml-2 w-full text-center text-sm font-bold" }, ua = { class: "w-full px-2" }, da = { class: "flex flex-col items-center w-full mb-3 border-stone-700" }, fa = { class: "ml-2 text-sm font-medium" }, ma = { class: "ml-2 text-sm font-medium" }, pa = {
|
|
2127
|
+
key: 0,
|
|
2128
|
+
class: "flex items-center w-full px-3 mt-3",
|
|
2129
|
+
href: "#"
|
|
2130
|
+
}, ha = { class: "ml-2 w-full text-center text-sm font-bold" }, ga = {
|
|
2131
|
+
key: 1,
|
|
2132
|
+
class: "w-full px-2"
|
|
2133
|
+
}, va = { class: "flex flex-col items-center w-full mb-3 border-stone-700" }, _a = { class: "ml-2 text-sm font-medium" }, ba = { class: "ml-2 text-sm font-medium" }, xa = {
|
|
2134
|
+
class: "flex items-center w-full px-3 mt-3",
|
|
2135
|
+
href: "#"
|
|
2136
|
+
}, ya = { class: "ml-2 w-full text-center text-sm font-bold" }, wa = { class: "w-full px-2" }, ka = { class: "flex flex-col items-center w-full mb-3 border-stone-700" }, Ca = { class: "ml-2 text-sm font-medium" }, $a = { class: "w-full px-2 mt-3" }, Sa = { class: "flex flex-col items-center w-full mb-3 border-stone-700" }, Pa = { class: "ml-2 text-sm font-medium" }, Ta = {
|
|
2137
|
+
__name: "MainSidebar",
|
|
2138
|
+
setup(e) {
|
|
2139
|
+
const t = W(), s = Ye(), n = ge(), i = w({
|
|
2140
|
+
get: () => s.isMenuMinimized,
|
|
2141
|
+
set: (_) => s.setMenuMinimized(_)
|
|
2142
|
+
});
|
|
2143
|
+
function r() {
|
|
2144
|
+
s.toggleMenuMinimized(), document.querySelectorAll(".sidebar-menu").forEach((_) => {
|
|
2145
|
+
_.scrollTop = 0;
|
|
2146
|
+
});
|
|
2147
|
+
}
|
|
2148
|
+
const d = w(() => t.isAdmin), m = w(() => n.getMenuItems("servers")), x = w(() => n.getMenuItems("admin")), f = w(() => n.getMenuItems("custom").reduce((l, v) => {
|
|
2149
|
+
const j = v.section || "Plugins";
|
|
2150
|
+
return l[j] || (l[j] = []), l[j].push(v), l;
|
|
2151
|
+
}, {}));
|
|
2152
|
+
return (_, l) => {
|
|
2153
|
+
const v = Q("GIcon"), j = Q("router-link");
|
|
2154
|
+
return a(), c(F, null, [
|
|
2155
|
+
i.value === !0 ? (a(), c("div", Wr)) : A("", !0),
|
|
2156
|
+
i.value === !0 ? (a(), c("div", Zr, [
|
|
2157
|
+
l[2] || (l[2] = o("a", {
|
|
2158
|
+
class: "flex items-center w-full px-3 mt-3",
|
|
2159
|
+
href: "#"
|
|
2160
|
+
}, [
|
|
2161
|
+
o("span", { class: "ml-2 w-full text-center text-sm font-bold" }, "—")
|
|
2162
|
+
], -1)),
|
|
2163
|
+
o("div", Jr, [
|
|
2164
|
+
o("div", Yr, [
|
|
2165
|
+
(a(!0), c(F, null, N(u(De), (h) => (a(), $(j, {
|
|
2166
|
+
to: h.route,
|
|
2167
|
+
class: "flex items-center transition transform w-full h-10 px-3 mt-2 bg-stone-800 hover:translate-x-2"
|
|
2168
|
+
}, {
|
|
2169
|
+
default: M(() => [
|
|
2170
|
+
y(v, {
|
|
2171
|
+
name: h.icon,
|
|
2172
|
+
class: "ml-1"
|
|
2173
|
+
}, null, 8, ["name"])
|
|
2174
|
+
]),
|
|
2175
|
+
_: 2
|
|
2176
|
+
}, 1032, ["to"]))), 256)),
|
|
2177
|
+
(a(!0), c(F, null, N(m.value, (h) => (a(), $(j, {
|
|
2178
|
+
key: h.pluginId + "-" + h.text,
|
|
2179
|
+
to: h.route,
|
|
2180
|
+
class: "flex items-center transition transform w-full h-10 px-3 mt-2 bg-stone-800 hover:translate-x-2"
|
|
2181
|
+
}, {
|
|
2182
|
+
default: M(() => [
|
|
2183
|
+
y(v, {
|
|
2184
|
+
name: h.icon,
|
|
2185
|
+
class: "ml-1"
|
|
2186
|
+
}, null, 8, ["name"])
|
|
2187
|
+
]),
|
|
2188
|
+
_: 2
|
|
2189
|
+
}, 1032, ["to"]))), 128))
|
|
2190
|
+
])
|
|
2191
|
+
]),
|
|
2192
|
+
d.value ? (a(), c("a", Qr, [...l[0] || (l[0] = [
|
|
2193
|
+
o("span", { class: "ml-2 w-full text-center text-sm font-bold" }, "—", -1)
|
|
2194
|
+
])])) : A("", !0),
|
|
2195
|
+
d.value ? (a(), c("div", ea, [
|
|
2196
|
+
o("div", ta, [
|
|
2197
|
+
(a(!0), c(F, null, N(u(Ue), (h) => (a(), $(j, {
|
|
2198
|
+
to: h.route,
|
|
2199
|
+
class: "flex items-center transition transform w-full h-10 px-3 mt-2 bg-stone-800 hover:translate-x-2"
|
|
2200
|
+
}, {
|
|
2201
|
+
default: M(() => [
|
|
2202
|
+
y(v, {
|
|
2203
|
+
name: h.icon,
|
|
2204
|
+
class: "ml-1"
|
|
2205
|
+
}, null, 8, ["name"])
|
|
2206
|
+
]),
|
|
2207
|
+
_: 2
|
|
2208
|
+
}, 1032, ["to"]))), 256)),
|
|
2209
|
+
(a(!0), c(F, null, N(x.value, (h) => (a(), $(j, {
|
|
2210
|
+
key: h.pluginId + "-" + h.text,
|
|
2211
|
+
to: h.route,
|
|
2212
|
+
class: "flex items-center transition transform w-full h-10 px-3 mt-2 bg-stone-800 hover:translate-x-2"
|
|
2213
|
+
}, {
|
|
2214
|
+
default: M(() => [
|
|
2215
|
+
y(v, {
|
|
2216
|
+
name: h.icon,
|
|
2217
|
+
class: "ml-1"
|
|
2218
|
+
}, null, 8, ["name"])
|
|
2219
|
+
]),
|
|
2220
|
+
_: 2
|
|
2221
|
+
}, 1032, ["to"]))), 128))
|
|
2222
|
+
])
|
|
2223
|
+
])) : A("", !0),
|
|
2224
|
+
(a(!0), c(F, null, N(f.value, (h, R) => (a(), c(F, { key: R }, [
|
|
2225
|
+
l[1] || (l[1] = o("a", {
|
|
2226
|
+
class: "flex items-center w-full px-3 mt-3",
|
|
2227
|
+
href: "#"
|
|
2228
|
+
}, [
|
|
2229
|
+
o("span", { class: "ml-2 w-full text-center text-sm font-bold" }, "—")
|
|
2230
|
+
], -1)),
|
|
2231
|
+
o("div", sa, [
|
|
2232
|
+
o("div", na, [
|
|
2233
|
+
(a(!0), c(F, null, N(h, (G) => (a(), $(j, {
|
|
2234
|
+
key: G.pluginId + "-" + G.text,
|
|
2235
|
+
to: G.route,
|
|
2236
|
+
class: "flex items-center transition transform w-full h-10 px-3 mt-2 bg-stone-800 hover:translate-x-2"
|
|
2237
|
+
}, {
|
|
2238
|
+
default: M(() => [
|
|
2239
|
+
y(v, {
|
|
2240
|
+
name: G.icon,
|
|
2241
|
+
class: "ml-1"
|
|
2242
|
+
}, null, 8, ["name"])
|
|
2243
|
+
]),
|
|
2244
|
+
_: 2
|
|
2245
|
+
}, 1032, ["to"]))), 128))
|
|
2246
|
+
])
|
|
2247
|
+
])
|
|
2248
|
+
], 64))), 128)),
|
|
2249
|
+
o("div", oa, [
|
|
2250
|
+
o("div", ra, [
|
|
2251
|
+
o("a", {
|
|
2252
|
+
onClick: r,
|
|
2253
|
+
class: "flex items-center transition transform w-full h-10 px-3 mt-2 bg-stone-800 hover:translate-x-2"
|
|
2254
|
+
}, [
|
|
2255
|
+
y(v, {
|
|
2256
|
+
name: "chevron-right",
|
|
2257
|
+
class: "ml-1"
|
|
2258
|
+
})
|
|
2259
|
+
])
|
|
2260
|
+
])
|
|
2261
|
+
]),
|
|
2262
|
+
l[3] || (l[3] = o("div", { class: "mb-20" }, null, -1))
|
|
2263
|
+
])) : A("", !0),
|
|
2264
|
+
i.value === !1 ? (a(), c("div", aa)) : A("", !0),
|
|
2265
|
+
i.value === !1 ? (a(), c("div", ia, [
|
|
2266
|
+
o("a", la, [
|
|
2267
|
+
o("span", ca, b(u(p)("sidebar.control")), 1)
|
|
2268
|
+
]),
|
|
2269
|
+
o("div", ua, [
|
|
2270
|
+
o("div", da, [
|
|
2271
|
+
(a(!0), c(F, null, N(u(De), (h) => (a(), $(j, {
|
|
2272
|
+
to: h.route,
|
|
2273
|
+
class: "flex items-center transition transform w-full h-10 px-3 mt-2 bg-stone-800 hover:translate-x-2"
|
|
2274
|
+
}, {
|
|
2275
|
+
default: M(() => [
|
|
2276
|
+
y(v, {
|
|
2277
|
+
name: h.icon,
|
|
2278
|
+
class: "ml-1"
|
|
2279
|
+
}, null, 8, ["name"]),
|
|
2280
|
+
o("span", fa, b(h.text), 1)
|
|
2281
|
+
]),
|
|
2282
|
+
_: 2
|
|
2283
|
+
}, 1032, ["to"]))), 256)),
|
|
2284
|
+
(a(!0), c(F, null, N(m.value, (h) => (a(), $(j, {
|
|
2285
|
+
key: h.pluginId + "-" + h.text,
|
|
2286
|
+
to: h.route,
|
|
2287
|
+
class: "flex items-center transition transform w-full h-10 px-3 mt-2 bg-stone-800 hover:translate-x-2"
|
|
2288
|
+
}, {
|
|
2289
|
+
default: M(() => [
|
|
2290
|
+
y(v, {
|
|
2291
|
+
name: h.icon,
|
|
2292
|
+
class: "ml-1"
|
|
2293
|
+
}, null, 8, ["name"]),
|
|
2294
|
+
o("span", ma, b(u(n).resolvePluginText(h.pluginId, h.text)), 1)
|
|
2295
|
+
]),
|
|
2296
|
+
_: 2
|
|
2297
|
+
}, 1032, ["to"]))), 128))
|
|
2298
|
+
])
|
|
2299
|
+
]),
|
|
2300
|
+
d.value ? (a(), c("a", pa, [
|
|
2301
|
+
o("span", ha, b(u(p)("sidebar.admin")), 1)
|
|
2302
|
+
])) : A("", !0),
|
|
2303
|
+
d.value ? (a(), c("div", ga, [
|
|
2304
|
+
o("div", va, [
|
|
2305
|
+
(a(!0), c(F, null, N(u(Ue), (h) => (a(), $(j, {
|
|
2306
|
+
to: h.route,
|
|
2307
|
+
class: "flex items-center transition transform w-full h-10 px-3 mt-2 bg-stone-800 hover:translate-x-2"
|
|
2308
|
+
}, {
|
|
2309
|
+
default: M(() => [
|
|
2310
|
+
y(v, {
|
|
2311
|
+
name: h.icon,
|
|
2312
|
+
class: "ml-1"
|
|
2313
|
+
}, null, 8, ["name"]),
|
|
2314
|
+
o("span", _a, b(h.text), 1)
|
|
2315
|
+
]),
|
|
2316
|
+
_: 2
|
|
2317
|
+
}, 1032, ["to"]))), 256)),
|
|
2318
|
+
(a(!0), c(F, null, N(x.value, (h) => (a(), $(j, {
|
|
2319
|
+
key: h.pluginId + "-" + h.text,
|
|
2320
|
+
to: h.route,
|
|
2321
|
+
class: "flex items-center transition transform w-full h-10 px-3 mt-2 bg-stone-800 hover:translate-x-2"
|
|
2322
|
+
}, {
|
|
2323
|
+
default: M(() => [
|
|
2324
|
+
y(v, {
|
|
2325
|
+
name: h.icon,
|
|
2326
|
+
class: "ml-1"
|
|
2327
|
+
}, null, 8, ["name"]),
|
|
2328
|
+
o("span", ba, b(u(n).resolvePluginText(h.pluginId, h.text)), 1)
|
|
2329
|
+
]),
|
|
2330
|
+
_: 2
|
|
2331
|
+
}, 1032, ["to"]))), 128))
|
|
2332
|
+
])
|
|
2333
|
+
])) : A("", !0),
|
|
2334
|
+
(a(!0), c(F, null, N(f.value, (h, R) => (a(), c(F, { key: R }, [
|
|
2335
|
+
o("a", xa, [
|
|
2336
|
+
o("span", ya, b(R), 1)
|
|
2337
|
+
]),
|
|
2338
|
+
o("div", wa, [
|
|
2339
|
+
o("div", ka, [
|
|
2340
|
+
(a(!0), c(F, null, N(h, (G) => (a(), $(j, {
|
|
2341
|
+
key: G.pluginId + "-" + G.text,
|
|
2342
|
+
to: G.route,
|
|
2343
|
+
class: "flex items-center transition transform w-full h-10 px-3 mt-2 bg-stone-800 hover:translate-x-2"
|
|
2344
|
+
}, {
|
|
2345
|
+
default: M(() => [
|
|
2346
|
+
y(v, {
|
|
2347
|
+
name: G.icon,
|
|
2348
|
+
class: "ml-1"
|
|
2349
|
+
}, null, 8, ["name"]),
|
|
2350
|
+
o("span", Ca, b(u(n).resolvePluginText(G.pluginId, G.text)), 1)
|
|
2351
|
+
]),
|
|
2352
|
+
_: 2
|
|
2353
|
+
}, 1032, ["to"]))), 128))
|
|
2354
|
+
])
|
|
2355
|
+
])
|
|
2356
|
+
], 64))), 128)),
|
|
2357
|
+
o("div", $a, [
|
|
2358
|
+
o("div", Sa, [
|
|
2359
|
+
o("a", {
|
|
2360
|
+
onClick: r,
|
|
2361
|
+
class: "flex items-center transition transform w-full h-10 px-3 mt-2 bg-stone-800 hover:translate-x-2",
|
|
2362
|
+
href: "#"
|
|
2363
|
+
}, [
|
|
2364
|
+
y(v, {
|
|
2365
|
+
name: "chevron-left",
|
|
2366
|
+
class: "ml-1"
|
|
2367
|
+
}),
|
|
2368
|
+
o("span", Pa, b(u(p)("sidebar.minimize")), 1)
|
|
2369
|
+
])
|
|
2370
|
+
])
|
|
2371
|
+
]),
|
|
2372
|
+
l[4] || (l[4] = o("div", { class: "mb-20" }, null, -1))
|
|
2373
|
+
])) : A("", !0)
|
|
2374
|
+
], 64);
|
|
2375
|
+
};
|
|
2376
|
+
}
|
|
2377
|
+
}, Bt = /* @__PURE__ */ Qe(Ta, [["__scopeId", "data-v-96960d74"]]), qe = {
|
|
2378
|
+
__name: "ContentView",
|
|
2379
|
+
setup(e) {
|
|
2380
|
+
return Xe(), xe(), window.$message = ss(), window.$dialog = ns(), re(() => {
|
|
2381
|
+
}), (t, s) => {
|
|
2382
|
+
const n = Q("RouterView");
|
|
2383
|
+
return a(), $(n, {
|
|
2384
|
+
key: t.$route.path
|
|
2385
|
+
});
|
|
2386
|
+
};
|
|
2387
|
+
}
|
|
2388
|
+
}, Aa = q("node", () => {
|
|
2389
|
+
const e = k(0), t = k({}), s = k({}), n = k(0), i = k([]), r = k([]), d = w(() => n.value > 0);
|
|
2390
|
+
function m(h) {
|
|
2391
|
+
e.value = h;
|
|
2392
|
+
}
|
|
2393
|
+
function x() {
|
|
2394
|
+
e.value = 0, i.value = [], r.value = [];
|
|
2395
|
+
}
|
|
2396
|
+
async function f() {
|
|
2397
|
+
n.value++;
|
|
2398
|
+
try {
|
|
2399
|
+
const h = await S.get("/api/dedicated_servers/" + e.value);
|
|
2400
|
+
t.value = h.data;
|
|
2401
|
+
} finally {
|
|
2402
|
+
n.value--;
|
|
2403
|
+
}
|
|
2404
|
+
}
|
|
2405
|
+
async function _() {
|
|
2406
|
+
n.value++;
|
|
2407
|
+
try {
|
|
2408
|
+
const h = await S.get("/api/dedicated_servers/" + e.value + "/daemon");
|
|
2409
|
+
s.value = h.data;
|
|
2410
|
+
} finally {
|
|
2411
|
+
n.value--;
|
|
2412
|
+
}
|
|
2413
|
+
}
|
|
2414
|
+
async function l(h) {
|
|
2415
|
+
n.value++;
|
|
2416
|
+
try {
|
|
2417
|
+
await S.put("/api/dedicated_servers/" + e.value, h);
|
|
2418
|
+
} finally {
|
|
2419
|
+
n.value--;
|
|
2420
|
+
}
|
|
2421
|
+
}
|
|
2422
|
+
async function v() {
|
|
2423
|
+
if (!(!e.value || e.value <= 0)) {
|
|
2424
|
+
n.value++;
|
|
2425
|
+
try {
|
|
2426
|
+
const h = await S.get("/api/dedicated_servers/" + e.value + "/ip_list");
|
|
2427
|
+
i.value = h.data;
|
|
2428
|
+
} finally {
|
|
2429
|
+
n.value--;
|
|
2430
|
+
}
|
|
2431
|
+
}
|
|
2432
|
+
}
|
|
2433
|
+
async function j(h = null) {
|
|
2434
|
+
if (!(!e.value || e.value <= 0)) {
|
|
2435
|
+
n.value++;
|
|
2436
|
+
try {
|
|
2437
|
+
const R = await S.get("/api/dedicated_servers/" + e.value + "/busy_ports");
|
|
2438
|
+
r.value = R.data, typeof h == "function" && h();
|
|
2439
|
+
} finally {
|
|
2440
|
+
n.value--;
|
|
2441
|
+
}
|
|
2442
|
+
}
|
|
2443
|
+
}
|
|
2444
|
+
return {
|
|
2445
|
+
// State
|
|
2446
|
+
nodeId: e,
|
|
2447
|
+
node: t,
|
|
2448
|
+
daemonInfo: s,
|
|
2449
|
+
apiProcesses: n,
|
|
2450
|
+
ipList: i,
|
|
2451
|
+
busyPorts: r,
|
|
2452
|
+
// Getters
|
|
2453
|
+
loading: d,
|
|
2454
|
+
// Actions
|
|
2455
|
+
setNodeId: m,
|
|
2456
|
+
resetNodeId: x,
|
|
2457
|
+
fetchNode: f,
|
|
2458
|
+
fetchDaemonInfo: _,
|
|
2459
|
+
saveNode: l,
|
|
2460
|
+
fetchIpList: v,
|
|
2461
|
+
fetchBusyPorts: j
|
|
2462
|
+
};
|
|
2463
|
+
}), Ia = q("daemonTask", {
|
|
2464
|
+
state: () => ({
|
|
2465
|
+
taskId: 0,
|
|
2466
|
+
task: {},
|
|
2467
|
+
// This is a counter to keep track of how many API processes are running
|
|
2468
|
+
apiProcesses: 0
|
|
2469
|
+
}),
|
|
2470
|
+
getters: {
|
|
2471
|
+
loading: (e) => e.apiProcesses > 0
|
|
2472
|
+
},
|
|
2473
|
+
actions: {
|
|
2474
|
+
setTaskId(e) {
|
|
2475
|
+
this.taskId = e;
|
|
2476
|
+
},
|
|
2477
|
+
async fetchTaskOutput() {
|
|
2478
|
+
this.apiProcesses++;
|
|
2479
|
+
try {
|
|
2480
|
+
const e = await S.get("/api/gdaemon_tasks/" + this.taskId + "/output");
|
|
2481
|
+
this.task = e.data;
|
|
2482
|
+
} catch (e) {
|
|
2483
|
+
throw e;
|
|
2484
|
+
} finally {
|
|
2485
|
+
this.apiProcesses--;
|
|
2486
|
+
}
|
|
2487
|
+
}
|
|
2488
|
+
}
|
|
2489
|
+
}), Fa = q("game", () => {
|
|
2490
|
+
const e = k(0), t = k(""), s = k({}), n = k([]), i = w(() => e.value > 0);
|
|
2491
|
+
function r(f) {
|
|
2492
|
+
t.value = f;
|
|
2493
|
+
}
|
|
2494
|
+
async function d() {
|
|
2495
|
+
e.value++;
|
|
2496
|
+
try {
|
|
2497
|
+
const f = await S.get("/api/games/" + t.value);
|
|
2498
|
+
s.value = f.data;
|
|
2499
|
+
} finally {
|
|
2500
|
+
e.value--;
|
|
2501
|
+
}
|
|
2502
|
+
}
|
|
2503
|
+
async function m() {
|
|
2504
|
+
e.value++;
|
|
2505
|
+
try {
|
|
2506
|
+
const f = await S.get("/api/games/" + t.value + "/mods");
|
|
2507
|
+
n.value = f.data;
|
|
2508
|
+
} finally {
|
|
2509
|
+
e.value--;
|
|
2510
|
+
}
|
|
2511
|
+
}
|
|
2512
|
+
async function x(f) {
|
|
2513
|
+
e.value++;
|
|
2514
|
+
try {
|
|
2515
|
+
await S.put("/api/games/" + t.value, f);
|
|
2516
|
+
} finally {
|
|
2517
|
+
e.value--;
|
|
2518
|
+
}
|
|
2519
|
+
}
|
|
2520
|
+
return {
|
|
2521
|
+
// State
|
|
2522
|
+
apiProcesses: e,
|
|
2523
|
+
gameCode: t,
|
|
2524
|
+
game: s,
|
|
2525
|
+
mods: n,
|
|
2526
|
+
// Getters
|
|
2527
|
+
loading: i,
|
|
2528
|
+
// Actions
|
|
2529
|
+
setGameCode: r,
|
|
2530
|
+
fetchGame: d,
|
|
2531
|
+
fetchMods: m,
|
|
2532
|
+
saveGame: x
|
|
2533
|
+
};
|
|
2534
|
+
}), Ma = q("user", {
|
|
2535
|
+
state: () => ({
|
|
2536
|
+
userId: 0,
|
|
2537
|
+
user: {},
|
|
2538
|
+
servers: [],
|
|
2539
|
+
permissionsForServer: /* @__PURE__ */ new Map(),
|
|
2540
|
+
// This is a counter to keep track of how many API processes are running
|
|
2541
|
+
apiProcesses: 0
|
|
2542
|
+
}),
|
|
2543
|
+
getters: {
|
|
2544
|
+
loading: (e) => e.apiProcesses > 0,
|
|
2545
|
+
getServerPermissions: (e) => (t) => e.permissionsForServer.get(t)
|
|
2546
|
+
},
|
|
2547
|
+
actions: {
|
|
2548
|
+
setUserId(e) {
|
|
2549
|
+
this.userId = e;
|
|
2550
|
+
},
|
|
2551
|
+
async fetchUser() {
|
|
2552
|
+
this.apiProcesses++;
|
|
2553
|
+
try {
|
|
2554
|
+
const e = await S.get("/api/users/" + this.userId);
|
|
2555
|
+
this.user = e.data;
|
|
2556
|
+
} catch (e) {
|
|
2557
|
+
throw e;
|
|
2558
|
+
} finally {
|
|
2559
|
+
this.apiProcesses--;
|
|
2560
|
+
}
|
|
2561
|
+
},
|
|
2562
|
+
async saveUser(e) {
|
|
2563
|
+
this.apiProcesses++;
|
|
2564
|
+
try {
|
|
2565
|
+
await S.put("/api/users/" + this.userId, e);
|
|
2566
|
+
} catch (t) {
|
|
2567
|
+
throw t;
|
|
2568
|
+
} finally {
|
|
2569
|
+
this.apiProcesses--;
|
|
2570
|
+
}
|
|
2571
|
+
},
|
|
2572
|
+
async fetchServers() {
|
|
2573
|
+
this.apiProcesses++;
|
|
2574
|
+
try {
|
|
2575
|
+
const e = await S.get("/api/users/" + this.userId + "/servers");
|
|
2576
|
+
this.servers = e.data;
|
|
2577
|
+
} catch (e) {
|
|
2578
|
+
throw e;
|
|
2579
|
+
} finally {
|
|
2580
|
+
this.apiProcesses--;
|
|
2581
|
+
}
|
|
2582
|
+
},
|
|
2583
|
+
async fetchPermissionsForServer(e) {
|
|
2584
|
+
this.apiProcesses++;
|
|
2585
|
+
try {
|
|
2586
|
+
const t = await S.get("/api/users/" + this.userId + "/servers/" + e + "/permissions");
|
|
2587
|
+
this.setServerPermissions(e, t.data);
|
|
2588
|
+
} catch (t) {
|
|
2589
|
+
throw t;
|
|
2590
|
+
} finally {
|
|
2591
|
+
this.apiProcesses--;
|
|
2592
|
+
}
|
|
2593
|
+
},
|
|
2594
|
+
setServerPermissions(e, t) {
|
|
2595
|
+
this.permissionsForServer.set(e, t);
|
|
2596
|
+
},
|
|
2597
|
+
async savePermissionsForServer(e) {
|
|
2598
|
+
this.apiProcesses++;
|
|
2599
|
+
try {
|
|
2600
|
+
await S.put(
|
|
2601
|
+
"/api/users/" + this.userId + "/servers/" + e + "/permissions",
|
|
2602
|
+
this.permissionsForServer.get(e)
|
|
2603
|
+
);
|
|
2604
|
+
} catch (t) {
|
|
2605
|
+
throw t;
|
|
2606
|
+
} finally {
|
|
2607
|
+
this.apiProcesses--;
|
|
2608
|
+
}
|
|
2609
|
+
}
|
|
2610
|
+
}
|
|
2611
|
+
}), Ea = { key: 0 }, ja = {
|
|
2612
|
+
id: "main-section",
|
|
2613
|
+
class: "mt-16 mr-5 sm:flex"
|
|
2614
|
+
}, Oa = { class: "sm:visible invisible flex-none" }, La = { class: "sm:flex-1" }, za = { class: "max-w-full" }, Na = { class: "pt-3 pb-5 max-sm:pl-5 content" }, Ra = { key: 0 }, Ga = { key: 1 }, Va = {
|
|
2615
|
+
id: "main-section",
|
|
2616
|
+
class: "mt-16 mr-5 sm:flex"
|
|
2617
|
+
}, Ba = { class: "sm:flex-1 sm:mr-5" }, Da = { class: "max-w-full" }, Ua = { class: "pt-3 pb-5 content" }, qa = {
|
|
2618
|
+
__name: "App",
|
|
2619
|
+
setup(e) {
|
|
2620
|
+
xe();
|
|
2621
|
+
const t = Xe(), s = W(), n = Ye(), i = Aa(), r = Ia(), d = Fa(), m = Gt(), x = Ma(), f = w(() => s.user), _ = {
|
|
2622
|
+
common: {
|
|
2623
|
+
primaryColor: "#84cc16",
|
|
2624
|
+
primaryColorHover: "#65a30d",
|
|
2625
|
+
primaryColorPressed: "#65a30d",
|
|
2626
|
+
successColor: "#84CC16FF",
|
|
2627
|
+
successColorHover: "#65A30DFF",
|
|
2628
|
+
successColorPressed: "#65A30DFF",
|
|
2629
|
+
successColorSuppl: "#65A30DFF",
|
|
2630
|
+
warningColor: "#fb923cFF",
|
|
2631
|
+
warningColorHover: "#f97316FF",
|
|
2632
|
+
warningColorPressed: "#f97316FF",
|
|
2633
|
+
warningColorSuppl: "#f97316FF",
|
|
2634
|
+
errorColor: "#ef4444FF",
|
|
2635
|
+
errorColorHover: "#dc2626ff",
|
|
2636
|
+
errorColorPressed: "#dc2626ff",
|
|
2637
|
+
errorColorSuppl: "#dc2626ff",
|
|
2638
|
+
tableHeaderColor: "#f5f5f4ff"
|
|
2639
|
+
},
|
|
2640
|
+
Tabs: {
|
|
2641
|
+
tabTextColorLine: "#78716c",
|
|
2642
|
+
tabTextColorActiveLine: "#1c1917",
|
|
2643
|
+
tabTextColorHoverLine: "#1c1917",
|
|
2644
|
+
barColor: "#1c1917"
|
|
2645
|
+
}
|
|
2646
|
+
}, l = {
|
|
2647
|
+
common: {
|
|
2648
|
+
primaryColor: "#84cc16",
|
|
2649
|
+
primaryColorHover: "#65a30d",
|
|
2650
|
+
primaryColorPressed: "#65a30d",
|
|
2651
|
+
successColor: "#84CC16FF",
|
|
2652
|
+
successColorHover: "#65A30DFF",
|
|
2653
|
+
successColorPressed: "#65A30DFF",
|
|
2654
|
+
successColorSuppl: "#65A30DFF",
|
|
2655
|
+
warningColor: "#fb923cFF",
|
|
2656
|
+
warningColorHover: "#f97316FF",
|
|
2657
|
+
warningColorPressed: "#f97316FF",
|
|
2658
|
+
warningColorSuppl: "#f97316FF",
|
|
2659
|
+
errorColor: "#ef4444FF",
|
|
2660
|
+
errorColorHover: "#dc2626ff",
|
|
2661
|
+
errorColorPressed: "#dc2626ff",
|
|
2662
|
+
errorColorSuppl: "#dc2626ff",
|
|
2663
|
+
tableHeaderColor: "#44403c",
|
|
2664
|
+
modalColor: "#292524FF",
|
|
2665
|
+
tableColor: "rgb(24, 24, 28)",
|
|
2666
|
+
bodyColor: "rgb(16, 16, 20)",
|
|
2667
|
+
cardColor: "#292524FF"
|
|
2668
|
+
},
|
|
2669
|
+
Tabs: {
|
|
2670
|
+
tabTextColorLine: "#a8a29e",
|
|
2671
|
+
tabTextColorActiveLine: "#737373",
|
|
2672
|
+
tabTextColorHoverLine: "#737373",
|
|
2673
|
+
barColor: "#737373"
|
|
2674
|
+
},
|
|
2675
|
+
DataTable: {
|
|
2676
|
+
tdColorStriped: "rgba(36, 36, 39, 1)",
|
|
2677
|
+
thColor: "#44403cFF",
|
|
2678
|
+
tdColor: "#292524FF",
|
|
2679
|
+
thColorHover: "rgba(79, 75, 72, 1)",
|
|
2680
|
+
tdColorHoverModal: "rgba(57, 57, 62, 1)",
|
|
2681
|
+
tdColorModal: "rgba(44, 44, 50, 1)",
|
|
2682
|
+
tdColorHover: "#262322FF"
|
|
2683
|
+
}
|
|
2684
|
+
};
|
|
2685
|
+
re(() => {
|
|
2686
|
+
const R = n.currentTheme;
|
|
2687
|
+
document.documentElement.classList.remove("dark", "light"), document.documentElement.classList.add(R);
|
|
2688
|
+
}), Zt(() => n.currentTheme, (R, G) => {
|
|
2689
|
+
G && document.documentElement.classList.remove(G), document.documentElement.classList.add(R);
|
|
2690
|
+
}), w({
|
|
2691
|
+
get() {
|
|
2692
|
+
return n.currentTheme;
|
|
2693
|
+
},
|
|
2694
|
+
set(R) {
|
|
2695
|
+
document.documentElement.classList.remove("dark", "light"), document.documentElement.classList.add(R), n.setTheme(R);
|
|
2696
|
+
}
|
|
2697
|
+
});
|
|
2698
|
+
const v = w(() => n.currentTheme === "dark" ? os : rs), j = w(() => n.currentTheme === "dark" ? l : _), h = ({
|
|
2699
|
+
name: R,
|
|
2700
|
+
// name of the action
|
|
2701
|
+
store: G,
|
|
2702
|
+
// store instance, same as `someStore`
|
|
2703
|
+
args: ie,
|
|
2704
|
+
// array of parameters passed to the action
|
|
2705
|
+
after: ve,
|
|
2706
|
+
// hook after the action returns or resolves
|
|
2707
|
+
onError: le
|
|
2708
|
+
// hook if the action throws or rejects
|
|
2709
|
+
}) => {
|
|
2710
|
+
le((Z) => {
|
|
2711
|
+
if (Z.response && Z.response.status)
|
|
2712
|
+
switch (Z.response.status) {
|
|
2713
|
+
case 401:
|
|
2714
|
+
s.logout().then(() => {
|
|
2715
|
+
window.location.href = "/";
|
|
2716
|
+
});
|
|
2717
|
+
break;
|
|
2718
|
+
case 403:
|
|
2719
|
+
t.push({ name: "error403" });
|
|
2720
|
+
break;
|
|
2721
|
+
case 404:
|
|
2722
|
+
t.push({ name: "error404" });
|
|
2723
|
+
break;
|
|
2724
|
+
}
|
|
2725
|
+
});
|
|
2726
|
+
};
|
|
2727
|
+
return i.$onAction(h), r.$onAction(h), d.$onAction(h), m.$onAction(h), x.$onAction(h), (R, G) => (a(), $(u(as), {
|
|
2728
|
+
locale: u(me)() === "ru" ? u(is) : u(ls),
|
|
2729
|
+
theme: v.value,
|
|
2730
|
+
"theme-overrides": j.value
|
|
2731
|
+
}, {
|
|
2732
|
+
default: M(() => [
|
|
2733
|
+
y(u(cs), null, {
|
|
2734
|
+
default: M(() => [
|
|
2735
|
+
y(u(us), null, {
|
|
2736
|
+
default: M(() => [
|
|
2737
|
+
f.value ? (a(), c("div", Ea, [
|
|
2738
|
+
y(Nt),
|
|
2739
|
+
o("div", ja, [
|
|
2740
|
+
o("div", Oa, [
|
|
2741
|
+
y(Bt)
|
|
2742
|
+
]),
|
|
2743
|
+
o("div", La, [
|
|
2744
|
+
o("div", za, [
|
|
2745
|
+
o("div", Na, [
|
|
2746
|
+
y(qe),
|
|
2747
|
+
R.$route.name ? A("", !0) : (a(), c("div", Ra))
|
|
2748
|
+
])
|
|
2749
|
+
])
|
|
2750
|
+
])
|
|
2751
|
+
])
|
|
2752
|
+
])) : (a(), c("div", Ga, [
|
|
2753
|
+
y(Rt),
|
|
2754
|
+
o("div", Va, [
|
|
2755
|
+
o("div", Ba, [
|
|
2756
|
+
o("div", Da, [
|
|
2757
|
+
o("div", Ua, [
|
|
2758
|
+
y(qe)
|
|
2759
|
+
])
|
|
2760
|
+
])
|
|
2761
|
+
])
|
|
2762
|
+
])
|
|
2763
|
+
]))
|
|
2764
|
+
]),
|
|
2765
|
+
_: 1
|
|
2766
|
+
})
|
|
2767
|
+
]),
|
|
2768
|
+
_: 1
|
|
2769
|
+
})
|
|
2770
|
+
]),
|
|
2771
|
+
_: 1
|
|
2772
|
+
}, 8, ["locale", "theme", "theme-overrides"]));
|
|
2773
|
+
}
|
|
2774
|
+
}, Ha = { class: "stone-table" }, Ka = {
|
|
2775
|
+
key: 0,
|
|
2776
|
+
class: "stone-table-header"
|
|
2777
|
+
}, Xa = { class: "px-2 py-2" }, Wa = { class: "px-2 py-2" }, Za = { class: "stone-table-row" }, Ja = { class: "px-2 py-2" }, Ya = { class: "px-2 py-2" }, Qa = {
|
|
2778
|
+
__name: "KeyValueTable",
|
|
2779
|
+
props: {
|
|
2780
|
+
titleKey: "",
|
|
2781
|
+
titleValue: "",
|
|
2782
|
+
items: null
|
|
2783
|
+
},
|
|
2784
|
+
setup(e) {
|
|
2785
|
+
return (t, s) => (a(), c("table", Ha, [
|
|
2786
|
+
e.titleKey || e.titleValue ? (a(), c("thead", Ka, [
|
|
2787
|
+
o("tr", null, [
|
|
2788
|
+
o("th", Xa, b(e.titleKey), 1),
|
|
2789
|
+
o("th", Wa, b(e.titleValue), 1)
|
|
2790
|
+
])
|
|
2791
|
+
])) : A("", !0),
|
|
2792
|
+
o("tbody", null, [
|
|
2793
|
+
(a(!0), c(F, null, N(e.items, (n, i) => (a(), c("tr", Za, [
|
|
2794
|
+
o("th", Ja, b(i), 1),
|
|
2795
|
+
o("td", Ya, b(n), 1)
|
|
2796
|
+
]))), 256))
|
|
2797
|
+
])
|
|
2798
|
+
]));
|
|
2799
|
+
}
|
|
2800
|
+
}, ei = ["name", "value"], ti = {
|
|
2801
|
+
__name: "GameapSelect",
|
|
2802
|
+
props: {
|
|
2803
|
+
options: null,
|
|
2804
|
+
name: "",
|
|
2805
|
+
value: null
|
|
2806
|
+
},
|
|
2807
|
+
setup(e) {
|
|
2808
|
+
const t = e, s = k(t.name), n = k(t.value);
|
|
2809
|
+
return (i, r) => {
|
|
2810
|
+
const d = ds;
|
|
2811
|
+
return a(), c(F, null, [
|
|
2812
|
+
y(d, {
|
|
2813
|
+
value: n.value,
|
|
2814
|
+
"onUpdate:value": r[0] || (r[0] = (m) => n.value = m),
|
|
2815
|
+
multiple: "",
|
|
2816
|
+
options: e.options
|
|
2817
|
+
}, null, 8, ["value", "options"]),
|
|
2818
|
+
n.value !== void 0 && n.value !== null ? (a(!0), c(F, { key: 0 }, N(n.value, (m) => (a(), c("div", null, [
|
|
2819
|
+
o("input", {
|
|
2820
|
+
type: "hidden",
|
|
2821
|
+
name: s.value,
|
|
2822
|
+
value: m
|
|
2823
|
+
}, null, 8, ei)
|
|
2824
|
+
]))), 256)) : A("", !0)
|
|
2825
|
+
], 64);
|
|
2826
|
+
};
|
|
2827
|
+
}
|
|
2828
|
+
}, si = {
|
|
2829
|
+
props: {
|
|
2830
|
+
taskId: Number
|
|
2831
|
+
},
|
|
2832
|
+
data: function() {
|
|
2833
|
+
return {
|
|
2834
|
+
updateOutput: !0,
|
|
2835
|
+
output: null
|
|
2836
|
+
};
|
|
2837
|
+
},
|
|
2838
|
+
methods: {
|
|
2839
|
+
getOutput() {
|
|
2840
|
+
this.updateOutput && axios.get("/api/gdaemon_tasks/" + this.taskId + "/output").then((function(e) {
|
|
2841
|
+
this.output = e.data.output, e.data.status !== "working" && (this.updateOutput = !1, location.reload());
|
|
2842
|
+
}).bind(this)).catch((function(e) {
|
|
2843
|
+
console.log(e), this.updateOutput = !1;
|
|
2844
|
+
}).bind(this));
|
|
2845
|
+
}
|
|
2846
|
+
},
|
|
2847
|
+
mounted() {
|
|
2848
|
+
this.getOutput(), setInterval(this.getOutput, 5e3);
|
|
2849
|
+
}
|
|
2850
|
+
}, ni = { class: "console" };
|
|
2851
|
+
function oi(e, t, s, n, i, r) {
|
|
2852
|
+
return a(), c("div", null, [
|
|
2853
|
+
o("pre", ni, b(e.output), 1)
|
|
2854
|
+
]);
|
|
2855
|
+
}
|
|
2856
|
+
const ri = /* @__PURE__ */ Qe(si, [["render", oi]]), ai = {
|
|
2857
|
+
__name: "PluginSlot",
|
|
2858
|
+
props: {
|
|
2859
|
+
name: {
|
|
2860
|
+
type: String,
|
|
2861
|
+
required: !0
|
|
2862
|
+
},
|
|
2863
|
+
context: {
|
|
2864
|
+
type: Object,
|
|
2865
|
+
default: () => ({})
|
|
2866
|
+
}
|
|
2867
|
+
},
|
|
2868
|
+
setup(e) {
|
|
2869
|
+
const t = e;
|
|
2870
|
+
Vt();
|
|
2871
|
+
const s = ge(), n = w(() => [...s.getSlotComponents(t.name)].sort((d, m) => d.order - m.order));
|
|
2872
|
+
function i(r) {
|
|
2873
|
+
return {
|
|
2874
|
+
...r.props,
|
|
2875
|
+
...t.context,
|
|
2876
|
+
pluginId: r.pluginId
|
|
2877
|
+
};
|
|
2878
|
+
}
|
|
2879
|
+
return (r, d) => (a(!0), c(F, null, N(n.value, (m, x) => (a(), $(pe(m.component), xt({
|
|
2880
|
+
key: `${m.pluginId}-${x}`
|
|
2881
|
+
}, { ref_for: !0 }, i(m)), null, 16))), 128));
|
|
2882
|
+
}
|
|
2883
|
+
}, ii = q("nodeList", {
|
|
2884
|
+
state: () => ({
|
|
2885
|
+
nodes: [],
|
|
2886
|
+
summary: {},
|
|
2887
|
+
autoSetupData: {
|
|
2888
|
+
link: "",
|
|
2889
|
+
token: "",
|
|
2890
|
+
host: ""
|
|
2891
|
+
},
|
|
2892
|
+
apiProcesses: 0
|
|
2893
|
+
}),
|
|
2894
|
+
getters: {
|
|
2895
|
+
loading: (e) => e.apiProcesses > 0
|
|
2896
|
+
},
|
|
2897
|
+
actions: {
|
|
2898
|
+
async fetchNodesByFilter(e) {
|
|
2899
|
+
this.apiProcesses++;
|
|
2900
|
+
try {
|
|
2901
|
+
const t = await S.get("/api/dedicated_servers");
|
|
2902
|
+
this.nodes = t.data;
|
|
2903
|
+
} catch (t) {
|
|
2904
|
+
throw t;
|
|
2905
|
+
} finally {
|
|
2906
|
+
this.apiProcesses--;
|
|
2907
|
+
}
|
|
2908
|
+
},
|
|
2909
|
+
async fetchNodesSummary() {
|
|
2910
|
+
this.apiProcesses++;
|
|
2911
|
+
try {
|
|
2912
|
+
const e = await S.get("/api/dedicated_servers/summary");
|
|
2913
|
+
this.summary = e.data;
|
|
2914
|
+
} catch (e) {
|
|
2915
|
+
throw e;
|
|
2916
|
+
} finally {
|
|
2917
|
+
this.apiProcesses--;
|
|
2918
|
+
}
|
|
2919
|
+
},
|
|
2920
|
+
async createNode(e) {
|
|
2921
|
+
this.apiProcesses++;
|
|
2922
|
+
try {
|
|
2923
|
+
await S.post("/api/dedicated_servers", e);
|
|
2924
|
+
} catch (t) {
|
|
2925
|
+
throw t;
|
|
2926
|
+
} finally {
|
|
2927
|
+
this.apiProcesses--;
|
|
2928
|
+
}
|
|
2929
|
+
},
|
|
2930
|
+
async deleteNode(e) {
|
|
2931
|
+
this.apiProcesses++;
|
|
2932
|
+
try {
|
|
2933
|
+
await S.delete("/api/dedicated_servers/" + e);
|
|
2934
|
+
} catch (t) {
|
|
2935
|
+
throw t;
|
|
2936
|
+
} finally {
|
|
2937
|
+
this.apiProcesses--;
|
|
2938
|
+
}
|
|
2939
|
+
},
|
|
2940
|
+
async fetchAutoSetupData() {
|
|
2941
|
+
this.apiProcesses++;
|
|
2942
|
+
try {
|
|
2943
|
+
const e = await S.get("/api/dedicated_servers/setup");
|
|
2944
|
+
this.autoSetupData = e.data;
|
|
2945
|
+
} catch (e) {
|
|
2946
|
+
throw e;
|
|
2947
|
+
} finally {
|
|
2948
|
+
this.apiProcesses--;
|
|
2949
|
+
}
|
|
2950
|
+
}
|
|
2951
|
+
}
|
|
2952
|
+
}), li = q("serverList", () => {
|
|
2953
|
+
const e = k([]), t = k({
|
|
2954
|
+
total: 0,
|
|
2955
|
+
online: 0,
|
|
2956
|
+
offline: 0
|
|
2957
|
+
}), s = k(0), n = w(() => s.value > 0);
|
|
2958
|
+
async function i(f) {
|
|
2959
|
+
s.value++;
|
|
2960
|
+
try {
|
|
2961
|
+
const _ = await S.get("/api/servers");
|
|
2962
|
+
e.value = _.data;
|
|
2963
|
+
} catch (_) {
|
|
2964
|
+
if (_.__CANCEL__)
|
|
2965
|
+
return;
|
|
2966
|
+
throw _;
|
|
2967
|
+
} finally {
|
|
2968
|
+
s.value--;
|
|
2969
|
+
}
|
|
2970
|
+
}
|
|
2971
|
+
async function r(f = null) {
|
|
2972
|
+
s.value++;
|
|
2973
|
+
try {
|
|
2974
|
+
let _ = "/api/servers";
|
|
2975
|
+
f && (_ = "/api/servers?filter[ds_id]=" + f + "&append=full_path");
|
|
2976
|
+
const l = await S.get(_);
|
|
2977
|
+
e.value = l.data;
|
|
2978
|
+
} catch (_) {
|
|
2979
|
+
if (_.__CANCEL__)
|
|
2980
|
+
return;
|
|
2981
|
+
throw _;
|
|
2982
|
+
} finally {
|
|
2983
|
+
s.value--;
|
|
2984
|
+
}
|
|
2985
|
+
}
|
|
2986
|
+
async function d() {
|
|
2987
|
+
s.value++;
|
|
2988
|
+
try {
|
|
2989
|
+
const f = await S.get("/api/servers/summary");
|
|
2990
|
+
t.value = f.data;
|
|
2991
|
+
} catch (f) {
|
|
2992
|
+
if (f.__CANCEL__)
|
|
2993
|
+
return;
|
|
2994
|
+
throw f;
|
|
2995
|
+
} finally {
|
|
2996
|
+
s.value--;
|
|
2997
|
+
}
|
|
2998
|
+
}
|
|
2999
|
+
async function m(f) {
|
|
3000
|
+
s.value++;
|
|
3001
|
+
try {
|
|
3002
|
+
await S.post("/api/servers", f);
|
|
3003
|
+
} catch (_) {
|
|
3004
|
+
if (_.__CANCEL__)
|
|
3005
|
+
return;
|
|
3006
|
+
throw _;
|
|
3007
|
+
} finally {
|
|
3008
|
+
s.value--;
|
|
3009
|
+
}
|
|
3010
|
+
}
|
|
3011
|
+
async function x(f, _) {
|
|
3012
|
+
s.value++;
|
|
3013
|
+
try {
|
|
3014
|
+
await S.post(
|
|
3015
|
+
"/api/servers/" + f,
|
|
3016
|
+
{ delete_files: _ },
|
|
3017
|
+
{ headers: { "X-Http-Method-Override": "DELETE" } }
|
|
3018
|
+
);
|
|
3019
|
+
} catch (l) {
|
|
3020
|
+
if (l.__CANCEL__)
|
|
3021
|
+
return;
|
|
3022
|
+
throw l;
|
|
3023
|
+
} finally {
|
|
3024
|
+
s.value--;
|
|
3025
|
+
}
|
|
3026
|
+
}
|
|
3027
|
+
return {
|
|
3028
|
+
// State
|
|
3029
|
+
servers: e,
|
|
3030
|
+
summary: t,
|
|
3031
|
+
apiProcesses: s,
|
|
3032
|
+
// Getters
|
|
3033
|
+
loading: n,
|
|
3034
|
+
// Actions
|
|
3035
|
+
fetchServersByFilter: i,
|
|
3036
|
+
fetchServersByNode: r,
|
|
3037
|
+
fetchServersSummary: d,
|
|
3038
|
+
create: m,
|
|
3039
|
+
deleteById: x
|
|
3040
|
+
};
|
|
3041
|
+
}), ci = { class: "mt-4" }, ui = { class: "text-lg" }, di = { class: "mt-3 grid grid-cols-2 content-center" }, fi = { class: "text-xs text-lime-600" }, mi = {
|
|
3042
|
+
key: 0,
|
|
3043
|
+
class: "inline"
|
|
3044
|
+
}, pi = { key: 2 }, hi = { class: "text-xs text-red-600" }, gi = {
|
|
3045
|
+
key: 0,
|
|
3046
|
+
class: "inline"
|
|
3047
|
+
}, vi = { key: 2 }, _i = { class: "text-lg" }, bi = { class: "mt-3 grid grid-cols-2 content-center" }, xi = { class: "text-xs text-lime-600" }, yi = {
|
|
3048
|
+
key: 0,
|
|
3049
|
+
class: "inline"
|
|
3050
|
+
}, wi = { key: 2 }, ki = { class: "text-xs text-red-600" }, Ci = {
|
|
3051
|
+
key: 0,
|
|
3052
|
+
class: "inline"
|
|
3053
|
+
}, $i = { key: 2 }, Si = { class: "text-lg" }, Pi = { class: "w-full mt-10 p-3 border border-stone-200 bg-stone-50 rounded-lg sm:p-4 dark:bg-stone-800 dark:border-stone-700" }, Ti = { class: "grid grid-cols-5 gap-4" }, Ai = { class: "col-span-3 text-base inline-block align-middle font-semibold text-stone-900 dark:text-white" }, Ii = { class: "col-span-2" }, Fi = {
|
|
3054
|
+
key: 0,
|
|
3055
|
+
type: "button",
|
|
3056
|
+
class: "text-white bg-[#0077FF] hover:bg-[#0077FF]/90 focus:outline-none rounded text-sm px-2 py-1 text-center inline-flex items-center me-1 mb-1 mr-2",
|
|
3057
|
+
href: "https://vk.com/gameap",
|
|
3058
|
+
target: "_blank"
|
|
3059
|
+
}, Mi = { class: "w-full mt-5 p-3 border border-stone-200 bg-stone-50 rounded-lg sm:p-4 dark:bg-stone-800 dark:border-stone-700" }, Ei = { class: "grid grid-cols-5 gap-4" }, ji = { class: "col-span-3 text-base inline-block align-middle font-semibold text-stone-900 dark:text-white" }, Oi = { class: "w-full mt-5 p-3 border border-stone-200 bg-stone-50 rounded-lg sm:p-4 dark:bg-stone-800 dark:border-stone-700" }, Li = { class: "grid grid-cols-5 gap-4" }, zi = { class: "col-span-3 text-base inline-block align-middle font-semibold text-stone-900 dark:text-white" }, Ni = { class: "col-span-2" }, Ri = ["href"], Gi = {
|
|
3060
|
+
type: "button",
|
|
3061
|
+
class: "text-white bg-sky-500 hover:bg-sky-400 focus:outline-none rounded text-sm px-2 py-1 text-center inline-flex items-center me-1 mb-1 mr-2",
|
|
3062
|
+
href: "https://openapi.gameap.io/",
|
|
3063
|
+
target: "_blank"
|
|
3064
|
+
}, Vi = {
|
|
3065
|
+
__name: "HomeView",
|
|
3066
|
+
setup(e) {
|
|
3067
|
+
const t = W(), s = ii(), n = li(), i = ge(), r = w(() => t.isAdmin), d = w(() => n.loading || s.loading), m = w(() => i.getSlotComponents("home-buttons"));
|
|
3068
|
+
re(() => {
|
|
3069
|
+
x(), r.value && f();
|
|
3070
|
+
});
|
|
3071
|
+
const x = () => {
|
|
3072
|
+
n.fetchServersSummary().catch((_) => {
|
|
3073
|
+
se(_);
|
|
3074
|
+
});
|
|
3075
|
+
}, f = () => {
|
|
3076
|
+
s.fetchNodesSummary().catch((_) => {
|
|
3077
|
+
se(_);
|
|
3078
|
+
});
|
|
3079
|
+
};
|
|
3080
|
+
return (_, l) => (a(), c(F, null, [
|
|
3081
|
+
o("div", ci, [
|
|
3082
|
+
y(ne, {
|
|
3083
|
+
class: "px-8 py-8 bg-stone-50 hover:bg-stone-100 border dark:border-stone-700 dark:bg-stone-800 dark:hover:bg-stone-900 m-2 h-28 min-w-48",
|
|
3084
|
+
route: { name: "servers" }
|
|
3085
|
+
}, {
|
|
3086
|
+
default: M(() => [
|
|
3087
|
+
o("div", ui, [
|
|
3088
|
+
y(u(O), { name: "server" }),
|
|
3089
|
+
L(" " + b(u(p)("servers.servers")), 1)
|
|
3090
|
+
]),
|
|
3091
|
+
o("div", di, [
|
|
3092
|
+
o("div", fi, [
|
|
3093
|
+
d.value ? A("", !0) : (a(), c("div", mi, [
|
|
3094
|
+
y(u(O), { name: "heart-pulse" }),
|
|
3095
|
+
l[0] || (l[0] = L(": ", -1))
|
|
3096
|
+
])),
|
|
3097
|
+
d.value ? (a(), $(u(O), {
|
|
3098
|
+
key: 1,
|
|
3099
|
+
name: "loading",
|
|
3100
|
+
class: "animate-spin"
|
|
3101
|
+
})) : (a(), c("span", pi, b(u(n).summary.online), 1))
|
|
3102
|
+
]),
|
|
3103
|
+
o("div", hi, [
|
|
3104
|
+
d.value ? A("", !0) : (a(), c("div", gi, [
|
|
3105
|
+
y(u(O), { name: "skull" }),
|
|
3106
|
+
l[1] || (l[1] = L(": ", -1))
|
|
3107
|
+
])),
|
|
3108
|
+
d.value ? (a(), $(u(O), {
|
|
3109
|
+
key: 1,
|
|
3110
|
+
name: "loading",
|
|
3111
|
+
class: "animate-spin"
|
|
3112
|
+
})) : (a(), c("span", vi, b(u(n).summary.offline), 1))
|
|
3113
|
+
])
|
|
3114
|
+
])
|
|
3115
|
+
]),
|
|
3116
|
+
_: 1
|
|
3117
|
+
}),
|
|
3118
|
+
r.value ? (a(), $(ne, {
|
|
3119
|
+
key: 0,
|
|
3120
|
+
class: "px-8 py-8 bg-stone-50 hover:bg-stone-100 px-8 py-8 bg-stone-50 hover:bg-stone-100 border dark:border-stone-700 dark:bg-stone-800 dark:hover:bg-stone-900 m-2 h-28 min-w-48",
|
|
3121
|
+
route: { name: "admin.nodes.index" }
|
|
3122
|
+
}, {
|
|
3123
|
+
default: M(() => [
|
|
3124
|
+
o("div", _i, [
|
|
3125
|
+
y(u(O), { name: "hard-drive" }),
|
|
3126
|
+
L(" " + b(u(p)("dedicated_servers.nodes")), 1)
|
|
3127
|
+
]),
|
|
3128
|
+
o("div", bi, [
|
|
3129
|
+
o("div", xi, [
|
|
3130
|
+
d.value ? A("", !0) : (a(), c("div", yi, [
|
|
3131
|
+
y(u(O), { name: "heart-pulse" }),
|
|
3132
|
+
l[2] || (l[2] = L(": ", -1))
|
|
3133
|
+
])),
|
|
3134
|
+
d.value ? (a(), $(u(O), {
|
|
3135
|
+
key: 1,
|
|
3136
|
+
name: "loading",
|
|
3137
|
+
class: "animate-spin"
|
|
3138
|
+
})) : (a(), c("span", wi, b(u(s).summary.online), 1))
|
|
3139
|
+
]),
|
|
3140
|
+
o("div", ki, [
|
|
3141
|
+
d.value ? A("", !0) : (a(), c("div", Ci, [
|
|
3142
|
+
y(u(O), { name: "power-off" }),
|
|
3143
|
+
l[3] || (l[3] = L(": ", -1))
|
|
3144
|
+
])),
|
|
3145
|
+
d.value ? (a(), $(u(O), {
|
|
3146
|
+
key: 1,
|
|
3147
|
+
name: "loading",
|
|
3148
|
+
class: "animate-spin"
|
|
3149
|
+
})) : (a(), c("span", $i, b(u(s).summary.offline), 1))
|
|
3150
|
+
])
|
|
3151
|
+
])
|
|
3152
|
+
]),
|
|
3153
|
+
_: 1
|
|
3154
|
+
})) : A("", !0),
|
|
3155
|
+
(a(!0), c(F, null, N(m.value, (v) => (a(), c(F, {
|
|
3156
|
+
key: v.pluginId + "-" + v.name
|
|
3157
|
+
}, [
|
|
3158
|
+
v.component ? (a(), $(pe(v.component), xt({
|
|
3159
|
+
key: 0,
|
|
3160
|
+
ref_for: !0
|
|
3161
|
+
}, v.props, {
|
|
3162
|
+
"plugin-id": v.pluginId
|
|
3163
|
+
}), null, 16, ["plugin-id"])) : (a(), $(ne, {
|
|
3164
|
+
key: 1,
|
|
3165
|
+
class: "px-8 py-8 bg-stone-50 hover:bg-stone-100 border dark:border-stone-700 dark:bg-stone-800 dark:hover:bg-stone-900 m-2 h-28 min-w-48",
|
|
3166
|
+
route: v.props.route
|
|
3167
|
+
}, {
|
|
3168
|
+
default: M(() => [
|
|
3169
|
+
o("div", Si, [
|
|
3170
|
+
o("i", {
|
|
3171
|
+
class: V(v.icon)
|
|
3172
|
+
}, null, 2),
|
|
3173
|
+
L(" " + b(u(i).resolvePluginText(v.pluginId, v.label)), 1)
|
|
3174
|
+
])
|
|
3175
|
+
]),
|
|
3176
|
+
_: 2
|
|
3177
|
+
}, 1032, ["route"]))
|
|
3178
|
+
], 64))), 128))
|
|
3179
|
+
]),
|
|
3180
|
+
o("div", Pi, [
|
|
3181
|
+
o("div", Ti, [
|
|
3182
|
+
o("h5", Ai, [
|
|
3183
|
+
y(u(O), {
|
|
3184
|
+
name: "comments",
|
|
3185
|
+
class: "mr-1"
|
|
3186
|
+
}),
|
|
3187
|
+
L(" " + b(u(p)("home.channels")), 1)
|
|
3188
|
+
]),
|
|
3189
|
+
o("div", Ii, [
|
|
3190
|
+
l[5] || (l[5] = o("a", {
|
|
3191
|
+
type: "button",
|
|
3192
|
+
class: "text-white bg-[#24A1DE] hover:bg-[#24A1DE]/90 focus:outline-none rounded text-sm px-2 py-1 text-center inline-flex items-center me-1 mb-1 mr-2",
|
|
3193
|
+
href: "https://t.me/gameap",
|
|
3194
|
+
target: "_blank"
|
|
3195
|
+
}, [
|
|
3196
|
+
o("i", { class: "fa-brands fa-telegram mr-1" }),
|
|
3197
|
+
L(" Telegram ")
|
|
3198
|
+
], -1)),
|
|
3199
|
+
l[6] || (l[6] = o("a", {
|
|
3200
|
+
type: "button",
|
|
3201
|
+
class: "text-white bg-[#7289da] hover:bg-[#7289da]/90 focus:outline-none rounded text-sm px-2 py-1 text-center inline-flex items-center me-1 mb-1 mr-2",
|
|
3202
|
+
href: "https://discord.gg/SqtHpZc",
|
|
3203
|
+
target: "_blank"
|
|
3204
|
+
}, [
|
|
3205
|
+
o("i", { class: "fa-brands fa-discord mr-1" }),
|
|
3206
|
+
L(" Discord ")
|
|
3207
|
+
], -1)),
|
|
3208
|
+
u(me)() === "ru" ? (a(), c("a", Fi, [...l[4] || (l[4] = [
|
|
3209
|
+
o("i", { class: "fa-brands fa-vk mr-1" }, null, -1),
|
|
3210
|
+
L(" VKontakte ", -1)
|
|
3211
|
+
])])) : A("", !0),
|
|
3212
|
+
l[7] || (l[7] = o("a", {
|
|
3213
|
+
type: "button",
|
|
3214
|
+
class: "text-white bg-[#FF5700] hover:bg-[#FF5700]/90 focus:outline-none rounded text-sm px-2 py-1 text-center inline-flex items-center me-1 mb-1 mr-2",
|
|
3215
|
+
href: "https://www.reddit.com/r/gameap/",
|
|
3216
|
+
target: "_blank"
|
|
3217
|
+
}, [
|
|
3218
|
+
o("i", { class: "fa-brands fa-reddit mr-1" }),
|
|
3219
|
+
L(" Reddit ")
|
|
3220
|
+
], -1))
|
|
3221
|
+
])
|
|
3222
|
+
])
|
|
3223
|
+
]),
|
|
3224
|
+
o("div", Mi, [
|
|
3225
|
+
o("div", Ei, [
|
|
3226
|
+
o("h5", ji, [
|
|
3227
|
+
y(u(O), {
|
|
3228
|
+
name: "heart",
|
|
3229
|
+
class: "mr-1"
|
|
3230
|
+
}),
|
|
3231
|
+
L(" " + b(u(p)("home.support_gameap")), 1)
|
|
3232
|
+
]),
|
|
3233
|
+
l[8] || (l[8] = Ke(`<div class="col-span-2"><div class="flex"><div><a type="button" class="text-white bg-[#F96854] hover:bg-[#F96854]/90 focus:outline-none rounded text-sm px-2 py-1 text-center inline-flex items-center me-1 mb-1 mr-2" href="https://www.patreon.com/gameap" target="_blank"><i class="fa-brands fa-patreon mr-1"></i> Patreon </a></div><div><a type="button" class="text-white bg-[#F15F2C] hover:bg-[#F15F2C]/90 focus:outline-none rounded text-sm px-2 py-1 text-center inline-flex items-center me-1 mb-1 mr-2" href="https://boosty.to/gameap" target="_blank"><svg class="w-5 h-5" viewBox="0 0 235.6 292.2"><path class="st0" fill="#FFFFFF" d="M44.3,164.5L76.9,51.6H127l-10.1,35c-0.1,0.2-0.2,0.4-0.3,0.6L90,179.6h24.8c-10.4,25.9-18.5,46.2-24.3,60.9
|
|
3234
|
+
c-45.8-0.5-58.6-33.3-47.4-72.1 M90.7,240.6l60.4-86.9h-25.6l22.3-55.7c38.2,4,56.2,34.1,45.6,70.5
|
|
3235
|
+
c-11.3,39.1-57.1,72.1-101.7,72.1C91.3,240.6,91,240.6,90.7,240.6z"></path></svg> Boosty </a></div></div></div>`, 1))
|
|
3236
|
+
])
|
|
3237
|
+
]),
|
|
3238
|
+
o("div", Oi, [
|
|
3239
|
+
o("div", Li, [
|
|
3240
|
+
o("h5", zi, [
|
|
3241
|
+
y(u(O), {
|
|
3242
|
+
name: "question",
|
|
3243
|
+
class: "mr-1"
|
|
3244
|
+
}),
|
|
3245
|
+
L(" " + b(u(p)("home.need_help")), 1)
|
|
3246
|
+
]),
|
|
3247
|
+
o("div", Ni, [
|
|
3248
|
+
o("a", {
|
|
3249
|
+
type: "button",
|
|
3250
|
+
class: "text-white bg-sky-500 hover:bg-sky-400 focus:outline-none rounded text-sm px-2 py-1 text-center inline-flex items-center me-1 mb-1 mr-2",
|
|
3251
|
+
href: u(me)() === "ru" ? "https://docs.gameap.com/ru/" : "https://docs.gameap.com/en/",
|
|
3252
|
+
target: "_blank"
|
|
3253
|
+
}, [
|
|
3254
|
+
y(u(O), {
|
|
3255
|
+
name: "book",
|
|
3256
|
+
class: "mr-1"
|
|
3257
|
+
}),
|
|
3258
|
+
L(" " + b(u(p)("home.documentation")), 1)
|
|
3259
|
+
], 8, Ri),
|
|
3260
|
+
o("a", Gi, [
|
|
3261
|
+
y(u(O), {
|
|
3262
|
+
name: "book",
|
|
3263
|
+
class: "mr-1"
|
|
3264
|
+
}),
|
|
3265
|
+
L(" " + b(u(p)("home.api_documentation")), 1)
|
|
3266
|
+
]),
|
|
3267
|
+
l[9] || (l[9] = o("a", {
|
|
3268
|
+
type: "button",
|
|
3269
|
+
class: "text-white bg-[#7289da] hover:bg-[#7289da]/90 focus:outline-none rounded text-sm px-2 py-1 text-center inline-flex items-center me-1 mb-1 mr-2",
|
|
3270
|
+
href: "https://discord.gg/SqtHpZc",
|
|
3271
|
+
target: "_blank"
|
|
3272
|
+
}, [
|
|
3273
|
+
o("i", { class: "fa-brands fa-discord mr-1" }),
|
|
3274
|
+
L(" Discord ")
|
|
3275
|
+
], -1))
|
|
3276
|
+
])
|
|
3277
|
+
])
|
|
3278
|
+
]),
|
|
3279
|
+
u(i).isInitialized ? (a(), $(ai, {
|
|
3280
|
+
key: 0,
|
|
3281
|
+
name: "dashboard-widgets",
|
|
3282
|
+
context: { isAdmin: r.value }
|
|
3283
|
+
}, null, 8, ["context"])) : A("", !0)
|
|
3284
|
+
], 64));
|
|
3285
|
+
}
|
|
3286
|
+
}, Bi = { class: "dark:bg-stone-800" }, Di = { class: "flex flex-col items-center justify-center px-6 py-8 mx-auto my-10 lg:py-0" }, Ui = { class: "w-full bg-white rounded shadow dark:border md:mt-0 sm:max-w-md xl:p-0 dark:bg-stone-800 dark:border-stone-700" }, qi = { class: "w-full bg-stone-700 p-8 rounded-t" }, Hi = { class: "text-xl font-bold leading-tight tracking-tight text-white md:text-2xl dark:text-white" }, Ki = { class: "p-6 space-y-4 md:space-y-6 sm:p-8" }, Xi = {
|
|
3287
|
+
class: "space-y-4 md:space-y-6",
|
|
3288
|
+
action: "#"
|
|
3289
|
+
}, Wi = {
|
|
3290
|
+
for: "email",
|
|
3291
|
+
class: "block mb-2 text-sm font-medium text-stone-900 dark:text-white"
|
|
3292
|
+
}, Zi = {
|
|
3293
|
+
for: "password",
|
|
3294
|
+
class: "block mb-2 text-sm font-medium text-stone-900 dark:text-white"
|
|
3295
|
+
}, Ji = { class: "flex items-center justify-between" }, Yi = { class: "flex items-start" }, Qi = { class: "flex items-center h-5" }, el = { class: "ml-3 text-sm" }, tl = {
|
|
3296
|
+
for: "remember",
|
|
3297
|
+
class: "text-stone-500 dark:text-stone-300"
|
|
3298
|
+
}, sl = { class: "w-full bg-stone-700 p-8 rounded-b" }, nl = {
|
|
3299
|
+
__name: "LoginView",
|
|
3300
|
+
setup(e) {
|
|
3301
|
+
const t = W(), s = k(null), n = k(null), i = k(!1), r = () => {
|
|
3302
|
+
t.login({
|
|
3303
|
+
login: s.value,
|
|
3304
|
+
password: n.value,
|
|
3305
|
+
remember: i.value ? "on" : null
|
|
3306
|
+
}).then(() => {
|
|
3307
|
+
location.reload();
|
|
3308
|
+
}).catch((d) => {
|
|
3309
|
+
d.response && "data" in d.response && "message" in d.response.data ? se(d.response.data.message) : se(d);
|
|
3310
|
+
});
|
|
3311
|
+
};
|
|
3312
|
+
return (d, m) => (a(), c("section", Bi, [
|
|
3313
|
+
o("div", Di, [
|
|
3314
|
+
o("div", Ui, [
|
|
3315
|
+
o("div", qi, [
|
|
3316
|
+
o("h1", Hi, b(u(p)("auth.sign_in")), 1)
|
|
3317
|
+
]),
|
|
3318
|
+
o("div", Ki, [
|
|
3319
|
+
o("form", Xi, [
|
|
3320
|
+
o("div", null, [
|
|
3321
|
+
o("label", Wi, b(u(p)("auth.username_email")), 1),
|
|
3322
|
+
be(o("input", {
|
|
3323
|
+
type: "email",
|
|
3324
|
+
name: "email",
|
|
3325
|
+
id: "email",
|
|
3326
|
+
"onUpdate:modelValue": m[0] || (m[0] = (x) => s.value = x),
|
|
3327
|
+
class: "bg-stone-50 border border-stone-300 text-stone-900 sm:text-sm rounded focus:ring-primary-600 focus:border-primary-600 block w-full p-2.5 dark:bg-stone-700 dark:border-stone-600 dark:placeholder-stone-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500",
|
|
3328
|
+
required: ""
|
|
3329
|
+
}, null, 512), [
|
|
3330
|
+
[ot, s.value]
|
|
3331
|
+
])
|
|
3332
|
+
]),
|
|
3333
|
+
o("div", null, [
|
|
3334
|
+
o("label", Zi, b(u(p)("auth.password")), 1),
|
|
3335
|
+
be(o("input", {
|
|
3336
|
+
type: "password",
|
|
3337
|
+
name: "password",
|
|
3338
|
+
id: "password",
|
|
3339
|
+
"onUpdate:modelValue": m[1] || (m[1] = (x) => n.value = x),
|
|
3340
|
+
class: "bg-stone-50 border border-stone-300 text-stone-900 sm:text-sm rounded focus:ring-primary-600 focus:border-primary-600 block w-full p-2.5 dark:bg-stone-700 dark:border-stone-600 dark:placeholder-stone-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500",
|
|
3341
|
+
required: ""
|
|
3342
|
+
}, null, 512), [
|
|
3343
|
+
[ot, n.value]
|
|
3344
|
+
])
|
|
3345
|
+
]),
|
|
3346
|
+
o("div", Ji, [
|
|
3347
|
+
o("div", Yi, [
|
|
3348
|
+
o("div", Qi, [
|
|
3349
|
+
be(o("input", {
|
|
3350
|
+
"onUpdate:modelValue": m[2] || (m[2] = (x) => i.value = x),
|
|
3351
|
+
id: "remember",
|
|
3352
|
+
"aria-describedby": "remember",
|
|
3353
|
+
type: "checkbox",
|
|
3354
|
+
class: "w-4 h-4 border border-stone-300 rounded bg-stone-50 focus:ring-3 focus:ring-primary-300 dark:bg-stone-700 dark:border-stone-600 dark:focus:ring-primary-600 dark:ring-offset-stone-800",
|
|
3355
|
+
required: ""
|
|
3356
|
+
}, null, 512), [
|
|
3357
|
+
[Jt, i.value]
|
|
3358
|
+
])
|
|
3359
|
+
]),
|
|
3360
|
+
o("div", el, [
|
|
3361
|
+
o("label", tl, b(u(p)("auth.remember")), 1)
|
|
3362
|
+
])
|
|
3363
|
+
])
|
|
3364
|
+
])
|
|
3365
|
+
])
|
|
3366
|
+
]),
|
|
3367
|
+
o("div", sl, [
|
|
3368
|
+
o("button", {
|
|
3369
|
+
onClick: r,
|
|
3370
|
+
type: "button",
|
|
3371
|
+
class: "text-stone-900 bg-white border focus:outline-none hover:bg-stone-100 focus:ring-4 focus:ring-stone-100 font-medium rounded text-sm px-5 py-2.5 me-2 mb-2 dark:bg-stone-800 dark:text-white dark:border-stone-600 dark:hover:bg-stone-700 dark:hover:border-stone-600 dark:focus:ring-stone-700"
|
|
3372
|
+
}, [
|
|
3373
|
+
y(u(O), {
|
|
3374
|
+
name: "sign-in",
|
|
3375
|
+
class: "mr-1"
|
|
3376
|
+
}),
|
|
3377
|
+
o("span", null, b(u(p)("auth.sign_in")), 1)
|
|
3378
|
+
])
|
|
3379
|
+
])
|
|
3380
|
+
])
|
|
3381
|
+
])
|
|
3382
|
+
]));
|
|
3383
|
+
}
|
|
3384
|
+
}, ol = { class: "py-8 px-4 mx-auto max-w-screen-xl lg:py-16 lg:px-6" }, rl = { class: "mx-auto max-w-screen-sm text-center" }, al = { class: "mb-4 text-3xl tracking-tight font-bold text-stone-900 md:text-4xl dark:text-white" }, il = {
|
|
3385
|
+
__name: "Error404View",
|
|
3386
|
+
setup(e) {
|
|
3387
|
+
const t = w(() => [
|
|
3388
|
+
{ route: "/", text: "GameAP", icon: "gicon gicon-gameap" },
|
|
3389
|
+
{ text: 404 }
|
|
3390
|
+
]);
|
|
3391
|
+
return (s, n) => (a(), c(F, null, [
|
|
3392
|
+
y(u(Je), { items: t.value }, null, 8, ["items"]),
|
|
3393
|
+
o("section", null, [
|
|
3394
|
+
o("div", ol, [
|
|
3395
|
+
o("div", rl, [
|
|
3396
|
+
n[0] || (n[0] = o("h1", { class: "mb-4 text-7xl tracking-tight font-extrabold lg:text-9xl text-stone-600 dark:text-stone-500" }, "404", -1)),
|
|
3397
|
+
o("p", al, b(u(p)("main.something_missing")), 1),
|
|
3398
|
+
y(ne, {
|
|
3399
|
+
size: "large",
|
|
3400
|
+
color: "black",
|
|
3401
|
+
route: { name: "home" }
|
|
3402
|
+
}, {
|
|
3403
|
+
default: M(() => [
|
|
3404
|
+
L(b(u(p)("navbar.main")), 1)
|
|
3405
|
+
]),
|
|
3406
|
+
_: 1
|
|
3407
|
+
})
|
|
3408
|
+
])
|
|
3409
|
+
])
|
|
3410
|
+
])
|
|
3411
|
+
], 64));
|
|
3412
|
+
}
|
|
3413
|
+
}, ll = { class: "py-8 px-4 mx-auto max-w-screen-xl lg:py-16 lg:px-6" }, cl = { class: "mx-auto max-w-screen-sm text-center" }, ul = { class: "mb-4 text-3xl tracking-tight font-bold text-stone-900 md:text-4xl dark:text-white" }, dl = {
|
|
3414
|
+
__name: "Error403View",
|
|
3415
|
+
setup(e) {
|
|
3416
|
+
const t = computed(() => [
|
|
3417
|
+
{ route: "/", text: "GameAP", icon: "gicon gicon-gameap" },
|
|
3418
|
+
{ text: 404 }
|
|
3419
|
+
]);
|
|
3420
|
+
return (s, n) => (a(), c(F, null, [
|
|
3421
|
+
y(u(Je), { items: u(t) }, null, 8, ["items"]),
|
|
3422
|
+
o("section", null, [
|
|
3423
|
+
o("div", ll, [
|
|
3424
|
+
o("div", cl, [
|
|
3425
|
+
n[0] || (n[0] = o("h1", { class: "mb-4 text-7xl tracking-tight font-extrabold lg:text-9xl text-stone-600 dark:text-stone-500" }, "403", -1)),
|
|
3426
|
+
o("p", ul, b(u(p)("main.something_went_wrong")), 1),
|
|
3427
|
+
y(ne, {
|
|
3428
|
+
size: "large",
|
|
3429
|
+
color: "black",
|
|
3430
|
+
route: { name: "home" }
|
|
3431
|
+
}, {
|
|
3432
|
+
default: M(() => [
|
|
3433
|
+
L(b(u(p)("navbar.main")), 1)
|
|
3434
|
+
]),
|
|
3435
|
+
_: 1
|
|
3436
|
+
})
|
|
3437
|
+
])
|
|
3438
|
+
])
|
|
3439
|
+
])
|
|
3440
|
+
], 64));
|
|
3441
|
+
}
|
|
3442
|
+
}, fl = { class: "py-8 px-4 mx-auto max-w-screen-xl lg:py-16 lg:px-6" }, ml = { class: "mx-auto max-w-screen-sm text-center" }, pl = { class: "mb-4 text-4xl tracking-tight font-extrabold lg:text-5xl text-stone-600 dark:text-stone-500" }, hl = { class: "mb-4 text-3xl tracking-tight font-bold text-stone-900 md:text-4xl dark:text-white" }, gl = {
|
|
3443
|
+
__name: "Error500View",
|
|
3444
|
+
setup(e) {
|
|
3445
|
+
return (t, s) => (a(), c("section", null, [
|
|
3446
|
+
o("div", fl, [
|
|
3447
|
+
o("div", ml, [
|
|
3448
|
+
o("h2", pl, [
|
|
3449
|
+
y(u(O), { name: "skull" })
|
|
3450
|
+
]),
|
|
3451
|
+
s[0] || (s[0] = o("h1", { class: "mb-4 text-7xl tracking-tight font-extrabold lg:text-9xl text-stone-600 dark:text-stone-500" }, "500", -1)),
|
|
3452
|
+
o("p", hl, b(u(p)("main.something_went_wrong")), 1)
|
|
3453
|
+
])
|
|
3454
|
+
])
|
|
3455
|
+
]));
|
|
3456
|
+
}
|
|
3457
|
+
}, vl = () => import("./ServersView-S_G_kuGj.js"), _l = () => import("./ProfileView-Dw2T3X8m.js"), bl = () => import("./TokensView-C1RFJSB5.js"), xl = () => import("./EmptyView-Bf6zmQQt.js"), yl = () => import("./ServerIdView-_vGQRk7y.js").then((e) => e.S), wl = () => import("./AdminClientCertificatesView-Bg8X_Ouc.js"), kl = () => import("./AdminDaemonTaskListView-DbJp0aqQ.js"), Cl = () => import("./AdminDaemonTaskOutputView-DNCHQfxx.js"), $l = () => import("./AdminGamesEdit-jco7cBfk.js"), Sl = () => import("./AdminGamesList-CMjsgEpx.js"), Pl = () => import("./AdminModEdit-BlRu_09M.js"), Tl = () => import("./AdminNodeShowView-BHxJkjYJ.js"), Al = () => import("./AdminNodesCreateView-DihmM46W.js"), Il = () => import("./AdminNodesEditView-CVACSido.js"), Fl = () => import("./AdminNodesView-CHtiU6dZ.js"), Ml = () => import("./AdminPluginsView-CRjF3BPs.js"), El = () => import("./AdminServersCreate-5f8x6eZO.js"), jl = () => import("./AdminServersEdit-CA7711nJ.js"), Ol = () => import("./AdminServersList-De5ZMEGZ.js"), Ll = () => import("./AdminUsersEditView-DeYo98vi.js"), zl = () => import("./AdminUsersView-C8fKEhpr.js"), Nl = [
|
|
3458
|
+
{
|
|
3459
|
+
path: "/403",
|
|
3460
|
+
name: "error403",
|
|
3461
|
+
component: dl
|
|
3462
|
+
},
|
|
3463
|
+
{
|
|
3464
|
+
path: "/404",
|
|
3465
|
+
name: "error404",
|
|
3466
|
+
component: il
|
|
3467
|
+
},
|
|
3468
|
+
{
|
|
3469
|
+
path: "/500",
|
|
3470
|
+
name: "error500",
|
|
3471
|
+
component: gl
|
|
3472
|
+
},
|
|
3473
|
+
{
|
|
3474
|
+
path: "/login",
|
|
3475
|
+
name: "login",
|
|
3476
|
+
component: nl
|
|
3477
|
+
},
|
|
3478
|
+
{
|
|
3479
|
+
path: "/",
|
|
3480
|
+
name: "home",
|
|
3481
|
+
component: Vi,
|
|
3482
|
+
alias: "/home"
|
|
3483
|
+
},
|
|
3484
|
+
{
|
|
3485
|
+
path: "/servers",
|
|
3486
|
+
name: "servers",
|
|
3487
|
+
component: vl
|
|
3488
|
+
},
|
|
3489
|
+
{
|
|
3490
|
+
path: "/servers/:id",
|
|
3491
|
+
name: "servers.control",
|
|
3492
|
+
component: yl
|
|
3493
|
+
},
|
|
3494
|
+
{
|
|
3495
|
+
path: "/admin/nodes",
|
|
3496
|
+
name: "admin.nodes.index",
|
|
3497
|
+
component: Fl,
|
|
3498
|
+
alias: "/admin/dedicated_servers",
|
|
3499
|
+
meta: {
|
|
3500
|
+
title: p("dedicated_servers.title_list")
|
|
3501
|
+
}
|
|
3502
|
+
},
|
|
3503
|
+
{
|
|
3504
|
+
path: "/admin/nodes/create",
|
|
3505
|
+
name: "admin.nodes.create",
|
|
3506
|
+
component: Al,
|
|
3507
|
+
alias: "/admin/dedicated_servers/create",
|
|
3508
|
+
meta: {
|
|
3509
|
+
title: p("dedicated_servers.title_create")
|
|
3510
|
+
}
|
|
3511
|
+
},
|
|
3512
|
+
{
|
|
3513
|
+
path: "/admin/nodes/:id",
|
|
3514
|
+
name: "admin.nodes.view",
|
|
3515
|
+
component: Tl,
|
|
3516
|
+
alias: "/admin/dedicated_servers/:id",
|
|
3517
|
+
meta: {
|
|
3518
|
+
title: p("dedicated_servers.title_view")
|
|
3519
|
+
}
|
|
3520
|
+
},
|
|
3521
|
+
{
|
|
3522
|
+
path: "/admin/nodes/:id/edit",
|
|
3523
|
+
name: "admin.nodes.edit",
|
|
3524
|
+
component: Il,
|
|
3525
|
+
alias: "/admin/dedicated_servers/:id/edit",
|
|
3526
|
+
meta: {
|
|
3527
|
+
title: p("dedicated_servers.title_edit")
|
|
3528
|
+
}
|
|
3529
|
+
},
|
|
3530
|
+
{
|
|
3531
|
+
path: "/admin/client_certificates",
|
|
3532
|
+
name: "admin.client_certificates.index",
|
|
3533
|
+
component: wl,
|
|
3534
|
+
meta: {
|
|
3535
|
+
title: p("client_certificates.title_list")
|
|
3536
|
+
}
|
|
3537
|
+
},
|
|
3538
|
+
{
|
|
3539
|
+
path: "/admin/servers",
|
|
3540
|
+
name: "admin.servers.index",
|
|
3541
|
+
component: Ol,
|
|
3542
|
+
meta: {
|
|
3543
|
+
title: p("servers.title_servers_list")
|
|
3544
|
+
}
|
|
3545
|
+
},
|
|
3546
|
+
{
|
|
3547
|
+
path: "/admin/servers/create",
|
|
3548
|
+
name: "admin.servers.create",
|
|
3549
|
+
component: El,
|
|
3550
|
+
meta: {
|
|
3551
|
+
title: p("servers.title_create")
|
|
3552
|
+
}
|
|
3553
|
+
},
|
|
3554
|
+
{
|
|
3555
|
+
path: "/admin/servers/:id/edit",
|
|
3556
|
+
name: "admin.servers.edit",
|
|
3557
|
+
component: jl,
|
|
3558
|
+
meta: {
|
|
3559
|
+
title: p("servers.title_edit")
|
|
3560
|
+
}
|
|
3561
|
+
},
|
|
3562
|
+
{
|
|
3563
|
+
path: "/admin/games",
|
|
3564
|
+
name: "admin.games.index",
|
|
3565
|
+
component: Sl,
|
|
3566
|
+
meta: {
|
|
3567
|
+
title: p("games.title_games_list")
|
|
3568
|
+
}
|
|
3569
|
+
},
|
|
3570
|
+
{
|
|
3571
|
+
path: "/admin/games/:code",
|
|
3572
|
+
name: "admin.games.edit",
|
|
3573
|
+
component: $l,
|
|
3574
|
+
meta: {
|
|
3575
|
+
title: p("games.title_edit")
|
|
3576
|
+
}
|
|
3577
|
+
},
|
|
3578
|
+
{
|
|
3579
|
+
path: "/admin/games/:code/mods/:id/edit",
|
|
3580
|
+
name: "admin.games.mods.edit",
|
|
3581
|
+
component: Pl,
|
|
3582
|
+
meta: {
|
|
3583
|
+
title: p("games.title_edit_mod")
|
|
3584
|
+
}
|
|
3585
|
+
},
|
|
3586
|
+
{
|
|
3587
|
+
path: "/admin/users",
|
|
3588
|
+
name: "admin.users.index",
|
|
3589
|
+
component: zl,
|
|
3590
|
+
meta: {
|
|
3591
|
+
title: p("users.title_list")
|
|
3592
|
+
}
|
|
3593
|
+
},
|
|
3594
|
+
{
|
|
3595
|
+
path: "/admin/users/:id/edit",
|
|
3596
|
+
name: "admin.users.edit",
|
|
3597
|
+
component: Ll,
|
|
3598
|
+
meta: {
|
|
3599
|
+
title: p("users.title_edit")
|
|
3600
|
+
}
|
|
3601
|
+
},
|
|
3602
|
+
{
|
|
3603
|
+
path: "/admin/gdaemon_tasks",
|
|
3604
|
+
name: "admin.gdaemon_tasks.index",
|
|
3605
|
+
component: kl,
|
|
3606
|
+
meta: {
|
|
3607
|
+
title: p("gdaemon_tasks.title_list")
|
|
3608
|
+
}
|
|
3609
|
+
},
|
|
3610
|
+
{
|
|
3611
|
+
path: "/admin/gdaemon_tasks/:id",
|
|
3612
|
+
name: "admin.gdaemon_tasks.output",
|
|
3613
|
+
component: Cl,
|
|
3614
|
+
meta: {
|
|
3615
|
+
title: p("gdaemon_tasks.title_view")
|
|
3616
|
+
}
|
|
3617
|
+
},
|
|
3618
|
+
{
|
|
3619
|
+
path: "/admin/plugins",
|
|
3620
|
+
name: "admin.plugins.index",
|
|
3621
|
+
component: Ml,
|
|
3622
|
+
meta: {
|
|
3623
|
+
title: p("plugins.title_list")
|
|
3624
|
+
}
|
|
3625
|
+
},
|
|
3626
|
+
{
|
|
3627
|
+
path: "/profile",
|
|
3628
|
+
name: "profile",
|
|
3629
|
+
component: _l,
|
|
3630
|
+
meta: {
|
|
3631
|
+
title: p("profile.title")
|
|
3632
|
+
}
|
|
3633
|
+
},
|
|
3634
|
+
{
|
|
3635
|
+
path: "/tokens",
|
|
3636
|
+
name: "tokens",
|
|
3637
|
+
component: bl,
|
|
3638
|
+
meta: {
|
|
3639
|
+
title: p("tokens.tokens")
|
|
3640
|
+
}
|
|
3641
|
+
},
|
|
3642
|
+
{
|
|
3643
|
+
path: "/report_bug",
|
|
3644
|
+
name: "report_bug",
|
|
3645
|
+
component: xl,
|
|
3646
|
+
meta: {
|
|
3647
|
+
title: p("home.send_report")
|
|
3648
|
+
}
|
|
3649
|
+
},
|
|
3650
|
+
{
|
|
3651
|
+
path: "/plugins/:pluginId/:pathMatch(.*)*",
|
|
3652
|
+
name: "plugin.pending",
|
|
3653
|
+
component: () => import("./PluginPendingView-DaDaN30Q.js"),
|
|
3654
|
+
meta: {
|
|
3655
|
+
requiresAuth: !0,
|
|
3656
|
+
isPluginRoute: !0
|
|
3657
|
+
}
|
|
3658
|
+
},
|
|
3659
|
+
{
|
|
3660
|
+
path: "/:pathMatch(.*)*",
|
|
3661
|
+
redirect: "/404"
|
|
3662
|
+
}
|
|
3663
|
+
], Rl = (e, t) => {
|
|
3664
|
+
const s = W();
|
|
3665
|
+
e.path !== t.path && (Be.setCurrentRoute(e.path), Be.createController(e.path));
|
|
3666
|
+
const n = ["error403", "error404", "error500"];
|
|
3667
|
+
if (e.name !== "login" && !n.includes(e.name) && !s.isAuthenticated)
|
|
3668
|
+
return { name: "login" };
|
|
3669
|
+
if (e.name === "login" && s.isAuthenticated)
|
|
3670
|
+
return { name: "home" };
|
|
3671
|
+
e.meta.title && (document.title = e.meta.title);
|
|
3672
|
+
}, Gl = D(
|
|
3673
|
+
() => import("./InputTextList-lPhVIV04.js")
|
|
3674
|
+
), Vl = D(
|
|
3675
|
+
() => import("./InputManyList-DUOtepb8.js")
|
|
3676
|
+
), Bl = D(
|
|
3677
|
+
() => import("./ServerStatus-CcqB0h1r.js")
|
|
3678
|
+
), Dl = D(
|
|
3679
|
+
() => import("./ServerConsole-B9v2PcWb.js")
|
|
3680
|
+
), Ul = D(
|
|
3681
|
+
() => import("./ServerTasks-BcaZzvz7.js")
|
|
3682
|
+
), ql = D(
|
|
3683
|
+
() => import(
|
|
3684
|
+
"./UserServerPrivileges-Q2wQMyHi.js"
|
|
3685
|
+
/* webpackChunkName: "components/user-server-privileges" */
|
|
3686
|
+
)
|
|
3687
|
+
), Hl = D(
|
|
3688
|
+
() => import(
|
|
3689
|
+
"./GameModSelector-CQBT8ZLu.js"
|
|
3690
|
+
/* webpackChunkName: "components/game-mod-selector" */
|
|
3691
|
+
)
|
|
3692
|
+
), Kl = D(
|
|
3693
|
+
() => import(
|
|
3694
|
+
"./DsIpSelector-C676Y19X.js"
|
|
3695
|
+
/* webpackChunkName: "components/game-mod-selector" */
|
|
3696
|
+
)
|
|
3697
|
+
), Xl = D(
|
|
3698
|
+
() => import(
|
|
3699
|
+
"./SmartPortSelector-BRSQFVqT.js"
|
|
3700
|
+
/* webpackChunkName: "components/smart-port-selector" */
|
|
3701
|
+
)
|
|
3702
|
+
), Wl = D(
|
|
3703
|
+
() => import(
|
|
3704
|
+
"./ServerSelector-6fCqL3e9.js"
|
|
3705
|
+
/* webpackChunkName: "components/server" */
|
|
3706
|
+
)
|
|
3707
|
+
), Zl = D(
|
|
3708
|
+
() => import(
|
|
3709
|
+
"./SettingsParameters-u3Awy4Vf.js"
|
|
3710
|
+
/* webpackChunkName: "components/settings" */
|
|
3711
|
+
)
|
|
3712
|
+
), Jl = D(
|
|
3713
|
+
() => import(
|
|
3714
|
+
"./CreateNodeModal-DOXVtVLQ.js"
|
|
3715
|
+
/* webpackChunkName: "components/blocks" */
|
|
3716
|
+
)
|
|
3717
|
+
), T = Yt(qa);
|
|
3718
|
+
T.config.globalProperties.pluralize = Lo;
|
|
3719
|
+
T.config.globalProperties.trans = p;
|
|
3720
|
+
T.config.globalProperties.changeLanguage = zo;
|
|
3721
|
+
T.config.globalProperties.getCurrentLanguage = No;
|
|
3722
|
+
const Yl = Qt();
|
|
3723
|
+
T.use(Yl);
|
|
3724
|
+
const et = es({
|
|
3725
|
+
history: ts(),
|
|
3726
|
+
routes: Nl
|
|
3727
|
+
});
|
|
3728
|
+
et.beforeEach(Rl);
|
|
3729
|
+
T.use(et);
|
|
3730
|
+
const gt = W();
|
|
3731
|
+
T.component("GBreadcrumbs", Je);
|
|
3732
|
+
T.component("GDeletableList", cr);
|
|
3733
|
+
T.component("GStatusBadge", ur);
|
|
3734
|
+
T.component("GIcon", O);
|
|
3735
|
+
T.component("Loading", mr);
|
|
3736
|
+
T.component("Progressbar", gr);
|
|
3737
|
+
T.component("GButton", ne);
|
|
3738
|
+
T.component("GuestNavbar", Rt);
|
|
3739
|
+
T.component("MainNavbar", Nt);
|
|
3740
|
+
T.component("MainSidebar", Bt);
|
|
3741
|
+
T.component("ContentView", qe);
|
|
3742
|
+
T.component("KeyValueTable", Qa);
|
|
3743
|
+
T.component("DsIpSelector", Kl);
|
|
3744
|
+
T.component("GameModSelector", Hl);
|
|
3745
|
+
T.component("GameapSelect", ti);
|
|
3746
|
+
T.component("InputManyList", Vl);
|
|
3747
|
+
T.component("InputTextList", Gl);
|
|
3748
|
+
T.component("ServerConsole", Dl);
|
|
3749
|
+
T.component("ServerSelector", Wl);
|
|
3750
|
+
T.component("ServerStatus", Bl);
|
|
3751
|
+
T.component("ServerTasks", Ul);
|
|
3752
|
+
T.component("SettingsParameters", Zl);
|
|
3753
|
+
T.component("SmartPortSelector", Xl);
|
|
3754
|
+
T.component("TaskOutput", ri);
|
|
3755
|
+
T.component("UserServerPrivileges", ql);
|
|
3756
|
+
T.component("CreateNodeModal", Jl);
|
|
3757
|
+
T.config.globalProperties.alert = Vo;
|
|
3758
|
+
T.config.globalProperties.confirm = Ot;
|
|
3759
|
+
T.config.globalProperties.confirmAction = Bo;
|
|
3760
|
+
const Dt = document.createElement("meta");
|
|
3761
|
+
Dt.name = "naive-ui-style";
|
|
3762
|
+
document.head.appendChild(Dt);
|
|
3763
|
+
async function Ql() {
|
|
3764
|
+
try {
|
|
3765
|
+
if (await gt.initializeAuth(), gt.isAuthenticated) {
|
|
3766
|
+
const { loadPlugins: e } = await import("./loader-qtG-Lf6M.js");
|
|
3767
|
+
await e(et);
|
|
3768
|
+
}
|
|
3769
|
+
} catch (e) {
|
|
3770
|
+
console.error("Failed to initialize:", e);
|
|
3771
|
+
}
|
|
3772
|
+
try {
|
|
3773
|
+
T.mount("#app");
|
|
3774
|
+
} catch (e) {
|
|
3775
|
+
throw e;
|
|
3776
|
+
}
|
|
3777
|
+
}
|
|
3778
|
+
Ql();
|
|
3779
|
+
export {
|
|
3780
|
+
Ds as $,
|
|
3781
|
+
cr as A,
|
|
3782
|
+
gr as B,
|
|
3783
|
+
jt as C,
|
|
3784
|
+
Tt as D,
|
|
3785
|
+
ye as E,
|
|
3786
|
+
te as F,
|
|
3787
|
+
he as G,
|
|
3788
|
+
Gn as H,
|
|
3789
|
+
we as I,
|
|
3790
|
+
Fs as J,
|
|
3791
|
+
Us as K,
|
|
3792
|
+
ae as L,
|
|
3793
|
+
lo as M,
|
|
3794
|
+
sn as N,
|
|
3795
|
+
Fn as O,
|
|
3796
|
+
ke as P,
|
|
3797
|
+
It as Q,
|
|
3798
|
+
Ys as R,
|
|
3799
|
+
oe as S,
|
|
3800
|
+
Ks as T,
|
|
3801
|
+
Rn as U,
|
|
3802
|
+
il as V,
|
|
3803
|
+
St as W,
|
|
3804
|
+
wo as X,
|
|
3805
|
+
ko as Y,
|
|
3806
|
+
At as Z,
|
|
3807
|
+
ne as _,
|
|
3808
|
+
O as a,
|
|
3809
|
+
Dn as a0,
|
|
3810
|
+
$o as a1,
|
|
3811
|
+
Co as a2,
|
|
3812
|
+
ks as a3,
|
|
3813
|
+
So as a4,
|
|
3814
|
+
Po as a5,
|
|
3815
|
+
S as b,
|
|
3816
|
+
Qe as c,
|
|
3817
|
+
Ot as d,
|
|
3818
|
+
se as e,
|
|
3819
|
+
Ma as f,
|
|
3820
|
+
ge as g,
|
|
3821
|
+
Fa as h,
|
|
3822
|
+
Aa as i,
|
|
3823
|
+
li as j,
|
|
3824
|
+
W as k,
|
|
3825
|
+
mr as l,
|
|
3826
|
+
Je as m,
|
|
3827
|
+
Go as n,
|
|
3828
|
+
Ye as o,
|
|
3829
|
+
Lo as p,
|
|
3830
|
+
No as q,
|
|
3831
|
+
jo as r,
|
|
3832
|
+
zo as s,
|
|
3833
|
+
p as t,
|
|
3834
|
+
Gt as u,
|
|
3835
|
+
me as v,
|
|
3836
|
+
Vo as w,
|
|
3837
|
+
ii as x,
|
|
3838
|
+
ur as y,
|
|
3839
|
+
Ia as z
|
|
3840
|
+
};
|