@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.
- package/dist/{AdminClientCertificatesView-DQTMJ6LY.js → AdminClientCertificatesView-BQyXmri1.js} +33 -34
- package/dist/{AdminDaemonTaskListView-Bx3e0Miy.js → AdminDaemonTaskListView-DTQbTpkt.js} +49 -50
- package/dist/{AdminDaemonTaskOutputView-BJtLdoAq.js → AdminDaemonTaskOutputView-DRrZwAwW.js} +32 -33
- package/dist/{AdminGamesEdit-hDe3Pr-7.js → AdminGamesEdit-CDTCJu52.js} +43 -44
- package/dist/{AdminGamesList-CM1xADCW.js → AdminGamesList-CU_RB7gu.js} +55 -56
- package/dist/{AdminModEdit-DDKd6Vga.js → AdminModEdit-P0crpkM3.js} +106 -107
- package/dist/{AdminNodeShowView-DMoEY2Cu.js → AdminNodeShowView-Col-7fyA.js} +34 -35
- package/dist/{AdminNodesCreateView-BXZDQIJ1.js → AdminNodesCreateView-CZsMnSCJ.js} +26 -27
- package/dist/{AdminNodesEditView-xO7-szjJ.js → AdminNodesEditView-DdNciuMa.js} +23 -24
- package/dist/{AdminNodesView-ugTPiC4h.js → AdminNodesView-DvuZ9haB.js} +16 -17
- package/dist/{AdminServersCreate-DOygFz_E.js → AdminServersCreate-zGHHAEkO.js} +56 -57
- package/dist/{AdminServersEdit-cZX6UGB1.js → AdminServersEdit-BR6sRGlM.js} +31 -32
- package/dist/{AdminServersList-CC50WRsv.js → AdminServersList-DhUQ1zrt.js} +21 -22
- package/dist/{AdminUsersEditView-CXpMKFfI.js → AdminUsersEditView-CqRLzCkV.js} +44 -45
- package/dist/{AdminUsersView-DGuGEHVR.js → AdminUsersView-TCHghzxY.js} +37 -38
- package/dist/{CreateModForm-CqhcrNFp.js → CreateModForm-Byq8UvuW.js} +23 -23
- package/dist/{CreateNodeModal-BvbJTKhD.js → CreateNodeModal-BNV35RnR.js} +1 -1
- package/dist/{DsIpSelector-DN9IyT4L.js → DsIpSelector-EnBHsJLE.js} +1 -1
- package/dist/{FileManager-8TWHezyM.js → FileManager-X3FkHNzF.js} +1 -1
- package/dist/{GameModSelector-DRIaCbGY.js → GameModSelector-bZsSGC6T.js} +4 -4
- package/dist/{InputManyList-By5xECIK.js → InputManyList-BFGIEnls.js} +1 -1
- package/dist/{InputTextList-Bm2Ofq5J.js → InputTextList-D280D5fs.js} +1 -1
- package/dist/{PluginPendingView-DHd_yijv.js → PluginPendingView-Cp6KgA8z.js} +1 -1
- package/dist/{RconConsole-DH9XeOu3.js → RconConsole-BxjHKC6E.js} +24 -25
- package/dist/{RconPlayers-GrvCMJX3.js → RconPlayers-CXL0bHlU.js} +32 -32
- package/dist/{ServerConsole-BHHnpxJy.js → ServerConsole-Cr-BZJIC.js} +1 -1
- package/dist/{ServerIdView-BfqrYuar.js → ServerIdView-wsnPfVUi.js} +141 -142
- package/dist/{ServerSelector-QMK1qiXa.js → ServerSelector-D7O1thVu.js} +1 -1
- package/dist/{ServerSettings-Cz6C8Dlh.js → ServerSettings-Lk4lq5hI.js} +1 -1
- package/dist/{ServerStatus-DBJW9C6H.js → ServerStatus-CCFiPWXV.js} +1 -1
- package/dist/{ServerTasks-Bs3iGYY3.js → ServerTasks-gNFBkyv1.js} +1 -1
- package/dist/{SettingsParameters-DCqhqxHk.js → SettingsParameters-BVpVg868.js} +1 -1
- package/dist/{SmartPortSelector-DektJC6p.js → SmartPortSelector-bubAEnvR.js} +8 -8
- package/dist/{UpdateNodeForm-CwirLUIK.js → UpdateNodeForm-BQDjp3CR.js} +1 -1
- package/dist/{UserServerPrivileges-utyKdh7O.js → UserServerPrivileges-CizE2EYl.js} +1 -1
- package/dist/{_createCompounder-DSupx5mD.js → _createCompounder-NPjOAZm-.js} +2 -2
- package/dist/{camelCase-WcUYdRB3.js → camelCase-BXg45SFI.js} +2 -2
- package/dist/{capitalize-DRKkBaYR.js → capitalize-BSQeiLff.js} +10 -10
- package/dist/{clientCertificates-BsJdUHYw.js → clientCertificates-Dm0Bh62v.js} +1 -1
- package/dist/{gameList-DpGDCxFE.js → gameList-CJAymSBL.js} +1 -1
- package/dist/{index-60qEjGuU.js → index-Fmomw6wi.js} +2333 -1954
- package/dist/index.js +1 -1
- package/dist/{loader-CrZTMKcy.js → loader-BGOXrNPF.js} +1 -1
- package/dist/{snakeCase-CTCA7tap.js → snakeCase-o1mQEFQr.js} +1 -1
- package/package.json +2 -1
|
@@ -1,59 +1,58 @@
|
|
|
1
|
-
import { ref as w, computed as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { useRoute as G } from "vue-router";
|
|
1
|
+
import { ref as w, computed as I, onMounted as L, createElementBlock as k, openBlock as _, Fragment as $, createVNode as r, createCommentVNode as B, unref as e, withCtx as u, createElementVNode as n, toDisplayString as t, createBlock as y } from "vue";
|
|
2
|
+
import { h as D, t as s, e as x, k as S, _ as v, x as U, l as V, a as A } from "./index-Fmomw6wi.js";
|
|
3
|
+
import { NCard as P, NTable as T } from "naive-ui";
|
|
4
|
+
import { storeToRefs as j } from "pinia";
|
|
5
|
+
import { useRoute as F } from "vue-router";
|
|
7
6
|
const M = {
|
|
8
7
|
key: 0,
|
|
9
8
|
class: "mb-5"
|
|
10
|
-
},
|
|
9
|
+
}, K = {
|
|
11
10
|
__name: "AdminNodeShowView",
|
|
12
11
|
setup(O) {
|
|
13
|
-
const
|
|
14
|
-
async function b(
|
|
12
|
+
const m = F(), f = D(), { daemonInfo: o, loading: N } = j(f), i = w(!1), c = w(0);
|
|
13
|
+
async function b(d, a) {
|
|
15
14
|
i.value = !0, c.value = 0;
|
|
16
15
|
try {
|
|
17
|
-
const g = await A.get(
|
|
16
|
+
const g = await A.get(d, {
|
|
18
17
|
responseType: "blob",
|
|
19
18
|
onDownloadProgress: (p) => {
|
|
20
19
|
p.total && (c.value = Math.round(p.loaded * 100 / p.total));
|
|
21
20
|
}
|
|
22
|
-
}),
|
|
23
|
-
l.href = window.URL.createObjectURL(
|
|
21
|
+
}), R = new Blob([g.data]), l = document.createElement("a");
|
|
22
|
+
l.href = window.URL.createObjectURL(R), l.setAttribute("download", a), document.body.appendChild(l), l.click(), document.body.removeChild(l), window.URL.revokeObjectURL(l.href);
|
|
24
23
|
} catch (g) {
|
|
25
|
-
|
|
24
|
+
x(g);
|
|
26
25
|
} finally {
|
|
27
26
|
i.value = !1, c.value = 0;
|
|
28
27
|
}
|
|
29
28
|
}
|
|
30
|
-
function
|
|
31
|
-
b(`/api/dedicated_servers/${
|
|
29
|
+
function h() {
|
|
30
|
+
b(`/api/dedicated_servers/${m.params.id}/logs.zip`, "logs.zip");
|
|
32
31
|
}
|
|
33
32
|
function z() {
|
|
34
33
|
b("/api/dedicated_servers/certificates.zip", "certificates.zip");
|
|
35
34
|
}
|
|
36
|
-
const C =
|
|
37
|
-
let
|
|
35
|
+
const C = I(() => {
|
|
36
|
+
let d = [
|
|
38
37
|
{ route: "/", text: "GameAP", icon: "gicon gicon-gameap" },
|
|
39
38
|
{ route: { name: "admin.nodes.index" }, text: s("dedicated_servers.dedicated_servers") }
|
|
40
39
|
];
|
|
41
|
-
return o.value.name &&
|
|
40
|
+
return o.value.name && d.push({ text: o.value.name }), d;
|
|
42
41
|
});
|
|
43
|
-
return
|
|
44
|
-
f.setNodeId(
|
|
45
|
-
|
|
42
|
+
return L(() => {
|
|
43
|
+
f.setNodeId(m.params.id), f.fetchDaemonInfo().catch((d) => {
|
|
44
|
+
x(d);
|
|
46
45
|
});
|
|
47
|
-
}), (
|
|
48
|
-
r(e(
|
|
46
|
+
}), (d, a) => (_(), k($, null, [
|
|
47
|
+
r(e(S), { items: C.value }, null, 8, ["items"]),
|
|
49
48
|
r(v, {
|
|
50
49
|
color: "blue",
|
|
51
50
|
size: "middle",
|
|
52
51
|
class: "mb-5 mr-1",
|
|
53
|
-
route: { name: "admin.nodes.edit", params: { id: e(
|
|
52
|
+
route: { name: "admin.nodes.edit", params: { id: e(m).params.id } }
|
|
54
53
|
}, {
|
|
55
54
|
default: u(() => [
|
|
56
|
-
|
|
55
|
+
a[0] || (a[0] = n("i", { class: "fa-solid fa-edit mr-0.5" }, null, -1)),
|
|
57
56
|
n("span", null, t(e(s)("main.edit")), 1)
|
|
58
57
|
]),
|
|
59
58
|
_: 1
|
|
@@ -63,10 +62,10 @@ const M = {
|
|
|
63
62
|
size: "middle",
|
|
64
63
|
class: "mb-5 mr-1",
|
|
65
64
|
disabled: i.value,
|
|
66
|
-
onClick:
|
|
65
|
+
onClick: h
|
|
67
66
|
}, {
|
|
68
67
|
default: u(() => [
|
|
69
|
-
|
|
68
|
+
a[1] || (a[1] = n("i", { class: "fa-solid fa-download mr-0.5" }, null, -1)),
|
|
70
69
|
n("span", null, t(e(s)("dedicated_servers.download_logs")), 1)
|
|
71
70
|
]),
|
|
72
71
|
_: 1
|
|
@@ -79,15 +78,15 @@ const M = {
|
|
|
79
78
|
onClick: z
|
|
80
79
|
}, {
|
|
81
80
|
default: u(() => [
|
|
82
|
-
|
|
81
|
+
a[2] || (a[2] = n("i", { class: "fa-solid fa-download mr-0.5" }, null, -1)),
|
|
83
82
|
n("span", null, t(e(s)("dedicated_servers.download_certificates")), 1)
|
|
84
83
|
]),
|
|
85
84
|
_: 1
|
|
86
85
|
}, 8, ["disabled"]),
|
|
87
|
-
i.value ? (
|
|
88
|
-
r(e(
|
|
89
|
-
])) :
|
|
90
|
-
r(e(
|
|
86
|
+
i.value ? (_(), k("div", M, [
|
|
87
|
+
r(e(U), { progress: c.value }, null, 8, ["progress"])
|
|
88
|
+
])) : B("", !0),
|
|
89
|
+
r(e(P), {
|
|
91
90
|
size: "small",
|
|
92
91
|
class: "mb-3",
|
|
93
92
|
"header-class": "g-card-header",
|
|
@@ -97,7 +96,7 @@ const M = {
|
|
|
97
96
|
}
|
|
98
97
|
}, {
|
|
99
98
|
default: u(() => [
|
|
100
|
-
e(
|
|
99
|
+
e(N) ? (_(), y(e(V), { key: 0 })) : (_(), y(e(T), {
|
|
101
100
|
key: 1,
|
|
102
101
|
bordered: !1,
|
|
103
102
|
"single-line": !0
|
|
@@ -105,7 +104,7 @@ const M = {
|
|
|
105
104
|
default: u(() => [
|
|
106
105
|
n("tbody", null, [
|
|
107
106
|
n("tr", null, [
|
|
108
|
-
|
|
107
|
+
a[3] || (a[3] = n("td", null, [
|
|
109
108
|
n("strong", null, "ID:")
|
|
110
109
|
], -1)),
|
|
111
110
|
n("td", null, t(e(o).id), 1)
|
|
@@ -163,5 +162,5 @@ const M = {
|
|
|
163
162
|
}
|
|
164
163
|
};
|
|
165
164
|
export {
|
|
166
|
-
|
|
165
|
+
K as default
|
|
167
166
|
};
|
|
@@ -1,19 +1,18 @@
|
|
|
1
|
-
import { computed as u, onMounted as x, ref as N, resolveComponent as b, createElementBlock as V, openBlock as M, Fragment as w, createVNode as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
const L = { class: "hidden lg:inline" }, K = {
|
|
1
|
+
import { computed as u, onMounted as x, ref as N, resolveComponent as b, createElementBlock as V, openBlock as M, Fragment as w, createVNode as a, unref as n, withCtx as f, createElementVNode as p, toDisplayString as y } from "vue";
|
|
2
|
+
import { q as A, t as r, e as d, k as D, _ as E, n as F } from "./index-Fmomw6wi.js";
|
|
3
|
+
import { u as O } from "./clientCertificates-Dm0Bh62v.js";
|
|
4
|
+
import { useRoute as R, useRouter as $ } from "vue-router";
|
|
5
|
+
import { storeToRefs as _ } from "pinia";
|
|
6
|
+
import { _ as j } from "./UpdateNodeForm-BQDjp3CR.js";
|
|
7
|
+
import { s as q } from "./snakeCase-o1mQEFQr.js";
|
|
8
|
+
const B = { class: "hidden lg:inline" }, J = {
|
|
10
9
|
__name: "AdminNodesCreateView",
|
|
11
|
-
setup(
|
|
12
|
-
|
|
13
|
-
const
|
|
10
|
+
setup(L) {
|
|
11
|
+
R();
|
|
12
|
+
const v = $(), s = A(), i = O(), C = u(() => [
|
|
14
13
|
{ route: "/", text: "GameAP", icon: "gicon gicon-gameap" },
|
|
15
|
-
{ route: { name: "admin.nodes.index" }, text:
|
|
16
|
-
{ text:
|
|
14
|
+
{ route: { name: "admin.nodes.index" }, text: r("dedicated_servers.dedicated_servers") },
|
|
15
|
+
{ text: r("dedicated_servers.create") }
|
|
17
16
|
]);
|
|
18
17
|
x(() => {
|
|
19
18
|
i.fetchClientCertificates().catch((e) => {
|
|
@@ -22,7 +21,7 @@ const L = { class: "hidden lg:inline" }, K = {
|
|
|
22
21
|
d(e);
|
|
23
22
|
});
|
|
24
23
|
});
|
|
25
|
-
const { certificates: g } =
|
|
24
|
+
const { certificates: g } = _(i), { autoSetupData: c } = _(s), k = u(() => i.loading.value), h = u(() => g.value.map((e) => ({
|
|
26
25
|
label: e.fingerprint,
|
|
27
26
|
value: e.id
|
|
28
27
|
}))), o = N({
|
|
@@ -32,14 +31,14 @@ const L = { class: "hidden lg:inline" }, K = {
|
|
|
32
31
|
}), m = async () => {
|
|
33
32
|
o.value.serverCertificateFile ? o.value.gdaemonServerCert = await o.value.serverCertificateFile.text() : o.value.gdaemonServerCert = "";
|
|
34
33
|
const e = Object.fromEntries(
|
|
35
|
-
Object.entries(o.value).map(([t, l]) => [
|
|
34
|
+
Object.entries(o.value).map(([t, l]) => [q(t), l])
|
|
36
35
|
);
|
|
37
36
|
s.createNode(e).then(() => {
|
|
38
|
-
|
|
39
|
-
content:
|
|
37
|
+
F({
|
|
38
|
+
content: r("dedicated_servers.create_success_msg"),
|
|
40
39
|
type: "success"
|
|
41
40
|
}, () => {
|
|
42
|
-
|
|
41
|
+
v.push({ name: "admin.nodes.index" });
|
|
43
42
|
});
|
|
44
43
|
}).catch((t) => {
|
|
45
44
|
d(t);
|
|
@@ -48,30 +47,30 @@ const L = { class: "hidden lg:inline" }, K = {
|
|
|
48
47
|
return (e, t) => {
|
|
49
48
|
const l = b("CreateNodeModal");
|
|
50
49
|
return M(), V(w, null, [
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
loading:
|
|
50
|
+
a(n(D), { items: C.value }, null, 8, ["items"]),
|
|
51
|
+
a(j, {
|
|
52
|
+
loading: k.value,
|
|
54
53
|
modelValue: o.value,
|
|
55
54
|
"onUpdate:modelValue": t[0] || (t[0] = (S) => o.value = S),
|
|
56
55
|
onSend: m,
|
|
57
|
-
"client-certificate-options":
|
|
56
|
+
"client-certificate-options": h.value
|
|
58
57
|
}, {
|
|
59
58
|
button: f(() => [
|
|
60
|
-
|
|
59
|
+
a(E, {
|
|
61
60
|
class: "mt-2",
|
|
62
61
|
color: "green",
|
|
63
62
|
onClick: m
|
|
64
63
|
}, {
|
|
65
64
|
default: f(() => [
|
|
66
65
|
t[1] || (t[1] = p("i", { class: "fa-regular fa-plus-square mr-0.5" }, null, -1)),
|
|
67
|
-
p("span",
|
|
66
|
+
p("span", B, " " + y(n(r)("main.create")), 1)
|
|
68
67
|
]),
|
|
69
68
|
_: 1
|
|
70
69
|
})
|
|
71
70
|
]),
|
|
72
71
|
_: 1
|
|
73
72
|
}, 8, ["loading", "modelValue", "client-certificate-options"]),
|
|
74
|
-
|
|
73
|
+
a(l, {
|
|
75
74
|
link: n(c).link,
|
|
76
75
|
token: n(c).token,
|
|
77
76
|
host: n(c).host
|
|
@@ -81,5 +80,5 @@ const L = { class: "hidden lg:inline" }, K = {
|
|
|
81
80
|
}
|
|
82
81
|
};
|
|
83
82
|
export {
|
|
84
|
-
|
|
83
|
+
J as default
|
|
85
84
|
};
|
|
@@ -1,45 +1,44 @@
|
|
|
1
|
-
import { computed as s, onMounted as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { useRoute as B, useRouter as F } from "vue-router";
|
|
1
|
+
import { computed as s, onMounted as h, ref as x, createElementBlock as b, openBlock as N, Fragment as S, createVNode as d, unref as O } from "vue";
|
|
2
|
+
import { h as V, t as i, e as c, k as j, n as k } from "./index-Fmomw6wi.js";
|
|
3
|
+
import { u as E } from "./clientCertificates-Dm0Bh62v.js";
|
|
4
|
+
import { useRoute as F, useRouter as R } from "vue-router";
|
|
6
5
|
import { storeToRefs as l } from "pinia";
|
|
7
|
-
import { _ as
|
|
8
|
-
import { c as
|
|
9
|
-
import { s as
|
|
10
|
-
const
|
|
6
|
+
import { _ as U } from "./UpdateNodeForm-BQDjp3CR.js";
|
|
7
|
+
import { c as w } from "./camelCase-BXg45SFI.js";
|
|
8
|
+
import { s as y } from "./snakeCase-o1mQEFQr.js";
|
|
9
|
+
const z = {
|
|
11
10
|
__name: "AdminNodesEditView",
|
|
12
|
-
setup(
|
|
13
|
-
const u =
|
|
11
|
+
setup(A) {
|
|
12
|
+
const u = F(), m = R(), a = V(), r = E(), f = s(() => [
|
|
14
13
|
{ route: "/", text: "GameAP", icon: "gicon gicon-gameap" },
|
|
15
14
|
{ route: { name: "admin.nodes.index" }, text: i("dedicated_servers.dedicated_servers") },
|
|
16
15
|
{ text: i("dedicated_servers.edit") }
|
|
17
16
|
]);
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
h(() => {
|
|
18
|
+
a.setNodeId(u.params.id), a.fetchNode().then(() => {
|
|
20
19
|
t.value = Object.fromEntries(
|
|
21
|
-
Object.entries(p.value).map(([e, o]) => [
|
|
20
|
+
Object.entries(p.value).map(([e, o]) => [w(e), o])
|
|
22
21
|
);
|
|
23
22
|
}).catch((e) => {
|
|
24
23
|
c(e);
|
|
25
|
-
}),
|
|
24
|
+
}), r.fetchClientCertificates().catch((e) => {
|
|
26
25
|
c(e);
|
|
27
26
|
});
|
|
28
27
|
});
|
|
29
|
-
const { node: p } = l(
|
|
28
|
+
const { node: p } = l(a), { certificates: v } = l(r), _ = s(() => a.loading.value || r.loading.value), g = s(() => v.value.map((e) => ({
|
|
30
29
|
label: e.fingerprint,
|
|
31
30
|
value: e.id
|
|
32
|
-
}))), t =
|
|
31
|
+
}))), t = x({
|
|
33
32
|
name: "",
|
|
34
33
|
description: "",
|
|
35
34
|
location: ""
|
|
36
35
|
}), C = async () => {
|
|
37
36
|
t.value.serverCertificateFile ? t.value.gdaemonServerCert = await t.value.serverCertificateFile.text() : t.value.gdaemonServerCert = "";
|
|
38
37
|
const e = Object.fromEntries(
|
|
39
|
-
Object.entries(t.value).map(([o, n]) => [
|
|
38
|
+
Object.entries(t.value).map(([o, n]) => [y(o), n])
|
|
40
39
|
);
|
|
41
|
-
|
|
42
|
-
|
|
40
|
+
a.saveNode(e).then(() => {
|
|
41
|
+
k({
|
|
43
42
|
content: i("dedicated_servers.update_success_msg"),
|
|
44
43
|
type: "success"
|
|
45
44
|
}, () => {
|
|
@@ -49,9 +48,9 @@ const D = {
|
|
|
49
48
|
c(o);
|
|
50
49
|
});
|
|
51
50
|
};
|
|
52
|
-
return (e, o) => (N(),
|
|
53
|
-
d(O(
|
|
54
|
-
d(
|
|
51
|
+
return (e, o) => (N(), b(S, null, [
|
|
52
|
+
d(O(j), { items: f.value }, null, 8, ["items"]),
|
|
53
|
+
d(U, {
|
|
55
54
|
loading: _.value,
|
|
56
55
|
modelValue: t.value,
|
|
57
56
|
"onUpdate:modelValue": o[0] || (o[0] = (n) => t.value = n),
|
|
@@ -62,5 +61,5 @@ const D = {
|
|
|
62
61
|
}
|
|
63
62
|
};
|
|
64
63
|
export {
|
|
65
|
-
|
|
64
|
+
z as default
|
|
66
65
|
};
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { computed as m, ref as x, onMounted as h, createElementBlock as z, openBlock as C, Fragment as w, createVNode as n, unref as s, withCtx as o, createElementVNode as l, toDisplayString as u, h as t } from "vue";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { NDataTable as V, NEmpty as q } from "naive-ui";
|
|
2
|
+
import { q as D, t as e, e as p, k as S, _ as r, l as T, w as $, n as q } from "./index-Fmomw6wi.js";
|
|
3
|
+
import { storeToRefs as B } from "pinia";
|
|
4
|
+
import { NDataTable as E, NEmpty as V } from "naive-ui";
|
|
6
5
|
const j = {
|
|
7
6
|
__name: "AdminNodesView",
|
|
8
7
|
setup(A) {
|
|
9
|
-
const d =
|
|
8
|
+
const d = D(), f = m(() => [
|
|
10
9
|
{ route: "/", text: "GameAP", icon: "gicon gicon-gameap" },
|
|
11
10
|
{ route: { name: "admin.nodes.index" }, text: e("sidebar.dedicated_servers") }
|
|
12
11
|
]), _ = () => [
|
|
@@ -26,7 +25,7 @@ const j = {
|
|
|
26
25
|
title: e("dedicated_servers.ip"),
|
|
27
26
|
key: "ip",
|
|
28
27
|
render(i) {
|
|
29
|
-
return
|
|
28
|
+
return $(i.ip, ", ");
|
|
30
29
|
}
|
|
31
30
|
},
|
|
32
31
|
{
|
|
@@ -60,7 +59,7 @@ const j = {
|
|
|
60
59
|
size: "small",
|
|
61
60
|
text: e("main.delete"),
|
|
62
61
|
onClick: () => {
|
|
63
|
-
|
|
62
|
+
b(i.id);
|
|
64
63
|
}
|
|
65
64
|
}, [
|
|
66
65
|
t("i", { class: "fa-solid fa-trash" }),
|
|
@@ -69,7 +68,7 @@ const j = {
|
|
|
69
68
|
];
|
|
70
69
|
}
|
|
71
70
|
}
|
|
72
|
-
], { loading: g, nodes: v } =
|
|
71
|
+
], { loading: g, nodes: v } = B(d), y = x(_()), k = {
|
|
73
72
|
pageSize: 20
|
|
74
73
|
};
|
|
75
74
|
h(() => {
|
|
@@ -79,14 +78,14 @@ const j = {
|
|
|
79
78
|
d.fetchNodesByFilter([]).catch((i) => {
|
|
80
79
|
p(i);
|
|
81
80
|
});
|
|
82
|
-
},
|
|
81
|
+
}, N = m(() => v.value.map((i) => ({
|
|
83
82
|
id: i.id,
|
|
84
83
|
name: i.name,
|
|
85
84
|
location: i.location,
|
|
86
85
|
provider: i.provider,
|
|
87
86
|
ip: i.ip,
|
|
88
87
|
os: i.os
|
|
89
|
-
}))),
|
|
88
|
+
}))), b = (i) => {
|
|
90
89
|
window.$dialog.success({
|
|
91
90
|
title: e("dedicated_servers.delete_confirm_msg"),
|
|
92
91
|
positiveText: e("main.yes"),
|
|
@@ -94,7 +93,7 @@ const j = {
|
|
|
94
93
|
closable: !1,
|
|
95
94
|
onPositiveClick: () => {
|
|
96
95
|
d.deleteNode(i).then(() => {
|
|
97
|
-
|
|
96
|
+
q({
|
|
98
97
|
content: e("dedicated_servers.delete_success_msg"),
|
|
99
98
|
type: "success"
|
|
100
99
|
}, () => {
|
|
@@ -109,7 +108,7 @@ const j = {
|
|
|
109
108
|
});
|
|
110
109
|
};
|
|
111
110
|
return (i, a) => (C(), z(w, null, [
|
|
112
|
-
n(s(
|
|
111
|
+
n(s(S), { items: f.value }, null, 8, ["items"]),
|
|
113
112
|
n(r, {
|
|
114
113
|
color: "green",
|
|
115
114
|
size: "middle",
|
|
@@ -134,20 +133,20 @@ const j = {
|
|
|
134
133
|
]),
|
|
135
134
|
_: 1
|
|
136
135
|
}),
|
|
137
|
-
n(s(
|
|
136
|
+
n(s(E), {
|
|
138
137
|
ref: "tableRef",
|
|
139
138
|
bordered: !1,
|
|
140
139
|
"single-line": !0,
|
|
141
140
|
columns: y.value,
|
|
142
|
-
data:
|
|
141
|
+
data: N.value,
|
|
143
142
|
loading: s(g),
|
|
144
|
-
pagination:
|
|
143
|
+
pagination: k
|
|
145
144
|
}, {
|
|
146
145
|
loading: o(() => [
|
|
147
|
-
n(s(
|
|
146
|
+
n(s(T))
|
|
148
147
|
]),
|
|
149
148
|
empty: o(() => [
|
|
150
|
-
n(s(
|
|
149
|
+
n(s(V), {
|
|
151
150
|
description: s(e)("servers.empty_list")
|
|
152
151
|
}, null, 8, ["description"])
|
|
153
152
|
]),
|