@gameap/frontend 4.1.0-dev8 → 4.1.0-dev9

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 (77) hide show
  1. package/dist/{AdminClientCertificatesView-BQyXmri1.js → AdminClientCertificatesView-rVNAX5Dl.js} +97 -94
  2. package/dist/AdminDaemonTaskListView-CoUVp9tK.js +316 -0
  3. package/dist/{AdminDaemonTaskOutputView-DRrZwAwW.js → AdminDaemonTaskOutputView-BJpuWCtc.js} +18 -17
  4. package/dist/{AdminGamesEdit-CDTCJu52.js → AdminGamesEdit-HKWU2C59.js} +121 -117
  5. package/dist/AdminGamesList-BwN_RFDY.js +518 -0
  6. package/dist/{AdminModEdit-P0crpkM3.js → AdminModEdit-CbVGlk5M.js} +123 -119
  7. package/dist/AdminNodeShowView-C7VsvwQo.js +175 -0
  8. package/dist/AdminNodesCreateView-BfEHhFn2.js +87 -0
  9. package/dist/{AdminNodesEditView-DdNciuMa.js → AdminNodesEditView-DE-zhVTd.js} +11 -11
  10. package/dist/AdminNodesView-QMdy3oJ1.js +167 -0
  11. package/dist/AdminPluginsView-BBALhxPk.js +984 -0
  12. package/dist/{AdminServersCreate-zGHHAEkO.js → AdminServersCreate-g_A290kz.js} +122 -124
  13. package/dist/{AdminServersEdit-BR6sRGlM.js → AdminServersEdit-D0RERbR5.js} +125 -124
  14. package/dist/{AdminServersList-DhUQ1zrt.js → AdminServersList-_ek_2u8B.js} +35 -31
  15. package/dist/{AdminUsersEditView-CqRLzCkV.js → AdminUsersEditView-CbZCH6eM.js} +89 -85
  16. package/dist/{AdminUsersView-TCHghzxY.js → AdminUsersView-D4WoRB5b.js} +145 -141
  17. package/dist/CreateModForm-CpbIOQNu.js +123 -0
  18. package/dist/CreateNodeModal-C96UVcAJ.js +99 -0
  19. package/dist/{DsIpSelector-EnBHsJLE.js → DsIpSelector-D_hc_JYQ.js} +1 -1
  20. package/dist/EmptyView-qkQQJ_OR.js +9 -0
  21. package/dist/FileManager-v-1ASSne.js +5931 -0
  22. package/dist/GameIcon-DaYNlnur.js +87 -0
  23. package/dist/{GameModSelector-bZsSGC6T.js → GameModSelector-CiI3H5Zq.js} +21 -20
  24. package/dist/InputManyList-C52f5V6l.js +110 -0
  25. package/dist/InputTextList-5KeNATa7.js +63 -0
  26. package/dist/PluginPendingView-CDR44QCG.js +34 -0
  27. package/dist/ProfileView-CC3KJ2gK.js +295 -0
  28. package/dist/RconConsole-DkRK7vz3.js +74 -0
  29. package/dist/{RconPlayers-CXL0bHlU.js → RconPlayers-CDRCp79f.js} +131 -127
  30. package/dist/ServerConsole-Bj0Zr1BS.js +99 -0
  31. package/dist/ServerControlButton-C4zWzA-d.js +185 -0
  32. package/dist/ServerIdView-BJS6wcMH.js +608 -0
  33. package/dist/{ServerSelector-D7O1thVu.js → ServerSelector-DPM5SjWO.js} +7 -7
  34. package/dist/{ServerSettings-Lk4lq5hI.js → ServerSettings-BYRSLaJk.js} +26 -26
  35. package/dist/{ServerStatus-CCFiPWXV.js → ServerStatus-BK8yKehx.js} +1 -1
  36. package/dist/{ServerTasks-gNFBkyv1.js → ServerTasks-DUC2DDcY.js} +304 -302
  37. package/dist/ServersView-BbLoOEEz.js +312 -0
  38. package/dist/SettingsParameters-C-TFWsJF.js +89 -0
  39. package/dist/SmartPortSelector-DCsuCDpV.js +174 -0
  40. package/dist/TokensView-B5D45QbV.js +392 -0
  41. package/dist/{UpdateNodeForm-BQDjp3CR.js → UpdateNodeForm-DmAoHURu.js} +131 -127
  42. package/dist/UserServerPrivileges-k-30v4ps.js +319 -0
  43. package/dist/{_createCompounder-NPjOAZm-.js → _createCompounder-DHQYnhTQ.js} +2 -2
  44. package/dist/{camelCase-BXg45SFI.js → camelCase-CE1GGhvX.js} +2 -2
  45. package/dist/{capitalize-BSQeiLff.js → capitalize-DnZmwhT4.js} +5 -5
  46. package/dist/{clientCertificates-Dm0Bh62v.js → clientCertificates-Dd9OqxGQ.js} +1 -1
  47. package/dist/frontend.css +6 -14
  48. package/dist/{gameList-CJAymSBL.js → gameList-BLdEusRA.js} +40 -40
  49. package/dist/gameap.svg +3 -0
  50. package/dist/gameap_full.svg +9 -0
  51. package/dist/index-BDKiNPpP.js +3840 -0
  52. package/dist/index.js +1 -1
  53. package/dist/isEmpty-lBntcFaB.js +263 -0
  54. package/dist/join-CmlzL0H9.js +7 -0
  55. package/dist/{loader-BGOXrNPF.js → loader-C49Def-j.js} +1 -1
  56. package/dist/{snakeCase-o1mQEFQr.js → snakeCase--wUVfLw4.js} +1 -1
  57. package/dist/validators-BVXTUmow.js +65 -0
  58. package/package.json +1 -1
  59. package/dist/AdminDaemonTaskListView-DTQbTpkt.js +0 -315
  60. package/dist/AdminGamesList-CU_RB7gu.js +0 -499
  61. package/dist/AdminNodeShowView-Col-7fyA.js +0 -166
  62. package/dist/AdminNodesCreateView-CZsMnSCJ.js +0 -84
  63. package/dist/AdminNodesView-DvuZ9haB.js +0 -160
  64. package/dist/CreateModForm-Byq8UvuW.js +0 -122
  65. package/dist/CreateNodeModal-BNV35RnR.js +0 -93
  66. package/dist/FileManager-X3FkHNzF.js +0 -31882
  67. package/dist/InputManyList-BFGIEnls.js +0 -110
  68. package/dist/InputTextList-D280D5fs.js +0 -63
  69. package/dist/PluginPendingView-Cp6KgA8z.js +0 -31
  70. package/dist/RconConsole-BxjHKC6E.js +0 -74
  71. package/dist/ServerConsole-Cr-BZJIC.js +0 -98
  72. package/dist/ServerIdView-wsnPfVUi.js +0 -576
  73. package/dist/SettingsParameters-BVpVg868.js +0 -87
  74. package/dist/SmartPortSelector-bubAEnvR.js +0 -161
  75. package/dist/UserServerPrivileges-CizE2EYl.js +0 -318
  76. package/dist/_commonjsHelpers-C6fGbg64.js +0 -6
  77. package/dist/index-Fmomw6wi.js +0 -5750
