@gameap/frontend 4.1.0-dev1 → 4.1.0-dev2

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 +1 -2
@@ -0,0 +1,400 @@
1
+ import { ref as L, computed as f, onMounted as Z, resolveComponent as c, createElementBlock as S, openBlock as _, Fragment as z, createVNode as n, unref as r, withCtx as d, createElementVNode as u, createBlock as x, createCommentVNode as w, normalizeClass as U, toDisplayString as y, renderList as ee, createTextVNode as te } from "vue";
2
+ import { GBreadcrumbs as ae, Loading as N } from "@gameap/ui";
3
+ import { m as re, u as le, t as l, e as h, o as v, _ as oe, n as R } from "./index-60qEjGuU.js";
4
+ import { NForm as se, NFormItem as m, NSwitch as V } from "naive-ui";
5
+ import { useRoute as ne, useRouter as ue } from "vue-router";
6
+ import { storeToRefs as C } from "pinia";
7
+ import { u as de } from "./gameList-DpGDCxFE.js";
8
+ import { c as I } from "./capitalize-DRKkBaYR.js";
9
+ const ie = { class: "flex flex-wrap mt-2" }, ve = { class: "md:w-1/2 pr-8" }, me = { class: "grid grid-cols-3" }, pe = { class: "pr-8" }, ce = ["innerHTML"], _e = { class: "md:w-1/2" }, be = { class: "md:w-full" }, ge = { class: "md:w-full" }, fe = { class: "stone-table" }, ye = { class: "stone-table-header" }, he = { class: "px-2 py-2 w-1/4" }, Pe = { class: "px-2 py-2" }, qe = { class: "stone-table-row" }, ke = { class: "px-2 py-2 w-1/4" }, Se = { class: "bg-stone-100 dark:bg-stone-600 highlighter-rouge p-1 rounded" }, xe = { class: "px-2 py-2" }, we = { class: "hidden lg:inline" }, Ve = {
10
+ __name: "AdminServersEdit",
11
+ setup(Ue) {
12
+ const M = ne(), B = ue(), P = de(), q = re(), b = le(), G = L({}), e = L({
13
+ serverPort: 27015,
14
+ queryPort: 27015,
15
+ rconPort: 27015,
16
+ install: !0,
17
+ user: "gameap"
18
+ }), { games: F } = C(P), { nodes: O } = C(q), { server: s } = C(b), T = f(() => [
19
+ { route: "/", text: "GameAP", icon: "gicon gicon-gameap" },
20
+ { route: { name: "admin.servers.index" }, text: l("servers.game_servers") },
21
+ { route: { name: "admin.servers.edit", params: { id: M.params.id } }, text: l("servers.edit") }
22
+ ]);
23
+ Z(() => {
24
+ b.setServerId(Number(M.params.id)), b.fetchServer().then(() => {
25
+ e.value.name = s.value.name, e.value.ip = s.value.server_ip, e.value.serverPort = s.value.server_port, e.value.queryPort = s.value.query_port, e.value.rconPort = s.value.rcon_port, e.value.status = s.value.installed, e.value.enabled = s.value.enabled, e.value.blocked = s.value.blocked, e.value.rcon = s.value.rcon, e.value.dir = s.value.dir, e.value.user = s.value.su_user, e.value.startCommand = s.value.start_command, H().then(() => {
26
+ e.value.game = s.value.game_id, e.value.gameMod = s.value.game_mod_id;
27
+ }), $().then(() => {
28
+ e.value.nodeId = s.value.ds_id;
29
+ });
30
+ }).catch((o) => {
31
+ h(o);
32
+ });
33
+ });
34
+ const p = f(() => b.loading || P.loading || q.loading), j = [
35
+ { value: 0, label: I(l("servers.not_installed")) },
36
+ { value: 1, label: I(l("servers.installed")) },
37
+ { value: 2, label: I(l("servers.installation")) }
38
+ ], D = f(() => {
39
+ let o = {};
40
+ for (const [t, i] of Object.entries(F.value))
41
+ o[i.code] = i.name;
42
+ return o;
43
+ }), E = f(() => {
44
+ let o = {};
45
+ for (const [t, i] of Object.entries(O.value))
46
+ o[i.id] = i.name;
47
+ return o;
48
+ }), A = f(
49
+ () => {
50
+ let o = s.value.aliases;
51
+ return o || (o = {}), o.ip = e.value.ip, o.port = e.value.serverPort, o.query_port = e.value.queryPort, o.rcon_port = e.value.rconPort, o.rcon_password = e.value.rcon, o.uuid = s.value.uuid, o.uuid_short = s.value.uuid_short, Object.entries(o).map(([t, i]) => ({ name: t, value: i }));
52
+ }
53
+ ), H = async () => {
54
+ try {
55
+ await P.fetchGames();
56
+ } catch {
57
+ h(error);
58
+ }
59
+ }, $ = async () => {
60
+ q.fetchNodesByFilter([]).catch((o) => {
61
+ h(o);
62
+ });
63
+ }, J = {
64
+ name: {
65
+ required: !0,
66
+ validator: v(l("labels.name"))
67
+ },
68
+ game: {
69
+ required: !0,
70
+ validator: v(l("labels.game_id"))
71
+ },
72
+ gameMod: {
73
+ required: !0,
74
+ validator: v(l("labels.game_mod_id"))
75
+ },
76
+ nodeId: {
77
+ required: !0,
78
+ validator: v(l("labels.ds_id"))
79
+ },
80
+ ip: {
81
+ required: !0,
82
+ validator: v(l("labels.ip"))
83
+ },
84
+ serverPort: {
85
+ required: !0,
86
+ validator: v(l("labels.server_port"))
87
+ },
88
+ queryPort: {
89
+ required: !0,
90
+ validator: v(l("labels.query_port"))
91
+ },
92
+ rconPort: {
93
+ required: !0,
94
+ validator: v(l("labels.rcon_port"))
95
+ }
96
+ }, K = () => {
97
+ G.value?.validate((o, { warnings: t }) => {
98
+ o ? (console.log(o), R({
99
+ content: "Please check the form.",
100
+ type: "error"
101
+ })) : Q();
102
+ });
103
+ }, Q = () => {
104
+ b.save({
105
+ name: e.value.name,
106
+ game_id: s.value.game_id,
107
+ game_mod_id: s.value.game_mod_id,
108
+ enabled: e.value.enabled,
109
+ blocked: e.value.blocked,
110
+ installed: e.value.status,
111
+ rcon: e.value.rcon,
112
+ ds_id: s.value.ds_id,
113
+ server_ip: e.value.ip,
114
+ server_port: e.value.serverPort,
115
+ query_port: e.value.queryPort,
116
+ rcon_port: e.value.rconPort,
117
+ dir: e.value.dir,
118
+ su_user: e.value.user,
119
+ start_command: e.value.startCommand
120
+ }).then(() => {
121
+ R({
122
+ content: l("servers.update_success_msg"),
123
+ type: "success"
124
+ }, () => {
125
+ B.push({ name: "admin.servers.index" });
126
+ });
127
+ }).catch((o) => {
128
+ h(o);
129
+ });
130
+ };
131
+ return (o, t) => {
132
+ const i = c("n-select"), g = c("n-input"), W = c("GameModSelector"), k = c("n-card"), X = c("DsIpSelector"), Y = c("SmartPortSelector");
133
+ return _(), S(z, null, [
134
+ n(r(ae), { items: T.value }, null, 8, ["items"]),
135
+ n(r(se), {
136
+ "label-placement": "top",
137
+ "label-width": "auto",
138
+ ref_key: "formRef",
139
+ ref: G,
140
+ model: e.value,
141
+ rules: J
142
+ }, {
143
+ default: d(() => [
144
+ u("div", ie, [
145
+ u("div", ve, [
146
+ n(k, {
147
+ title: r(l)("servers.basic_info"),
148
+ size: "small",
149
+ class: "mb-3",
150
+ "header-class": "g-card-header",
151
+ segmented: {
152
+ content: !0,
153
+ footer: "soft"
154
+ }
155
+ }, {
156
+ default: d(() => [
157
+ p.value ? (_(), x(r(N), { key: 0 })) : w("", !0),
158
+ u("div", {
159
+ class: U(p.value ? "hidden" : "")
160
+ }, [
161
+ u("div", me, [
162
+ u("div", pe, [
163
+ n(r(m), {
164
+ label: r(l)("servers.status")
165
+ }, {
166
+ default: d(() => [
167
+ n(i, {
168
+ value: e.value.status,
169
+ "onUpdate:value": t[0] || (t[0] = (a) => e.value.status = a),
170
+ options: j
171
+ }, null, 8, ["value"])
172
+ ]),
173
+ _: 1
174
+ }, 8, ["label"])
175
+ ]),
176
+ n(r(m), {
177
+ label: r(l)("labels.enabled"),
178
+ path: "enabled"
179
+ }, {
180
+ default: d(() => [
181
+ n(r(V), {
182
+ value: e.value.enabled,
183
+ "onUpdate:value": t[1] || (t[1] = (a) => e.value.enabled = a)
184
+ }, null, 8, ["value"])
185
+ ]),
186
+ _: 1
187
+ }, 8, ["label"]),
188
+ n(r(m), {
189
+ label: r(l)("labels.blocked"),
190
+ path: "blocked"
191
+ }, {
192
+ default: d(() => [
193
+ n(r(V), {
194
+ value: e.value.blocked,
195
+ "onUpdate:value": t[2] || (t[2] = (a) => e.value.blocked = a),
196
+ "rail-style": ({ checked: a }) => a ? { background: "#b91c1c" } : {}
197
+ }, null, 8, ["value", "rail-style"])
198
+ ]),
199
+ _: 1
200
+ }, 8, ["label"])
201
+ ]),
202
+ n(r(m), {
203
+ label: r(l)("labels.name"),
204
+ path: "name"
205
+ }, {
206
+ default: d(() => [
207
+ n(g, {
208
+ value: e.value.name,
209
+ "onUpdate:value": t[3] || (t[3] = (a) => e.value.name = a),
210
+ type: "text"
211
+ }, null, 8, ["value"])
212
+ ]),
213
+ _: 1
214
+ }, 8, ["label"]),
215
+ n(W, {
216
+ games: D.value,
217
+ "game-path": "game",
218
+ "game-mod-path": "gameMod",
219
+ "game-select-disabled": !0,
220
+ game: e.value.game,
221
+ "onUpdate:game": t[4] || (t[4] = (a) => e.value.game = a),
222
+ "game-mod": e.value.gameMod,
223
+ "onUpdate:gameMod": t[5] || (t[5] = (a) => e.value.gameMod = a)
224
+ }, null, 8, ["games", "game", "game-mod"]),
225
+ n(r(m), {
226
+ label: r(l)("labels.rcon"),
227
+ path: "rcon"
228
+ }, {
229
+ default: d(() => [
230
+ n(g, {
231
+ value: e.value.rcon,
232
+ "onUpdate:value": t[6] || (t[6] = (a) => e.value.rcon = a),
233
+ type: "password",
234
+ "show-password-on": "click",
235
+ "input-props": { autocomplete: "one-time-code" }
236
+ }, null, 8, ["value"])
237
+ ]),
238
+ _: 1
239
+ }, 8, ["label"]),
240
+ n(r(m), {
241
+ label: r(l)("labels.dir"),
242
+ class: "mb-4",
243
+ path: "dir"
244
+ }, {
245
+ feedback: d(() => [
246
+ u("small", {
247
+ innerHTML: r(l)("servers.d_dir")
248
+ }, null, 8, ce)
249
+ ]),
250
+ default: d(() => [
251
+ n(g, {
252
+ value: e.value.dir,
253
+ "onUpdate:value": t[7] || (t[7] = (a) => e.value.dir = a),
254
+ type: "text"
255
+ }, null, 8, ["value"])
256
+ ]),
257
+ _: 1
258
+ }, 8, ["label"]),
259
+ n(r(m), {
260
+ label: r(l)("labels.su_user"),
261
+ path: "user"
262
+ }, {
263
+ default: d(() => [
264
+ n(g, {
265
+ value: e.value.user,
266
+ "onUpdate:value": t[8] || (t[8] = (a) => e.value.user = a),
267
+ type: "text"
268
+ }, null, 8, ["value"])
269
+ ]),
270
+ _: 1
271
+ }, 8, ["label"])
272
+ ], 2)
273
+ ]),
274
+ _: 1
275
+ }, 8, ["title"])
276
+ ]),
277
+ u("div", _e, [
278
+ n(k, {
279
+ title: r(l)("servers.ds_ip_ports"),
280
+ size: "small",
281
+ class: "mb-3",
282
+ "header-class": "g-card-header",
283
+ segmented: {
284
+ content: !0,
285
+ footer: "soft"
286
+ }
287
+ }, {
288
+ default: d(() => [
289
+ p.value ? (_(), x(r(N), { key: 0 })) : w("", !0),
290
+ u("div", {
291
+ class: U(p.value ? "hidden" : "")
292
+ }, [
293
+ n(X, {
294
+ "ds-list": E.value,
295
+ "node-id": e.value.nodeId,
296
+ "onUpdate:nodeId": t[9] || (t[9] = (a) => e.value.nodeId = a),
297
+ ip: e.value.ip,
298
+ "onUpdate:ip": t[10] || (t[10] = (a) => e.value.ip = a),
299
+ "node-select-disabled": !0,
300
+ "node-id-path": "nodeId",
301
+ "ip-path": "ip"
302
+ }, null, 8, ["ds-list", "node-id", "ip"]),
303
+ n(Y, {
304
+ "server-port": e.value.serverPort,
305
+ "onUpdate:serverPort": t[11] || (t[11] = (a) => e.value.serverPort = a),
306
+ "rcon-port": e.value.rconPort,
307
+ "onUpdate:rconPort": t[12] || (t[12] = (a) => e.value.rconPort = a),
308
+ "query-port": e.value.queryPort,
309
+ "onUpdate:queryPort": t[13] || (t[13] = (a) => e.value.queryPort = a),
310
+ "initial-server-ip": r(s).server_ip,
311
+ "initial-server-port": r(s).server_port,
312
+ "initial-query-port": r(s).query_port,
313
+ "initial-rcon-port": r(s).rcon_port,
314
+ "server-port-path": "serverPort",
315
+ "rcon-port-path": "rconPort",
316
+ "query-port-path": "queryPort"
317
+ }, null, 8, ["server-port", "rcon-port", "query-port", "initial-server-ip", "initial-server-port", "initial-query-port", "initial-rcon-port"])
318
+ ], 2)
319
+ ]),
320
+ _: 1
321
+ }, 8, ["title"])
322
+ ]),
323
+ u("div", be, [
324
+ n(k, {
325
+ title: r(l)("servers.start_command"),
326
+ size: "small",
327
+ class: "mb-3",
328
+ "header-class": "g-card-header",
329
+ segmented: {
330
+ content: !0,
331
+ footer: "soft"
332
+ }
333
+ }, {
334
+ default: d(() => [
335
+ p.value ? (_(), x(r(N), { key: 0 })) : w("", !0),
336
+ u("div", {
337
+ class: U(p.value ? "hidden" : "")
338
+ }, [
339
+ n(r(m), {
340
+ label: r(l)("labels.start_command"),
341
+ path: "startCommand"
342
+ }, {
343
+ default: d(() => [
344
+ n(g, {
345
+ value: e.value.startCommand,
346
+ "onUpdate:value": t[14] || (t[14] = (a) => e.value.startCommand = a),
347
+ type: "textarea",
348
+ autosize: { minRows: 4 }
349
+ }, null, 8, ["value"])
350
+ ]),
351
+ _: 1
352
+ }, 8, ["label"]),
353
+ u("div", ge, [
354
+ u("table", fe, [
355
+ u("thead", ye, [
356
+ u("tr", null, [
357
+ u("th", he, y(r(l)("labels.name")), 1),
358
+ u("th", Pe, y(r(l)("labels.the_value")), 1)
359
+ ])
360
+ ]),
361
+ u("tbody", null, [
362
+ (_(!0), S(z, null, ee(A.value, (a) => (_(), S("tr", qe, [
363
+ u("td", ke, [
364
+ u("span", Se, [
365
+ t[15] || (t[15] = u("span", null, "{", -1)),
366
+ te(y(a.name), 1),
367
+ t[16] || (t[16] = u("span", null, "}", -1))
368
+ ])
369
+ ]),
370
+ u("td", xe, y(a.value), 1)
371
+ ]))), 256))
372
+ ])
373
+ ])
374
+ ])
375
+ ], 2)
376
+ ]),
377
+ _: 1
378
+ }, 8, ["title"])
379
+ ]),
380
+ n(oe, {
381
+ color: "green",
382
+ onClick: K
383
+ }, {
384
+ default: d(() => [
385
+ t[17] || (t[17] = u("i", { class: "fa-solid fa-floppy-disk" }, null, -1)),
386
+ u("span", we, " " + y(r(l)("main.save")), 1)
387
+ ]),
388
+ _: 1
389
+ })
390
+ ])
391
+ ]),
392
+ _: 1
393
+ }, 8, ["model"])
394
+ ], 64);
395
+ };
396
+ }
397
+ };
398
+ export {
399
+ Ve as default
400
+ };
@@ -0,0 +1,165 @@
1
+ import { computed as d, ref as L, onMounted as D, createElementBlock as z, openBlock as E, Fragment as F, createVNode as n, unref as r, withCtx as c, createElementVNode as f, toDisplayString as I, h as a } from "vue";
2
+ import { GBreadcrumbs as P, Loading as T } from "@gameap/ui";
3
+ import { i as R, m as $, t as s, e as m, _ as u, g as q } from "./index-60qEjGuU.js";
4
+ import { storeToRefs as g } from "pinia";
5
+ import { NDataTable as w, NEmpty as A } from "naive-ui";
6
+ import { RouterLink as G } from "vue-router";
7
+ const Q = {
8
+ __name: "AdminServersList",
9
+ setup(V) {
10
+ const i = R(), o = $(), v = d(() => [
11
+ { route: "/", text: "GameAP", icon: "gicon gicon-gameap" },
12
+ { route: { name: "admin.servers.index" }, text: s("servers.game_servers") }
13
+ ]), _ = () => [
14
+ {
15
+ title: s("servers.name"),
16
+ key: "name"
17
+ },
18
+ {
19
+ title: s("servers.game"),
20
+ key: "game",
21
+ render: (e) => [
22
+ a(q, { game: e.gameCode, class: "mr-2" }),
23
+ e.game
24
+ ]
25
+ },
26
+ {
27
+ title: s("servers.ip_port"),
28
+ key: "ipPort"
29
+ },
30
+ {
31
+ title: s("servers.dedicated_server"),
32
+ render: (e) => {
33
+ let t = b.value.find((l) => l.id === e.nodeId);
34
+ return a(
35
+ G,
36
+ {
37
+ to: { name: "admin.nodes.view", params: { id: t.id } },
38
+ class: "text-blue-600 underline dark:text-blue-500 hover:no-underline"
39
+ },
40
+ t.name
41
+ );
42
+ }
43
+ },
44
+ {
45
+ title: s("main.actions"),
46
+ render(e) {
47
+ return [
48
+ a(u, {
49
+ color: "blue",
50
+ size: "small",
51
+ class: "mr-0.5",
52
+ route: { name: "admin.servers.edit", params: { id: e.id } }
53
+ }, [
54
+ a("i", { class: "fa-solid fa-pen-to-square" }),
55
+ a("span", { class: "hidden lg:inline" }, s("main.edit"))
56
+ ]),
57
+ a(u, {
58
+ color: "red",
59
+ size: "small",
60
+ text: s("main.delete"),
61
+ onClick: () => {
62
+ N(e.id);
63
+ }
64
+ }, [
65
+ a("i", { class: "fa-solid fa-trash" }),
66
+ a("span", { class: "hidden lg:inline" }, s("main.delete"))
67
+ ])
68
+ ];
69
+ }
70
+ }
71
+ ], { servers: h } = g(i), { nodes: b } = g(o), k = d(() => i.loading || o.loading), x = L(_()), y = {
72
+ pageSize: 20
73
+ };
74
+ D(() => {
75
+ p(), S();
76
+ });
77
+ const p = () => {
78
+ i.fetchServersByFilter([]).catch((e) => {
79
+ m(e);
80
+ });
81
+ }, S = () => {
82
+ o.fetchNodesByFilter([]).catch((e) => {
83
+ m(e);
84
+ });
85
+ }, C = d(() => {
86
+ let e = [];
87
+ return h.value.forEach((t) => {
88
+ e.push({
89
+ id: t.id,
90
+ name: t.name,
91
+ game: t.game.name,
92
+ gameCode: t.game.code,
93
+ nodeId: t.ds_id,
94
+ ipPort: t.server_ip + ":" + t.server_port
95
+ });
96
+ }), e;
97
+ }), N = (e) => {
98
+ let t = !1;
99
+ window.$dialog.success({
100
+ title: s("servers.delete_confirm_msg"),
101
+ content: () => a("div", { class: "mt-4 mb-4" }, [
102
+ a("input", {
103
+ type: "checkbox",
104
+ id: "delete-files-checkbox",
105
+ onChange: () => {
106
+ t = !0;
107
+ }
108
+ }),
109
+ a("label", { class: "ms-1", for: "delete-files-checkbox" }, s("servers.delete_files"))
110
+ ]),
111
+ positiveText: s("main.yes"),
112
+ negativeText: s("main.no"),
113
+ closable: !1,
114
+ onPositiveClick: () => {
115
+ B(e, t);
116
+ },
117
+ onNegativeClick: () => {
118
+ }
119
+ });
120
+ }, B = (e, t) => {
121
+ i.deleteById(e, t).catch((l) => {
122
+ m(l);
123
+ }).finally(() => {
124
+ p();
125
+ });
126
+ };
127
+ return (e, t) => (E(), z(F, null, [
128
+ n(r(P), { items: v.value }, null, 8, ["items"]),
129
+ n(u, {
130
+ color: "green",
131
+ size: "middle",
132
+ class: "mb-5",
133
+ route: { name: "admin.servers.create" }
134
+ }, {
135
+ default: c(() => [
136
+ t[0] || (t[0] = f("i", { class: "fa fa-plus-square mr-0.5" }, null, -1)),
137
+ f("span", null, I(r(s)("servers.create")), 1)
138
+ ]),
139
+ _: 1
140
+ }),
141
+ n(r(w), {
142
+ ref: "tableRef",
143
+ bordered: !1,
144
+ "single-line": !0,
145
+ columns: x.value,
146
+ data: C.value,
147
+ loading: k.value,
148
+ pagination: y
149
+ }, {
150
+ loading: c(() => [
151
+ n(r(T))
152
+ ]),
153
+ empty: c(() => [
154
+ n(r(A), {
155
+ description: r(s)("servers.empty_list")
156
+ }, null, 8, ["description"])
157
+ ]),
158
+ _: 1
159
+ }, 8, ["columns", "data", "loading"])
160
+ ], 64));
161
+ }
162
+ };
163
+ export {
164
+ Q as default
165
+ };