@gameap/frontend 4.1.0-dev2 → 4.1.0-dev4

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 (45) hide show
  1. package/dist/{AdminClientCertificatesView-DQTMJ6LY.js → AdminClientCertificatesView-BQyXmri1.js} +33 -34
  2. package/dist/{AdminDaemonTaskListView-Bx3e0Miy.js → AdminDaemonTaskListView-DTQbTpkt.js} +49 -50
  3. package/dist/{AdminDaemonTaskOutputView-BJtLdoAq.js → AdminDaemonTaskOutputView-DRrZwAwW.js} +32 -33
  4. package/dist/{AdminGamesEdit-hDe3Pr-7.js → AdminGamesEdit-CDTCJu52.js} +43 -44
  5. package/dist/{AdminGamesList-CM1xADCW.js → AdminGamesList-CU_RB7gu.js} +55 -56
  6. package/dist/{AdminModEdit-DDKd6Vga.js → AdminModEdit-P0crpkM3.js} +106 -107
  7. package/dist/{AdminNodeShowView-DMoEY2Cu.js → AdminNodeShowView-Col-7fyA.js} +34 -35
  8. package/dist/{AdminNodesCreateView-BXZDQIJ1.js → AdminNodesCreateView-CZsMnSCJ.js} +26 -27
  9. package/dist/{AdminNodesEditView-xO7-szjJ.js → AdminNodesEditView-DdNciuMa.js} +23 -24
  10. package/dist/{AdminNodesView-ugTPiC4h.js → AdminNodesView-DvuZ9haB.js} +16 -17
  11. package/dist/{AdminServersCreate-DOygFz_E.js → AdminServersCreate-zGHHAEkO.js} +56 -57
  12. package/dist/{AdminServersEdit-cZX6UGB1.js → AdminServersEdit-BR6sRGlM.js} +31 -32
  13. package/dist/{AdminServersList-CC50WRsv.js → AdminServersList-DhUQ1zrt.js} +21 -22
  14. package/dist/{AdminUsersEditView-CXpMKFfI.js → AdminUsersEditView-CqRLzCkV.js} +44 -45
  15. package/dist/{AdminUsersView-DGuGEHVR.js → AdminUsersView-TCHghzxY.js} +37 -38
  16. package/dist/{CreateModForm-CqhcrNFp.js → CreateModForm-Byq8UvuW.js} +23 -23
  17. package/dist/{CreateNodeModal-BvbJTKhD.js → CreateNodeModal-BNV35RnR.js} +1 -1
  18. package/dist/{DsIpSelector-DN9IyT4L.js → DsIpSelector-EnBHsJLE.js} +1 -1
  19. package/dist/{FileManager-8TWHezyM.js → FileManager-X3FkHNzF.js} +1 -1
  20. package/dist/{GameModSelector-DRIaCbGY.js → GameModSelector-bZsSGC6T.js} +4 -4
  21. package/dist/{InputManyList-By5xECIK.js → InputManyList-BFGIEnls.js} +1 -1
  22. package/dist/{InputTextList-Bm2Ofq5J.js → InputTextList-D280D5fs.js} +1 -1
  23. package/dist/{PluginPendingView-DHd_yijv.js → PluginPendingView-Cp6KgA8z.js} +1 -1
  24. package/dist/{RconConsole-DH9XeOu3.js → RconConsole-BxjHKC6E.js} +24 -25
  25. package/dist/{RconPlayers-GrvCMJX3.js → RconPlayers-CXL0bHlU.js} +32 -32
  26. package/dist/{ServerConsole-BHHnpxJy.js → ServerConsole-Cr-BZJIC.js} +1 -1
  27. package/dist/{ServerIdView-BfqrYuar.js → ServerIdView-wsnPfVUi.js} +141 -142
  28. package/dist/{ServerSelector-QMK1qiXa.js → ServerSelector-D7O1thVu.js} +1 -1
  29. package/dist/{ServerSettings-Cz6C8Dlh.js → ServerSettings-Lk4lq5hI.js} +1 -1
  30. package/dist/{ServerStatus-DBJW9C6H.js → ServerStatus-CCFiPWXV.js} +1 -1
  31. package/dist/{ServerTasks-Bs3iGYY3.js → ServerTasks-gNFBkyv1.js} +1 -1
  32. package/dist/{SettingsParameters-DCqhqxHk.js → SettingsParameters-BVpVg868.js} +1 -1
  33. package/dist/{SmartPortSelector-DektJC6p.js → SmartPortSelector-bubAEnvR.js} +8 -8
  34. package/dist/{UpdateNodeForm-CwirLUIK.js → UpdateNodeForm-BQDjp3CR.js} +1 -1
  35. package/dist/{UserServerPrivileges-utyKdh7O.js → UserServerPrivileges-CizE2EYl.js} +1 -1
  36. package/dist/{_createCompounder-DSupx5mD.js → _createCompounder-NPjOAZm-.js} +2 -2
  37. package/dist/{camelCase-WcUYdRB3.js → camelCase-BXg45SFI.js} +2 -2
  38. package/dist/{capitalize-DRKkBaYR.js → capitalize-BSQeiLff.js} +10 -10
  39. package/dist/{clientCertificates-BsJdUHYw.js → clientCertificates-Dm0Bh62v.js} +1 -1
  40. package/dist/{gameList-DpGDCxFE.js → gameList-CJAymSBL.js} +1 -1
  41. package/dist/{index-60qEjGuU.js → index-Fmomw6wi.js} +2333 -1954
  42. package/dist/index.js +1 -1
  43. package/dist/{loader-CrZTMKcy.js → loader-BGOXrNPF.js} +1 -1
  44. package/dist/{snakeCase-CTCA7tap.js → snakeCase-o1mQEFQr.js} +1 -1
  45. package/package.json +2 -1
