@gameap/frontend 4.1.0-dev7 → 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.
- package/dist/{AdminClientCertificatesView-BQyXmri1.js → AdminClientCertificatesView-rVNAX5Dl.js} +97 -94
- package/dist/AdminDaemonTaskListView-CoUVp9tK.js +316 -0
- package/dist/{AdminDaemonTaskOutputView-DRrZwAwW.js → AdminDaemonTaskOutputView-BJpuWCtc.js} +18 -17
- package/dist/{AdminGamesEdit-CDTCJu52.js → AdminGamesEdit-HKWU2C59.js} +121 -117
- package/dist/AdminGamesList-BwN_RFDY.js +518 -0
- package/dist/{AdminModEdit-P0crpkM3.js → AdminModEdit-CbVGlk5M.js} +123 -119
- package/dist/AdminNodeShowView-C7VsvwQo.js +175 -0
- package/dist/AdminNodesCreateView-BfEHhFn2.js +87 -0
- package/dist/{AdminNodesEditView-DdNciuMa.js → AdminNodesEditView-DE-zhVTd.js} +11 -11
- package/dist/AdminNodesView-QMdy3oJ1.js +167 -0
- package/dist/AdminPluginsView-BBALhxPk.js +984 -0
- package/dist/{AdminServersCreate-zGHHAEkO.js → AdminServersCreate-g_A290kz.js} +122 -124
- package/dist/{AdminServersEdit-BR6sRGlM.js → AdminServersEdit-D0RERbR5.js} +125 -124
- package/dist/{AdminServersList-DhUQ1zrt.js → AdminServersList-_ek_2u8B.js} +35 -31
- package/dist/{AdminUsersEditView-CqRLzCkV.js → AdminUsersEditView-CbZCH6eM.js} +89 -85
- package/dist/{AdminUsersView-TCHghzxY.js → AdminUsersView-D4WoRB5b.js} +145 -141
- package/dist/CreateModForm-CpbIOQNu.js +123 -0
- package/dist/CreateNodeModal-C96UVcAJ.js +99 -0
- package/dist/{DsIpSelector-EnBHsJLE.js → DsIpSelector-D_hc_JYQ.js} +1 -1
- package/dist/EmptyView-qkQQJ_OR.js +9 -0
- package/dist/FileManager-v-1ASSne.js +5931 -0
- package/dist/GameIcon-DaYNlnur.js +87 -0
- package/dist/{GameModSelector-bZsSGC6T.js → GameModSelector-CiI3H5Zq.js} +21 -20
- package/dist/InputManyList-C52f5V6l.js +110 -0
- package/dist/InputTextList-5KeNATa7.js +63 -0
- package/dist/PluginPendingView-CDR44QCG.js +34 -0
- package/dist/ProfileView-CC3KJ2gK.js +295 -0
- package/dist/RconConsole-DkRK7vz3.js +74 -0
- package/dist/{RconPlayers-CXL0bHlU.js → RconPlayers-CDRCp79f.js} +131 -127
- package/dist/ServerConsole-Bj0Zr1BS.js +99 -0
- package/dist/ServerControlButton-C4zWzA-d.js +185 -0
- package/dist/ServerIdView-BJS6wcMH.js +608 -0
- package/dist/{ServerSelector-D7O1thVu.js → ServerSelector-DPM5SjWO.js} +7 -7
- package/dist/{ServerSettings-Lk4lq5hI.js → ServerSettings-BYRSLaJk.js} +26 -26
- package/dist/{ServerStatus-CCFiPWXV.js → ServerStatus-BK8yKehx.js} +1 -1
- package/dist/{ServerTasks-gNFBkyv1.js → ServerTasks-DUC2DDcY.js} +304 -302
- package/dist/ServersView-BbLoOEEz.js +312 -0
- package/dist/SettingsParameters-C-TFWsJF.js +89 -0
- package/dist/SmartPortSelector-DCsuCDpV.js +174 -0
- package/dist/TokensView-B5D45QbV.js +392 -0
- package/dist/{UpdateNodeForm-BQDjp3CR.js → UpdateNodeForm-DmAoHURu.js} +131 -127
- package/dist/UserServerPrivileges-k-30v4ps.js +319 -0
- package/dist/{_createCompounder-NPjOAZm-.js → _createCompounder-DHQYnhTQ.js} +2 -2
- package/dist/{camelCase-BXg45SFI.js → camelCase-CE1GGhvX.js} +2 -2
- package/dist/{capitalize-BSQeiLff.js → capitalize-DnZmwhT4.js} +5 -5
- package/dist/{clientCertificates-Dm0Bh62v.js → clientCertificates-Dd9OqxGQ.js} +1 -1
- package/dist/frontend.css +6 -14
- package/dist/{gameList-CJAymSBL.js → gameList-BLdEusRA.js} +40 -40
- package/dist/gameap.svg +3 -0
- package/dist/gameap_full.svg +9 -0
- package/dist/index-BDKiNPpP.js +3840 -0
- package/dist/index.js +1 -1
- package/dist/isEmpty-lBntcFaB.js +263 -0
- package/dist/join-CmlzL0H9.js +7 -0
- package/dist/{loader-BGOXrNPF.js → loader-C49Def-j.js} +1 -1
- package/dist/{snakeCase-o1mQEFQr.js → snakeCase--wUVfLw4.js} +1 -1
- package/dist/validators-BVXTUmow.js +65 -0
- package/package.json +1 -1
- package/dist/AdminDaemonTaskListView-DTQbTpkt.js +0 -315
- package/dist/AdminGamesList-CU_RB7gu.js +0 -499
- package/dist/AdminNodeShowView-Col-7fyA.js +0 -166
- package/dist/AdminNodesCreateView-CZsMnSCJ.js +0 -84
- package/dist/AdminNodesView-DvuZ9haB.js +0 -160
- package/dist/CreateModForm-Byq8UvuW.js +0 -122
- package/dist/CreateNodeModal-BNV35RnR.js +0 -93
- package/dist/FileManager-X3FkHNzF.js +0 -31882
- package/dist/InputManyList-BFGIEnls.js +0 -110
- package/dist/InputTextList-D280D5fs.js +0 -63
- package/dist/PluginPendingView-Cp6KgA8z.js +0 -31
- package/dist/RconConsole-BxjHKC6E.js +0 -74
- package/dist/ServerConsole-Cr-BZJIC.js +0 -98
- package/dist/ServerIdView-wsnPfVUi.js +0 -576
- package/dist/SettingsParameters-BVpVg868.js +0 -87
- package/dist/SmartPortSelector-bubAEnvR.js +0 -161
- package/dist/UserServerPrivileges-CizE2EYl.js +0 -318
- package/dist/_commonjsHelpers-C6fGbg64.js +0 -6
- package/dist/index-Fmomw6wi.js +0 -5750
|
@@ -1,499 +0,0 @@
|
|
|
1
|
-
import { mergeModels as X, ref as v, useModel as Y, createElementBlock as q, openBlock as B, createVNode as l, unref as t, withCtx as n, createElementVNode as f, toDisplayString as G, computed as W, onMounted as Z, Fragment as ee, createTextVNode as L, h as m } from "vue";
|
|
2
|
-
import { s as T, t as o, y as ae, z as oe, _ as y, e as g, k as te, l as le, g as se, A as ne, n as M } from "./index-Fmomw6wi.js";
|
|
3
|
-
import { u as ie } from "./gameList-CJAymSBL.js";
|
|
4
|
-
import { NForm as re, NFormItem as b, NInput as _, NSpace as de, NInputGroup as me, NInputGroupLabel as ue, NDataTable as ce, NEmpty as pe, NModal as E } from "naive-ui";
|
|
5
|
-
import { useRouter as fe } from "vue-router";
|
|
6
|
-
import { storeToRefs as ge } from "pinia";
|
|
7
|
-
import { _ as ve } from "./CreateModForm-Byq8UvuW.js";
|
|
8
|
-
const ye = { class: "hidden lg:inline" }, _e = {
|
|
9
|
-
__name: "CreateGameForm",
|
|
10
|
-
props: {
|
|
11
|
-
modelValue: {
|
|
12
|
-
code: "",
|
|
13
|
-
name: "",
|
|
14
|
-
engine: "",
|
|
15
|
-
engineVersion: "",
|
|
16
|
-
remoteRepositoryLinux: "",
|
|
17
|
-
remoteRepositoryWindows: ""
|
|
18
|
-
},
|
|
19
|
-
modelModifiers: {}
|
|
20
|
-
},
|
|
21
|
-
emits: /* @__PURE__ */ X(["create"], ["update:modelValue"]),
|
|
22
|
-
setup(N, { emit: V }) {
|
|
23
|
-
const u = v({}), r = Y(N, "modelValue"), x = {
|
|
24
|
-
code: {
|
|
25
|
-
required: !0,
|
|
26
|
-
validator: ae(
|
|
27
|
-
T(o("labels.code")),
|
|
28
|
-
oe(o("labels.code"), 2, 16)
|
|
29
|
-
)
|
|
30
|
-
},
|
|
31
|
-
name: {
|
|
32
|
-
required: !0,
|
|
33
|
-
validator: T(o("labels.name"))
|
|
34
|
-
}
|
|
35
|
-
}, C = V, h = () => {
|
|
36
|
-
u.value.validate().then(() => {
|
|
37
|
-
C("create");
|
|
38
|
-
});
|
|
39
|
-
};
|
|
40
|
-
return ($, i) => (B(), q("div", null, [
|
|
41
|
-
l(t(re), {
|
|
42
|
-
"label-placement": "top",
|
|
43
|
-
"label-width": "auto",
|
|
44
|
-
ref_key: "formRef",
|
|
45
|
-
ref: u,
|
|
46
|
-
model: r.value,
|
|
47
|
-
rules: x
|
|
48
|
-
}, {
|
|
49
|
-
default: n(() => [
|
|
50
|
-
l(t(b), {
|
|
51
|
-
label: t(o)("labels.code"),
|
|
52
|
-
path: "code"
|
|
53
|
-
}, {
|
|
54
|
-
default: n(() => [
|
|
55
|
-
l(t(_), {
|
|
56
|
-
minlength: "2",
|
|
57
|
-
maxlength: "16",
|
|
58
|
-
"show-count": "",
|
|
59
|
-
value: r.value.code,
|
|
60
|
-
"onUpdate:value": i[0] || (i[0] = (d) => r.value.code = d),
|
|
61
|
-
type: "text"
|
|
62
|
-
}, null, 8, ["value"])
|
|
63
|
-
]),
|
|
64
|
-
_: 1
|
|
65
|
-
}, 8, ["label"]),
|
|
66
|
-
l(t(b), {
|
|
67
|
-
label: t(o)("labels.name"),
|
|
68
|
-
path: "name"
|
|
69
|
-
}, {
|
|
70
|
-
default: n(() => [
|
|
71
|
-
l(t(_), {
|
|
72
|
-
value: r.value.name,
|
|
73
|
-
"onUpdate:value": i[1] || (i[1] = (d) => r.value.name = d),
|
|
74
|
-
type: "text"
|
|
75
|
-
}, null, 8, ["value"])
|
|
76
|
-
]),
|
|
77
|
-
_: 1
|
|
78
|
-
}, 8, ["label"]),
|
|
79
|
-
l(t(de), null, {
|
|
80
|
-
default: n(() => [
|
|
81
|
-
l(t(b), {
|
|
82
|
-
label: t(o)("labels.engine"),
|
|
83
|
-
path: "engine"
|
|
84
|
-
}, {
|
|
85
|
-
default: n(() => [
|
|
86
|
-
l(t(_), {
|
|
87
|
-
value: r.value.engine,
|
|
88
|
-
"onUpdate:value": i[2] || (i[2] = (d) => r.value.engine = d),
|
|
89
|
-
type: "text"
|
|
90
|
-
}, null, 8, ["value"])
|
|
91
|
-
]),
|
|
92
|
-
_: 1
|
|
93
|
-
}, 8, ["label"]),
|
|
94
|
-
l(t(b), {
|
|
95
|
-
label: t(o)("labels.engine_version"),
|
|
96
|
-
path: "engineVersion"
|
|
97
|
-
}, {
|
|
98
|
-
default: n(() => [
|
|
99
|
-
l(t(_), {
|
|
100
|
-
value: r.value.engineVersion,
|
|
101
|
-
"onUpdate:value": i[3] || (i[3] = (d) => r.value.engineVersion = d),
|
|
102
|
-
type: "text"
|
|
103
|
-
}, null, 8, ["value"])
|
|
104
|
-
]),
|
|
105
|
-
_: 1
|
|
106
|
-
}, 8, ["label"])
|
|
107
|
-
]),
|
|
108
|
-
_: 1
|
|
109
|
-
}),
|
|
110
|
-
l(t(b), {
|
|
111
|
-
label: t(o)("labels.remote_repository_linux"),
|
|
112
|
-
path: "remoteRepositoryLinux"
|
|
113
|
-
}, {
|
|
114
|
-
default: n(() => [
|
|
115
|
-
l(t(_), {
|
|
116
|
-
value: r.value.remoteRepositoryLinux,
|
|
117
|
-
"onUpdate:value": i[4] || (i[4] = (d) => r.value.remoteRepositoryLinux = d),
|
|
118
|
-
type: "text"
|
|
119
|
-
}, null, 8, ["value"])
|
|
120
|
-
]),
|
|
121
|
-
_: 1
|
|
122
|
-
}, 8, ["label"]),
|
|
123
|
-
l(t(b), {
|
|
124
|
-
label: t(o)("labels.remote_repository_windows"),
|
|
125
|
-
path: "remoteRepositoryWindows"
|
|
126
|
-
}, {
|
|
127
|
-
default: n(() => [
|
|
128
|
-
l(t(_), {
|
|
129
|
-
value: r.value.remoteRepositoryWindows,
|
|
130
|
-
"onUpdate:value": i[5] || (i[5] = (d) => r.value.remoteRepositoryWindows = d),
|
|
131
|
-
type: "text"
|
|
132
|
-
}, null, 8, ["value"])
|
|
133
|
-
]),
|
|
134
|
-
_: 1
|
|
135
|
-
}, 8, ["label"])
|
|
136
|
-
]),
|
|
137
|
-
_: 1
|
|
138
|
-
}, 8, ["model"]),
|
|
139
|
-
l(y, {
|
|
140
|
-
color: "green",
|
|
141
|
-
onClick: h
|
|
142
|
-
}, {
|
|
143
|
-
default: n(() => [
|
|
144
|
-
i[6] || (i[6] = f("i", { class: "fa-regular fa-square-plus" }, null, -1)),
|
|
145
|
-
f("span", ye, " " + G(t(o)("main.create")), 1)
|
|
146
|
-
]),
|
|
147
|
-
_: 1
|
|
148
|
-
})
|
|
149
|
-
]));
|
|
150
|
-
}
|
|
151
|
-
}, Ce = { class: "mb-5" }, be = { class: "w-1/4 mb-1" }, Le = {
|
|
152
|
-
__name: "AdminGamesList",
|
|
153
|
-
setup(N) {
|
|
154
|
-
const V = fe(), u = ie(), r = W(() => [
|
|
155
|
-
{ route: "/", text: "GameAP", icon: "gicon gicon-gameap" },
|
|
156
|
-
{ route: { name: "admin.games.index" }, text: o("games.games") }
|
|
157
|
-
]);
|
|
158
|
-
Z(() => {
|
|
159
|
-
x(), C();
|
|
160
|
-
});
|
|
161
|
-
const x = () => {
|
|
162
|
-
u.fetchGames().catch((a) => {
|
|
163
|
-
g(a);
|
|
164
|
-
});
|
|
165
|
-
}, C = () => {
|
|
166
|
-
u.fetchAllGameMods().catch((a) => {
|
|
167
|
-
g(a);
|
|
168
|
-
});
|
|
169
|
-
}, h = () => [
|
|
170
|
-
{
|
|
171
|
-
title: o("games.name"),
|
|
172
|
-
key: "name",
|
|
173
|
-
render(a) {
|
|
174
|
-
return m("div", { class: "flex items-center" }, [
|
|
175
|
-
m(se, { game: a.code, class: "mr-2" }),
|
|
176
|
-
m("span", { class: "" }, a.name)
|
|
177
|
-
]);
|
|
178
|
-
}
|
|
179
|
-
},
|
|
180
|
-
{
|
|
181
|
-
title: o("games.code"),
|
|
182
|
-
key: "code"
|
|
183
|
-
},
|
|
184
|
-
{
|
|
185
|
-
title: o("games.mods"),
|
|
186
|
-
key: "mods",
|
|
187
|
-
render(a) {
|
|
188
|
-
return a.mods.length === 0 ? m(y, {
|
|
189
|
-
color: "orange",
|
|
190
|
-
size: "small",
|
|
191
|
-
class: "px-2 py-1",
|
|
192
|
-
onClick: () => {
|
|
193
|
-
U(a.code);
|
|
194
|
-
}
|
|
195
|
-
}, [
|
|
196
|
-
m("i", { class: "fa-solid fa-cat mr-0.5" }),
|
|
197
|
-
m("span", { class: "" }, o("games.add_first_mod"))
|
|
198
|
-
]) : m(
|
|
199
|
-
ne,
|
|
200
|
-
{
|
|
201
|
-
class: ["md:max-w-48"],
|
|
202
|
-
items: a.mods,
|
|
203
|
-
deleteCallback: J,
|
|
204
|
-
clickCallback: H
|
|
205
|
-
}
|
|
206
|
-
);
|
|
207
|
-
}
|
|
208
|
-
},
|
|
209
|
-
{
|
|
210
|
-
title: o("main.actions"),
|
|
211
|
-
render(a) {
|
|
212
|
-
return [
|
|
213
|
-
m(y, {
|
|
214
|
-
color: "blue",
|
|
215
|
-
size: "small",
|
|
216
|
-
class: "mr-0.5",
|
|
217
|
-
route: { name: "admin.games.edit", params: { code: a.code } }
|
|
218
|
-
}, [
|
|
219
|
-
m("i", { class: "fa-solid fa-pen-to-square" }),
|
|
220
|
-
m("span", { class: "hidden lg:inline" }, o("main.edit"))
|
|
221
|
-
]),
|
|
222
|
-
m(y, {
|
|
223
|
-
color: "red",
|
|
224
|
-
size: "small",
|
|
225
|
-
text: o("main.delete"),
|
|
226
|
-
onClick: () => {
|
|
227
|
-
S(a.code);
|
|
228
|
-
}
|
|
229
|
-
}, [
|
|
230
|
-
m("i", { class: "fa-solid fa-trash" }),
|
|
231
|
-
m("span", { class: "hidden lg:inline" }, o("main.delete"))
|
|
232
|
-
])
|
|
233
|
-
];
|
|
234
|
-
}
|
|
235
|
-
}
|
|
236
|
-
], { loading: $, games: i, allGameMods: d } = ge(u), k = v(!1), p = v({
|
|
237
|
-
game: null,
|
|
238
|
-
name: "",
|
|
239
|
-
remoteRepositoryLinux: "",
|
|
240
|
-
remoteRepositoryWindows: ""
|
|
241
|
-
}), R = v(!1), c = v({
|
|
242
|
-
code: "",
|
|
243
|
-
name: "",
|
|
244
|
-
engine: "",
|
|
245
|
-
engineVersion: "",
|
|
246
|
-
remoteRepositoryLinux: "",
|
|
247
|
-
remoteRepositoryWindows: ""
|
|
248
|
-
}), I = v(h()), z = {
|
|
249
|
-
pageSize: 50
|
|
250
|
-
}, w = v(""), A = W(() => {
|
|
251
|
-
let a = [];
|
|
252
|
-
return i.value.forEach((e) => {
|
|
253
|
-
w.value && !e.name.toLowerCase().includes(w.value.toLowerCase()) && !e.code.toLowerCase().includes(w.value.toLowerCase()) || a.push({
|
|
254
|
-
name: e.name,
|
|
255
|
-
code: e.code,
|
|
256
|
-
engine: e.engine,
|
|
257
|
-
mods: D(e.code)
|
|
258
|
-
});
|
|
259
|
-
}), a.sort((e, s) => e.name.localeCompare(s.name));
|
|
260
|
-
}), D = (a) => {
|
|
261
|
-
let e = [];
|
|
262
|
-
return d.value.forEach((s) => {
|
|
263
|
-
s.game_code === a && e.push({
|
|
264
|
-
id: s.id,
|
|
265
|
-
name: s.name,
|
|
266
|
-
gameCode: s.game_code
|
|
267
|
-
});
|
|
268
|
-
}), e;
|
|
269
|
-
}, S = (a) => {
|
|
270
|
-
window.$dialog.success({
|
|
271
|
-
title: o("games.delete_game_confirm_msg"),
|
|
272
|
-
positiveText: o("main.yes"),
|
|
273
|
-
negativeText: o("main.no"),
|
|
274
|
-
closable: !1,
|
|
275
|
-
onPositiveClick: () => {
|
|
276
|
-
F(a);
|
|
277
|
-
},
|
|
278
|
-
onNegativeClick: () => {
|
|
279
|
-
}
|
|
280
|
-
});
|
|
281
|
-
}, F = (a) => {
|
|
282
|
-
u.deleteGameByCode(a).then(() => {
|
|
283
|
-
x();
|
|
284
|
-
}).catch((e) => {
|
|
285
|
-
g(e);
|
|
286
|
-
});
|
|
287
|
-
}, U = (a) => {
|
|
288
|
-
p.value = {
|
|
289
|
-
game: null,
|
|
290
|
-
name: "",
|
|
291
|
-
remoteRepositoryLinux: "",
|
|
292
|
-
remoteRepositoryWindows: ""
|
|
293
|
-
}, a && (p.value.game = a), k.value = !0;
|
|
294
|
-
}, P = () => {
|
|
295
|
-
const a = {
|
|
296
|
-
name: p.value.name,
|
|
297
|
-
game_code: p.value.game,
|
|
298
|
-
remote_repository_linux: p.value.remoteRepositoryLinux,
|
|
299
|
-
remote_repository_windows: p.value.remoteRepositoryWindows
|
|
300
|
-
};
|
|
301
|
-
u.createGameMod(a).then(({ id: e }) => {
|
|
302
|
-
M({
|
|
303
|
-
content: o("games.mod_create_success_msg"),
|
|
304
|
-
type: "success"
|
|
305
|
-
}, () => {
|
|
306
|
-
C();
|
|
307
|
-
});
|
|
308
|
-
}).catch((e) => {
|
|
309
|
-
g(e);
|
|
310
|
-
}).finally(() => {
|
|
311
|
-
k.value = !1;
|
|
312
|
-
});
|
|
313
|
-
}, O = () => {
|
|
314
|
-
c.value = {
|
|
315
|
-
code: "",
|
|
316
|
-
name: "",
|
|
317
|
-
remoteRepositoryLinux: "",
|
|
318
|
-
remoteRepositoryWindows: ""
|
|
319
|
-
}, R.value = !0;
|
|
320
|
-
}, j = () => {
|
|
321
|
-
const a = {
|
|
322
|
-
name: c.value.name,
|
|
323
|
-
code: c.value.code,
|
|
324
|
-
engine: c.value.engine,
|
|
325
|
-
engine_version: c.value.engineVersion,
|
|
326
|
-
remote_repository_linux: c.value.remoteRepositoryLinux,
|
|
327
|
-
remote_repository_windows: c.value.remoteRepositoryWindows
|
|
328
|
-
};
|
|
329
|
-
a.engine || (a.engine = "unknown"), u.createGame(a).then(({ id: e }) => {
|
|
330
|
-
M({
|
|
331
|
-
content: o("games.create_success_msg"),
|
|
332
|
-
type: "success"
|
|
333
|
-
}, () => {
|
|
334
|
-
u.fetchGames();
|
|
335
|
-
});
|
|
336
|
-
}).catch((e) => {
|
|
337
|
-
g(e);
|
|
338
|
-
}).finally(() => {
|
|
339
|
-
R.value = !1;
|
|
340
|
-
});
|
|
341
|
-
}, H = (a, e) => {
|
|
342
|
-
V.push({ name: "admin.games.mods.edit", params: { code: a, id: e } });
|
|
343
|
-
}, J = (a) => {
|
|
344
|
-
window.$dialog.success({
|
|
345
|
-
title: o("games.delete_mod_confirm_msg"),
|
|
346
|
-
positiveText: o("main.yes"),
|
|
347
|
-
negativeText: o("main.no"),
|
|
348
|
-
closable: !1,
|
|
349
|
-
onPositiveClick: () => {
|
|
350
|
-
K(a);
|
|
351
|
-
},
|
|
352
|
-
onNegativeClick: () => {
|
|
353
|
-
}
|
|
354
|
-
});
|
|
355
|
-
}, K = (a) => {
|
|
356
|
-
u.deleteModById(a).then(() => {
|
|
357
|
-
C();
|
|
358
|
-
}).catch((e) => {
|
|
359
|
-
g(e);
|
|
360
|
-
});
|
|
361
|
-
}, Q = () => {
|
|
362
|
-
window.$dialog.success({
|
|
363
|
-
title: o("games.d_upgrade_confirm"),
|
|
364
|
-
positiveText: o("main.yes"),
|
|
365
|
-
negativeText: o("main.no"),
|
|
366
|
-
closable: !1,
|
|
367
|
-
onPositiveClick: () => {
|
|
368
|
-
u.upgradeGames().then(() => {
|
|
369
|
-
M({
|
|
370
|
-
content: o("games.upgrade_success_msg"),
|
|
371
|
-
type: "success"
|
|
372
|
-
}), x(), C();
|
|
373
|
-
}).catch((a) => {
|
|
374
|
-
g(a);
|
|
375
|
-
});
|
|
376
|
-
},
|
|
377
|
-
onNegativeClick: () => {
|
|
378
|
-
}
|
|
379
|
-
});
|
|
380
|
-
};
|
|
381
|
-
return (a, e) => (B(), q(ee, null, [
|
|
382
|
-
l(t(te), { items: r.value }, null, 8, ["items"]),
|
|
383
|
-
f("div", Ce, [
|
|
384
|
-
l(y, {
|
|
385
|
-
class: "mr-1",
|
|
386
|
-
color: "green",
|
|
387
|
-
onClick: e[0] || (e[0] = (s) => O())
|
|
388
|
-
}, {
|
|
389
|
-
default: n(() => [
|
|
390
|
-
e[8] || (e[8] = f("i", { class: "fa-solid fa-plus-square" }, null, -1)),
|
|
391
|
-
L(" " + G(t(o)("games.add")), 1)
|
|
392
|
-
]),
|
|
393
|
-
_: 1
|
|
394
|
-
}),
|
|
395
|
-
l(y, {
|
|
396
|
-
class: "mr-1",
|
|
397
|
-
color: "orange",
|
|
398
|
-
onClick: e[1] || (e[1] = (s) => U())
|
|
399
|
-
}, {
|
|
400
|
-
default: n(() => [
|
|
401
|
-
e[9] || (e[9] = f("i", { class: "fa-solid fa-cat" }, null, -1)),
|
|
402
|
-
L(" " + G(t(o)("games.add_mod")), 1)
|
|
403
|
-
]),
|
|
404
|
-
_: 1
|
|
405
|
-
}),
|
|
406
|
-
l(y, {
|
|
407
|
-
class: "mr-1",
|
|
408
|
-
color: "black",
|
|
409
|
-
onClick: e[2] || (e[2] = (s) => Q())
|
|
410
|
-
}, {
|
|
411
|
-
default: n(() => [
|
|
412
|
-
e[10] || (e[10] = f("i", { class: "fa-solid fa-sync" }, null, -1)),
|
|
413
|
-
L(" " + G(t(o)("games.upgrade")), 1)
|
|
414
|
-
]),
|
|
415
|
-
_: 1
|
|
416
|
-
})
|
|
417
|
-
]),
|
|
418
|
-
f("div", be, [
|
|
419
|
-
l(t(me), null, {
|
|
420
|
-
default: n(() => [
|
|
421
|
-
l(t(ue), null, {
|
|
422
|
-
default: n(() => [...e[11] || (e[11] = [
|
|
423
|
-
f("i", { class: "fa-solid fa-magnifying-glass" }, null, -1)
|
|
424
|
-
])]),
|
|
425
|
-
_: 1
|
|
426
|
-
}),
|
|
427
|
-
l(t(_), {
|
|
428
|
-
value: w.value,
|
|
429
|
-
"onUpdate:value": e[3] || (e[3] = (s) => w.value = s),
|
|
430
|
-
type: "text",
|
|
431
|
-
placeholder: t(o)("main.search")
|
|
432
|
-
}, null, 8, ["value", "placeholder"])
|
|
433
|
-
]),
|
|
434
|
-
_: 1
|
|
435
|
-
})
|
|
436
|
-
]),
|
|
437
|
-
l(t(ce), {
|
|
438
|
-
ref: "tableRef",
|
|
439
|
-
bordered: !1,
|
|
440
|
-
"single-line": !0,
|
|
441
|
-
columns: I.value,
|
|
442
|
-
data: A.value,
|
|
443
|
-
loading: t($),
|
|
444
|
-
pagination: z
|
|
445
|
-
}, {
|
|
446
|
-
loading: n(() => [
|
|
447
|
-
l(t(le))
|
|
448
|
-
]),
|
|
449
|
-
empty: n(() => [
|
|
450
|
-
l(t(pe), {
|
|
451
|
-
description: t(o)("servers.empty_list")
|
|
452
|
-
}, null, 8, ["description"])
|
|
453
|
-
]),
|
|
454
|
-
_: 1
|
|
455
|
-
}, 8, ["columns", "data", "loading"]),
|
|
456
|
-
l(t(E), {
|
|
457
|
-
show: R.value,
|
|
458
|
-
"onUpdate:show": e[5] || (e[5] = (s) => R.value = s),
|
|
459
|
-
class: "custom-card",
|
|
460
|
-
preset: "card",
|
|
461
|
-
title: t(o)("games.title_add"),
|
|
462
|
-
bordered: !1,
|
|
463
|
-
style: { width: "600px" },
|
|
464
|
-
segmented: { content: "soft", footer: "soft" }
|
|
465
|
-
}, {
|
|
466
|
-
default: n(() => [
|
|
467
|
-
l(_e, {
|
|
468
|
-
modelValue: c.value,
|
|
469
|
-
"onUpdate:modelValue": e[4] || (e[4] = (s) => c.value = s),
|
|
470
|
-
onCreate: j
|
|
471
|
-
}, null, 8, ["modelValue"])
|
|
472
|
-
]),
|
|
473
|
-
_: 1
|
|
474
|
-
}, 8, ["show", "title"]),
|
|
475
|
-
l(t(E), {
|
|
476
|
-
show: k.value,
|
|
477
|
-
"onUpdate:show": e[7] || (e[7] = (s) => k.value = s),
|
|
478
|
-
class: "custom-card",
|
|
479
|
-
preset: "card",
|
|
480
|
-
title: t(o)("games.title_add_mod"),
|
|
481
|
-
bordered: !1,
|
|
482
|
-
style: { width: "600px" },
|
|
483
|
-
segmented: { content: "soft", footer: "soft" }
|
|
484
|
-
}, {
|
|
485
|
-
default: n(() => [
|
|
486
|
-
l(ve, {
|
|
487
|
-
modelValue: p.value,
|
|
488
|
-
"onUpdate:modelValue": e[6] || (e[6] = (s) => p.value = s),
|
|
489
|
-
onCreate: P
|
|
490
|
-
}, null, 8, ["modelValue"])
|
|
491
|
-
]),
|
|
492
|
-
_: 1
|
|
493
|
-
}, 8, ["show", "title"])
|
|
494
|
-
], 64));
|
|
495
|
-
}
|
|
496
|
-
};
|
|
497
|
-
export {
|
|
498
|
-
Le as default
|
|
499
|
-
};
|
|
@@ -1,166 +0,0 @@
|
|
|
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";
|
|
6
|
-
const M = {
|
|
7
|
-
key: 0,
|
|
8
|
-
class: "mb-5"
|
|
9
|
-
}, K = {
|
|
10
|
-
__name: "AdminNodeShowView",
|
|
11
|
-
setup(O) {
|
|
12
|
-
const m = F(), f = D(), { daemonInfo: o, loading: N } = j(f), i = w(!1), c = w(0);
|
|
13
|
-
async function b(d, a) {
|
|
14
|
-
i.value = !0, c.value = 0;
|
|
15
|
-
try {
|
|
16
|
-
const g = await A.get(d, {
|
|
17
|
-
responseType: "blob",
|
|
18
|
-
onDownloadProgress: (p) => {
|
|
19
|
-
p.total && (c.value = Math.round(p.loaded * 100 / p.total));
|
|
20
|
-
}
|
|
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);
|
|
23
|
-
} catch (g) {
|
|
24
|
-
x(g);
|
|
25
|
-
} finally {
|
|
26
|
-
i.value = !1, c.value = 0;
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
function h() {
|
|
30
|
-
b(`/api/dedicated_servers/${m.params.id}/logs.zip`, "logs.zip");
|
|
31
|
-
}
|
|
32
|
-
function z() {
|
|
33
|
-
b("/api/dedicated_servers/certificates.zip", "certificates.zip");
|
|
34
|
-
}
|
|
35
|
-
const C = I(() => {
|
|
36
|
-
let d = [
|
|
37
|
-
{ route: "/", text: "GameAP", icon: "gicon gicon-gameap" },
|
|
38
|
-
{ route: { name: "admin.nodes.index" }, text: s("dedicated_servers.dedicated_servers") }
|
|
39
|
-
];
|
|
40
|
-
return o.value.name && d.push({ text: o.value.name }), d;
|
|
41
|
-
});
|
|
42
|
-
return L(() => {
|
|
43
|
-
f.setNodeId(m.params.id), f.fetchDaemonInfo().catch((d) => {
|
|
44
|
-
x(d);
|
|
45
|
-
});
|
|
46
|
-
}), (d, a) => (_(), k($, null, [
|
|
47
|
-
r(e(S), { items: C.value }, null, 8, ["items"]),
|
|
48
|
-
r(v, {
|
|
49
|
-
color: "blue",
|
|
50
|
-
size: "middle",
|
|
51
|
-
class: "mb-5 mr-1",
|
|
52
|
-
route: { name: "admin.nodes.edit", params: { id: e(m).params.id } }
|
|
53
|
-
}, {
|
|
54
|
-
default: u(() => [
|
|
55
|
-
a[0] || (a[0] = n("i", { class: "fa-solid fa-edit mr-0.5" }, null, -1)),
|
|
56
|
-
n("span", null, t(e(s)("main.edit")), 1)
|
|
57
|
-
]),
|
|
58
|
-
_: 1
|
|
59
|
-
}, 8, ["route"]),
|
|
60
|
-
r(v, {
|
|
61
|
-
color: "orange",
|
|
62
|
-
size: "middle",
|
|
63
|
-
class: "mb-5 mr-1",
|
|
64
|
-
disabled: i.value,
|
|
65
|
-
onClick: h
|
|
66
|
-
}, {
|
|
67
|
-
default: u(() => [
|
|
68
|
-
a[1] || (a[1] = n("i", { class: "fa-solid fa-download mr-0.5" }, null, -1)),
|
|
69
|
-
n("span", null, t(e(s)("dedicated_servers.download_logs")), 1)
|
|
70
|
-
]),
|
|
71
|
-
_: 1
|
|
72
|
-
}, 8, ["disabled"]),
|
|
73
|
-
r(v, {
|
|
74
|
-
color: "green",
|
|
75
|
-
size: "middle",
|
|
76
|
-
class: "mb-5 mr-1",
|
|
77
|
-
disabled: i.value,
|
|
78
|
-
onClick: z
|
|
79
|
-
}, {
|
|
80
|
-
default: u(() => [
|
|
81
|
-
a[2] || (a[2] = n("i", { class: "fa-solid fa-download mr-0.5" }, null, -1)),
|
|
82
|
-
n("span", null, t(e(s)("dedicated_servers.download_certificates")), 1)
|
|
83
|
-
]),
|
|
84
|
-
_: 1
|
|
85
|
-
}, 8, ["disabled"]),
|
|
86
|
-
i.value ? (_(), k("div", M, [
|
|
87
|
-
r(e(U), { progress: c.value }, null, 8, ["progress"])
|
|
88
|
-
])) : B("", !0),
|
|
89
|
-
r(e(P), {
|
|
90
|
-
size: "small",
|
|
91
|
-
class: "mb-3",
|
|
92
|
-
"header-class": "g-card-header",
|
|
93
|
-
segmented: {
|
|
94
|
-
content: !0,
|
|
95
|
-
footer: "soft"
|
|
96
|
-
}
|
|
97
|
-
}, {
|
|
98
|
-
default: u(() => [
|
|
99
|
-
e(N) ? (_(), y(e(V), { key: 0 })) : (_(), y(e(T), {
|
|
100
|
-
key: 1,
|
|
101
|
-
bordered: !1,
|
|
102
|
-
"single-line": !0
|
|
103
|
-
}, {
|
|
104
|
-
default: u(() => [
|
|
105
|
-
n("tbody", null, [
|
|
106
|
-
n("tr", null, [
|
|
107
|
-
a[3] || (a[3] = n("td", null, [
|
|
108
|
-
n("strong", null, "ID:")
|
|
109
|
-
], -1)),
|
|
110
|
-
n("td", null, t(e(o).id), 1)
|
|
111
|
-
]),
|
|
112
|
-
n("tr", null, [
|
|
113
|
-
n("td", null, [
|
|
114
|
-
n("strong", null, t(e(s)("dedicated_servers.name")) + ":", 1)
|
|
115
|
-
]),
|
|
116
|
-
n("td", null, t(e(o).name), 1)
|
|
117
|
-
]),
|
|
118
|
-
n("tr", null, [
|
|
119
|
-
n("td", null, [
|
|
120
|
-
n("strong", null, t(e(s)("dedicated_servers.gdaemon_api_key")) + ":", 1)
|
|
121
|
-
]),
|
|
122
|
-
n("td", null, t(e(o).api_key), 1)
|
|
123
|
-
]),
|
|
124
|
-
n("tr", null, [
|
|
125
|
-
n("td", null, [
|
|
126
|
-
n("strong", null, t(e(s)("dedicated_servers.gdaemon_version")) + ":", 1)
|
|
127
|
-
]),
|
|
128
|
-
n("td", null, t(e(o).version && e(o).version.version ? e(o).version.version + " (" + e(o).version.compile_date + ")" : e(s)("dedicated_servers.gdaemon_empty_info")), 1)
|
|
129
|
-
]),
|
|
130
|
-
n("tr", null, [
|
|
131
|
-
n("td", null, [
|
|
132
|
-
n("strong", null, t(e(s)("dedicated_servers.gdaemon_uptime")) + ":", 1)
|
|
133
|
-
]),
|
|
134
|
-
n("td", null, t(e(o).base_info && e(o).base_info.uptime ? e(o).base_info.uptime : e(s)("dedicated_servers.gdaemon_empty_info")), 1)
|
|
135
|
-
]),
|
|
136
|
-
n("tr", null, [
|
|
137
|
-
n("td", null, [
|
|
138
|
-
n("strong", null, t(e(s)("dedicated_servers.gdaemon_online_servers_count")) + ":", 1)
|
|
139
|
-
]),
|
|
140
|
-
n("td", null, t(e(o).base_info && e(o).base_info.online_servers_count ? e(o).base_info.online_servers_count : e(s)("dedicated_servers.gdaemon_empty_info")), 1)
|
|
141
|
-
]),
|
|
142
|
-
n("tr", null, [
|
|
143
|
-
n("td", null, [
|
|
144
|
-
n("strong", null, t(e(s)("dedicated_servers.gdaemon_working_tasks_count")) + ":", 1)
|
|
145
|
-
]),
|
|
146
|
-
n("td", null, t(e(o).base_info && e(o).base_info.working_tasks_count ? e(o).base_info.working_tasks_count : e(s)("dedicated_servers.gdaemon_empty_info")), 1)
|
|
147
|
-
]),
|
|
148
|
-
n("tr", null, [
|
|
149
|
-
n("td", null, [
|
|
150
|
-
n("strong", null, t(e(s)("dedicated_servers.gdaemon_waiting_tasks_count")) + ":", 1)
|
|
151
|
-
]),
|
|
152
|
-
n("td", null, t(e(o).base_info && e(o).base_info.waiting_tasks_count ? e(o).base_info.waiting_tasks_count : e(s)("dedicated_servers.gdaemon_empty_info")), 1)
|
|
153
|
-
])
|
|
154
|
-
])
|
|
155
|
-
]),
|
|
156
|
-
_: 1
|
|
157
|
-
}))
|
|
158
|
-
]),
|
|
159
|
-
_: 1
|
|
160
|
-
})
|
|
161
|
-
], 64));
|
|
162
|
-
}
|
|
163
|
-
};
|
|
164
|
-
export {
|
|
165
|
-
K as default
|
|
166
|
-
};
|