@gameap/frontend 4.1.0-dev1 → 4.1.0-dev3

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.
Files changed (61) hide show
  1. package/dist/AdminClientCertificatesView-DQTMJ6LY.js +368 -0
  2. package/dist/AdminDaemonTaskListView-Bx3e0Miy.js +316 -0
  3. package/dist/AdminDaemonTaskOutputView-BJtLdoAq.js +87 -0
  4. package/dist/AdminGamesEdit-hDe3Pr-7.js +470 -0
  5. package/dist/AdminGamesList-CM1xADCW.js +500 -0
  6. package/dist/AdminModEdit-DDKd6Vga.js +526 -0
  7. package/dist/AdminNodeShowView-DMoEY2Cu.js +167 -0
  8. package/dist/AdminNodesCreateView-BXZDQIJ1.js +85 -0
  9. package/dist/AdminNodesEditView-xO7-szjJ.js +66 -0
  10. package/dist/AdminNodesView-ugTPiC4h.js +161 -0
  11. package/dist/AdminServersCreate-DOygFz_E.js +345 -0
  12. package/dist/AdminServersEdit-cZX6UGB1.js +400 -0
  13. package/dist/AdminServersList-CC50WRsv.js +165 -0
  14. package/dist/AdminUsersEditView-CXpMKFfI.js +305 -0
  15. package/dist/AdminUsersView-DGuGEHVR.js +443 -0
  16. package/dist/CreateModForm-CqhcrNFp.js +122 -0
  17. package/dist/CreateNodeModal-BvbJTKhD.js +93 -0
  18. package/dist/DsIpSelector-DN9IyT4L.js +90 -0
  19. package/dist/FileManager-8TWHezyM.js +31882 -0
  20. package/dist/GameModSelector-DRIaCbGY.js +94 -0
  21. package/dist/InputManyList-By5xECIK.js +110 -0
  22. package/dist/InputTextList-Bm2Ofq5J.js +63 -0
  23. package/dist/PluginPendingView-DHd_yijv.js +31 -0
  24. package/dist/RconConsole-DH9XeOu3.js +75 -0
  25. package/dist/RconPlayers-GrvCMJX3.js +420 -0
  26. package/dist/ServerConsole-BHHnpxJy.js +98 -0
  27. package/dist/ServerIdView-BfqrYuar.js +577 -0
  28. package/dist/ServerSelector-QMK1qiXa.js +52 -0
  29. package/dist/ServerSettings-Cz6C8Dlh.js +84 -0
  30. package/dist/ServerStatus-DBJW9C6H.js +63 -0
  31. package/dist/ServerTasks-Bs3iGYY3.js +854 -0
  32. package/dist/SettingsParameters-DCqhqxHk.js +87 -0
  33. package/dist/SmartPortSelector-DektJC6p.js +161 -0
  34. package/dist/UpdateNodeForm-CwirLUIK.js +648 -0
  35. package/dist/UserServerPrivileges-utyKdh7O.js +318 -0
  36. package/dist/_commonjsHelpers-C6fGbg64.js +6 -0
  37. package/dist/_createCompounder-DSupx5mD.js +241 -0
  38. package/dist/camelCase-WcUYdRB3.js +8 -0
  39. package/dist/capitalize-DRKkBaYR.js +40 -0
  40. package/dist/clientCertificates-BsJdUHYw.js +53 -0
  41. package/dist/favicon-32x32.png +0 -0
  42. package/dist/favicon-96x96.png +0 -0
  43. package/dist/favicon.ico +0 -0
  44. package/dist/fonts/gicon.eot +0 -0
  45. package/dist/fonts/gicon.svg +33 -0
  46. package/dist/fonts/gicon.ttf +0 -0
  47. package/dist/fonts/gicon.woff +0 -0
  48. package/dist/fonts/gicon.woff2 +0 -0
  49. package/dist/frontend.css +14 -0
  50. package/dist/gameList-DpGDCxFE.js +115 -0
  51. package/dist/images/gap_logo_white.png +0 -0
  52. package/dist/images/gap_logo_white_mini.png +0 -0
  53. package/dist/images/gicon.svg +18 -0
  54. package/dist/images/icons/save-white.svg +1 -0
  55. package/dist/images/icons/save.svg +1 -0
  56. package/dist/index-60qEjGuU.js +5371 -0
  57. package/dist/index.js +1 -0
  58. package/dist/loader-CrZTMKcy.js +131 -0
  59. package/dist/mockServiceWorker.js +349 -0
  60. package/dist/snakeCase-CTCA7tap.js +7 -0
  61. package/package.json +2 -2
