@gameap/frontend 4.1.0-dev1 → 4.1.0-dev10
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-Bg8X_Ouc.js +370 -0
- package/dist/AdminDaemonTaskListView-DbJp0aqQ.js +316 -0
- package/dist/AdminDaemonTaskOutputView-DNCHQfxx.js +87 -0
- package/dist/AdminGamesEdit-jco7cBfk.js +473 -0
- package/dist/AdminGamesList-CMjsgEpx.js +518 -0
- package/dist/AdminModEdit-BlRu_09M.js +529 -0
- package/dist/AdminNodeShowView-BHxJkjYJ.js +175 -0
- package/dist/AdminNodesCreateView-DihmM46W.js +87 -0
- package/dist/AdminNodesEditView-CVACSido.js +65 -0
- package/dist/AdminNodesView-CHtiU6dZ.js +167 -0
- package/dist/AdminPluginsView-CRjF3BPs.js +984 -0
- package/dist/AdminServersCreate-5f8x6eZO.js +342 -0
- package/dist/AdminServersEdit-CA7711nJ.js +400 -0
- package/dist/AdminServersList-De5ZMEGZ.js +168 -0
- package/dist/AdminUsersEditView-DeYo98vi.js +308 -0
- package/dist/AdminUsersView-C8fKEhpr.js +446 -0
- package/dist/CreateModForm-CqkvVLfN.js +123 -0
- package/dist/CreateNodeModal-DOXVtVLQ.js +100 -0
- package/dist/DsIpSelector-C676Y19X.js +90 -0
- package/dist/EmptyView-Bf6zmQQt.js +9 -0
- package/dist/FileManager-DSa9v4Ex.js +5932 -0
- package/dist/GameIcon-DaYNlnur.js +87 -0
- package/dist/GameModSelector-CQBT8ZLu.js +95 -0
- package/dist/InputManyList-DUOtepb8.js +110 -0
- package/dist/InputTextList-lPhVIV04.js +63 -0
- package/dist/PluginPendingView-DaDaN30Q.js +34 -0
- package/dist/ProfileView-Dw2T3X8m.js +295 -0
- package/dist/RconConsole-CvxNBv0B.js +74 -0
- package/dist/RconPlayers-odUKa0Ps.js +424 -0
- package/dist/ServerConsole-B9v2PcWb.js +99 -0
- package/dist/ServerControlButton-D_zJbxr6.js +186 -0
- package/dist/ServerIdView-_vGQRk7y.js +609 -0
- package/dist/ServerSelector-6fCqL3e9.js +52 -0
- package/dist/ServerSettings-C6-tkLTH.js +84 -0
- package/dist/ServerStatus-CcqB0h1r.js +63 -0
- package/dist/ServerTasks-BcaZzvz7.js +857 -0
- package/dist/ServersView-S_G_kuGj.js +313 -0
- package/dist/SettingsParameters-u3Awy4Vf.js +89 -0
- package/dist/SmartPortSelector-BRSQFVqT.js +174 -0
- package/dist/TokensView-C1RFJSB5.js +392 -0
- package/dist/UpdateNodeForm-BAhzQLt-.js +652 -0
- package/dist/UserServerPrivileges-Q2wQMyHi.js +319 -0
- package/dist/_createCompounder-CXjx5-CF.js +241 -0
- package/dist/camelCase-CSrB2MWj.js +8 -0
- package/dist/capitalize-BZSBvd6d.js +40 -0
- package/dist/clientCertificates-C0FlDwsb.js +53 -0
- package/dist/favicon-32x32.png +0 -0
- package/dist/favicon-96x96.png +0 -0
- package/dist/favicon.ico +0 -0
- package/dist/fonts/gicon.eot +0 -0
- package/dist/fonts/gicon.svg +33 -0
- package/dist/fonts/gicon.ttf +0 -0
- package/dist/fonts/gicon.woff +0 -0
- package/dist/fonts/gicon.woff2 +0 -0
- package/dist/frontend.css +6 -0
- package/dist/gameList-kucszmx0.js +115 -0
- package/dist/gameap.svg +3 -0
- package/dist/gameap_full.svg +9 -0
- package/dist/images/gap_logo_white.png +0 -0
- package/dist/images/gap_logo_white_mini.png +0 -0
- package/dist/images/gicon.svg +18 -0
- package/dist/images/icons/save-white.svg +1 -0
- package/dist/images/icons/save.svg +1 -0
- package/dist/index-9fvX7FD-.js +3840 -0
- package/dist/index.js +1 -0
- package/dist/isEmpty-D0Z8Rneq.js +263 -0
- package/dist/join-CmlzL0H9.js +7 -0
- package/dist/loader-qtG-Lf6M.js +131 -0
- package/dist/mockServiceWorker.js +349 -0
- package/dist/snakeCase-nnM4dAra.js +7 -0
- package/dist/validators-ChBGsKft.js +65 -0
- package/package.json +6 -4
|
@@ -0,0 +1,609 @@
|
|
|
1
|
+
import { NTabs as re, NTabPane as te, NCard as ae } from "naive-ui";
|
|
2
|
+
import { ref as C, computed as g, createElementBlock as f, createCommentVNode as t, openBlock as s, createElementVNode as r, createVNode as l, unref as e, toDisplayString as _, defineAsyncComponent as I, onMounted as ne, h as X, resolveComponent as oe, Fragment as H, createBlock as n, normalizeClass as U, createSlots as le, withCtx as c, withDirectives as ce, vShow as ie, createTextVNode as w, renderList as de, resolveDynamicComponent as ue } from "vue";
|
|
3
|
+
import { useRoute as ve } from "vue-router";
|
|
4
|
+
import { defineStore as me, storeToRefs as Q } from "pinia";
|
|
5
|
+
import { _ as V } from "./ServerControlButton-D_zJbxr6.js";
|
|
6
|
+
import { u as y, b as $, a as h, k as pe, g as _e, t as i, m as fe, l as P, v as ye } from "./index-9fvX7FD-.js";
|
|
7
|
+
import { _ as ge } from "./GameIcon-DaYNlnur.js";
|
|
8
|
+
const be = me("serverRcon", () => {
|
|
9
|
+
const x = C([]), k = C({
|
|
10
|
+
rcon: !1,
|
|
11
|
+
playersManage: !1
|
|
12
|
+
}), E = C(""), d = C(0), B = C([]), D = g(() => d.value > 0), j = g(() => y().serverId), z = g(() => !!y().abilities["game-server-rcon-console"]), q = g(() => !!y().abilities["game-server-rcon-players"]);
|
|
13
|
+
function o(a) {
|
|
14
|
+
y().setServerId(a);
|
|
15
|
+
}
|
|
16
|
+
async function F() {
|
|
17
|
+
const a = y();
|
|
18
|
+
d.value++;
|
|
19
|
+
try {
|
|
20
|
+
const m = await $.get("/api/servers/" + a.serverId + "/rcon/features");
|
|
21
|
+
k.value = m.data;
|
|
22
|
+
} finally {
|
|
23
|
+
d.value--;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
async function G() {
|
|
27
|
+
const a = y();
|
|
28
|
+
d.value++;
|
|
29
|
+
try {
|
|
30
|
+
const m = await $.get("/api/servers/" + a.serverId + "/rcon/fast_rcon");
|
|
31
|
+
x.value = m.data;
|
|
32
|
+
} finally {
|
|
33
|
+
d.value--;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
async function O(a) {
|
|
37
|
+
const m = y();
|
|
38
|
+
d.value++;
|
|
39
|
+
try {
|
|
40
|
+
const S = await $.post("/api/servers/" + m.serverId + "/rcon", {
|
|
41
|
+
command: a
|
|
42
|
+
});
|
|
43
|
+
E.value = S.data.output;
|
|
44
|
+
} finally {
|
|
45
|
+
d.value--;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
async function p() {
|
|
49
|
+
const a = y();
|
|
50
|
+
if (!(a.serverId <= 0)) {
|
|
51
|
+
d.value++;
|
|
52
|
+
try {
|
|
53
|
+
const m = await $.get("/api/servers/" + a.serverId + "/rcon/players");
|
|
54
|
+
B.value = m.data;
|
|
55
|
+
} finally {
|
|
56
|
+
d.value--;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
async function u(a, m) {
|
|
61
|
+
const S = y();
|
|
62
|
+
d.value++;
|
|
63
|
+
try {
|
|
64
|
+
await $.post("/api/servers/" + S.serverId + "/rcon/players/kick", {
|
|
65
|
+
player: a,
|
|
66
|
+
reason: m
|
|
67
|
+
}), await p();
|
|
68
|
+
} finally {
|
|
69
|
+
d.value--;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
async function T(a, m, S) {
|
|
73
|
+
const M = y();
|
|
74
|
+
d.value++;
|
|
75
|
+
try {
|
|
76
|
+
await $.post("/api/servers/" + M.serverId + "/rcon/players/ban", {
|
|
77
|
+
player: a,
|
|
78
|
+
reason: m,
|
|
79
|
+
time: S
|
|
80
|
+
}), await p();
|
|
81
|
+
} finally {
|
|
82
|
+
d.value--;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
async function v(a, m) {
|
|
86
|
+
const S = y();
|
|
87
|
+
d.value++;
|
|
88
|
+
try {
|
|
89
|
+
await $.post("/api/servers/" + S.serverId + "/rcon/players/message", {
|
|
90
|
+
player: a,
|
|
91
|
+
message: m
|
|
92
|
+
});
|
|
93
|
+
} finally {
|
|
94
|
+
d.value--;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
return {
|
|
98
|
+
// State
|
|
99
|
+
fastRcon: x,
|
|
100
|
+
rconSupportedFeatures: k,
|
|
101
|
+
output: E,
|
|
102
|
+
apiProcesses: d,
|
|
103
|
+
players: B,
|
|
104
|
+
// Getters
|
|
105
|
+
loading: D,
|
|
106
|
+
serverId: j,
|
|
107
|
+
canUseRcon: z,
|
|
108
|
+
canManageRconPlayers: q,
|
|
109
|
+
// Actions
|
|
110
|
+
setServerId: o,
|
|
111
|
+
fetchRconSupportedFeatures: F,
|
|
112
|
+
fetchFastRcon: G,
|
|
113
|
+
sendCommand: O,
|
|
114
|
+
fetchPlayers: p,
|
|
115
|
+
kickPlayer: u,
|
|
116
|
+
banPlayer: T,
|
|
117
|
+
sendPlayerMessage: v
|
|
118
|
+
};
|
|
119
|
+
}), he = {
|
|
120
|
+
key: 0,
|
|
121
|
+
id: "alert-additional-content-4",
|
|
122
|
+
class: "p-4 mb-4 text-yellow-800 border border-yellow-300 rounded-lg bg-yellow-50 dark:bg-stone-800 dark:text-yellow-300 dark:border-yellow-800",
|
|
123
|
+
role: "alert"
|
|
124
|
+
}, ke = { class: "flex items-center" }, Se = { class: "text-lg font-medium" }, we = {
|
|
125
|
+
key: 1,
|
|
126
|
+
id: "alert-additional-content-4",
|
|
127
|
+
class: "p-4 mb-4 text-yellow-800 border border-yellow-300 rounded-lg bg-yellow-50 dark:bg-stone-800 dark:text-yellow-300 dark:border-yellow-800",
|
|
128
|
+
role: "alert"
|
|
129
|
+
}, xe = { class: "flex items-center" }, Re = { class: "text-lg font-medium" }, Ie = {
|
|
130
|
+
key: 2,
|
|
131
|
+
id: "alert-additional-content-4",
|
|
132
|
+
class: "p-4 mb-4 text-yellow-800 border border-yellow-300 rounded-lg bg-yellow-50 dark:bg-stone-800 dark:text-yellow-300 dark:border-yellow-800",
|
|
133
|
+
role: "alert"
|
|
134
|
+
}, $e = { class: "flex items-center" }, Pe = { class: "text-lg font-medium" }, Ce = {
|
|
135
|
+
key: 3,
|
|
136
|
+
id: "alert-additional-content-4",
|
|
137
|
+
class: "p-4 mb-4 text-yellow-800 border border-yellow-300 rounded-lg bg-yellow-50 dark:bg-stone-800 dark:text-yellow-300 dark:border-yellow-800",
|
|
138
|
+
role: "alert"
|
|
139
|
+
}, Te = { class: "flex items-center" }, Me = { class: "text-lg font-medium" }, Ne = 0, Ae = 2, Ee = {
|
|
140
|
+
__name: "InactiveServer",
|
|
141
|
+
props: {
|
|
142
|
+
server: null
|
|
143
|
+
},
|
|
144
|
+
setup(x) {
|
|
145
|
+
return (k, E) => x.server.installed === Ne ? (s(), f("div", he, [
|
|
146
|
+
r("div", ke, [
|
|
147
|
+
l(e(h), {
|
|
148
|
+
name: "warning",
|
|
149
|
+
class: "mr-1"
|
|
150
|
+
}),
|
|
151
|
+
r("h3", Se, _(k.trans("servers.not_installed_msg")), 1)
|
|
152
|
+
])
|
|
153
|
+
])) : x.server.installed === Ae ? (s(), f("div", we, [
|
|
154
|
+
r("div", xe, [
|
|
155
|
+
l(e(h), {
|
|
156
|
+
name: "warning",
|
|
157
|
+
class: "mr-1"
|
|
158
|
+
}),
|
|
159
|
+
r("h3", Re, _(k.trans("servers.installation_process_msg")), 1)
|
|
160
|
+
])
|
|
161
|
+
])) : x.server.blocked ? (s(), f("div", Ie, [
|
|
162
|
+
r("div", $e, [
|
|
163
|
+
l(e(h), {
|
|
164
|
+
name: "warning",
|
|
165
|
+
class: "mr-1"
|
|
166
|
+
}),
|
|
167
|
+
r("h3", Pe, _(k.trans("servers.blocked_msg")), 1)
|
|
168
|
+
])
|
|
169
|
+
])) : x.server.enabled ? t("", !0) : (s(), f("div", Ce, [
|
|
170
|
+
r("div", Te, [
|
|
171
|
+
l(e(h), {
|
|
172
|
+
name: "warning",
|
|
173
|
+
class: "mr-1"
|
|
174
|
+
}),
|
|
175
|
+
r("h3", Me, _(k.trans("servers.disabled_msg")), 1)
|
|
176
|
+
])
|
|
177
|
+
]));
|
|
178
|
+
}
|
|
179
|
+
}, Fe = { class: "md:flex md:flex-wrap mt-2" }, Le = { class: "md:w-full" }, Ve = { class: "md:flex mt-2" }, Be = { class: "md:w-1/2 md:pr-8" }, Oe = {
|
|
180
|
+
key: 1,
|
|
181
|
+
id: "serverControl"
|
|
182
|
+
}, Ue = { class: "md:w-1/2" }, De = {
|
|
183
|
+
key: 1,
|
|
184
|
+
class: "flex flex-col pl-0 mb-0"
|
|
185
|
+
}, je = {
|
|
186
|
+
key: 0,
|
|
187
|
+
class: "relative block py-3 px-6 -mb-px"
|
|
188
|
+
}, ze = { class: "badge-green" }, qe = {
|
|
189
|
+
key: 1,
|
|
190
|
+
class: "relative block py-3 px-6 -mb-px"
|
|
191
|
+
}, Ge = { class: "badge-red" }, Xe = { class: "relative block py-3 px-6 -mb-px" }, He = {
|
|
192
|
+
key: 0,
|
|
193
|
+
class: "md:flex flex-wrap mt-2"
|
|
194
|
+
}, Qe = { class: "md:w-full" }, We = { class: "flex flex-wrap mt-2" }, Je = { class: "md:w-full" }, Ke = {
|
|
195
|
+
key: 0,
|
|
196
|
+
class: "pr-8"
|
|
197
|
+
}, Ye = { class: "flex flex-wrap mt-2 h-[calc(100vh-14rem)]" }, Ze = { class: "md:w-full h-full" }, es = { class: "flex flex-col min-w-0 rounded break-words border bg-white dark:bg-stone-800 border-1 border-stone-300 dark:border-stone-700 h-full" }, ss = { class: "md:flex md:flex-wrap mt-2" }, rs = { class: "md:w-full" }, ts = { class: "order-last ml-auto text-red-500 hover:text-red-600" }, as = {
|
|
198
|
+
__name: "ServerIdView",
|
|
199
|
+
setup(x) {
|
|
200
|
+
const k = I(
|
|
201
|
+
() => import(
|
|
202
|
+
"./ServerStatus-CcqB0h1r.js"
|
|
203
|
+
/* webpackChunkName: "components/server" */
|
|
204
|
+
)
|
|
205
|
+
), E = I(
|
|
206
|
+
() => import(
|
|
207
|
+
"./ServerTasks-BcaZzvz7.js"
|
|
208
|
+
/* webpackChunkName: "components/server" */
|
|
209
|
+
)
|
|
210
|
+
), d = I(
|
|
211
|
+
() => import(
|
|
212
|
+
"./ServerConsole-B9v2PcWb.js"
|
|
213
|
+
/* webpackChunkName: "components/server" */
|
|
214
|
+
)
|
|
215
|
+
), B = I(
|
|
216
|
+
() => import(
|
|
217
|
+
"./ServerSettings-C6-tkLTH.js"
|
|
218
|
+
/* webpackChunkName: "components/server" */
|
|
219
|
+
)
|
|
220
|
+
), D = I(
|
|
221
|
+
() => import(
|
|
222
|
+
"./RconPlayers-odUKa0Ps.js"
|
|
223
|
+
/* webpackChunkName: "components/rcon" */
|
|
224
|
+
)
|
|
225
|
+
), j = I(
|
|
226
|
+
() => import(
|
|
227
|
+
"./RconConsole-CvxNBv0B.js"
|
|
228
|
+
/* webpackChunkName: "components/rcon" */
|
|
229
|
+
)
|
|
230
|
+
), z = I(
|
|
231
|
+
() => import("./FileManager-DSa9v4Ex.js")
|
|
232
|
+
), q = ve(), o = y(), F = be(), G = pe(), O = _e(), {
|
|
233
|
+
serverId: p,
|
|
234
|
+
server: u
|
|
235
|
+
} = Q(o), {
|
|
236
|
+
rconSupportedFeatures: T
|
|
237
|
+
} = Q(F), v = g(() => o.loading);
|
|
238
|
+
ne(() => {
|
|
239
|
+
o.setServerId(Number(q.params.id)), o.fetchServer().then(() => {
|
|
240
|
+
u.value && (document.title = u.value.name), a.value = u.value?.enabled && !u.value?.blocked && u.value?.installed === 1, a.value && F.fetchRconSupportedFeatures();
|
|
241
|
+
}), o.fetchAbilities();
|
|
242
|
+
});
|
|
243
|
+
const a = C(!0), m = C(null), S = g(() => ({
|
|
244
|
+
start: o.canStart,
|
|
245
|
+
stop: o.canStop,
|
|
246
|
+
restart: o.canRestart,
|
|
247
|
+
update: o.canUpdate
|
|
248
|
+
})), M = g(() => !!u.value?.online), W = g(() => m.value?.status === "online"), J = g(() => (T.value.rcon || T.value.playersManage) && F.canUseRcon && M.value), K = g(() => {
|
|
249
|
+
const L = [
|
|
250
|
+
{ route: "/", text: "GameAP", icon: "gicon gicon-gameap" },
|
|
251
|
+
{ route: { name: "servers" }, text: i("servers.game_servers") }
|
|
252
|
+
];
|
|
253
|
+
return u.value?.name && L.push({
|
|
254
|
+
render: () => [
|
|
255
|
+
X(ge, { game: u.value.game?.code ?? "", class: "mr-2 align-middle" }),
|
|
256
|
+
X("span", { game: u.value.game?.code ?? "", class: "align-middle" }, u.value.name)
|
|
257
|
+
]
|
|
258
|
+
}), L;
|
|
259
|
+
}), Y = g(() => G.isAdmin), Z = g(() => O.getSlotComponents("server-tabs").filter((N) => N.checkPermission && N.checkPermission.type === "hasServerPermissions" ? N.checkPermission.permissions.every(
|
|
260
|
+
(R) => o.abilities[R] === !0
|
|
261
|
+
) : !0));
|
|
262
|
+
return (L, N) => {
|
|
263
|
+
const R = ae, A = te, ee = oe("router-link"), se = re;
|
|
264
|
+
return s(), f(H, null, [
|
|
265
|
+
l(e(fe), { items: K.value }, null, 8, ["items"]),
|
|
266
|
+
!v.value && !a.value ? (s(), n(Ee, {
|
|
267
|
+
key: 0,
|
|
268
|
+
server: e(u)
|
|
269
|
+
}, null, 8, ["server"])) : (s(), n(se, {
|
|
270
|
+
key: 1,
|
|
271
|
+
type: "line",
|
|
272
|
+
class: U(["flex justify-between", a.value ? "" : "hidden"]),
|
|
273
|
+
animated: "",
|
|
274
|
+
"display-directive": "show:lazy"
|
|
275
|
+
}, le({
|
|
276
|
+
default: c(() => [
|
|
277
|
+
l(A, { name: "control" }, {
|
|
278
|
+
tab: c(() => [
|
|
279
|
+
l(e(h), {
|
|
280
|
+
name: "play",
|
|
281
|
+
class: "mr-1"
|
|
282
|
+
}),
|
|
283
|
+
w(" " + _(e(i)("servers.control")), 1)
|
|
284
|
+
]),
|
|
285
|
+
default: c(() => [
|
|
286
|
+
ce(r("div", Fe, [
|
|
287
|
+
r("div", Le, [
|
|
288
|
+
l(R, { class: "mb-3" }, {
|
|
289
|
+
default: c(() => [
|
|
290
|
+
v.value ? (s(), n(e(P), { key: 0 })) : t("", !0),
|
|
291
|
+
v.value ? t("", !0) : (s(), n(e(k), {
|
|
292
|
+
key: 1,
|
|
293
|
+
ref_key: "serverStatusRef",
|
|
294
|
+
ref: m,
|
|
295
|
+
"server-id": e(p)
|
|
296
|
+
}, null, 8, ["server-id"]))
|
|
297
|
+
]),
|
|
298
|
+
_: 1
|
|
299
|
+
})
|
|
300
|
+
])
|
|
301
|
+
], 512), [
|
|
302
|
+
[ie, W.value]
|
|
303
|
+
]),
|
|
304
|
+
r("div", Ve, [
|
|
305
|
+
r("div", Be, [
|
|
306
|
+
l(R, {
|
|
307
|
+
title: e(i)("servers.commands"),
|
|
308
|
+
class: "mb-3",
|
|
309
|
+
"header-class": "g-card-header",
|
|
310
|
+
segmented: {
|
|
311
|
+
content: !0,
|
|
312
|
+
footer: "soft"
|
|
313
|
+
}
|
|
314
|
+
}, {
|
|
315
|
+
default: c(() => [
|
|
316
|
+
v.value ? (s(), n(e(P), { key: 0 })) : t("", !0),
|
|
317
|
+
v.value ? t("", !0) : (s(), f("div", Oe, [
|
|
318
|
+
e(o).canStart && !M.value ? (s(), n(V, {
|
|
319
|
+
key: 0,
|
|
320
|
+
command: "start",
|
|
321
|
+
"server-id": e(p),
|
|
322
|
+
button: "m-1",
|
|
323
|
+
"button-color": "green",
|
|
324
|
+
icon: "play",
|
|
325
|
+
text: e(i)("servers.start")
|
|
326
|
+
}, null, 8, ["server-id", "text"])) : t("", !0),
|
|
327
|
+
e(o).canStop && M.value ? (s(), n(V, {
|
|
328
|
+
key: 1,
|
|
329
|
+
command: "stop",
|
|
330
|
+
"server-id": e(p),
|
|
331
|
+
button: "m-1",
|
|
332
|
+
"button-color": "red",
|
|
333
|
+
icon: "stop",
|
|
334
|
+
text: e(i)("servers.stop")
|
|
335
|
+
}, null, 8, ["server-id", "text"])) : t("", !0),
|
|
336
|
+
e(o).canRestart ? (s(), n(V, {
|
|
337
|
+
key: 2,
|
|
338
|
+
command: "restart",
|
|
339
|
+
"server-id": e(p),
|
|
340
|
+
button: "m-1",
|
|
341
|
+
"button-color": "orange",
|
|
342
|
+
icon: "restart",
|
|
343
|
+
text: e(i)("servers.restart")
|
|
344
|
+
}, null, 8, ["server-id", "text"])) : t("", !0),
|
|
345
|
+
e(o).canUpdate ? (s(), n(V, {
|
|
346
|
+
key: 3,
|
|
347
|
+
command: "update",
|
|
348
|
+
"server-id": e(p),
|
|
349
|
+
button: "m-1",
|
|
350
|
+
"button-color": "black",
|
|
351
|
+
icon: "refresh",
|
|
352
|
+
text: e(i)("servers.update")
|
|
353
|
+
}, null, 8, ["server-id", "text"])) : t("", !0),
|
|
354
|
+
e(o).canUpdate ? (s(), n(V, {
|
|
355
|
+
key: 4,
|
|
356
|
+
command: "reinstall",
|
|
357
|
+
"server-id": e(p),
|
|
358
|
+
button: "m-1",
|
|
359
|
+
"button-color": "black",
|
|
360
|
+
icon: "rcon",
|
|
361
|
+
text: e(i)("servers.reinstall")
|
|
362
|
+
}, null, 8, ["server-id", "text"])) : t("", !0)
|
|
363
|
+
]))
|
|
364
|
+
]),
|
|
365
|
+
_: 1
|
|
366
|
+
}, 8, ["title"])
|
|
367
|
+
]),
|
|
368
|
+
r("div", Ue, [
|
|
369
|
+
l(R, {
|
|
370
|
+
title: e(i)("servers.process_status"),
|
|
371
|
+
class: "mb-3",
|
|
372
|
+
"header-class": "g-card-header",
|
|
373
|
+
segmented: {
|
|
374
|
+
content: !0,
|
|
375
|
+
footer: "soft"
|
|
376
|
+
}
|
|
377
|
+
}, {
|
|
378
|
+
default: c(() => [
|
|
379
|
+
v.value ? (s(), n(e(P), { key: 0 })) : t("", !0),
|
|
380
|
+
v.value ? t("", !0) : (s(), f("ul", De, [
|
|
381
|
+
M.value ? (s(), f("li", je, [
|
|
382
|
+
w(_(e(i)("servers.status")) + ": ", 1),
|
|
383
|
+
r("span", ze, _(e(i)("servers.active")), 1)
|
|
384
|
+
])) : (s(), f("li", qe, [
|
|
385
|
+
w(_(e(i)("servers.status")) + ": ", 1),
|
|
386
|
+
r("span", Ge, _(e(i)("servers.inactive")), 1)
|
|
387
|
+
])),
|
|
388
|
+
r("li", Xe, _(e(i)("servers.last_check")) + ": " + _(new Date(e(u).last_process_check).toLocaleString()), 1)
|
|
389
|
+
]))
|
|
390
|
+
]),
|
|
391
|
+
_: 1
|
|
392
|
+
}, 8, ["title"])
|
|
393
|
+
])
|
|
394
|
+
]),
|
|
395
|
+
e(o).canReadConsole ? (s(), f("div", He, [
|
|
396
|
+
r("div", Qe, [
|
|
397
|
+
v.value ? (s(), n(e(P), { key: 0 })) : t("", !0),
|
|
398
|
+
v.value ? t("", !0) : (s(), n(e(d), {
|
|
399
|
+
key: 1,
|
|
400
|
+
"console-hostname": e(u)?.name,
|
|
401
|
+
"server-id": e(p),
|
|
402
|
+
"server-active": e(u)?.online,
|
|
403
|
+
"send-command-available": e(o).canSendConsole
|
|
404
|
+
}, null, 8, ["console-hostname", "server-id", "server-active", "send-command-available"]))
|
|
405
|
+
])
|
|
406
|
+
])) : t("", !0)
|
|
407
|
+
]),
|
|
408
|
+
_: 1
|
|
409
|
+
}),
|
|
410
|
+
J.value ? (s(), n(A, {
|
|
411
|
+
key: 0,
|
|
412
|
+
name: "rcon"
|
|
413
|
+
}, {
|
|
414
|
+
tab: c(() => [
|
|
415
|
+
l(e(h), {
|
|
416
|
+
name: "rcon",
|
|
417
|
+
class: "mr-1"
|
|
418
|
+
}),
|
|
419
|
+
N[0] || (N[0] = w(" RCON ", -1))
|
|
420
|
+
]),
|
|
421
|
+
default: c(() => [
|
|
422
|
+
r("div", We, [
|
|
423
|
+
r("div", Je, [
|
|
424
|
+
r("div", {
|
|
425
|
+
class: U("md:grid " + (e(T).playersManage ? "md:grid-cols-2" : "md:grid-cols-1"))
|
|
426
|
+
}, [
|
|
427
|
+
e(T).playersManage ? (s(), f("div", Ke, [
|
|
428
|
+
l(R, {
|
|
429
|
+
title: e(i)("rcon.players_manage"),
|
|
430
|
+
class: "mb-3",
|
|
431
|
+
"header-class": "g-card-header",
|
|
432
|
+
segmented: {
|
|
433
|
+
content: !0,
|
|
434
|
+
footer: "soft"
|
|
435
|
+
}
|
|
436
|
+
}, {
|
|
437
|
+
default: c(() => [
|
|
438
|
+
v.value ? (s(), n(e(P), { key: 0 })) : t("", !0),
|
|
439
|
+
v.value ? t("", !0) : (s(), n(e(D), {
|
|
440
|
+
key: 1,
|
|
441
|
+
"server-id": e(p)
|
|
442
|
+
}, null, 8, ["server-id"]))
|
|
443
|
+
]),
|
|
444
|
+
_: 1
|
|
445
|
+
}, 8, ["title"])
|
|
446
|
+
])) : t("", !0),
|
|
447
|
+
r("div", null, [
|
|
448
|
+
l(R, {
|
|
449
|
+
title: e(i)("rcon.console"),
|
|
450
|
+
class: "mb-3",
|
|
451
|
+
"header-class": "g-card-header",
|
|
452
|
+
segmented: {
|
|
453
|
+
content: !0,
|
|
454
|
+
footer: "soft"
|
|
455
|
+
}
|
|
456
|
+
}, {
|
|
457
|
+
default: c(() => [
|
|
458
|
+
v.value ? (s(), n(e(P), { key: 0 })) : t("", !0),
|
|
459
|
+
v.value ? t("", !0) : (s(), n(e(j), {
|
|
460
|
+
key: 1,
|
|
461
|
+
"server-id": e(p)
|
|
462
|
+
}, null, 8, ["server-id"]))
|
|
463
|
+
]),
|
|
464
|
+
_: 1
|
|
465
|
+
}, 8, ["title"])
|
|
466
|
+
])
|
|
467
|
+
], 2)
|
|
468
|
+
])
|
|
469
|
+
])
|
|
470
|
+
]),
|
|
471
|
+
_: 1
|
|
472
|
+
})) : t("", !0),
|
|
473
|
+
e(o).canManageFiles ? (s(), n(A, {
|
|
474
|
+
key: 1,
|
|
475
|
+
name: "files"
|
|
476
|
+
}, {
|
|
477
|
+
tab: c(() => [
|
|
478
|
+
l(e(h), {
|
|
479
|
+
name: "folder-solid",
|
|
480
|
+
class: "mr-1"
|
|
481
|
+
}),
|
|
482
|
+
w(" " + _(e(i)("servers.files")), 1)
|
|
483
|
+
]),
|
|
484
|
+
default: c(() => [
|
|
485
|
+
r("div", Ye, [
|
|
486
|
+
r("div", Ze, [
|
|
487
|
+
r("div", es, [
|
|
488
|
+
l(e(z), {
|
|
489
|
+
settings: {
|
|
490
|
+
lang: e(ye)(),
|
|
491
|
+
baseUrl: "/api/file-manager/" + L.$route.params.id,
|
|
492
|
+
headers: {
|
|
493
|
+
"X-Requested-With": "XMLHttpRequest"
|
|
494
|
+
}
|
|
495
|
+
}
|
|
496
|
+
}, null, 8, ["settings"])
|
|
497
|
+
])
|
|
498
|
+
])
|
|
499
|
+
])
|
|
500
|
+
]),
|
|
501
|
+
_: 1
|
|
502
|
+
})) : t("", !0),
|
|
503
|
+
e(o).canManageTasks ? (s(), n(A, {
|
|
504
|
+
key: 2,
|
|
505
|
+
name: "schedules"
|
|
506
|
+
}, {
|
|
507
|
+
tab: c(() => [
|
|
508
|
+
l(e(h), {
|
|
509
|
+
name: "calendar",
|
|
510
|
+
class: "mr-1"
|
|
511
|
+
}),
|
|
512
|
+
w(" " + _(e(i)("servers.task_scheduler")), 1)
|
|
513
|
+
]),
|
|
514
|
+
default: c(() => [
|
|
515
|
+
l(e(E), {
|
|
516
|
+
"server-id": e(p),
|
|
517
|
+
privileges: S.value
|
|
518
|
+
}, null, 8, ["server-id", "privileges"])
|
|
519
|
+
]),
|
|
520
|
+
_: 1
|
|
521
|
+
})) : t("", !0),
|
|
522
|
+
(s(!0), f(H, null, de(Z.value, (b) => (s(), n(A, {
|
|
523
|
+
key: "plugin-" + b.pluginId + "-" + (b.name || "tab"),
|
|
524
|
+
name: "plugin-" + b.pluginId + "-" + (b.name || "tab")
|
|
525
|
+
}, {
|
|
526
|
+
tab: c(() => [
|
|
527
|
+
b.icon ? (s(), f("i", {
|
|
528
|
+
key: 0,
|
|
529
|
+
class: U([b.icon, "mr-1"])
|
|
530
|
+
}, null, 2)) : t("", !0),
|
|
531
|
+
w(" " + _(e(O).resolvePluginText(b.pluginId, b.label)), 1)
|
|
532
|
+
]),
|
|
533
|
+
default: c(() => [
|
|
534
|
+
(s(), n(ue(b.component), {
|
|
535
|
+
"server-id": e(p),
|
|
536
|
+
server: e(u),
|
|
537
|
+
"plugin-id": b.pluginId
|
|
538
|
+
}, null, 8, ["server-id", "server", "plugin-id"]))
|
|
539
|
+
]),
|
|
540
|
+
_: 2
|
|
541
|
+
}, 1032, ["name"]))), 128)),
|
|
542
|
+
e(o).canManageSettings ? (s(), n(A, {
|
|
543
|
+
key: 3,
|
|
544
|
+
name: "settings"
|
|
545
|
+
}, {
|
|
546
|
+
tab: c(() => [
|
|
547
|
+
l(e(h), {
|
|
548
|
+
name: "cogs",
|
|
549
|
+
class: "mr-1"
|
|
550
|
+
}),
|
|
551
|
+
w(" " + _(e(i)("servers.settings")), 1)
|
|
552
|
+
]),
|
|
553
|
+
default: c(() => [
|
|
554
|
+
r("div", ss, [
|
|
555
|
+
r("div", rs, [
|
|
556
|
+
l(R, { class: "mb-3" }, {
|
|
557
|
+
default: c(() => [
|
|
558
|
+
r("div", null, [
|
|
559
|
+
v.value ? (s(), n(e(P), {
|
|
560
|
+
key: 0,
|
|
561
|
+
class: "absolute inset-0 flex justify-center items-center z-10"
|
|
562
|
+
})) : t("", !0),
|
|
563
|
+
l(e(B), {
|
|
564
|
+
class: U(v.value ? "opacity-20" : "")
|
|
565
|
+
}, null, 8, ["class"])
|
|
566
|
+
])
|
|
567
|
+
]),
|
|
568
|
+
_: 1
|
|
569
|
+
})
|
|
570
|
+
])
|
|
571
|
+
])
|
|
572
|
+
]),
|
|
573
|
+
_: 1
|
|
574
|
+
})) : t("", !0)
|
|
575
|
+
]),
|
|
576
|
+
_: 2
|
|
577
|
+
}, [
|
|
578
|
+
Y.value ? {
|
|
579
|
+
name: "suffix",
|
|
580
|
+
fn: c(() => [
|
|
581
|
+
r("div", ts, [
|
|
582
|
+
l(ee, {
|
|
583
|
+
to: { name: "admin.servers.edit", params: { id: e(p) } }
|
|
584
|
+
}, {
|
|
585
|
+
default: c(() => [
|
|
586
|
+
l(e(h), {
|
|
587
|
+
name: "hammer",
|
|
588
|
+
class: "mr-1"
|
|
589
|
+
}),
|
|
590
|
+
w(" " + _(e(i)("servers.admin")), 1)
|
|
591
|
+
]),
|
|
592
|
+
_: 1
|
|
593
|
+
}, 8, ["to"])
|
|
594
|
+
])
|
|
595
|
+
]),
|
|
596
|
+
key: "0"
|
|
597
|
+
} : void 0
|
|
598
|
+
]), 1032, ["class"]))
|
|
599
|
+
], 64);
|
|
600
|
+
};
|
|
601
|
+
}
|
|
602
|
+
}, vs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
603
|
+
__proto__: null,
|
|
604
|
+
default: as
|
|
605
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
606
|
+
export {
|
|
607
|
+
vs as S,
|
|
608
|
+
be as u
|
|
609
|
+
};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { computed as p, onMounted as f, watch as I, createElementBlock as s, openBlock as o, createElementVNode as l, withDirectives as g, toDisplayString as t, unref as v, Fragment as h, renderList as N, vModelSelect as b } from "vue";
|
|
2
|
+
import { storeToRefs as u } from "pinia";
|
|
3
|
+
import { i as F, u as L, j as y, t as B } from "./index-9fvX7FD-.js";
|
|
4
|
+
const k = {
|
|
5
|
+
id: "serverForm",
|
|
6
|
+
class: "mb-3"
|
|
7
|
+
}, w = {
|
|
8
|
+
for: "server-id",
|
|
9
|
+
class: "control-label"
|
|
10
|
+
}, x = ["name"], D = ["value"], j = {
|
|
11
|
+
__name: "ServerSelector",
|
|
12
|
+
props: {
|
|
13
|
+
serverIdFieldName: {
|
|
14
|
+
type: String,
|
|
15
|
+
default: "game_server_id"
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
setup(m) {
|
|
19
|
+
const _ = F(), n = L(), a = y(), { nodeId: d } = u(_), { servers: S } = u(a), r = p({
|
|
20
|
+
get() {
|
|
21
|
+
return n.serverId;
|
|
22
|
+
},
|
|
23
|
+
set(i) {
|
|
24
|
+
n.setServerId(i);
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
return f(() => {
|
|
28
|
+
r.value || (r.value = -1);
|
|
29
|
+
}), I(d, () => {
|
|
30
|
+
a.fetchServersByNode(d.value);
|
|
31
|
+
}), (i, c) => (o(), s("div", null, [
|
|
32
|
+
l("div", k, [
|
|
33
|
+
l("label", w, t(v(B)("labels.game_server")), 1),
|
|
34
|
+
g(l("select", {
|
|
35
|
+
id: "server-id",
|
|
36
|
+
name: m.serverIdFieldName,
|
|
37
|
+
class: "form-select",
|
|
38
|
+
"onUpdate:modelValue": c[0] || (c[0] = (e) => r.value = e)
|
|
39
|
+
}, [
|
|
40
|
+
(o(!0), s(h, null, N(v(S), (e) => (o(), s("option", {
|
|
41
|
+
value: e.id
|
|
42
|
+
}, t(e.name) + " " + t(e.server_ip) + ":" + t(e.server_port), 9, D))), 256))
|
|
43
|
+
], 8, x), [
|
|
44
|
+
[b, r.value]
|
|
45
|
+
])
|
|
46
|
+
])
|
|
47
|
+
]));
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
export {
|
|
51
|
+
j as default
|
|
52
|
+
};
|