@@ -0,0 +1,74 @@
1
+ import { ref as v, computed as h, onMounted as g, createElementBlock as e, openBlock as o, createElementVNode as a, createCommentVNode as x, createVNode as c, unref as t, toDisplayString as d, Fragment as k, renderList as b, withKeys as y, withCtx as w } from "vue";
2
+ import { NInput as C } from "naive-ui";
3
+ import { l as R, _ as N, a as S, e as $ } from "./index-BDKiNPpP.js";
4
+ import { storeToRefs as V } from "pinia";
5
+ import { u as B } from "./ServerIdView-BJS6wcMH.js";
6
+ const E = { id: "rcon-console-component" }, F = { class: "coding inverse-toggle px-5 pt-4 shadow-lg text-stone-100 text-sm font-mono subpixel-antialiased bg-stone-800 dark:bg-stone-900 pb-6 pt-4 rounded-lg leading-normal overflow-hidden" }, I = {
7
+ ref: "consoleRef",
8
+ class: "whitespace-pre-wrap mt-4 flex h-[40vh] overflow-y-scroll overscroll-contain"
9
+ }, K = {
10
+ key: 0,
11
+ class: "flex w-full items-center justify-center"
12
+ }, j = { key: 1 }, z = {
13
+ key: 0,
14
+ class: "gap-x-2 mt-2"
15
+ }, A = ["onClick"], D = { class: "grid grid-cols-8 gap-x-2 mt-2" }, L = { class: "col-span-7 w-full" }, M = { class: "hidden lg:inline" }, P = {
16
+ __name: "RconConsole",
17
+ props: {
18
+ serverId: null
19
+ },
20
+ setup(T) {
21
+ const l = B(), { output: _, fastRcon: m } = V(l), n = v(""), u = h(() => l.loading), i = () => {
22
+ l.sendCommand(n.value).then(() => {
23
+ n.value = "";
24
+ }).catch((s) => {
25
+ $(s);
26
+ });
27
+ }, f = (s) => {
28
+ n.value = s, i();
29
+ };
30
+ return g(() => {
31
+ l.fetchFastRcon();
32
+ }), (s, p) => (o(), e("div", E, [
33
+ a("div", F, [
34
+ a("div", I, [
35
+ u.value ? (o(), e("div", K, [
36
+ c(t(R))
37
+ ])) : (o(), e("div", j, d(t(_)), 1))
38
+ ], 512)
39
+ ]),
40
+ t(m) ? (o(), e("div", z, [
41
+ (o(!0), e(k, null, b(t(m), (r) => (o(), e("span", {
42
+ onClick: (U) => f(r.command),
43
+ class: "bg-stone-100 hover:bg-stone-200 text-stone-800 text-xs font-medium me-2 px-2.5 py-1 rounded dark:bg-stone-700 dark:text-stone-300 cursor-pointer"
44
+ }, d(r.info), 9, A))), 256))
45
+ ])) : x("", !0),
46
+ a("div", D, [
47
+ a("div", L, [
48
+ c(t(C), {
49
+ value: n.value,
50
+ "onUpdate:value": p[0] || (p[0] = (r) => n.value = r),
51
+ onKeyup: y(i, ["enter"]),
52
+ disabled: u.value,
53
+ type: "text",
54
+ placeholder: ""
55
+ }, null, 8, ["value", "disabled"])
56
+ ]),
57
+ c(N, {
58
+ color: "black",
59
+ size: "small",
60
+ onClick: i
61
+ }, {
62
+ default: w(() => [
63
+ c(t(S), { name: "terminal" }),
64
+ a("span", M, " " + d(s.trans("main.send")), 1)
65
+ ]),
66
+ _: 1
67
+ })
68
+ ])
69
+ ]));
70
+ }
71
+ };
72
+ export {
73
+ P as default
74
+ };
@@ -1,115 +1,116 @@
1
- import { resolveComponent as k, createElementBlock as u, openBlock as m, createVNode as f, withCtx as h, createElementVNode as s, createCommentVNode as c, toDisplayString as o, Fragment as O, renderList as D, withDirectives as _, vModelText as w, ref as L } from "vue";
2
- import { storeToRefs as G } from "pinia";
3
- import { S as B, J as S, K as T, L as C, M as U, N as M, O as z, P as K, Q as R, R as V, T as I, U as q, V as H, W as J, X as Q, Y as W, Z as X, b as Y, _ as Z, n as P, e as v, u as x, $ as A } from "./index-Fmomw6wi.js";
4
- import { u as $ } from "./ServerIdView-wsnPfVUi.js";
1
+ import { resolveComponent as y, createElementBlock as u, openBlock as m, createVNode as h, withCtx as p, createElementVNode as t, createCommentVNode as c, toDisplayString as o, Fragment as O, renderList as D, withDirectives as _, vModelText as w, ref as L } from "vue";
2
+ import { storeToRefs as B } from "pinia";
3
+ import { W as T, H as S, X as U, Y as R, Z as z, $ as H, G as M, R as K, a0 as C, a1 as V, a2 as q, a3 as W, a4 as X, a5 as Y, c as Z, a as J, _ as Q, n as P, e as v, u as $ } from "./index-BDKiNPpP.js";
4
+ import { u as x } from "./ServerIdView-BJS6wcMH.js";
5
5
  import "naive-ui";