@@ -0,0 +1,577 @@
1
+ import { ref as M, computed as k, createElementBlock as g, createCommentVNode as t, openBlock as r, createElementVNode as s, toDisplayString as p, defineAsyncComponent as P, onMounted as re, h as X, resolveComponent as O, Fragment as H, createVNode as _, createBlock as l, unref as e, normalizeClass as U, createSlots as te, withCtx as o, withDirectives as ae, vShow as le, createTextVNode as w, renderList as ne, resolveDynamicComponent as oe } from "vue";
2
+ import { useRoute as ie } from "vue-router";
3
+ import { defineStore as de, storeToRefs as Q } from "pinia";
4
+ import { u as b, a as $, j as ce, f as ue, t as i, g as ve, k as F, l as me } from "./index-60qEjGuU.js";
5
+ import { GBreadcrumbs as fe, Loading as C } from "@gameap/ui";
6
+ const pe = de("serverRcon", () => {
7
+ const R = M([]), h = M({
8
+ rcon: !1,
9
+ playersManage: !1
10
+ }), y = M(""), d = M(0), V = M([]), j = k(() => d.value > 0), D = k(() => b().serverId), z = k(() => !!b().abilities["game-server-rcon-console"]), G = k(() => !!b().abilities["game-server-rcon-players"]);
11
+ function n(a) {
12
+ b().setServerId(a);
13
+ }
14
+ async function A() {
15
+ const a = b();
16
+ d.value++;
17
+ try {
18
+ const v = await $.get("/api/servers/" + a.serverId + "/rcon/features");
19
+ h.value = v.data;
20
+ } finally {
21
+ d.value--;
22
+ }
23
+ }
24
+ async function q() {
25
+ const a = b();
26
+ d.value++;
27
+ try {
28
+ const v = await $.get("/api/servers/" + a.serverId + "/rcon/fast_rcon");
29
+ R.value = v.data;
30
+ } finally {
31
+ d.value--;
32
+ }
33
+ }
34
+ async function B(a) {
35
+ const v = b();
36
+ d.value++;
37
+ try {
38
+ const x = await $.post("/api/servers/" + v.serverId + "/rcon", {
39
+ command: a
40
+ });
41
+ y.value = x.data.output;
42
+ } finally {
43
+ d.value--;
44
+ }
45
+ }
46
+ async function m() {
47
+ const a = b();
48
+ if (!(a.serverId <= 0)) {
49
+ d.value++;
50
+ try {
51
+ const v = await $.get("/api/servers/" + a.serverId + "/rcon/players");
52
+ V.value = v.data;
53
+ } finally {
54
+ d.value--;
55
+ }
56
+ }
57
+ }
58
+ async function c(a, v) {
59
+ const x = b();
60
+ d.value++;
61
+ try {
62
+ await $.post("/api/servers/" + x.serverId + "/rcon/players/kick", {
63
+ player: a,
64
+ reason: v
65
+ }), await m();
66
+ } finally {
67
+ d.value--;
68
+ }
69
+ }
70
+ async function T(a, v, x) {
71
+ const N = b();
72
+ d.value++;
73
+ try {
74
+ await $.post("/api/servers/" + N.serverId + "/rcon/players/ban", {
75
+ player: a,
76
+ reason: v,
77
+ time: x
78
+ }), await m();
79
+ } finally {
80
+ d.value--;
81
+ }
82
+ }
83
+ async function u(a, v) {
84
+ const x = b();
85
+ d.value++;
86
+ try {
87
+ await $.post("/api/servers/" + x.serverId + "/rcon/players/message", {
88
+ player: a,
89
+ message: v
90
+ });
91
+ } finally {
92
+ d.value--;
93
+ }
94
+ }
95
+ return {
96
+ // State
97
+ fastRcon: R,
98
+ rconSupportedFeatures: h,
99
+ output: y,
100
+ apiProcesses: d,
101
+ players: V,
102
+ // Getters
103
+ loading: j,
104
+ serverId: D,
105
+ canUseRcon: z,
106
+ canManageRconPlayers: G,
107
+ // Actions
108
+ setServerId: n,
109
+ fetchRconSupportedFeatures: A,
110
+ fetchFastRcon: q,
111
+ sendCommand: B,
112
+ fetchPlayers: m,
113
+ kickPlayer: c,
114
+ banPlayer: T,
115
+ sendPlayerMessage: u
116
+ };
117
+ }), ye = {
118
+ key: 0,
119
+ id: "alert-additional-content-4",
120
+ class: "p-4 mb-4 text-yellow-800 border border-yellow-300 rounded-lg bg-yellow-50 dark:bg-stone-800 dark:text-yellow-300 dark:border-yellow-800",
121
+ role: "alert"
122
+ }, ge = { class: "flex items-center" }, _e = { class: "text-lg font-medium" }, be = {
123
+ key: 1,
124
+ id: "alert-additional-content-4",
125
+ class: "p-4 mb-4 text-yellow-800 border border-yellow-300 rounded-lg bg-yellow-50 dark:bg-stone-800 dark:text-yellow-300 dark:border-yellow-800",
126
+ role: "alert"
127
+ }, ke = { class: "flex items-center" }, Se = { class: "text-lg font-medium" }, he = {
128
+ key: 2,
129
+ id: "alert-additional-content-4",
130
+ class: "p-4 mb-4 text-yellow-800 border border-yellow-300 rounded-lg bg-yellow-50 dark:bg-stone-800 dark:text-yellow-300 dark:border-yellow-800",
131
+ role: "alert"
132
+ }, xe = { class: "flex items-center" }, we = { class: "text-lg font-medium" }, Re = {
133
+ key: 3,
134
+ id: "alert-additional-content-4",
135
+ class: "p-4 mb-4 text-yellow-800 border border-yellow-300 rounded-lg bg-yellow-50 dark:bg-stone-800 dark:text-yellow-300 dark:border-yellow-800",
136
+ role: "alert"
137
+ }, Ie = { class: "flex items-center" }, Pe = { class: "text-lg font-medium" }, $e = 0, Ce = 2, Me = {
138
+ __name: "InactiveServer",
139
+ props: {
140
+ server: null
141
+ },
142
+ setup(R) {
143
+ return (h, y) => R.server.installed === $e ? (r(), g("div", ye, [
144
+ s("div", ge, [
145
+ y[0] || (y[0] = s("i", { class: "fa-solid fa-triangle-exclamation mr-1" }, null, -1)),
146
+ s("h3", _e, p(h.trans("servers.not_installed_msg")), 1)
147
+ ])
148
+ ])) : R.server.installed === Ce ? (r(), g("div", be, [
149
+ s("div", ke, [
150
+ y[1] || (y[1] = s("i", { class: "fa-solid fa-triangle-exclamation mr-1" }, null, -1)),
151
+ s("h3", Se, p(h.trans("servers.installation_process_msg")), 1)
152
+ ])
153
+ ])) : R.server.blocked ? (r(), g("div", he, [
154
+ s("div", xe, [
155
+ y[2] || (y[2] = s("i", { class: "fa-solid fa-triangle-exclamation mr-1" }, null, -1)),
156
+ s("h3", we, p(h.trans("servers.blocked_msg")), 1)
157
+ ])
158
+ ])) : R.server.enabled ? t("", !0) : (r(), g("div", Re, [
159
+ s("div", Ie, [
160
+ y[3] || (y[3] = s("i", { class: "fa-solid fa-triangle-exclamation mr-1" }, null, -1)),
161
+ s("h3", Pe, p(h.trans("servers.disabled_msg")), 1)
162
+ ])
163
+ ]));
164
+ }
165
+ }, Te = { class: "md:flex md:flex-wrap mt-2" }, Ne = { class: "md:w-full" }, Le = { class: "md:flex mt-2" }, Ae = { class: "md:w-1/2 md:pr-8" }, Ee = {
166
+ key: 1,
167
+ id: "serverControl"
168
+ }, Fe = { class: "md:w-1/2" }, Ve = {
169
+ key: 1,
170
+ class: "flex flex-col pl-0 mb-0"
171
+ }, Be = {
172
+ key: 0,
173
+ class: "relative block py-3 px-6 -mb-px"
174
+ }, Oe = { class: "badge-green" }, Ue = {
175
+ key: 1,
176
+ class: "relative block py-3 px-6 -mb-px"
177
+ }, je = { class: "badge-red" }, De = { class: "relative block py-3 px-6 -mb-px" }, ze = {
178
+ key: 0,
179
+ class: "md:flex flex-wrap mt-2"
180
+ }, Ge = { class: "md:w-full" }, qe = { class: "flex flex-wrap mt-2" }, Xe = { class: "md:w-full" }, He = {
181
+ key: 0,
182
+ class: "pr-8"
183
+ }, Qe = { class: "flex flex-wrap mt-2 h-[calc(100vh-14rem)]" }, We = { class: "md:w-full h-full" }, Je = { class: "flex flex-col min-w-0 rounded break-words border bg-white dark:bg-stone-800 border-1 border-stone-300 dark:border-stone-700 h-full" }, Ke = { class: "md:flex md:flex-wrap mt-2" }, Ye = { class: "md:w-full" }, Ze = { class: "order-last ml-auto text-red-500 hover:text-red-600" }, es = {
184
+ __name: "ServerIdView",
185
+ setup(R) {
186
+ const h = P(
187
+ () => import(
188
+ "./ServerStatus-DBJW9C6H.js"
189
+ /* webpackChunkName: "components/server" */
190
+ )
191
+ ), y = P(
192
+ () => import(
193
+ "./ServerTasks-Bs3iGYY3.js"
194
+ /* webpackChunkName: "components/server" */
195
+ )
196
+ ), d = P(
197
+ () => import(
198
+ "./ServerConsole-BHHnpxJy.js"
199
+ /* webpackChunkName: "components/server" */
200
+ )
201
+ ), V = P(
202
+ () => import(
203
+ "./ServerSettings-Cz6C8Dlh.js"
204
+ /* webpackChunkName: "components/server" */
205
+ )
206
+ ), j = P(
207
+ () => import(
208
+ "./RconPlayers-GrvCMJX3.js"
209
+ /* webpackChunkName: "components/rcon" */
210
+ )
211
+ ), D = P(
212
+ () => import(
213
+ "./RconConsole-DH9XeOu3.js"
214
+ /* webpackChunkName: "components/rcon" */
215
+ )
216
+ ), z = P(
217
+ () => import("./FileManager-8TWHezyM.js")
218
+ ), G = ie(), n = b(), A = pe(), q = ce(), B = ue(), {
219
+ serverId: m,
220
+ server: c
221
+ } = Q(n), {
222
+ rconSupportedFeatures: T
223
+ } = Q(A), u = k(() => n.loading);
224
+ re(() => {
225
+ n.setServerId(Number(G.params.id)), n.fetchServer().then(() => {
226
+ c.value && (document.title = c.value.name), a.value = c.value?.enabled && !c.value?.blocked && c.value?.installed === 1, a.value && A.fetchRconSupportedFeatures();
227
+ }), n.fetchAbilities();
228
+ });
229
+ const a = M(!0), v = M(null), x = k(() => ({
230
+ start: n.canStart,
231
+ stop: n.canStop,
232
+ restart: n.canRestart,
233
+ update: n.canUpdate
234
+ })), N = k(() => !!c.value?.online), W = k(() => v.value?.status === "online"), J = k(() => (T.value.rcon || T.value.playersManage) && A.canUseRcon && N.value), K = k(() => {
235
+ const E = [
236
+ { route: "/", text: "GameAP", icon: "gicon gicon-gameap" },
237
+ { route: { name: "servers" }, text: i("servers.game_servers") }
238
+ ];
239
+ return c.value?.name && E.push({
240
+ render: () => [
241
+ X(ve, { game: c.value.game?.code ?? "", class: "mr-2 align-middle" }),
242
+ X("span", { game: c.value.game?.code ?? "", class: "align-middle" }, c.value.name)
243
+ ]
244
+ }), E;
245
+ }), Y = k(() => q.isAdmin), Z = k(() => B.getSlotComponents("server-tabs").filter((f) => f.checkPermission && f.checkPermission.type === "hasServerPermissions" ? f.checkPermission.permissions.every(
246
+ (I) => n.abilities[I] === !0
247
+ ) : !0));
248
+ return (E, f) => {
249
+ const I = O("n-card"), L = O("n-tab-pane"), ee = O("router-link"), se = O("n-tabs");
250
+ return r(), g(H, null, [
251
+ _(e(fe), { items: K.value }, null, 8, ["items"]),
252
+ !u.value && !a.value ? (r(), l(Me, {
253
+ key: 0,
254
+ server: e(c)
255
+ }, null, 8, ["server"])) : (r(), l(se, {
256
+ key: 1,
257
+ type: "line",
258
+ class: U(["flex justify-between", a.value ? "" : "hidden"]),
259
+ animated: "",
260
+ "display-directive": "show:lazy"
261
+ }, te({
262
+ default: o(() => [
263
+ _(L, { name: "control" }, {
264
+ tab: o(() => [
265
+ f[0] || (f[0] = s("i", { class: "fas fa-play mr-1" }, null, -1)),
266
+ w(" " + p(e(i)("servers.control")), 1)
267
+ ]),
268
+ default: o(() => [
269
+ ae(s("div", Te, [
270
+ s("div", Ne, [
271
+ _(I, { class: "mb-3" }, {
272
+ default: o(() => [
273
+ u.value ? (r(), l(e(C), { key: 0 })) : t("", !0),
274
+ u.value ? t("", !0) : (r(), l(e(h), {
275
+ key: 1,
276
+ ref_key: "serverStatusRef",
277
+ ref: v,
278
+ "server-id": e(m)
279
+ }, null, 8, ["server-id"]))
280
+ ]),
281
+ _: 1
282
+ })
283
+ ])
284
+ ], 512), [
285
+ [le, W.value]
286
+ ]),
287
+ s("div", Le, [
288
+ s("div", Ae, [
289
+ _(I, {
290
+ title: e(i)("servers.commands"),
291
+ class: "mb-3",
292
+ "header-class": "g-card-header",
293
+ segmented: {
294
+ content: !0,
295
+ footer: "soft"
296
+ }
297
+ }, {
298
+ default: o(() => [
299
+ u.value ? (r(), l(e(C), { key: 0 })) : t("", !0),
300
+ u.value ? t("", !0) : (r(), g("div", Ee, [
301
+ e(n).canStart && !N.value ? (r(), l(F, {
302
+ key: 0,
303
+ command: "start",
304
+ "server-id": e(m),
305
+ button: "m-1",
306
+ "button-color": "green",
307
+ icon: "fas fa-play",
308
+ text: e(i)("servers.start")
309
+ }, null, 8, ["server-id", "text"])) : t("", !0),
310
+ e(n).canStop && N.value ? (r(), l(F, {
311
+ key: 1,
312
+ command: "stop",
313
+ "server-id": e(m),
314
+ button: "m-1",
315
+ "button-color": "red",
316
+ icon: "fas fa-stop",
317
+ text: e(i)("servers.stop")
318
+ }, null, 8, ["server-id", "text"])) : t("", !0),
319
+ e(n).canRestart ? (r(), l(F, {
320
+ key: 2,
321
+ command: "restart",
322
+ "server-id": e(m),
323
+ button: "m-1",
324
+ "button-color": "orange",
325
+ icon: "fas fa-redo",
326
+ text: e(i)("servers.restart")
327
+ }, null, 8, ["server-id", "text"])) : t("", !0),
328
+ e(n).canUpdate ? (r(), l(F, {
329
+ key: 3,
330
+ command: "update",
331
+ "server-id": e(m),
332
+ button: "m-1",
333
+ "button-color": "black",
334
+ icon: "fas fa-sync",
335
+ text: e(i)("servers.update")
336
+ }, null, 8, ["server-id", "text"])) : t("", !0),
337
+ e(n).canUpdate ? (r(), l(F, {
338
+ key: 4,
339
+ command: "reinstall",
340
+ "server-id": e(m),
341
+ button: "m-1",
342
+ "button-color": "black",
343
+ icon: "fas fa-reply-all",
344
+ text: e(i)("servers.reinstall")
345
+ }, null, 8, ["server-id", "text"])) : t("", !0)
346
+ ]))
347
+ ]),
348
+ _: 1
349
+ }, 8, ["title"])
350
+ ]),
351
+ s("div", Fe, [
352
+ _(I, {
353
+ title: e(i)("servers.process_status"),
354
+ class: "mb-3",
355
+ "header-class": "g-card-header",
356
+ segmented: {
357
+ content: !0,
358
+ footer: "soft"
359
+ }
360
+ }, {
361
+ default: o(() => [
362
+ u.value ? (r(), l(e(C), { key: 0 })) : t("", !0),
363
+ u.value ? t("", !0) : (r(), g("ul", Ve, [
364
+ N.value ? (r(), g("li", Be, [
365
+ w(p(e(i)("servers.status")) + ": ", 1),
366
+ s("span", Oe, p(e(i)("servers.active")), 1)
367
+ ])) : (r(), g("li", Ue, [
368
+ w(p(e(i)("servers.status")) + ": ", 1),
369
+ s("span", je, p(e(i)("servers.inactive")), 1)
370
+ ])),
371
+ s("li", De, p(e(i)("servers.last_check")) + ": " + p(new Date(e(c).last_process_check).toLocaleString()), 1)
372
+ ]))
373
+ ]),
374
+ _: 1
375
+ }, 8, ["title"])
376
+ ])
377
+ ]),
378
+ e(n).canReadConsole ? (r(), g("div", ze, [
379
+ s("div", Ge, [
380
+ u.value ? (r(), l(e(C), { key: 0 })) : t("", !0),
381
+ u.value ? t("", !0) : (r(), l(e(d), {
382
+ key: 1,
383
+ "console-hostname": e(c)?.name,
384
+ "server-id": e(m),
385
+ "server-active": e(c)?.online,
386
+ "send-command-available": e(n).canSendConsole
387
+ }, null, 8, ["console-hostname", "server-id", "server-active", "send-command-available"]))
388
+ ])
389
+ ])) : t("", !0)
390
+ ]),
391
+ _: 1
392
+ }),
393
+ J.value ? (r(), l(L, {
394
+ key: 0,
395
+ name: "rcon"
396
+ }, {
397
+ tab: o(() => [...f[1] || (f[1] = [
398
+ s("i", { class: "fas fa-user-astronaut mr-1" }, null, -1),
399
+ w(" RCON ", -1)
400
+ ])]),
401
+ default: o(() => [
402
+ s("div", qe, [
403
+ s("div", Xe, [
404
+ s("div", {
405
+ class: U("md:grid " + (e(T).playersManage ? "md:grid-cols-2" : "md:grid-cols-1"))
406
+ }, [
407
+ e(T).playersManage ? (r(), g("div", He, [
408
+ _(I, {
409
+ title: e(i)("rcon.players_manage"),
410
+ class: "mb-3",
411
+ "header-class": "g-card-header",
412
+ segmented: {
413
+ content: !0,
414
+ footer: "soft"
415
+ }
416
+ }, {
417
+ default: o(() => [
418
+ u.value ? (r(), l(e(C), { key: 0 })) : t("", !0),
419
+ u.value ? t("", !0) : (r(), l(e(j), {
420
+ key: 1,
421
+ "server-id": e(m)
422
+ }, null, 8, ["server-id"]))
423
+ ]),
424
+ _: 1
425
+ }, 8, ["title"])
426
+ ])) : t("", !0),
427
+ s("div", null, [
428
+ _(I, {
429
+ title: e(i)("rcon.console"),
430
+ class: "mb-3",
431
+ "header-class": "g-card-header",
432
+ segmented: {
433
+ content: !0,
434
+ footer: "soft"
435
+ }
436
+ }, {
437
+ default: o(() => [
438
+ u.value ? (r(), l(e(C), { key: 0 })) : t("", !0),
439
+ u.value ? t("", !0) : (r(), l(e(D), {
440
+ key: 1,
441
+ "server-id": e(m)
442
+ }, null, 8, ["server-id"]))
443
+ ]),
444
+ _: 1
445
+ }, 8, ["title"])
446
+ ])
447
+ ], 2)
448
+ ])
449
+ ])
450
+ ]),
451
+ _: 1
452
+ })) : t("", !0),
453
+ e(n).canManageFiles ? (r(), l(L, {
454
+ key: 1,
455
+ name: "files"
456
+ }, {
457
+ tab: o(() => [
458
+ f[2] || (f[2] = s("i", { class: "fa fa-folder-open mr-1" }, null, -1)),
459
+ w(" " + p(e(i)("servers.files")), 1)
460
+ ]),
461
+ default: o(() => [
462
+ s("div", Qe, [
463
+ s("div", We, [
464
+ s("div", Je, [
465
+ _(e(z), {
466
+ settings: {
467
+ lang: e(me)(),
468
+ baseUrl: "/api/file-manager/" + E.$route.params.id,
469
+ headers: {
470
+ "X-Requested-With": "XMLHttpRequest"
471
+ }
472
+ }
473
+ }, null, 8, ["settings"])
474
+ ])
475
+ ])
476
+ ])
477
+ ]),
478
+ _: 1
479
+ })) : t("", !0),
480
+ e(n).canManageTasks ? (r(), l(L, {
481
+ key: 2,
482
+ name: "schedules"
483
+ }, {
484
+ tab: o(() => [
485
+ f[3] || (f[3] = s("i", { class: "far fa-calendar-alt mr-1" }, null, -1)),
486
+ w(" " + p(e(i)("servers.task_scheduler")), 1)
487
+ ]),
488
+ default: o(() => [
489
+ _(e(y), {
490
+ "server-id": e(m),
491
+ privileges: x.value
492
+ }, null, 8, ["server-id", "privileges"])
493
+ ]),
494
+ _: 1
495
+ })) : t("", !0),
496
+ (r(!0), g(H, null, ne(Z.value, (S) => (r(), l(L, {
497
+ key: "plugin-" + S.pluginId + "-" + (S.name || "tab"),
498
+ name: "plugin-" + S.pluginId + "-" + (S.name || "tab")
499
+ }, {
500
+ tab: o(() => [
501
+ S.icon ? (r(), g("i", {
502
+ key: 0,
503
+ class: U([S.icon, "mr-1"])
504
+ }, null, 2)) : t("", !0),
505
+ w(" " + p(e(B).resolvePluginText(S.pluginId, S.label)), 1)
506
+ ]),
507
+ default: o(() => [
508
+ (r(), l(oe(S.component), {
509
+ "server-id": e(m),
510
+ server: e(c),
511
+ "plugin-id": S.pluginId
512
+ }, null, 8, ["server-id", "server", "plugin-id"]))
513
+ ]),
514
+ _: 2
515
+ }, 1032, ["name"]))), 128)),
516
+ e(n).canManageSettings ? (r(), l(L, {
517
+ key: 3,
518
+ name: "settings"
519
+ }, {
520
+ tab: o(() => [
521
+ f[4] || (f[4] = s("i", { class: "fa fa-cogs mr-1" }, null, -1)),
522
+ w(" " + p(e(i)("servers.settings")), 1)
523
+ ]),
524
+ default: o(() => [
525
+ s("div", Ke, [
526
+ s("div", Ye, [
527
+ _(I, { class: "mb-3" }, {
528
+ default: o(() => [
529
+ s("div", null, [
530
+ u.value ? (r(), l(e(C), {
531
+ key: 0,
532
+ class: "absolute inset-0 flex justify-center items-center z-10"
533
+ })) : t("", !0),
534
+ _(e(V), {
535
+ class: U(u.value ? "opacity-20" : "")
536
+ }, null, 8, ["class"])
537
+ ])
538
+ ]),
539
+ _: 1
540
+ })
541
+ ])
542
+ ])
543
+ ]),
544
+ _: 1
545
+ })) : t("", !0)
546
+ ]),
547
+ _: 2
548
+ }, [
549
+ Y.value ? {
550
+ name: "suffix",
551
+ fn: o(() => [
552
+ s("div", Ze, [
553
+ _(ee, {
554
+ to: { name: "admin.servers.edit", params: { id: e(m) } }
555
+ }, {
556
+ default: o(() => [
557
+ f[5] || (f[5] = s("i", { class: "fa fa-hammer mr-1" }, null, -1)),
558
+ w(" " + p(e(i)("servers.admin")), 1)
559
+ ]),
560
+ _: 1
561
+ }, 8, ["to"])
562
+ ])
563
+ ]),
564
+ key: "0"
565
+ } : void 0
566
+ ]), 1032, ["class"]))
567
+ ], 64);
568
+ };
569
+ }
570
+ }, ns = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
571
+ __proto__: null,
572
+ default: es
573
+ }, Symbol.toStringTag, { value: "Module" }));
574
+ export {
575
+ ns as S,
576
+ pe as u
577
+ };
@@ -0,0 +1,52 @@
1
+ import { computed as p, onMounted as f, watch as h, createElementBlock as s, openBlock as o, createElementVNode as l, withDirectives as I, toDisplayString as t, unref as v, Fragment as g, renderList as N, vModelSelect as b } from "vue";
2
+ import { storeToRefs as u } from "pinia";
3
+ import { h as F, u as L, i as y, t as B } from "./index-60qEjGuU.js";
4
+ const k = {
5
+ id: "serverForm",
6
+ class: "mb-3"
7
+ }, w = {
8
+ for: "server-id",
9
+ class: "control-label"
10
+ }, x = ["name"], D = ["value"], R = {
11
+ __name: "ServerSelector",
12
+ props: {
13
+ serverIdFieldName: {
14
+ type: String,
15
+ default: "game_server_id"
16
+ }
17
+ },
18
+ setup(m) {
19
+ const _ = F(), n = L(), a = y(), { nodeId: d } = u(_), { servers: S } = u(a), r = p({
20
+ get() {
21
+ return n.serverId;
22
+ },
23
+ set(i) {
24
+ n.setServerId(i);
25
+ }
26
+ });
27
+ return f(() => {
28
+ r.value || (r.value = -1);
29
+ }), h(d, () => {
30
+ a.fetchServersByNode(d.value);
31
+ }), (i, c) => (o(), s("div", null, [
32
+ l("div", k, [
33
+ l("label", w, t(v(B)("labels.game_server")), 1),
34
+ I(l("select", {
35
+ id: "server-id",
36
+ name: m.serverIdFieldName,
37
+ class: "form-select",
38
+ "onUpdate:modelValue": c[0] || (c[0] = (e) => r.value = e)
39
+ }, [
40
+ (o(!0), s(g, null, N(v(S), (e) => (o(), s("option", {
41
+ value: e.id
42
+ }, t(e.name) + "    " + t(e.server_ip) + ":" + t(e.server_port), 9, D))), 256))
43
+ ], 8, x), [
44
+ [b, r.value]
45
+ ])
46
+ ])
47
+ ]));
48
+ }
49
+ };
50
+ export {
51
+ R as default
52
+ };