@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,500 @@
1
+ import { mergeModels as X, ref as v, useModel as Y, createElementBlock as E, openBlock as q, createVNode as l, unref as t, withCtx as n, createElementVNode as f, toDisplayString as R, computed as W, onMounted as Z, Fragment as ee, createTextVNode as L, h as m } from "vue";
2
+ import { GBreadcrumbs as ae, Loading as oe, GDeletableList as te } from "@gameap/ui";
3
+ import { o as T, t as o, v as le, w as se, _ as y, e as g, g as ne, n as M } from "./index-60qEjGuU.js";
4
+ import { u as ie } from "./gameList-DpGDCxFE.js";
5
+ import { NForm as re, NFormItem as C, NInput as _, NSpace as de, NInputGroup as me, NInputGroupLabel as ue, NDataTable as ce, NEmpty as pe, NModal as B } from "naive-ui";
6
+ import { useRouter as fe } from "vue-router";
7
+ import { storeToRefs as ge } from "pinia";
8
+ import { _ as ve } from "./CreateModForm-CqhcrNFp.js";
9
+ const ye = { class: "hidden lg:inline" }, _e = {
10
+ __name: "CreateGameForm",
11
+ props: {
12
+ modelValue: {
13
+ code: "",
14
+ name: "",
15
+ engine: "",
16
+ engineVersion: "",
17
+ remoteRepositoryLinux: "",
18
+ remoteRepositoryWindows: ""
19
+ },
20
+ modelModifiers: {}
21
+ },
22
+ emits: /* @__PURE__ */ X(["create"], ["update:modelValue"]),
23
+ setup(N, { emit: V }) {
24
+ const u = v({}), r = Y(N, "modelValue"), x = {
25
+ code: {
26
+ required: !0,
27
+ validator: le(
28
+ T(o("labels.code")),
29
+ se(o("labels.code"), 2, 16)
30
+ )
31
+ },
32
+ name: {
33
+ required: !0,
34
+ validator: T(o("labels.name"))
35
+ }
36
+ }, b = V, h = () => {
37
+ u.value.validate().then(() => {
38
+ b("create");
39
+ });
40
+ };
41
+ return (U, i) => (q(), E("div", null, [
42
+ l(t(re), {
43
+ "label-placement": "top",
44
+ "label-width": "auto",
45
+ ref_key: "formRef",
46
+ ref: u,
47
+ model: r.value,
48
+ rules: x
49
+ }, {
50
+ default: n(() => [
51
+ l(t(C), {
52
+ label: t(o)("labels.code"),
53
+ path: "code"
54
+ }, {
55
+ default: n(() => [
56
+ l(t(_), {
57
+ minlength: "2",
58
+ maxlength: "16",
59
+ "show-count": "",
60
+ value: r.value.code,
61
+ "onUpdate:value": i[0] || (i[0] = (d) => r.value.code = d),
62
+ type: "text"
63
+ }, null, 8, ["value"])
64
+ ]),
65
+ _: 1
66
+ }, 8, ["label"]),
67
+ l(t(C), {
68
+ label: t(o)("labels.name"),
69
+ path: "name"
70
+ }, {
71
+ default: n(() => [
72
+ l(t(_), {
73
+ value: r.value.name,
74
+ "onUpdate:value": i[1] || (i[1] = (d) => r.value.name = d),
75
+ type: "text"
76
+ }, null, 8, ["value"])
77
+ ]),
78
+ _: 1
79
+ }, 8, ["label"]),
80
+ l(t(de), null, {
81
+ default: n(() => [
82
+ l(t(C), {
83
+ label: t(o)("labels.engine"),
84
+ path: "engine"
85
+ }, {
86
+ default: n(() => [
87
+ l(t(_), {
88
+ value: r.value.engine,
89
+ "onUpdate:value": i[2] || (i[2] = (d) => r.value.engine = d),
90
+ type: "text"
91
+ }, null, 8, ["value"])
92
+ ]),
93
+ _: 1
94
+ }, 8, ["label"]),
95
+ l(t(C), {
96
+ label: t(o)("labels.engine_version"),
97
+ path: "engineVersion"
98
+ }, {
99
+ default: n(() => [
100
+ l(t(_), {
101
+ value: r.value.engineVersion,
102
+ "onUpdate:value": i[3] || (i[3] = (d) => r.value.engineVersion = d),
103
+ type: "text"
104
+ }, null, 8, ["value"])
105
+ ]),
106
+ _: 1
107
+ }, 8, ["label"])
108
+ ]),
109
+ _: 1
110
+ }),
111
+ l(t(C), {
112
+ label: t(o)("labels.remote_repository_linux"),
113
+ path: "remoteRepositoryLinux"
114
+ }, {
115
+ default: n(() => [
116
+ l(t(_), {
117
+ value: r.value.remoteRepositoryLinux,
118
+ "onUpdate:value": i[4] || (i[4] = (d) => r.value.remoteRepositoryLinux = d),
119
+ type: "text"
120
+ }, null, 8, ["value"])
121
+ ]),
122
+ _: 1
123
+ }, 8, ["label"]),
124
+ l(t(C), {
125
+ label: t(o)("labels.remote_repository_windows"),
126
+ path: "remoteRepositoryWindows"
127
+ }, {
128
+ default: n(() => [
129
+ l(t(_), {
130
+ value: r.value.remoteRepositoryWindows,
131
+ "onUpdate:value": i[5] || (i[5] = (d) => r.value.remoteRepositoryWindows = d),
132
+ type: "text"
133
+ }, null, 8, ["value"])
134
+ ]),
135
+ _: 1
136
+ }, 8, ["label"])
137
+ ]),
138
+ _: 1
139
+ }, 8, ["model"]),
140
+ l(y, {
141
+ color: "green",
142
+ onClick: h
143
+ }, {
144
+ default: n(() => [
145
+ i[6] || (i[6] = f("i", { class: "fa-regular fa-square-plus" }, null, -1)),
146
+ f("span", ye, " " + R(t(o)("main.create")), 1)
147
+ ]),
148
+ _: 1
149
+ })
150
+ ]));
151
+ }
152
+ }, be = { class: "mb-5" }, Ce = { class: "w-1/4 mb-1" }, Me = {
153
+ __name: "AdminGamesList",
154
+ setup(N) {
155
+ const V = fe(), u = ie(), r = W(() => [
156
+ { route: "/", text: "GameAP", icon: "gicon gicon-gameap" },
157
+ { route: { name: "admin.games.index" }, text: o("games.games") }
158
+ ]);
159
+ Z(() => {
160
+ x(), b();
161
+ });
162
+ const x = () => {
163
+ u.fetchGames().catch((a) => {
164
+ g(a);
165
+ });
166
+ }, b = () => {
167
+ u.fetchAllGameMods().catch((a) => {
168
+ g(a);
169
+ });
170
+ }, h = () => [
171
+ {
172
+ title: o("games.name"),
173
+ key: "name",
174
+ render(a) {
175
+ return m("div", { class: "flex items-center" }, [
176
+ m(ne, { game: a.code, class: "mr-2" }),
177
+ m("span", { class: "" }, a.name)
178
+ ]);
179
+ }
180
+ },
181
+ {
182
+ title: o("games.code"),
183
+ key: "code"
184
+ },
185
+ {
186
+ title: o("games.mods"),
187
+ key: "mods",
188
+ render(a) {
189
+ return a.mods.length === 0 ? m(y, {
190
+ color: "orange",
191
+ size: "small",
192
+ class: "px-2 py-1",
193
+ onClick: () => {
194
+ $(a.code);
195
+ }
196
+ }, [
197
+ m("i", { class: "fa-solid fa-cat mr-0.5" }),
198
+ m("span", { class: "" }, o("games.add_first_mod"))
199
+ ]) : m(
200
+ te,
201
+ {
202
+ class: ["md:max-w-48"],
203
+ items: a.mods,
204
+ deleteCallback: J,
205
+ clickCallback: H
206
+ }
207
+ );
208
+ }
209
+ },
210
+ {
211
+ title: o("main.actions"),
212
+ render(a) {
213
+ return [
214
+ m(y, {
215
+ color: "blue",
216
+ size: "small",
217
+ class: "mr-0.5",
218
+ route: { name: "admin.games.edit", params: { code: a.code } }
219
+ }, [
220
+ m("i", { class: "fa-solid fa-pen-to-square" }),
221
+ m("span", { class: "hidden lg:inline" }, o("main.edit"))
222
+ ]),
223
+ m(y, {
224
+ color: "red",
225
+ size: "small",
226
+ text: o("main.delete"),
227
+ onClick: () => {
228
+ A(a.code);
229
+ }
230
+ }, [
231
+ m("i", { class: "fa-solid fa-trash" }),
232
+ m("span", { class: "hidden lg:inline" }, o("main.delete"))
233
+ ])
234
+ ];
235
+ }
236
+ }
237
+ ], { loading: U, games: i, allGameMods: d } = ge(u), k = v(!1), p = v({
238
+ game: null,
239
+ name: "",
240
+ remoteRepositoryLinux: "",
241
+ remoteRepositoryWindows: ""
242
+ }), G = v(!1), c = v({
243
+ code: "",
244
+ name: "",
245
+ engine: "",
246
+ engineVersion: "",
247
+ remoteRepositoryLinux: "",
248
+ remoteRepositoryWindows: ""
249
+ }), D = v(h()), I = {
250
+ pageSize: 50
251
+ }, w = v(""), S = W(() => {
252
+ let a = [];
253
+ return i.value.forEach((e) => {
254
+ w.value && !e.name.toLowerCase().includes(w.value.toLowerCase()) && !e.code.toLowerCase().includes(w.value.toLowerCase()) || a.push({
255
+ name: e.name,
256
+ code: e.code,
257
+ engine: e.engine,
258
+ mods: z(e.code)
259
+ });
260
+ }), a.sort((e, s) => e.name.localeCompare(s.name));
261
+ }), z = (a) => {
262
+ let e = [];
263
+ return d.value.forEach((s) => {
264
+ s.game_code === a && e.push({
265
+ id: s.id,
266
+ name: s.name,
267
+ gameCode: s.game_code
268
+ });
269
+ }), e;
270
+ }, A = (a) => {
271
+ window.$dialog.success({
272
+ title: o("games.delete_game_confirm_msg"),
273
+ positiveText: o("main.yes"),
274
+ negativeText: o("main.no"),
275
+ closable: !1,
276
+ onPositiveClick: () => {
277
+ F(a);
278
+ },
279
+ onNegativeClick: () => {
280
+ }
281
+ });
282
+ }, F = (a) => {
283
+ u.deleteGameByCode(a).then(() => {
284
+ x();
285
+ }).catch((e) => {
286
+ g(e);
287
+ });
288
+ }, $ = (a) => {
289
+ p.value = {
290
+ game: null,
291
+ name: "",
292
+ remoteRepositoryLinux: "",
293
+ remoteRepositoryWindows: ""
294
+ }, a && (p.value.game = a), k.value = !0;
295
+ }, P = () => {
296
+ const a = {
297
+ name: p.value.name,
298
+ game_code: p.value.game,
299
+ remote_repository_linux: p.value.remoteRepositoryLinux,
300
+ remote_repository_windows: p.value.remoteRepositoryWindows
301
+ };
302
+ u.createGameMod(a).then(({ id: e }) => {
303
+ M({
304
+ content: o("games.mod_create_success_msg"),
305
+ type: "success"
306
+ }, () => {
307
+ b();
308
+ });
309
+ }).catch((e) => {
310
+ g(e);
311
+ }).finally(() => {
312
+ k.value = !1;
313
+ });
314
+ }, O = () => {
315
+ c.value = {
316
+ code: "",
317
+ name: "",
318
+ remoteRepositoryLinux: "",
319
+ remoteRepositoryWindows: ""
320
+ }, G.value = !0;
321
+ }, j = () => {
322
+ const a = {
323
+ name: c.value.name,
324
+ code: c.value.code,
325
+ engine: c.value.engine,
326
+ engine_version: c.value.engineVersion,
327
+ remote_repository_linux: c.value.remoteRepositoryLinux,
328
+ remote_repository_windows: c.value.remoteRepositoryWindows
329
+ };
330
+ a.engine || (a.engine = "unknown"), u.createGame(a).then(({ id: e }) => {
331
+ M({
332
+ content: o("games.create_success_msg"),
333
+ type: "success"
334
+ }, () => {
335
+ u.fetchGames();
336
+ });
337
+ }).catch((e) => {
338
+ g(e);
339
+ }).finally(() => {
340
+ G.value = !1;
341
+ });
342
+ }, H = (a, e) => {
343
+ V.push({ name: "admin.games.mods.edit", params: { code: a, id: e } });
344
+ }, J = (a) => {
345
+ window.$dialog.success({
346
+ title: o("games.delete_mod_confirm_msg"),
347
+ positiveText: o("main.yes"),
348
+ negativeText: o("main.no"),
349
+ closable: !1,
350
+ onPositiveClick: () => {
351
+ K(a);
352
+ },
353
+ onNegativeClick: () => {
354
+ }
355
+ });
356
+ }, K = (a) => {
357
+ u.deleteModById(a).then(() => {
358
+ b();
359
+ }).catch((e) => {
360
+ g(e);
361
+ });
362
+ }, Q = () => {
363
+ window.$dialog.success({
364
+ title: o("games.d_upgrade_confirm"),
365
+ positiveText: o("main.yes"),
366
+ negativeText: o("main.no"),
367
+ closable: !1,
368
+ onPositiveClick: () => {
369
+ u.upgradeGames().then(() => {
370
+ M({
371
+ content: o("games.upgrade_success_msg"),
372
+ type: "success"
373
+ }), x(), b();
374
+ }).catch((a) => {
375
+ g(a);
376
+ });
377
+ },
378
+ onNegativeClick: () => {
379
+ }
380
+ });
381
+ };
382
+ return (a, e) => (q(), E(ee, null, [
383
+ l(t(ae), { items: r.value }, null, 8, ["items"]),
384
+ f("div", be, [
385
+ l(y, {
386
+ class: "mr-1",
387
+ color: "green",
388
+ onClick: e[0] || (e[0] = (s) => O())
389
+ }, {
390
+ default: n(() => [
391
+ e[8] || (e[8] = f("i", { class: "fa-solid fa-plus-square" }, null, -1)),
392
+ L(" " + R(t(o)("games.add")), 1)
393
+ ]),
394
+ _: 1
395
+ }),
396
+ l(y, {
397
+ class: "mr-1",
398
+ color: "orange",
399
+ onClick: e[1] || (e[1] = (s) => $())
400
+ }, {
401
+ default: n(() => [
402
+ e[9] || (e[9] = f("i", { class: "fa-solid fa-cat" }, null, -1)),
403
+ L(" " + R(t(o)("games.add_mod")), 1)
404
+ ]),
405
+ _: 1
406
+ }),
407
+ l(y, {
408
+ class: "mr-1",
409
+ color: "black",
410
+ onClick: e[2] || (e[2] = (s) => Q())
411
+ }, {
412
+ default: n(() => [
413
+ e[10] || (e[10] = f("i", { class: "fa-solid fa-sync" }, null, -1)),
414
+ L(" " + R(t(o)("games.upgrade")), 1)
415
+ ]),
416
+ _: 1
417
+ })
418
+ ]),
419
+ f("div", Ce, [
420
+ l(t(me), null, {
421
+ default: n(() => [
422
+ l(t(ue), null, {
423
+ default: n(() => [...e[11] || (e[11] = [
424
+ f("i", { class: "fa-solid fa-magnifying-glass" }, null, -1)
425
+ ])]),
426
+ _: 1
427
+ }),
428
+ l(t(_), {
429
+ value: w.value,
430
+ "onUpdate:value": e[3] || (e[3] = (s) => w.value = s),
431
+ type: "text",
432
+ placeholder: t(o)("main.search")
433
+ }, null, 8, ["value", "placeholder"])
434
+ ]),
435
+ _: 1
436
+ })
437
+ ]),
438
+ l(t(ce), {
439
+ ref: "tableRef",
440
+ bordered: !1,
441
+ "single-line": !0,
442
+ columns: D.value,
443
+ data: S.value,
444
+ loading: t(U),
445
+ pagination: I
446
+ }, {
447
+ loading: n(() => [
448
+ l(t(oe))
449
+ ]),
450
+ empty: n(() => [
451
+ l(t(pe), {
452
+ description: t(o)("servers.empty_list")
453
+ }, null, 8, ["description"])
454
+ ]),
455
+ _: 1
456
+ }, 8, ["columns", "data", "loading"]),
457
+ l(t(B), {
458
+ show: G.value,
459
+ "onUpdate:show": e[5] || (e[5] = (s) => G.value = s),
460
+ class: "custom-card",
461
+ preset: "card",
462
+ title: t(o)("games.title_add"),
463
+ bordered: !1,
464
+ style: { width: "600px" },
465
+ segmented: { content: "soft", footer: "soft" }
466
+ }, {
467
+ default: n(() => [
468
+ l(_e, {
469
+ modelValue: c.value,
470
+ "onUpdate:modelValue": e[4] || (e[4] = (s) => c.value = s),
471
+ onCreate: j
472
+ }, null, 8, ["modelValue"])
473
+ ]),
474
+ _: 1
475
+ }, 8, ["show", "title"]),
476
+ l(t(B), {
477
+ show: k.value,
478
+ "onUpdate:show": e[7] || (e[7] = (s) => k.value = s),
479
+ class: "custom-card",
480
+ preset: "card",
481
+ title: t(o)("games.title_add_mod"),
482
+ bordered: !1,
483
+ style: { width: "600px" },
484
+ segmented: { content: "soft", footer: "soft" }
485
+ }, {
486
+ default: n(() => [
487
+ l(ve, {
488
+ modelValue: p.value,
489
+ "onUpdate:modelValue": e[6] || (e[6] = (s) => p.value = s),
490
+ onCreate: P
491
+ }, null, 8, ["modelValue"])
492
+ ]),
493
+ _: 1
494
+ }, 8, ["show", "title"])
495
+ ], 64));
496
+ }
497
+ };
498
+ export {
499
+ Me as default
500
+ };