@@ -1,14 +1,13 @@
1
- import { ref as x, computed as h, onMounted as T, watch as C, resolveComponent as c, createElementBlock as z, openBlock as A, Fragment as D, createVNode as a, unref as s, withCtx as u, createElementVNode as i, toDisplayString as H } from "vue";
2
- import { GBreadcrumbs as V } from "@gameap/ui";
3
- import { m as W, i as J, t as l, e as P, o as d, _ as K, n as I } from "./index-60qEjGuU.js";
4
- import { u as Q } from "./gameList-DpGDCxFE.js";
5
- import { storeToRefs as M } from "pinia";
1
+ import { ref as x, computed as h, onMounted as T, watch as k, resolveComponent as c, createElementBlock as z, openBlock as A, Fragment as D, createVNode as a, unref as s, withCtx as u, createElementVNode as i, toDisplayString as H } from "vue";
2
+ import { q as V, i as W, t as l, e as q, s as d, k as J, _ as K, n as C } from "./index-Fmomw6wi.js";
3
+ import { u as Q } from "./gameList-CJAymSBL.js";
4
+ import { storeToRefs as I } from "pinia";
6
5
  import { NForm as X, NFormItem as p, NInputGroup as Y, NSwitch as Z } from "naive-ui";
7
6
  import { useRouter as ee } from "vue-router";
