@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,529 @@
|
|
|
1
|
+
import { mergeModels as N, ref as T, useModel as W, resolveComponent as z, createElementBlock as H, openBlock as L, normalizeClass as I, createVNode as a, unref as e, withCtx as o, createElementVNode as d, createTextVNode as y, toDisplayString as g, computed as U, onMounted as j, Fragment as S, createBlock as $, createCommentVNode as E } from "vue";
|
|
2
|
+
import { t, _ as G, a as F, b as R, h as O, e as k, m as B, l as q, n as A } from "./index-9fvX7FD-.js";
|
|
3
|
+
import { r as P } from "./validators-ChBGsKft.js";
|
|
4
|
+
import { NForm as D, NTabs as J, NTabPane as w, NCard as x, NFormItem as m, NInput as u } from "naive-ui";
|
|
5
|
+
import { defineStore as K, storeToRefs as V } from "pinia";
|
|
6
|
+
import { useRoute as Q, useRouter as X } from "vue-router";
|
|
7
|
+
import { c as Y } from "./camelCase-CSrB2MWj.js";
|
|
8
|
+
import { s as Z } from "./snakeCase-nnM4dAra.js";
|
|
9
|
+
const ee = { class: "flex flex-wrap justify-center mt-2" }, ae = { class: "md:w-1/2" }, te = { class: "flex flex-wrap mt-2" }, le = { class: "md:w-1/2 pr-8" }, se = { class: "md:w-1/2" }, oe = { class: "flex flex-wrap mt-2" }, ne = { class: "md:w-full" }, de = { class: "flex flex-wrap mt-2" }, me = { class: "md:w-full" }, ue = { class: "flex grid grid-cols-2 gap-x-5 gap-y-4" }, re = ["innerHTML"], ie = ["innerHTML"], ce = ["innerHTML"], pe = ["innerHTML"], ve = ["innerHTML"], fe = ["innerHTML"], _e = { class: "hidden lg:inline" }, be = {
|
|
10
|
+
__name: "UpdateModForm",
|
|
11
|
+
props: {
|
|
12
|
+
modelValue: {},
|
|
13
|
+
modelModifiers: {}
|
|
14
|
+
},
|
|
15
|
+
emits: /* @__PURE__ */ N(["update"], ["update:modelValue"]),
|
|
16
|
+
setup(i, { emit: f }) {
|
|
17
|
+
const h = T({}), l = W(i, "modelValue"), p = {
|
|
18
|
+
name: {
|
|
19
|
+
required: !0,
|
|
20
|
+
validator: P(t("labels.name"))
|
|
21
|
+
}
|
|
22
|
+
}, C = f, _ = () => {
|
|
23
|
+
h.value.validate().then(() => {
|
|
24
|
+
C("update");
|
|
25
|
+
});
|
|
26
|
+
};
|
|
27
|
+
return (b, s) => {
|
|
28
|
+
const v = z("InputManyList");
|
|
29
|
+
return L(), H("div", {
|
|
30
|
+
class: I(b.$attrs.class)
|
|
31
|
+
}, [
|
|
32
|
+
a(e(D), {
|
|
33
|
+
"label-placement": "top",
|
|
34
|
+
"label-width": "auto",
|
|
35
|
+
ref_key: "formRef",
|
|
36
|
+
ref: h,
|
|
37
|
+
model: l.value,
|
|
38
|
+
rules: p
|
|
39
|
+
}, {
|
|
40
|
+
default: o(() => [
|
|
41
|
+
a(e(J), {
|
|
42
|
+
type: "line",
|
|
43
|
+
class: "flex justify-between",
|
|
44
|
+
animated: ""
|
|
45
|
+
}, {
|
|
46
|
+
default: o(() => [
|
|
47
|
+
a(e(w), { name: "main" }, {
|
|
48
|
+
tab: o(() => [
|
|
49
|
+
y(g(e(t)("games.main")), 1)
|
|
50
|
+
]),
|
|
51
|
+
default: o(() => [
|
|
52
|
+
d("div", ee, [
|
|
53
|
+
d("div", ae, [
|
|
54
|
+
a(e(x), {
|
|
55
|
+
title: e(t)("games.basic_info"),
|
|
56
|
+
size: "small",
|
|
57
|
+
class: "mb-3",
|
|
58
|
+
"header-class": "g-card-header",
|
|
59
|
+
segmented: {
|
|
60
|
+
content: !0,
|
|
61
|
+
footer: "soft"
|
|
62
|
+
}
|
|
63
|
+
}, {
|
|
64
|
+
default: o(() => [
|
|
65
|
+
a(e(m), {
|
|
66
|
+
label: e(t)("labels.name"),
|
|
67
|
+
path: "name"
|
|
68
|
+
}, {
|
|
69
|
+
default: o(() => [
|
|
70
|
+
a(e(u), {
|
|
71
|
+
value: l.value.name,
|
|
72
|
+
"onUpdate:value": s[0] || (s[0] = (n) => l.value.name = n),
|
|
73
|
+
type: "text"
|
|
74
|
+
}, null, 8, ["value"])
|
|
75
|
+
]),
|
|
76
|
+
_: 1
|
|
77
|
+
}, 8, ["label"])
|
|
78
|
+
]),
|
|
79
|
+
_: 1
|
|
80
|
+
}, 8, ["title"])
|
|
81
|
+
])
|
|
82
|
+
]),
|
|
83
|
+
d("div", te, [
|
|
84
|
+
d("div", le, [
|
|
85
|
+
a(e(x), {
|
|
86
|
+
title: e(t)("games.repositories_local"),
|
|
87
|
+
size: "small",
|
|
88
|
+
class: "mb-3",
|
|
89
|
+
"header-class": "g-card-header",
|
|
90
|
+
segmented: {
|
|
91
|
+
content: !0,
|
|
92
|
+
footer: "soft"
|
|
93
|
+
}
|
|
94
|
+
}, {
|
|
95
|
+
default: o(() => [
|
|
96
|
+
a(e(m), {
|
|
97
|
+
label: e(t)("labels.local_repository_linux"),
|
|
98
|
+
path: "localRepositoryLinux"
|
|
99
|
+
}, {
|
|
100
|
+
default: o(() => [
|
|
101
|
+
a(e(u), {
|
|
102
|
+
value: l.value.localRepositoryLinux,
|
|
103
|
+
"onUpdate:value": s[1] || (s[1] = (n) => l.value.localRepositoryLinux = n),
|
|
104
|
+
type: "text"
|
|
105
|
+
}, null, 8, ["value"])
|
|
106
|
+
]),
|
|
107
|
+
_: 1
|
|
108
|
+
}, 8, ["label"]),
|
|
109
|
+
a(e(m), {
|
|
110
|
+
label: e(t)("labels.local_repository_windows"),
|
|
111
|
+
path: "localRepositoryWindows"
|
|
112
|
+
}, {
|
|
113
|
+
default: o(() => [
|
|
114
|
+
a(e(u), {
|
|
115
|
+
value: l.value.localRepositoryWindows,
|
|
116
|
+
"onUpdate:value": s[2] || (s[2] = (n) => l.value.localRepositoryWindows = n),
|
|
117
|
+
type: "text"
|
|
118
|
+
}, null, 8, ["value"])
|
|
119
|
+
]),
|
|
120
|
+
_: 1
|
|
121
|
+
}, 8, ["label"])
|
|
122
|
+
]),
|
|
123
|
+
_: 1
|
|
124
|
+
}, 8, ["title"])
|
|
125
|
+
]),
|
|
126
|
+
d("div", se, [
|
|
127
|
+
a(e(x), {
|
|
128
|
+
title: e(t)("games.repositories_remote"),
|
|
129
|
+
size: "small",
|
|
130
|
+
class: "mb-3",
|
|
131
|
+
"header-class": "g-card-header",
|
|
132
|
+
segmented: {
|
|
133
|
+
content: !0,
|
|
134
|
+
footer: "soft"
|
|
135
|
+
}
|
|
136
|
+
}, {
|
|
137
|
+
default: o(() => [
|
|
138
|
+
a(e(m), {
|
|
139
|
+
label: e(t)("labels.remote_repository_linux"),
|
|
140
|
+
path: "remoteRepositoryLinux"
|
|
141
|
+
}, {
|
|
142
|
+
default: o(() => [
|
|
143
|
+
a(e(u), {
|
|
144
|
+
value: l.value.remoteRepositoryLinux,
|
|
145
|
+
"onUpdate:value": s[3] || (s[3] = (n) => l.value.remoteRepositoryLinux = n),
|
|
146
|
+
type: "text"
|
|
147
|
+
}, null, 8, ["value"])
|
|
148
|
+
]),
|
|
149
|
+
_: 1
|
|
150
|
+
}, 8, ["label"]),
|
|
151
|
+
a(e(m), {
|
|
152
|
+
label: e(t)("labels.remote_repository_windows"),
|
|
153
|
+
path: "remoteRepositoryWindows"
|
|
154
|
+
}, {
|
|
155
|
+
default: o(() => [
|
|
156
|
+
a(e(u), {
|
|
157
|
+
value: l.value.remoteRepositoryWindows,
|
|
158
|
+
"onUpdate:value": s[4] || (s[4] = (n) => l.value.remoteRepositoryWindows = n),
|
|
159
|
+
type: "text"
|
|
160
|
+
}, null, 8, ["value"])
|
|
161
|
+
]),
|
|
162
|
+
_: 1
|
|
163
|
+
}, 8, ["label"])
|
|
164
|
+
]),
|
|
165
|
+
_: 1
|
|
166
|
+
}, 8, ["title"])
|
|
167
|
+
])
|
|
168
|
+
]),
|
|
169
|
+
d("div", oe, [
|
|
170
|
+
d("div", ne, [
|
|
171
|
+
a(e(x), {
|
|
172
|
+
title: e(t)("games.run_commands"),
|
|
173
|
+
size: "small",
|
|
174
|
+
class: "mb-3",
|
|
175
|
+
"header-class": "g-card-header",
|
|
176
|
+
segmented: {
|
|
177
|
+
content: !0,
|
|
178
|
+
footer: "soft"
|
|
179
|
+
}
|
|
180
|
+
}, {
|
|
181
|
+
default: o(() => [
|
|
182
|
+
a(e(m), {
|
|
183
|
+
label: e(t)("labels.start_cmd_linux"),
|
|
184
|
+
path: "startCmdLinux"
|
|
185
|
+
}, {
|
|
186
|
+
default: o(() => [
|
|
187
|
+
a(e(u), {
|
|
188
|
+
value: l.value.startCmdLinux,
|
|
189
|
+
"onUpdate:value": s[5] || (s[5] = (n) => l.value.startCmdLinux = n),
|
|
190
|
+
type: "textarea",
|
|
191
|
+
autosize: { minRows: 4 }
|
|
192
|
+
}, null, 8, ["value"])
|
|
193
|
+
]),
|
|
194
|
+
_: 1
|
|
195
|
+
}, 8, ["label"]),
|
|
196
|
+
a(e(m), {
|
|
197
|
+
label: e(t)("labels.start_cmd_windows"),
|
|
198
|
+
path: "startCmdWindows"
|
|
199
|
+
}, {
|
|
200
|
+
default: o(() => [
|
|
201
|
+
a(e(u), {
|
|
202
|
+
value: l.value.startCmdWindows,
|
|
203
|
+
"onUpdate:value": s[6] || (s[6] = (n) => l.value.startCmdWindows = n),
|
|
204
|
+
type: "textarea",
|
|
205
|
+
autosize: { minRows: 4 }
|
|
206
|
+
}, null, 8, ["value"])
|
|
207
|
+
]),
|
|
208
|
+
_: 1
|
|
209
|
+
}, 8, ["label"])
|
|
210
|
+
]),
|
|
211
|
+
_: 1
|
|
212
|
+
}, 8, ["title"])
|
|
213
|
+
])
|
|
214
|
+
])
|
|
215
|
+
]),
|
|
216
|
+
_: 1
|
|
217
|
+
}),
|
|
218
|
+
a(e(w), { name: "commands" }, {
|
|
219
|
+
tab: o(() => [
|
|
220
|
+
y(g(e(t)("games.servers_commands")), 1)
|
|
221
|
+
]),
|
|
222
|
+
default: o(() => [
|
|
223
|
+
d("div", de, [
|
|
224
|
+
d("div", me, [
|
|
225
|
+
a(e(x), {
|
|
226
|
+
title: e(t)("games.servers_commands"),
|
|
227
|
+
size: "small",
|
|
228
|
+
class: "mb-3",
|
|
229
|
+
"header-class": "g-card-header",
|
|
230
|
+
segmented: {
|
|
231
|
+
content: !0,
|
|
232
|
+
footer: "soft"
|
|
233
|
+
}
|
|
234
|
+
}, {
|
|
235
|
+
default: o(() => [
|
|
236
|
+
d("div", ue, [
|
|
237
|
+
a(e(m), {
|
|
238
|
+
label: e(t)("labels.kick_cmd"),
|
|
239
|
+
path: "kickCmd"
|
|
240
|
+
}, {
|
|
241
|
+
feedback: o(() => [
|
|
242
|
+
d("small", {
|
|
243
|
+
innerHTML: e(t)("games.d_kick_cmd")
|
|
244
|
+
}, null, 8, re)
|
|
245
|
+
]),
|
|
246
|
+
default: o(() => [
|
|
247
|
+
a(e(u), {
|
|
248
|
+
value: l.value.kickCmd,
|
|
249
|
+
"onUpdate:value": s[7] || (s[7] = (n) => l.value.kickCmd = n),
|
|
250
|
+
type: "text"
|
|
251
|
+
}, null, 8, ["value"])
|
|
252
|
+
]),
|
|
253
|
+
_: 1
|
|
254
|
+
}, 8, ["label"]),
|
|
255
|
+
a(e(m), {
|
|
256
|
+
label: e(t)("labels.ban_cmd"),
|
|
257
|
+
path: "banCmd"
|
|
258
|
+
}, {
|
|
259
|
+
feedback: o(() => [
|
|
260
|
+
d("small", {
|
|
261
|
+
innerHTML: e(t)("games.d_ban_cmd")
|
|
262
|
+
}, null, 8, ie)
|
|
263
|
+
]),
|
|
264
|
+
default: o(() => [
|
|
265
|
+
a(e(u), {
|
|
266
|
+
value: l.value.banCmd,
|
|
267
|
+
"onUpdate:value": s[8] || (s[8] = (n) => l.value.banCmd = n),
|
|
268
|
+
type: "text"
|
|
269
|
+
}, null, 8, ["value"])
|
|
270
|
+
]),
|
|
271
|
+
_: 1
|
|
272
|
+
}, 8, ["label"]),
|
|
273
|
+
a(e(m), {
|
|
274
|
+
label: e(t)("labels.chname_cmd"),
|
|
275
|
+
path: "chnameCmd"
|
|
276
|
+
}, {
|
|
277
|
+
feedback: o(() => [
|
|
278
|
+
d("small", {
|
|
279
|
+
innerHTML: e(t)("games.d_chname_cmd")
|
|
280
|
+
}, null, 8, ce)
|
|
281
|
+
]),
|
|
282
|
+
default: o(() => [
|
|
283
|
+
a(e(u), {
|
|
284
|
+
value: l.value.chnameCmd,
|
|
285
|
+
"onUpdate:value": s[9] || (s[9] = (n) => l.value.chnameCmd = n),
|
|
286
|
+
type: "text"
|
|
287
|
+
}, null, 8, ["value"])
|
|
288
|
+
]),
|
|
289
|
+
_: 1
|
|
290
|
+
}, 8, ["label"]),
|
|
291
|
+
a(e(m), {
|
|
292
|
+
label: e(t)("labels.srestart_cmd"),
|
|
293
|
+
path: "srestartCmd"
|
|
294
|
+
}, {
|
|
295
|
+
default: o(() => [
|
|
296
|
+
a(e(u), {
|
|
297
|
+
value: l.value.srestartCmd,
|
|
298
|
+
"onUpdate:value": s[10] || (s[10] = (n) => l.value.srestartCmd = n),
|
|
299
|
+
type: "text"
|
|
300
|
+
}, null, 8, ["value"])
|
|
301
|
+
]),
|
|
302
|
+
_: 1
|
|
303
|
+
}, 8, ["label"]),
|
|
304
|
+
a(e(m), {
|
|
305
|
+
label: e(t)("labels.chmap_cmd"),
|
|
306
|
+
path: "chmapCmd"
|
|
307
|
+
}, {
|
|
308
|
+
feedback: o(() => [
|
|
309
|
+
d("small", {
|
|
310
|
+
innerHTML: e(t)("games.d_chmap_cmd")
|
|
311
|
+
}, null, 8, pe)
|
|
312
|
+
]),
|
|
313
|
+
default: o(() => [
|
|
314
|
+
a(e(u), {
|
|
315
|
+
value: l.value.chmapCmd,
|
|
316
|
+
"onUpdate:value": s[11] || (s[11] = (n) => l.value.chmapCmd = n),
|
|
317
|
+
type: "text"
|
|
318
|
+
}, null, 8, ["value"])
|
|
319
|
+
]),
|
|
320
|
+
_: 1
|
|
321
|
+
}, 8, ["label"]),
|
|
322
|
+
a(e(m), {
|
|
323
|
+
label: e(t)("labels.sendmsg_cmd"),
|
|
324
|
+
path: "sendmsgCmd"
|
|
325
|
+
}, {
|
|
326
|
+
feedback: o(() => [
|
|
327
|
+
d("small", {
|
|
328
|
+
innerHTML: e(t)("games.d_sendmsg_cmd")
|
|
329
|
+
}, null, 8, ve)
|
|
330
|
+
]),
|
|
331
|
+
default: o(() => [
|
|
332
|
+
a(e(u), {
|
|
333
|
+
value: l.value.sendmsgCmd,
|
|
334
|
+
"onUpdate:value": s[12] || (s[12] = (n) => l.value.sendmsgCmd = n),
|
|
335
|
+
type: "text"
|
|
336
|
+
}, null, 8, ["value"])
|
|
337
|
+
]),
|
|
338
|
+
_: 1
|
|
339
|
+
}, 8, ["label"]),
|
|
340
|
+
a(e(m), {
|
|
341
|
+
label: e(t)("labels.passwd_cmd"),
|
|
342
|
+
path: "passwdCmd"
|
|
343
|
+
}, {
|
|
344
|
+
feedback: o(() => [
|
|
345
|
+
d("small", {
|
|
346
|
+
innerHTML: e(t)("games.d_passwd_cmd")
|
|
347
|
+
}, null, 8, fe)
|
|
348
|
+
]),
|
|
349
|
+
default: o(() => [
|
|
350
|
+
a(e(u), {
|
|
351
|
+
value: l.value.passwdCmd,
|
|
352
|
+
"onUpdate:value": s[13] || (s[13] = (n) => l.value.passwdCmd = n),
|
|
353
|
+
type: "text"
|
|
354
|
+
}, null, 8, ["value"])
|
|
355
|
+
]),
|
|
356
|
+
_: 1
|
|
357
|
+
}, 8, ["label"])
|
|
358
|
+
])
|
|
359
|
+
]),
|
|
360
|
+
_: 1
|
|
361
|
+
}, 8, ["title"])
|
|
362
|
+
])
|
|
363
|
+
])
|
|
364
|
+
]),
|
|
365
|
+
_: 1
|
|
366
|
+
}),
|
|
367
|
+
a(e(w), { name: "vars" }, {
|
|
368
|
+
tab: o(() => [
|
|
369
|
+
y(g(e(t)("games.vars")), 1)
|
|
370
|
+
]),
|
|
371
|
+
default: o(() => [
|
|
372
|
+
a(v, {
|
|
373
|
+
name: "vars",
|
|
374
|
+
modelValue: l.value.vars,
|
|
375
|
+
"onUpdate:modelValue": s[14] || (s[14] = (n) => l.value.vars = n),
|
|
376
|
+
class: "mb-4",
|
|
377
|
+
labels: [
|
|
378
|
+
e(t)("games.var"),
|
|
379
|
+
e(t)("games.default"),
|
|
380
|
+
e(t)("games.info"),
|
|
381
|
+
e(t)("games.admin_var")
|
|
382
|
+
],
|
|
383
|
+
keys: ["var", "default", "info", "admin_var"],
|
|
384
|
+
"input-types": ["text", "text", "text", "checkbox"]
|
|
385
|
+
}, null, 8, ["modelValue", "labels"])
|
|
386
|
+
]),
|
|
387
|
+
_: 1
|
|
388
|
+
}),
|
|
389
|
+
a(e(w), { name: "rcon" }, {
|
|
390
|
+
tab: o(() => [
|
|
391
|
+
y(g(e(t)("games.fast_rcon_commands")), 1)
|
|
392
|
+
]),
|
|
393
|
+
default: o(() => [
|
|
394
|
+
a(v, {
|
|
395
|
+
name: "vars",
|
|
396
|
+
modelValue: l.value.fastRcon,
|
|
397
|
+
"onUpdate:modelValue": s[15] || (s[15] = (n) => l.value.fastRcon = n),
|
|
398
|
+
class: "mb-4",
|
|
399
|
+
labels: [
|
|
400
|
+
e(t)("games.description"),
|
|
401
|
+
e(t)("games.rcon_command")
|
|
402
|
+
],
|
|
403
|
+
keys: ["info", "command"],
|
|
404
|
+
"input-types": ["text", "text"]
|
|
405
|
+
}, null, 8, ["modelValue", "labels"])
|
|
406
|
+
]),
|
|
407
|
+
_: 1
|
|
408
|
+
})
|
|
409
|
+
]),
|
|
410
|
+
_: 1
|
|
411
|
+
})
|
|
412
|
+
]),
|
|
413
|
+
_: 1
|
|
414
|
+
}, 8, ["model"]),
|
|
415
|
+
a(G, {
|
|
416
|
+
color: "green",
|
|
417
|
+
onClick: _
|
|
418
|
+
}, {
|
|
419
|
+
default: o(() => [
|
|
420
|
+
a(e(F), {
|
|
421
|
+
name: "save",
|
|
422
|
+
class: "mr-0.5"
|
|
423
|
+
}),
|
|
424
|
+
d("span", _e, " " + g(e(t)("main.save")), 1)
|
|
425
|
+
]),
|
|
426
|
+
_: 1
|
|
427
|
+
})
|
|
428
|
+
], 2);
|
|
429
|
+
};
|
|
430
|
+
}
|
|
431
|
+
}, ge = K("gameMod", {
|
|
432
|
+
state: () => ({
|
|
433
|
+
loading: !1,
|
|
434
|
+
modId: "",
|
|
435
|
+
mod: {}
|
|
436
|
+
}),
|
|
437
|
+
actions: {
|
|
438
|
+
setModId(i) {
|
|
439
|
+
this.modId = i;
|
|
440
|
+
},
|
|
441
|
+
async fetchMod() {
|
|
442
|
+
this.loading = !0;
|
|
443
|
+
try {
|
|
444
|
+
const i = await R.get("/api/game_mods/" + this.modId);
|
|
445
|
+
this.mod = i.data;
|
|
446
|
+
} catch (i) {
|
|
447
|
+
throw i;
|
|
448
|
+
} finally {
|
|
449
|
+
this.loading = !1;
|
|
450
|
+
}
|
|
451
|
+
},
|
|
452
|
+
async saveMod(i) {
|
|
453
|
+
this.loading = !0;
|
|
454
|
+
try {
|
|
455
|
+
await R.put("/api/game_mods/" + this.modId, i);
|
|
456
|
+
} catch (f) {
|
|
457
|
+
throw f;
|
|
458
|
+
} finally {
|
|
459
|
+
this.loading = !1;
|
|
460
|
+
}
|
|
461
|
+
}
|
|
462
|
+
}
|
|
463
|
+
}), Ue = {
|
|
464
|
+
__name: "AdminModEdit",
|
|
465
|
+
setup(i) {
|
|
466
|
+
const f = Q(), h = X(), l = O(), p = ge(), C = U(() => {
|
|
467
|
+
let r = [
|
|
468
|
+
{ route: "/", text: "GameAP", icon: "gicon gicon-gameap" },
|
|
469
|
+
{ route: { name: "admin.games.index" }, text: t("games.games") }
|
|
470
|
+
];
|
|
471
|
+
return _.value.name && r.push(
|
|
472
|
+
{
|
|
473
|
+
route: { name: "admin.games.edit", params: { code: _.value.code } },
|
|
474
|
+
text: _.value.name
|
|
475
|
+
}
|
|
476
|
+
), b.value.name && r.push(
|
|
477
|
+
{
|
|
478
|
+
route: { name: "admin.games.mods.edit", params: { code: _.value.code, id: b.value.id } },
|
|
479
|
+
text: b.value.name
|
|
480
|
+
}
|
|
481
|
+
), r;
|
|
482
|
+
}), { game: _ } = V(l), { mod: b } = V(p), s = U(() => l.loading || p.loading);
|
|
483
|
+
j(() => {
|
|
484
|
+
l.setGameCode(f.params.code), l.fetchGame().then(() => {
|
|
485
|
+
p.setModId(f.params.id), p.fetchMod().then(() => {
|
|
486
|
+
v.value = Object.fromEntries(
|
|
487
|
+
Object.entries(b.value).map(([r, c]) => [Y(r), c])
|
|
488
|
+
);
|
|
489
|
+
}).catch((r) => {
|
|
490
|
+
k(r);
|
|
491
|
+
});
|
|
492
|
+
}).catch((r) => {
|
|
493
|
+
k(r);
|
|
494
|
+
});
|
|
495
|
+
});
|
|
496
|
+
const v = T({}), n = () => {
|
|
497
|
+
const r = Object.fromEntries(
|
|
498
|
+
Object.entries(v.value).map(([c, M]) => [Z(c), M])
|
|
499
|
+
);
|
|
500
|
+
p.saveMod(r).then(() => {
|
|
501
|
+
A({
|
|
502
|
+
content: t("games.mod_update_success_msg"),
|
|
503
|
+
type: "success"
|
|
504
|
+
}, () => {
|
|
505
|
+
h.push({ name: "admin.games.index" });
|
|
506
|
+
});
|
|
507
|
+
}).catch((c) => {
|
|
508
|
+
k(c);
|
|
509
|
+
});
|
|
510
|
+
};
|
|
511
|
+
return (r, c) => (L(), H(S, null, [
|
|
512
|
+
a(e(B), { items: C.value }, null, 8, ["items"]),
|
|
513
|
+
s.value ? (L(), $(e(q), { key: 0 })) : E("", !0),
|
|
514
|
+
d("div", {
|
|
515
|
+
class: I(s.value ? "hidden" : "")
|
|
516
|
+
}, [
|
|
517
|
+
a(be, {
|
|
518
|
+
modelValue: v.value,
|
|
519
|
+
"onUpdate:modelValue": c[0] || (c[0] = (M) => v.value = M),
|
|
520
|
+
onUpdate: n,
|
|
521
|
+
loading: s.value
|
|
522
|
+
}, null, 8, ["modelValue", "loading"])
|
|
523
|
+
], 2)
|
|
524
|
+
], 64));
|
|
525
|
+
}
|
|
526
|
+
};
|
|
527
|
+
export {
|
|
528
|
+
Ue as default
|
|
529
|
+
};
|