6
- var j = 1, ee = 2;
7
- function re(e, r, n, i) {
8
- var a = n.length, t = a;
6
+ import { S as j, b as I, a as ee, i as A } from "./isEmpty-lBntcFaB.js";
7
+ var re = 1, ne = 2;
8
+ function se(e, r, n, a) {
9
+ var i = n.length, s = i;
9
10
  if (e == null)
10
- return !t;
11
- for (e = Object(e); a--; ) {
12
- var d = n[a];
11
+ return !s;
12
+ for (e = Object(e); i--; ) {
13
+ var d = n[i];
13
14
  if (d[2] ? d[1] !== e[d[0]] : !(d[0] in e))
14
15
  return !1;
15
16
  }
16
- for (; ++a < t; ) {
17
- d = n[a];
18
- var p = d[0], g = e[p], l = d[1];
17
+ for (; ++i < s; ) {
18
+ d = n[i];
19
+ var f = d[0], b = e[f], k = d[1];
19
20
  if (d[2]) {
20
- if (g === void 0 && !(p in e))
21
+ if (b === void 0 && !(f in e))
21
22
  return !1;
22
23
  } else {
23
- var b = new B(), y;
24
- if (!(y === void 0 ? S(l, g, j | ee, i, b) : y))
24
+ var l = new j(), g;
25
+ if (!(g === void 0 ? I(k, b, re | ne, a, l) : g))
25
26
  return !1;
26
27
  }
27
28
  }
28
29
  return !0;
29
30
  }
30
- function N(e) {
31
+ function F(e) {
31
32
  return e === e && !T(e);
32
33
  }
33
- function ne(e) {
34
- for (var r = C(e), n = r.length; n--; ) {
35
- var i = r[n], a = e[i];
36
- r[n] = [i, a, N(a)];
34
+ function te(e) {
35
+ for (var r = S(e), n = r.length; n--; ) {
36
+ var a = r[n], i = e[a];
37
+ r[n] = [a, i, F(i)];
37
38
  }
38
39
  return r;
39
40
  }
40
- function F(e, r) {
41
+ function G(e, r) {
41
42
  return function(n) {
42
43
  return n == null ? !1 : n[e] === r && (r !== void 0 || e in Object(n));
43
44
  };
44
45
  }
45
- function se(e) {
46
- var r = ne(e);
47
- return r.length == 1 && r[0][2] ? F(r[0][0], r[0][1]) : function(n) {
48
- return n === e || re(n, e, r);
46
+ function oe(e) {
47
+ var r = te(e);
48
+ return r.length == 1 && r[0][2] ? G(r[0][0], r[0][1]) : function(n) {
49
+ return n === e || se(n, e, r);
49
50
  };
50
51
  }
51
- function te(e, r) {
52
+ function ae(e, r) {
52
53
  return e != null && r in Object(e);
53
54
  }
54
- function oe(e, r, n) {
55
+ function ie(e, r, n) {
55
56
  r = U(r, e);
56
- for (var i = -1, a = r.length, t = !1; ++i < a; ) {
57
- var d = M(r[i]);
58
- if (!(t = e != null && n(e, d)))
57
+ for (var a = -1, i = r.length, s = !1; ++a < i; ) {
58
+ var d = R(r[a]);
59
+ if (!(s = e != null && n(e, d)))
59
60
  break;
60
61
  e = e[d];
61
62
  }
62
- return t || ++i != a ? t : (a = e == null ? 0 : e.length, !!a && z(a) && K(d, a) && (R(e) || V(e)));
63
+ return s || ++a != i ? s : (i = e == null ? 0 : e.length, !!i && z(i) && H(d, i) && (M(e) || K(e)));
63
64
  }
64
- function ie(e, r) {
65
- return e != null && oe(e, r, te);
65
+ function le(e, r) {
66
+ return e != null && ie(e, r, ae);
66
67
  }
67
- var ae = 1, le = 2;
68
- function de(e, r) {
69
- return I(e) && N(r) ? F(M(e), r) : function(n) {
70
- var i = q(n, e);
71
- return i === void 0 && i === r ? ie(n, e) : S(r, i, ae | le);
68
+ var de = 1, ue = 2;
69
+ function me(e, r) {
70
+ return C(e) && F(r) ? G(R(e), r) : function(n) {
71
+ var a = V(n, e);
72
+ return a === void 0 && a === r ? le(n, e) : I(r, a, de | ue);
72
73
  };
73
74
  }
74
- function ue(e) {
75
+ function ce(e) {
75
76
  return function(r) {
76
77
  return r?.[e];
77
78
  };
78
79
  }
79
- function me(e) {
80
+ function he(e) {
80
81
  return function(r) {
81
- return H(r, e);
82
+ return q(r, e);
82
83
  };
83
84
  }
84
- function ce(e) {
85
- return I(e) ? ue(M(e)) : me(e);
86
- }
87
- function he(e) {
88
- return typeof e == "function" ? e : e == null ? J : typeof e == "object" ? R(e) ? de(e[0], e[1]) : se(e) : ce(e);
85
+ function fe(e) {
86
+ return C(e) ? ce(R(e)) : he(e);
89
87
  }
90
- var fe = Q();
91
- function pe(e, r) {
92
- return e && fe(e, r, C);
88
+ function pe(e) {
89
+ return typeof e == "function" ? e : e == null ? W : typeof e == "object" ? M(e) ? me(e[0], e[1]) : oe(e) : fe(e);
93
90
  }
94
- var ge = W(pe);
91
+ var ge = X();
95
92
  function be(e, r) {
93
+ return e && ge(e, r, S);
94
+ }
95
+ var ye = Y(be);
96
+ function ke(e, r) {
96
97
  var n;
97
- return ge(e, function(i, a, t) {
98
- return n = r(i, a, t), !n;
98
+ return ye(e, function(a, i, s) {
99
+ return n = r(a, i, s), !n;
99
100
  }), !!n;
100
101
  }
101
102
  function E(e, r, n) {
102
- var i = R(e) ? X : be;
103
- return i(e, he(r));
103
+ var a = M(e) ? ee : ke;
104
+ return a(e, pe(r));
104
105
  }
105
- const ye = {
106
+ const _e = {
106
107
  name: "RconPlayers",
107
- components: { GButton: Z },
108
+ components: { GButton: Q, GIcon: J },
108
109
  props: {
109
110
  serverId: Number
110
111
  },
111
112
  setup() {
112
- const e = x(), r = $(), { players: n } = G(r);
113
+ const e = $(), r = x(), { players: n } = B(r);
113
114
  return {
114
115
  serverStore: e,
115
116
  rconStore: r,
@@ -232,90 +233,93 @@ const ye = {
232
233
  mounted() {
233
234
  this.serverStore.setServerId(this.serverId), this.rconStore.fetchPlayers();
234
235
  }
235
- }, ke = { id: "rcon-players-component" }, _e = { key: 0 }, we = { key: 1 }, Pe = { key: 2 }, ve = { key: 0 }, Ae = { key: 1 }, Ee = { key: 2 }, Me = { class: "grid grid-cols-2 gap-x-4" }, Re = { class: "hidden lg:inline" }, Se = { class: "hidden lg:inline" }, Ce = {
236
+ }, we = { id: "rcon-players-component" }, Pe = { key: 0 }, ve = { key: 1 }, Ae = { key: 2 }, Ee = { key: 0 }, Re = { key: 1 }, Me = { key: 2 }, Se = { class: "grid grid-cols-2 gap-x-4" }, Ce = { class: "hidden lg:inline" }, Ie = { class: "hidden lg:inline" }, Fe = {
236
237
  key: 0,
237
238
  class: "mb-3"
238
- }, Ie = {
239
+ }, Ge = {
239
240
  for: "input-reason",
240
241
  class: "control-label"
241
242
  }, Ne = {
242
243
  key: 0,
243
244
  class: "help-block"
244
- }, Fe = { class: "text-red-600" }, Oe = {
245
+ }, Oe = { class: "text-red-600" }, De = {
245
246
  key: 1,
246
247
  class: "mb-3"
247
- }, De = {
248
+ }, Le = {
248
249
  for: "input-time",
249
250
  class: "control-label"
250
- }, Le = {
251
+ }, Be = {
251
252
  key: 0,
252
253
  class: "help-block"
253
- }, Ge = { class: "text-red-600" }, Be = {
254
+ }, Te = { class: "text-red-600" }, Ue = {
254
255
  key: 2,
255
256
  class: "mb-3"
256
- }, Te = {
257
+ }, ze = {
257
258
  for: "input-mesage",
258
259
  class: "control-label"
259
- }, Ue = {
260
+ }, He = {
260
261
  key: 0,
261
262
  class: "help-block"
262
- }, ze = { class: "text-red-600" };
263
- function Ke(e, r, n, i, a, t) {
264
- const d = k("GButton"), p = k("n-table"), g = k("n-modal");
265
- return m(), u("div", ke, [
266
- f(d, {
263
+ }, Ke = { class: "text-red-600" };
264
+ function Ve(e, r, n, a, i, s) {
265
+ const d = y("GIcon"), f = y("GButton"), b = y("n-table"), k = y("n-modal");
266
+ return m(), u("div", we, [
267
+ h(f, {
267
268
  color: "green",
268
269
  size: "small",
269
270
  class: "mb-2",
270
- onClick: t.updatePlayers
271
+ onClick: s.updatePlayers
271
272
  }, {
272
- default: h(() => [...r[6] || (r[6] = [
273
- s("i", { class: "fas fa-sync" }, null, -1)
274
- ])]),
273
+ default: p(() => [
274
+ h(d, { name: "sync" })
275
+ ]),
275
276
  _: 1
276
277
  }, 8, ["onClick"]),
277
- f(p, {
278
+ h(b, {
278
279
  size: "small",
279
280
  bordered: !1
280
281
  }, {
281
- default: h(() => [
282
- s("thead", null, [
283
- s("tr", null, [
284
- s("th", null, o(e.trans("rcon.player_name")), 1),
285
- t.scoreRow ? (m(), u("th", _e, o(e.trans("rcon.player_score")), 1)) : c("", !0),
286
- t.pingRow ? (m(), u("th", we, o(e.trans("rcon.player_ping")), 1)) : c("", !0),
287
- t.ipRow ? (m(), u("th", Pe, o(e.trans("rcon.player_ip")), 1)) : c("", !0),
288
- s("th", null, o(e.trans("main.actions")), 1)
282
+ default: p(() => [
283
+ t("thead", null, [
284
+ t("tr", null, [
285
+ t("th", null, o(e.trans("rcon.player_name")), 1),
286
+ s.scoreRow ? (m(), u("th", Pe, o(e.trans("rcon.player_score")), 1)) : c("", !0),
287
+ s.pingRow ? (m(), u("th", ve, o(e.trans("rcon.player_ping")), 1)) : c("", !0),
288
+ s.ipRow ? (m(), u("th", Ae, o(e.trans("rcon.player_ip")), 1)) : c("", !0),
289
+ t("th", null, o(e.trans("main.actions")), 1)
289
290
  ])
290
291
  ]),
291
- (m(!0), u(O, null, D(i.players, (l, b) => (m(), u("tbody", null, [
292
- s("tr", null, [
293
- s("td", null, o(l.name), 1),
294
- t.scoreRow ? (m(), u("td", ve, o(l.score), 1)) : c("", !0),
295
- t.pingRow ? (m(), u("td", Ae, o(l.ping), 1)) : c("", !0),
296
- t.ipRow ? (m(), u("td", Ee, o(l.ip), 1)) : c("", !0),
297
- s("td", Me, [
298
- f(d, {
292
+ (m(!0), u(O, null, D(a.players, (l, g) => (m(), u("tbody", null, [
293
+ t("tr", null, [
294
+ t("td", null, o(l.name), 1),
295
+ s.scoreRow ? (m(), u("td", Ee, o(l.score), 1)) : c("", !0),
296
+ s.pingRow ? (m(), u("td", Re, o(l.ping), 1)) : c("", !0),
297
+ s.ipRow ? (m(), u("td", Me, o(l.ip), 1)) : c("", !0),
298
+ t("td", Se, [
299
+ h(f, {
299
300
  color: "black",
300
301
  size: "small",
301
302
  class: "mb-2",
302
- onClick: (y) => t.openDialog("kick", b)
303
+ onClick: (N) => s.openDialog("kick", g)
303
304
  }, {
304
- default: h(() => [
305
- r[7] || (r[7] = s("i", { class: "gicon gicon-kick mr-1" }, null, -1)),
306
- s("span", Re, o(e.trans("rcon.kick")), 1)
305
+ default: p(() => [
306
+ r[6] || (r[6] = t("i", { class: "gicon gicon-kick mr-1" }, null, -1)),
307
+ t("span", Ce, o(e.trans("rcon.kick")), 1)
307
308
  ]),
308
309
  _: 1
309
310
  }, 8, ["onClick"]),
310
- f(d, {
311
+ h(f, {
311
312
  color: "black",
312
313
  size: "small",
313
314
  class: "mb-2",
314
- onClick: (y) => t.openDialog("ban", b)
315
+ onClick: (N) => s.openDialog("ban", g)
315
316
  }, {
316
- default: h(() => [
317
- r[8] || (r[8] = s("i", { class: "fas fa-ban mr-1" }, null, -1)),
318
- s("span", Se, o(e.trans("rcon.ban")), 1)
317
+ default: p(() => [
318
+ h(d, {
319
+ name: "ban",
320
+ class: "mr-1"
321
+ }),
322
+ t("span", Ie, o(e.trans("rcon.ban")), 1)
319
323
  ]),
320
324
  _: 1
321
325
  }, 8, ["onClick"])
@@ -325,34 +329,34 @@ function Ke(e, r, n, i, a, t) {
325
329
  ]),
326
330
  _: 1
327
331
  }),
328
- f(g, {
332
+ h(k, {
329
333
  show: e.modalEnabled,
330
334
  "onUpdate:show": r[5] || (r[5] = (l) => e.modalEnabled = l),
331
335
  class: "custom-card",
332
336
  preset: "card",
333
- title: t.dialogTitle,
337
+ title: s.dialogTitle,
334
338
  bordered: !1,
335
339
  style: { width: "600px" },
336
340
  segmented: e.segmented
337
341
  }, {
338
- footer: h(() => [
339
- s("button", {
342
+ footer: p(() => [
343
+ t("button", {
340
344
  type: "button",
341
345
  class: "inline-block align-middle text-center select-none border font-normal whitespace-no-wrap rounded py-2 px-3 leading-normal no-underline bg-blue-600 text-white hover:bg-blue-600 me-1",
342
- onClick: r[3] || (r[3] = (...l) => t.send && t.send(...l))
346
+ onClick: r[3] || (r[3] = (...l) => s.send && s.send(...l))
343
347
  }, o(e.trans("main.send")), 1),
344
- s("button", {
348
+ t("button", {
345
349
  type: "button",
346
350
  class: "inline-block align-middle text-center select-none border font-normal whitespace-no-wrap rounded py-2 px-3 leading-normal no-underline bg-stone-600 text-white hover:bg-stone-700",
347
- onClick: r[4] || (r[4] = (...l) => t.hideModal && t.hideModal(...l))
351
+ onClick: r[4] || (r[4] = (...l) => s.hideModal && s.hideModal(...l))
348
352
  }, o(e.trans("main.close")), 1)
349
353
  ]),
350
- default: h(() => [
351
- s("div", null, [
352
- s("form", null, [
353
- e.dialogAction === "ban" || e.dialogAction === "kick" ? (m(), u("div", Ce, [
354
- s("label", Ie, o(e.trans("rcon.reason")), 1),
355
- _(s("input", {
354
+ default: p(() => [
355
+ t("div", null, [
356
+ t("form", null, [
357
+ e.dialogAction === "ban" || e.dialogAction === "kick" ? (m(), u("div", Fe, [
358
+ t("label", Ge, o(e.trans("rcon.reason")), 1),
359
+ _(t("input", {
356
360
  "onUpdate:modelValue": r[0] || (r[0] = (l) => e.form.reason = l),
357
361
  id: "input-reason",
358
362
  type: "text",
@@ -366,12 +370,12 @@ function Ke(e, r, n, i, a, t) {
366
370
  ]
367
371
  ]),
368
372
  e.errors.reason ? (m(), u("span", Ne, [
369
- s("strong", Fe, o(e.errors.reason), 1)
373
+ t("strong", Oe, o(e.errors.reason), 1)
370
374
  ])) : c("", !0)
371
375
  ])) : c("", !0),
372
- e.dialogAction === "ban" ? (m(), u("div", Oe, [
373
- s("label", De, o(e.trans("rcon.time")), 1),
374
- _(s("input", {
376
+ e.dialogAction === "ban" ? (m(), u("div", De, [
377
+ t("label", Le, o(e.trans("rcon.time")), 1),
378
+ _(t("input", {
375
379
  "onUpdate:modelValue": r[1] || (r[1] = (l) => e.form.time = l),
376
380
  id: "input-time",
377
381
  type: "number",
@@ -384,13 +388,13 @@ function Ke(e, r, n, i, a, t) {
384
388
  { number: !0 }
385
389
  ]
386
390
  ]),
387
- e.errors.time ? (m(), u("span", Le, [
388
- s("strong", Ge, o(e.errors.time), 1)
391
+ e.errors.time ? (m(), u("span", Be, [
392
+ t("strong", Te, o(e.errors.time), 1)
389
393
  ])) : c("", !0)
390
394
  ])) : c("", !0),
391
- e.dialogAction === "message" ? (m(), u("div", Be, [
392
- s("label", Te, o(e.trans("rcon.message")), 1),
393
- _(s("input", {
395
+ e.dialogAction === "message" ? (m(), u("div", Ue, [
396
+ t("label", ze, o(e.trans("rcon.message")), 1),
397
+ _(t("input", {
394
398
  "onUpdate:modelValue": r[2] || (r[2] = (l) => e.form.message = l),
395
399
  id: "input-mesage",
396
400
  type: "text",
@@ -403,8 +407,8 @@ function Ke(e, r, n, i, a, t) {
403
407
  { number: !0 }
404
408
  ]
405
409
  ]),
406
- e.errors.message ? (m(), u("span", Ue, [
407
- s("strong", ze, o(e.errors.message), 1)
410
+ e.errors.message ? (m(), u("span", He, [
411
+ t("strong", Ke, o(e.errors.message), 1)
408
412
  ])) : c("", !0)
409
413
  ])) : c("", !0)
410
414
  ])
@@ -414,7 +418,7 @@ function Ke(e, r, n, i, a, t) {
414
418
  }, 8, ["show", "title", "segmented"])
415
419
  ]);
416
420
  }
417
- const We = /* @__PURE__ */ Y(ye, [["render", Ke]]);
421
+ const Qe = /* @__PURE__ */ Z(_e, [["render", Ve]]);
418
422
  export {
419
- We as default
423
+ Qe as default
420
424
  };
@@ -0,0 +1,99 @@
1
+ import { ref as l, onMounted as N, onUnmounted as T, createElementBlock as n, openBlock as t, createElementVNode as o, createCommentVNode as k, createVNode as I, toDisplayString as v, createBlock as A, withDirectives as B, unref as _, withKeys as V, vModelText as R, createTextVNode as S } from "vue";
2
+ import { a as $, b as x, r as D, e as H } from "./index-BDKiNPpP.js";
3
+ import { NDivider as E } from "naive-ui";
4
+ const K = { class: "w-full" }, M = { class: "coding inverse-toggle px-5 pt-4 shadow-lg text-stone-100 text-sm font-mono subpixel-antialiased bg-stone-800 dark:bg-stone-900 pb-6 pt-4 rounded-lg leading-normal overflow-hidden" }, U = {
5
+ key: 0,
6
+ class: "bg-red-500 text-white dark:bg-red-800 dark:text-stone-200 font-bold rounded px-4 py-2 mt-6 mb-3"
7
+ }, L = {
8
+ key: 1,
9
+ class: "mt-4"
10
+ }, j = { class: "relative flex items-stretch w-full" }, q = { class: "w-full" }, z = { class: "inline" }, F = ["placeholder"], G = { key: 0 }, J = { key: 1 }, W = {
11
+ __name: "ServerConsole",
12
+ props: {
13
+ serverId: Number,
14
+ consoleHostname: String,
15
+ serverActive: Boolean,
16
+ sendCommandAvailable: Boolean
17
+ },
18
+ setup(a) {
19
+ const g = a, r = l(), m = l(), h = l(null), i = l(null), d = l(!1), f = l(!1), c = l(!0), u = l(!0);
20
+ function y() {
21
+ u.value && r.value && r.value.scrollTo({ top: r.value.scrollHeight, behavior: "smooth" });
22
+ }
23
+ function p() {
24
+ c.value && x.get(`/api/servers/${g.serverId}/console`).then((e) => {
25
+ h.value = D(e.data.console, /(\r\n|\n|\r)/gm, `
26
+ `), setTimeout(y, 1e3);
27
+ }).catch((e) => {
28
+ console.log(e), c.value = !1;
29
+ });
30
+ }
31
+ function C() {
32
+ d.value || (d.value = !0, f.value = !0, x.post(`/api/servers/${g.serverId}/console`, { command: i.value }).then((e) => {
33
+ i.value = "", d.value = !1, c.value = !0, setTimeout(p, 1e3);
34
+ }).catch((e) => {
35
+ d.value = !1, console.log(e), H(e);
36
+ }).finally(() => {
37
+ f.value = !1, setTimeout(() => {
38
+ m.value && m.value.select();
39
+ }, 200);
40
+ }));
41
+ }
42
+ let b;
43
+ return N(() => {
44
+ p(), b = setInterval(p, 1e4);
45
+ }), T(() => {
46
+ c.value = !1, clearInterval(b);
47
+ }), (e, s) => (t(), n("div", null, [
48
+ o("div", K, [
49
+ o("div", M, [
50
+ s[2] || (s[2] = o("div", { class: "top mb-2 flex" }, [
51
+ o("div", { class: "h-3 w-3 bg-red-500 rounded-full" }),
52
+ o("div", { class: "ml-2 h-3 w-3 bg-orange-300 rounded-full" }),
53
+ o("div", { class: "ml-2 h-3 w-3 bg-green-500 rounded-full" })
54
+ ], -1)),
55
+ a.serverActive ? k("", !0) : (t(), n("div", U, v(e.trans("servers.offline_console_msg")), 1)),
56
+ o("div", {
57
+ ref_key: "consoleRef",
58
+ ref: r,
59
+ class: "break-all whitespace-pre-wrap mt-4 flex h-[60vh] overflow-y-scroll overscroll-contain"
60
+ }, v(h.value), 513),
61
+ a.serverActive && a.sendCommandAvailable ? (t(), n("div", L, [
62
+ o("div", j, [
63
+ o("div", q, [
64
+ o("div", z, v(a.consoleHostname) + ":> ", 1),
65
+ f.value ? (t(), A(_($), {
66
+ key: 0,
67
+ name: "loading",
68
+ class: "animate-spin"
69
+ })) : B((t(), n("input", {
70
+ key: 1,
71
+ onKeyup: V(C, ["enter"]),
72
+ "onUpdate:modelValue": s[0] || (s[0] = (w) => i.value = w),
73
+ type: "text",
74
+ ref_key: "inputRef",
75
+ ref: m,
76
+ class: "terminal-input inline md:w-[40vw] lg:w-[50vw]",
77
+ placeholder: e.trans("servers.enter_command") + " ..."
78
+ }, null, 40, F)), [
79
+ [R, i.value]
80
+ ])
81
+ ])
82
+ ])
83
+ ])) : k("", !0),
84
+ I(_(E), { dashed: "" }),
85
+ o("div", {
86
+ class: "p-1 cursor-pointer inline",
87
+ onClick: s[1] || (s[1] = (w) => u.value = !u.value)
88
+ }, [
89
+ u.value ? (t(), n("span", G, "[x]")) : (t(), n("span", J, "[ ]")),
90
+ S(" " + v(e.trans("main.autoscroll")), 1)
91
+ ])
92
+ ])
93
+ ])
94
+ ]));
95
+ }
96
+ };
97
+ export {
98
+ W as default
99
+ };