8
- import re from "./GameModSelector-DRIaCbGY.js";
9
- import te from "./SmartPortSelector-DektJC6p.js";
10
- import ae from "./DsIpSelector-DN9IyT4L.js";
11
- const k = [
7
+ import te from "./GameModSelector-bZsSGC6T.js";
8
+ import re from "./SmartPortSelector-bubAEnvR.js";
9
+ import ae from "./DsIpSelector-EnBHsJLE.js";
10
+ const M = [
12
11
  "Alpha",
13
12
  "Bravo",
14
13
  "Charlie",
@@ -20,62 +19,62 @@ const k = [
20
19
  "Sierra",
21
20
  "Whiskey"
22
21
  ];
23
- function oe(q = "Server") {
24
- const g = k[Math.floor(Math.random() * k.length)], f = Math.floor(Math.random() * 90) + 10;
25
- return `${q} ${g}-${f}`;
22
+ function oe(P = "Server") {
23
+ const g = M[Math.floor(Math.random() * M.length)], f = Math.floor(Math.random() * 90) + 10;
24
+ return `${P} ${g}-${f}`;
26
25
  }
27
- const le = { class: "flex flex-wrap mt-2" }, se = { class: "md:w-1/2 pr-8" }, ne = ["innerHTML"], ue = { class: "md:w-1/2" }, de = { class: "hidden lg:inline" }, he = {
26
+ const le = { class: "flex flex-wrap mt-2" }, se = { class: "md:w-1/2 pr-8" }, ne = ["innerHTML"], ue = { class: "md:w-1/2" }, de = { class: "hidden lg:inline" }, ye = {
28
27
  __name: "AdminServersCreate",
29
- setup(q) {
30
- const g = ee(), f = Q(), w = W(), L = J(), { games: U } = M(f), { nodes: G } = M(w), S = x({}), e = x({
28
+ setup(P) {
29
+ const g = ee(), f = Q(), w = V(), L = W(), { games: U } = I(f), { nodes: $ } = I(w), S = x({}), e = x({
31
30
  serverPort: 27015,
32
31
  queryPort: 27015,
33
32
  rconPort: 27015,
34
33
  install: !0,
35
34
  user: "gameap"
36
- }), O = h(() => [
35
+ }), G = h(() => [
37
36
  { route: "/", text: "GameAP", icon: "gicon gicon-gameap" },
38
37
  { route: { name: "admin.servers.index" }, text: l("servers.game_servers") },
39
38
  { route: { name: "admin.servers.create" }, text: l("servers.create") }
40
39
  ]);
41
40
  T(() => {
42
- $(), F();
41
+ O(), F();
43
42
  });
44
43
  const b = h(() => {
45
44
  let o = {};
46
- for (const [r, n] of Object.entries(U.value))
45
+ for (const [t, n] of Object.entries(U.value))
47
46
  o[n.code] = n.name;
48
47
  return o;
49
48
  }), N = h(() => {
50
49
  let o = {};
51
- for (const [r, n] of Object.entries(G.value))
50
+ for (const [t, n] of Object.entries($.value))
52
51
  o[n.id] = n.name;
53
52
  return o;
54
- }), $ = async () => {
53
+ }), O = async () => {
55
54
  try {
56
55
  await f.fetchGames();
57
56
  } catch {
58
- P(error);
57
+ q(error);
59
58
  }
60
59
  }, F = () => {
61
60
  w.fetchNodesByFilter([]).catch((o) => {
62
- P(o);
61
+ q(o);
63
62
  });
64
63
  };
65
- C(N, (o) => {
66
- const r = Object.keys(o);
67
- r.length === 1 && !e.value.nodeId && (e.value.nodeId = Number(r[0]));
68
- }, { immediate: !0 }), C(() => e.value.name, (o) => {
64
+ k(N, (o) => {
65
+ const t = Object.keys(o);
66
+ t.length === 1 && !e.value.nodeId && (e.value.nodeId = Number(t[0]));
67
+ }, { immediate: !0 }), k(() => e.value.name, (o) => {
69
68
  if (!o || e.value.game)
70
69
  return;
71
- const r = o.toLowerCase().split(/\s+/).filter((m) => m.length >= 3);
72
- if (r.length === 0)
70
+ const t = o.toLowerCase().split(/\s+/).filter((m) => m.length >= 3);
71
+ if (t.length === 0)
73
72
  return;
74
73
  const n = /* @__PURE__ */ new Set();
75
74
  for (const [m, y] of Object.entries(b.value)) {
76
75
  const _ = m.toLowerCase(), v = y.toLowerCase();
77
- for (const t of r)
78
- if (_.includes(t) || t.includes(_) || v.includes(t) || t.includes(v)) {
76
+ for (const r of t)
77
+ if (_.includes(r) || r.includes(_) || v.includes(r) || r.includes(v)) {
79
78
  n.add(m);
80
79
  break;
81
80
  }
@@ -85,7 +84,7 @@ const le = { class: "flex flex-wrap mt-2" }, se = { class: "md:w-1/2 pr-8" }, ne
85
84
  const R = () => {
86
85
  const o = b.value[e.value.game] || "Server";
87
86
  e.value.name = oe(o);
88
- }, B = {
87
+ }, j = {
89
88
  name: {
90
89
  required: !0,
91
90
  validator: d(l("labels.name"))
@@ -121,9 +120,9 @@ const le = { class: "flex flex-wrap mt-2" }, se = { class: "md:w-1/2 pr-8" }, ne
121
120
  required: !0,
122
121
  validator: d(l("labels.rcon_port"))
123
122
  }
124
- }, j = () => {
125
- S.value?.validate((o, { warnings: r }) => {
126
- o ? (console.log(o), I({
123
+ }, B = () => {
124
+ S.value?.validate((o, { warnings: t }) => {
125
+ o ? (console.log(o), C({
127
126
  content: "Please check the form.",
128
127
  type: "error"
129
128
  })) : E();
@@ -143,27 +142,27 @@ const le = { class: "flex flex-wrap mt-2" }, se = { class: "md:w-1/2 pr-8" }, ne
143
142
  rcon_port: e.value.rconPort,
144
143
  dir: e.value.dir
145
144
  }).then(() => {
146
- I({
145
+ C({
147
146
  content: l("servers.create_success_msg"),
148
147
  type: "success"
149
148
  }, () => {
150
149
  g.push({ name: "admin.servers.index" });
151
150
  });
152
151
  }).catch((o) => {
153
- P(o);
152
+ q(o);
154
153
  });
155
154
  };
156
- return (o, r) => {
155
+ return (o, t) => {
157
156
  const n = c("n-input"), m = c("n-button"), y = c("n-collapse-item"), _ = c("n-collapse"), v = c("n-card");
158
157
  return A(), z(D, null, [
159
- a(s(V), { items: O.value }, null, 8, ["items"]),
158
+ a(s(J), { items: G.value }, null, 8, ["items"]),
160
159
  a(s(X), {
161
160
  "label-placement": "top",
162
161
  "label-width": "auto",
163
162
  ref_key: "formRef",
164
163
  ref: S,
165
164
  model: e.value,
166
- rules: B
165
+ rules: j
167
166
  }, {
168
167
  default: u(() => [
169
168
  i("div", le, [
@@ -188,11 +187,11 @@ const le = { class: "flex flex-wrap mt-2" }, se = { class: "md:w-1/2 pr-8" }, ne
188
187
  default: u(() => [
189
188
  a(n, {
190
189
  value: e.value.name,
191
- "onUpdate:value": r[0] || (r[0] = (t) => e.value.name = t),
190
+ "onUpdate:value": t[0] || (t[0] = (r) => e.value.name = r),
192
191
  type: "text"
193
192
  }, null, 8, ["value"]),
194
193
  a(m, { onClick: R }, {
195
- default: u(() => [...r[12] || (r[12] = [
194
+ default: u(() => [...t[12] || (t[12] = [
196
195
  i("i", { class: "fa-solid fa-dice" }, null, -1)
197
196
  ])]),
198
197
  _: 1
@@ -203,14 +202,14 @@ const le = { class: "flex flex-wrap mt-2" }, se = { class: "md:w-1/2 pr-8" }, ne
203
202
  ]),
204
203
  _: 1
205
204
  }, 8, ["label"]),
206
- a(re, {
205
+ a(te, {
207
206
  games: b.value,
208
207
  "game-path": "game",
209
208
  "game-mod-path": "gameMod",
210
209
  game: e.value.game,
211
- "onUpdate:game": r[1] || (r[1] = (t) => e.value.game = t),
210
+ "onUpdate:game": t[1] || (t[1] = (r) => e.value.game = r),
212
211
  "game-mod": e.value.gameMod,
213
- "onUpdate:gameMod": r[2] || (r[2] = (t) => e.value.gameMod = t)
212
+ "onUpdate:gameMod": t[2] || (t[2] = (r) => e.value.gameMod = r)
214
213
  }, null, 8, ["games", "game", "game-mod"]),
215
214
  a(s(p), {
216
215
  label: s(l)("servers.install"),
@@ -219,7 +218,7 @@ const le = { class: "flex flex-wrap mt-2" }, se = { class: "md:w-1/2 pr-8" }, ne
219
218
  default: u(() => [
220
219
  a(s(Z), {
221
220
  value: e.value.install,
222
- "onUpdate:value": r[3] || (r[3] = (t) => e.value.install = t)
221
+ "onUpdate:value": t[3] || (t[3] = (r) => e.value.install = r)
223
222
  }, null, 8, ["value"])
224
223
  ]),
225
224
  _: 1
@@ -237,7 +236,7 @@ const le = { class: "flex flex-wrap mt-2" }, se = { class: "md:w-1/2 pr-8" }, ne
237
236
  default: u(() => [
238
237
  a(n, {
239
238
  value: e.value.rcon,
240
- "onUpdate:value": r[4] || (r[4] = (t) => e.value.rcon = t),
239
+ "onUpdate:value": t[4] || (t[4] = (r) => e.value.rcon = r),
241
240
  type: "password",
242
241
  "show-password-on": "click"
243
242
  }, null, 8, ["value"])
@@ -257,7 +256,7 @@ const le = { class: "flex flex-wrap mt-2" }, se = { class: "md:w-1/2 pr-8" }, ne
257
256
  default: u(() => [
258
257
  a(n, {
259
258
  value: e.value.dir,
260
- "onUpdate:value": r[5] || (r[5] = (t) => e.value.dir = t),
259
+ "onUpdate:value": t[5] || (t[5] = (r) => e.value.dir = r),
261
260
  type: "text"
262
261
  }, null, 8, ["value"])
263
262
  ]),
@@ -270,7 +269,7 @@ const le = { class: "flex flex-wrap mt-2" }, se = { class: "md:w-1/2 pr-8" }, ne
270
269
  default: u(() => [
271
270
  a(n, {
272
271
  value: e.value.user,
273
- "onUpdate:value": r[6] || (r[6] = (t) => e.value.user = t),
272
+ "onUpdate:value": t[6] || (t[6] = (r) => e.value.user = r),
274
273
  type: "text"
275
274
  }, null, 8, ["value"])
276
275
  ]),
@@ -301,19 +300,19 @@ const le = { class: "flex flex-wrap mt-2" }, se = { class: "md:w-1/2 pr-8" }, ne
301
300
  a(ae, {
302
301
  "ds-list": N.value,
303
302
  "node-id": e.value.nodeId,
304
- "onUpdate:nodeId": r[7] || (r[7] = (t) => e.value.nodeId = t),
303
+ "onUpdate:nodeId": t[7] || (t[7] = (r) => e.value.nodeId = r),
305
304
  ip: e.value.ip,
306
- "onUpdate:ip": r[8] || (r[8] = (t) => e.value.ip = t),
305
+ "onUpdate:ip": t[8] || (t[8] = (r) => e.value.ip = r),
307
306
  "node-id-path": "nodeId",
308
307
  "ip-path": "ip"
309
308
  }, null, 8, ["ds-list", "node-id", "ip"]),
310
- a(te, {
309
+ a(re, {
311
310
  "server-port": e.value.serverPort,
312
- "onUpdate:serverPort": r[9] || (r[9] = (t) => e.value.serverPort = t),
311
+ "onUpdate:serverPort": t[9] || (t[9] = (r) => e.value.serverPort = r),
313
312
  "rcon-port": e.value.rconPort,
314
- "onUpdate:rconPort": r[10] || (r[10] = (t) => e.value.rconPort = t),
313
+ "onUpdate:rconPort": t[10] || (t[10] = (r) => e.value.rconPort = r),
315
314
  "query-port": e.value.queryPort,
316
- "onUpdate:queryPort": r[11] || (r[11] = (t) => e.value.queryPort = t),
315
+ "onUpdate:queryPort": t[11] || (t[11] = (r) => e.value.queryPort = r),
317
316
  "server-port-path": "serverPort",
318
317
  "rcon-port-path": "rconPort",
319
318
  "query-port-path": "queryPort"
@@ -324,10 +323,10 @@ const le = { class: "flex flex-wrap mt-2" }, se = { class: "md:w-1/2 pr-8" }, ne
324
323
  ]),
325
324
  a(K, {
326
325
  color: "green",
327
- onClick: j
326
+ onClick: B
328
327
  }, {
329
328
  default: u(() => [
330
- r[13] || (r[13] = i("i", { class: "fa-regular fa-square-plus" }, null, -1)),
329
+ t[13] || (t[13] = i("i", { class: "fa-regular fa-square-plus" }, null, -1)),
331
330
  i("span", de, " " + H(s(l)("main.create")), 1)
332
331
  ]),
333
332
  _: 1
@@ -341,5 +340,5 @@ const le = { class: "flex flex-wrap mt-2" }, se = { class: "md:w-1/2 pr-8" }, ne
341
340
  }
342
341
  };
343
342
  export {
344
- he as default
343
+ ye as default
345
344
  };
@@ -1,62 +1,61 @@
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";
1
+ import { ref as G, computed as g, onMounted as Z, resolveComponent as c, createElementBlock as S, openBlock as _, Fragment as L, 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 { q as ae, u as re, t as l, e as h, s as v, k as le, l as N, _ as oe, n as R } from "./index-Fmomw6wi.js";
4
3
  import { NForm as se, NFormItem as m, NSwitch as V } from "naive-ui";
5
4
  import { useRoute as ne, useRouter as ue } from "vue-router";
6
5
  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 = {
6
+ import { u as de } from "./gameList-CJAymSBL.js";
7
+ import { c as I } from "./capitalize-BSQeiLff.js";
8
+ 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" }, fe = { class: "md:w-full" }, ge = { 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" }, Re = {
10
9
  __name: "AdminServersEdit",
11
10
  setup(Ue) {
12
- const M = ne(), B = ue(), P = de(), q = re(), b = le(), G = L({}), e = L({
11
+ const M = ne(), F = ue(), P = de(), q = ae(), b = re(), z = G({}), e = G({
13
12
  serverPort: 27015,
14
13
  queryPort: 27015,
15
14
  rconPort: 27015,
16
15
  install: !0,
17
16
  user: "gameap"
18
- }), { games: F } = C(P), { nodes: O } = C(q), { server: s } = C(b), T = f(() => [
17
+ }), { games: B } = C(P), { nodes: O } = C(q), { server: s } = C(b), T = g(() => [
19
18
  { route: "/", text: "GameAP", icon: "gicon gicon-gameap" },
20
19
  { route: { name: "admin.servers.index" }, text: l("servers.game_servers") },
21
20
  { route: { name: "admin.servers.edit", params: { id: M.params.id } }, text: l("servers.edit") }
22
21
  ]);
23
22
  Z(() => {
24
23
  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(() => {
24
+ 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, A().then(() => {
26
25
  e.value.game = s.value.game_id, e.value.gameMod = s.value.game_mod_id;
27
- }), $().then(() => {
26
+ }), H().then(() => {
28
27
  e.value.nodeId = s.value.ds_id;
29
28
  });
30
29
  }).catch((o) => {
31
30
  h(o);
32
31
  });
33
32
  });
34
- const p = f(() => b.loading || P.loading || q.loading), j = [
33
+ const p = g(() => b.loading || P.loading || q.loading), j = [
35
34
  { value: 0, label: I(l("servers.not_installed")) },
36
35
  { value: 1, label: I(l("servers.installed")) },
37
36
  { value: 2, label: I(l("servers.installation")) }
38
- ], D = f(() => {
37
+ ], D = g(() => {
39
38
  let o = {};
40
- for (const [t, i] of Object.entries(F.value))
39
+ for (const [t, i] of Object.entries(B.value))
41
40
  o[i.code] = i.name;
42
41
  return o;
43
- }), E = f(() => {
42
+ }), E = g(() => {
44
43
  let o = {};
45
44
  for (const [t, i] of Object.entries(O.value))
46
45
  o[i.id] = i.name;
47
46
  return o;
48
- }), A = f(
47
+ }), $ = g(
49
48
  () => {
50
49
  let o = s.value.aliases;
51
50
  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
51
  }
53
- ), H = async () => {
52
+ ), A = async () => {
54
53
  try {
55
54
  await P.fetchGames();
56
55
  } catch {
57
56
  h(error);
58
57
  }
59
- }, $ = async () => {
58
+ }, H = async () => {
60
59
  q.fetchNodesByFilter([]).catch((o) => {
61
60
  h(o);
62
61
  });
@@ -94,7 +93,7 @@ const ie = { class: "flex flex-wrap mt-2" }, ve = { class: "md:w-1/2 pr-8" }, me
94
93
  validator: v(l("labels.rcon_port"))
95
94
  }
96
95
  }, K = () => {
97
- G.value?.validate((o, { warnings: t }) => {
96
+ z.value?.validate((o, { warnings: t }) => {
98
97
  o ? (console.log(o), R({
99
98
  content: "Please check the form.",
100
99
  type: "error"
@@ -122,21 +121,21 @@ const ie = { class: "flex flex-wrap mt-2" }, ve = { class: "md:w-1/2 pr-8" }, me
122
121
  content: l("servers.update_success_msg"),
123
122
  type: "success"
124
123
  }, () => {
125
- B.push({ name: "admin.servers.index" });
124
+ F.push({ name: "admin.servers.index" });
126
125
  });
127
126
  }).catch((o) => {
128
127
  h(o);
129
128
  });
130
129
  };
131
130
  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"]),
131
+ const i = c("n-select"), f = c("n-input"), W = c("GameModSelector"), k = c("n-card"), X = c("DsIpSelector"), Y = c("SmartPortSelector");
132
+ return _(), S(L, null, [
133
+ n(r(le), { items: T.value }, null, 8, ["items"]),
135
134
  n(r(se), {
136
135
  "label-placement": "top",
137
136
  "label-width": "auto",
138
137
  ref_key: "formRef",
139
- ref: G,
138
+ ref: z,
140
139
  model: e.value,
141
140
  rules: J
142
141
  }, {
@@ -204,7 +203,7 @@ const ie = { class: "flex flex-wrap mt-2" }, ve = { class: "md:w-1/2 pr-8" }, me
204
203
  path: "name"
205
204
  }, {
206
205
  default: d(() => [
207
- n(g, {
206
+ n(f, {
208
207
  value: e.value.name,
209
208
  "onUpdate:value": t[3] || (t[3] = (a) => e.value.name = a),
210
209
  type: "text"
@@ -227,7 +226,7 @@ const ie = { class: "flex flex-wrap mt-2" }, ve = { class: "md:w-1/2 pr-8" }, me
227
226
  path: "rcon"
228
227
  }, {
229
228
  default: d(() => [
230
- n(g, {
229
+ n(f, {
231
230
  value: e.value.rcon,
232
231
  "onUpdate:value": t[6] || (t[6] = (a) => e.value.rcon = a),
233
232
  type: "password",
@@ -248,7 +247,7 @@ const ie = { class: "flex flex-wrap mt-2" }, ve = { class: "md:w-1/2 pr-8" }, me
248
247
  }, null, 8, ce)
249
248
  ]),
250
249
  default: d(() => [
251
- n(g, {
250
+ n(f, {
252
251
  value: e.value.dir,
253
252
  "onUpdate:value": t[7] || (t[7] = (a) => e.value.dir = a),
254
253
  type: "text"
@@ -261,7 +260,7 @@ const ie = { class: "flex flex-wrap mt-2" }, ve = { class: "md:w-1/2 pr-8" }, me
261
260
  path: "user"
262
261
  }, {
263
262
  default: d(() => [
264
- n(g, {
263
+ n(f, {
265
264
  value: e.value.user,
266
265
  "onUpdate:value": t[8] || (t[8] = (a) => e.value.user = a),
267
266
  type: "text"
@@ -341,7 +340,7 @@ const ie = { class: "flex flex-wrap mt-2" }, ve = { class: "md:w-1/2 pr-8" }, me
341
340
  path: "startCommand"
342
341
  }, {
343
342
  default: d(() => [
344
- n(g, {
343
+ n(f, {
345
344
  value: e.value.startCommand,
346
345
  "onUpdate:value": t[14] || (t[14] = (a) => e.value.startCommand = a),
347
346
  type: "textarea",
@@ -350,8 +349,8 @@ const ie = { class: "flex flex-wrap mt-2" }, ve = { class: "md:w-1/2 pr-8" }, me
350
349
  ]),
351
350
  _: 1
352
351
  }, 8, ["label"]),
353
- u("div", ge, [
354
- u("table", fe, [
352
+ u("div", fe, [
353
+ u("table", ge, [
355
354
  u("thead", ye, [
356
355
  u("tr", null, [
357
356
  u("th", he, y(r(l)("labels.name")), 1),
@@ -359,7 +358,7 @@ const ie = { class: "flex flex-wrap mt-2" }, ve = { class: "md:w-1/2 pr-8" }, me
359
358
  ])
360
359
  ]),
361
360
  u("tbody", null, [
362
- (_(!0), S(z, null, ee(A.value, (a) => (_(), S("tr", qe, [
361
+ (_(!0), S(L, null, ee($.value, (a) => (_(), S("tr", qe, [
363
362
  u("td", ke, [
364
363
  u("span", Se, [
365
364
  t[15] || (t[15] = u("span", null, "{", -1)),
@@ -396,5 +395,5 @@ const ie = { class: "flex flex-wrap mt-2" }, ve = { class: "md:w-1/2 pr-8" }, me
396
395
  }
397
396
  };
398
397
  export {
399
- Ve as default
398
+ Re as default
400
399
  };
@@ -1,13 +1,12 @@
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";
1
+ import { computed as d, ref as L, onMounted as D, createElementBlock as $, openBlock as z, Fragment as E, createVNode as r, unref as n, withCtx as c, createElementVNode as p, toDisplayString as F, h as a } from "vue";
2
+ import { i as I, q as P, t as s, e as m, k as T, _ as u, l as q, g as R } from "./index-Fmomw6wi.js";
4
3
  import { storeToRefs as g } from "pinia";
5
4
  import { NDataTable as w, NEmpty as A } from "naive-ui";
6
- import { RouterLink as G } from "vue-router";
7
- const Q = {
5
+ import { RouterLink as V } from "vue-router";
6
+ const O = {
8
7
  __name: "AdminServersList",
9
- setup(V) {
10
- const i = R(), o = $(), v = d(() => [
8
+ setup(G) {
9
+ const i = I(), o = P(), v = d(() => [
11
10
  { route: "/", text: "GameAP", icon: "gicon gicon-gameap" },
12
11
  { route: { name: "admin.servers.index" }, text: s("servers.game_servers") }
13
12
  ]), _ = () => [
@@ -19,7 +18,7 @@ const Q = {
19
18
  title: s("servers.game"),
20
19
  key: "game",
21
20
  render: (e) => [
22
- a(q, { game: e.gameCode, class: "mr-2" }),
21
+ a(R, { game: e.gameCode, class: "mr-2" }),
23
22
  e.game
24
23
  ]
25
24
  },
@@ -32,7 +31,7 @@ const Q = {
32
31
  render: (e) => {
33
32
  let t = b.value.find((l) => l.id === e.nodeId);
34
33
  return a(
35
- G,
34
+ V,
36
35
  {
37
36
  to: { name: "admin.nodes.view", params: { id: t.id } },
38
37
  class: "text-blue-600 underline dark:text-blue-500 hover:no-underline"
@@ -72,9 +71,9 @@ const Q = {
72
71
  pageSize: 20
73
72
  };
74
73
  D(() => {
75
- p(), S();
74
+ f(), S();
76
75
  });
77
- const p = () => {
76
+ const f = () => {
78
77
  i.fetchServersByFilter([]).catch((e) => {
79
78
  m(e);
80
79
  });
@@ -121,24 +120,24 @@ const Q = {
121
120
  i.deleteById(e, t).catch((l) => {
122
121
  m(l);
123
122
  }).finally(() => {
124
- p();
123
+ f();
125
124
  });
126
125
  };
127
- return (e, t) => (E(), z(F, null, [
128
- n(r(P), { items: v.value }, null, 8, ["items"]),
129
- n(u, {
126
+ return (e, t) => (z(), $(E, null, [
127
+ r(n(T), { items: v.value }, null, 8, ["items"]),
128
+ r(u, {
130
129
  color: "green",
131
130
  size: "middle",
132
131
  class: "mb-5",
133
132
  route: { name: "admin.servers.create" }
134
133
  }, {
135
134
  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)
135
+ t[0] || (t[0] = p("i", { class: "fa fa-plus-square mr-0.5" }, null, -1)),
136
+ p("span", null, F(n(s)("servers.create")), 1)
138
137
  ]),
139
138
  _: 1
140
139
  }),
141
- n(r(w), {
140
+ r(n(w), {
142
141
  ref: "tableRef",
143
142
  bordered: !1,
144
143
  "single-line": !0,
@@ -148,11 +147,11 @@ const Q = {
148
147
  pagination: y
149
148
  }, {
150
149
  loading: c(() => [
151
- n(r(T))
150
+ r(n(q))
152
151
  ]),
153
152
  empty: c(() => [
154
- n(r(A), {
155
- description: r(s)("servers.empty_list")
153
+ r(n(A), {
154
+ description: n(s)("servers.empty_list")
156
155
  }, null, 8, ["description"])
157
156
  ]),
158
157
  _: 1
@@ -161,5 +160,5 @@ const Q = {
161
160
  }
162
161
  };
163
162
  export {
164
- Q as default
163
+ O as default
165
164
  };