@gameap/frontend 4.1.0-dev1 → 4.1.0-dev11
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,87 @@
|
|
|
1
|
+
import { computed as m, onMounted as k, createElementBlock as v, openBlock as r, Fragment as b, createVNode as i, createBlock as c, createCommentVNode as g, createElementVNode as t, unref as e, normalizeClass as h, withCtx as x, toDisplayString as a } from "vue";
|
|
2
|
+
import { z as w, t as n, e as T, r as y, m as N, l as V, y as B } from "./index-9fvX7FD-.js";
|
|
3
|
+
import { NTable as C } from "naive-ui";
|
|
4
|
+
import { useRoute as D } from "vue-router";
|
|
5
|
+
import { storeToRefs as S } from "pinia";
|
|
6
|
+
const $ = { class: "w-full mt-3" }, z = { class: "coding inverse-toggle px-5 pt-4 shadow-lg text-stone-100 text-sm font-mono subpixel-antialiased bg-stone-800 dark:bg-stone-900 pb-6 pt-4 rounded-lg leading-normal overflow-hidden" }, A = { class: "whitespace-pre-wrap mt-4 flex" }, M = {
|
|
7
|
+
__name: "AdminDaemonTaskOutputView",
|
|
8
|
+
setup(E) {
|
|
9
|
+
const o = w(), p = D(), _ = m(() => {
|
|
10
|
+
let l = [
|
|
11
|
+
{ route: "/", text: "GameAP", icon: "gicon gicon-gameap" },
|
|
12
|
+
{ route: { name: "admin.gdaemon_tasks.index" }, text: n("gdaemon_tasks.gdaemon_tasks") }
|
|
13
|
+
];
|
|
14
|
+
return s.value.id && l.push({
|
|
15
|
+
route: { name: "admin.gdaemon_tasks.output", params: { id: s.value.id } },
|
|
16
|
+
text: n("gdaemon_tasks." + s.value.task)
|
|
17
|
+
}), l;
|
|
18
|
+
}), { loading: u, task: s } = S(o);
|
|
19
|
+
k(() => {
|
|
20
|
+
o.setTaskId(p.params.id), o.fetchTaskOutput().catch((l) => {
|
|
21
|
+
T(l);
|
|
22
|
+
});
|
|
23
|
+
});
|
|
24
|
+
const f = m(() => s.value.output ? y(s.value.output, /(\r\n|\n|\r)/gm, `
|
|
25
|
+
`) : "");
|
|
26
|
+
return (l, d) => (r(), v(b, null, [
|
|
27
|
+
i(e(N), { items: _.value }, null, 8, ["items"]),
|
|
28
|
+
e(u) ? (r(), c(e(V), { key: 0 })) : g("", !0),
|
|
29
|
+
t("div", {
|
|
30
|
+
class: h(e(u) ? "hidden" : "")
|
|
31
|
+
}, [
|
|
32
|
+
i(e(C), {
|
|
33
|
+
bordered: !1,
|
|
34
|
+
"single-line": !0
|
|
35
|
+
}, {
|
|
36
|
+
default: x(() => [
|
|
37
|
+
t("tbody", null, [
|
|
38
|
+
t("tr", null, [
|
|
39
|
+
t("td", null, [
|
|
40
|
+
t("strong", null, a(e(n)("gdaemon_tasks.task")) + ":", 1)
|
|
41
|
+
]),
|
|
42
|
+
t("td", null, a(e(n)("gdaemon_tasks." + e(s).task)), 1)
|
|
43
|
+
]),
|
|
44
|
+
t("tr", null, [
|
|
45
|
+
t("td", null, [
|
|
46
|
+
t("strong", null, a(e(n)("gdaemon_tasks.status")) + ":", 1)
|
|
47
|
+
]),
|
|
48
|
+
t("td", null, [
|
|
49
|
+
e(s).status ? (r(), c(e(B), {
|
|
50
|
+
key: 0,
|
|
51
|
+
status: e(s).status
|
|
52
|
+
}, null, 8, ["status"])) : g("", !0)
|
|
53
|
+
])
|
|
54
|
+
]),
|
|
55
|
+
t("tr", null, [
|
|
56
|
+
t("td", null, [
|
|
57
|
+
t("strong", null, a(e(n)("gdaemon_tasks.created")) + ":", 1)
|
|
58
|
+
]),
|
|
59
|
+
t("td", null, a(e(s).created_at), 1)
|
|
60
|
+
]),
|
|
61
|
+
t("tr", null, [
|
|
62
|
+
t("td", null, [
|
|
63
|
+
t("strong", null, a(e(n)("gdaemon_tasks.created")) + ":", 1)
|
|
64
|
+
]),
|
|
65
|
+
t("td", null, a(e(s).updated_at), 1)
|
|
66
|
+
])
|
|
67
|
+
])
|
|
68
|
+
]),
|
|
69
|
+
_: 1
|
|
70
|
+
}),
|
|
71
|
+
t("div", $, [
|
|
72
|
+
t("div", z, [
|
|
73
|
+
d[0] || (d[0] = t("div", { class: "top mb-2 flex" }, [
|
|
74
|
+
t("div", { class: "h-3 w-3 bg-red-500 rounded-full" }),
|
|
75
|
+
t("div", { class: "ml-2 h-3 w-3 bg-orange-300 rounded-full" }),
|
|
76
|
+
t("div", { class: "ml-2 h-3 w-3 bg-green-500 rounded-full" })
|
|
77
|
+
], -1)),
|
|
78
|
+
t("div", A, a(f.value), 1)
|
|
79
|
+
])
|
|
80
|
+
])
|
|
81
|
+
], 2)
|
|
82
|
+
], 64));
|
|
83
|
+
}
|
|
84
|
+
};
|
|
85
|
+
export {
|
|
86
|
+
M as default
|
|
87
|
+
};
|
|
@@ -0,0 +1,473 @@
|
|
|
1
|
+
import { mergeModels as I, ref as A, useModel as j, createElementBlock as S, openBlock as _, createVNode as a, unref as e, withCtx as d, createElementVNode as c, renderSlot as H, createBlock as w, createCommentVNode as R, normalizeClass as h, toDisplayString as $, computed as M, onMounted as J, Fragment as K, createTextVNode as Q } from "vue";
|
|
2
|
+
import { t, l as C, _ as z, a as B, h as X, m as Y, A as Z, e as k, n as G } from "./index-9fvX7FD-.js";
|
|
3
|
+
import { NForm as ee, NCard as L, NFormItem as m, NInput as p, NModal as ae } from "naive-ui";
|
|
4
|
+
import { r as N, a as le, c as te } from "./validators-ChBGsKft.js";
|
|
5
|
+
import { u as oe } from "./gameList-kucszmx0.js";
|
|
6
|
+
import { _ as se } from "./CreateModForm-CqkvVLfN.js";
|
|
7
|
+
import { useRoute as ne, useRouter as ie } from "vue-router";
|
|
8
|
+
import { storeToRefs as de } from "pinia";
|
|
9
|
+
const ue = { class: "flex flex-wrap mt-2" }, re = { class: "md:w-1/2 pr-8" }, me = { class: "md:w-1/2" }, pe = { class: "hidden lg:inline" }, ve = {
|
|
10
|
+
__name: "UpdateGameForm",
|
|
11
|
+
props: /* @__PURE__ */ I({
|
|
12
|
+
loading: {
|
|
13
|
+
type: Boolean,
|
|
14
|
+
required: !1
|
|
15
|
+
}
|
|
16
|
+
}, {
|
|
17
|
+
modelValue: {
|
|
18
|
+
code: "",
|
|
19
|
+
name: "",
|
|
20
|
+
engine: "",
|
|
21
|
+
engineVersion: "",
|
|
22
|
+
remoteRepositoryLinux: "",
|
|
23
|
+
remoteRepositoryWindows: ""
|
|
24
|
+
},
|
|
25
|
+
modelModifiers: {}
|
|
26
|
+
}),
|
|
27
|
+
emits: /* @__PURE__ */ I(["update"], ["update:modelValue"]),
|
|
28
|
+
setup(v, { emit: U }) {
|
|
29
|
+
const x = A({}), l = j(v, "modelValue"), g = {
|
|
30
|
+
code: {
|
|
31
|
+
required: !0,
|
|
32
|
+
validator: le(
|
|
33
|
+
N(t("labels.code")),
|
|
34
|
+
te(t("labels.code"), 2, 16)
|
|
35
|
+
)
|
|
36
|
+
},
|
|
37
|
+
name: {
|
|
38
|
+
required: !0,
|
|
39
|
+
validator: N(t("labels.name"))
|
|
40
|
+
}
|
|
41
|
+
}, W = U, b = () => {
|
|
42
|
+
x.value.validate().then(() => {
|
|
43
|
+
W("update");
|
|
44
|
+
});
|
|
45
|
+
};
|
|
46
|
+
return (r, s) => (_(), S("div", null, [
|
|
47
|
+
a(e(ee), {
|
|
48
|
+
"label-placement": "top",
|
|
49
|
+
"label-width": "auto",
|
|
50
|
+
ref_key: "formRef",
|
|
51
|
+
ref: x,
|
|
52
|
+
model: l.value,
|
|
53
|
+
rules: g
|
|
54
|
+
}, {
|
|
55
|
+
default: d(() => [
|
|
56
|
+
c("div", ue, [
|
|
57
|
+
c("div", re, [
|
|
58
|
+
a(e(L), {
|
|
59
|
+
title: e(t)("games.basic_info"),
|
|
60
|
+
size: "small",
|
|
61
|
+
class: "mb-3",
|
|
62
|
+
"header-class": "g-card-header",
|
|
63
|
+
segmented: {
|
|
64
|
+
content: !0,
|
|
65
|
+
footer: "soft"
|
|
66
|
+
}
|
|
67
|
+
}, {
|
|
68
|
+
default: d(() => [
|
|
69
|
+
v.loading ? (_(), w(e(C), { key: 0 })) : R("", !0),
|
|
70
|
+
c("div", {
|
|
71
|
+
class: h(v.loading ? "hidden" : "")
|
|
72
|
+
}, [
|
|
73
|
+
a(e(m), {
|
|
74
|
+
label: e(t)("labels.code"),
|
|
75
|
+
path: "code"
|
|
76
|
+
}, {
|
|
77
|
+
default: d(() => [
|
|
78
|
+
a(e(p), {
|
|
79
|
+
disabled: "",
|
|
80
|
+
value: l.value.code,
|
|
81
|
+
"onUpdate:value": s[0] || (s[0] = (o) => l.value.code = o),
|
|
82
|
+
type: "text"
|
|
83
|
+
}, null, 8, ["value"])
|
|
84
|
+
]),
|
|
85
|
+
_: 1
|
|
86
|
+
}, 8, ["label"]),
|
|
87
|
+
a(e(m), {
|
|
88
|
+
label: e(t)("labels.name"),
|
|
89
|
+
path: "name"
|
|
90
|
+
}, {
|
|
91
|
+
default: d(() => [
|
|
92
|
+
a(e(p), {
|
|
93
|
+
value: l.value.name,
|
|
94
|
+
"onUpdate:value": s[1] || (s[1] = (o) => l.value.name = o),
|
|
95
|
+
type: "text"
|
|
96
|
+
}, null, 8, ["value"])
|
|
97
|
+
]),
|
|
98
|
+
_: 1
|
|
99
|
+
}, 8, ["label"]),
|
|
100
|
+
a(e(m), {
|
|
101
|
+
label: e(t)("labels.engine"),
|
|
102
|
+
path: "engine"
|
|
103
|
+
}, {
|
|
104
|
+
default: d(() => [
|
|
105
|
+
a(e(p), {
|
|
106
|
+
value: l.value.engine,
|
|
107
|
+
"onUpdate:value": s[2] || (s[2] = (o) => l.value.engine = o),
|
|
108
|
+
type: "text"
|
|
109
|
+
}, null, 8, ["value"])
|
|
110
|
+
]),
|
|
111
|
+
_: 1
|
|
112
|
+
}, 8, ["label"]),
|
|
113
|
+
a(e(m), {
|
|
114
|
+
label: e(t)("labels.engine_version"),
|
|
115
|
+
path: "engineVersion"
|
|
116
|
+
}, {
|
|
117
|
+
default: d(() => [
|
|
118
|
+
a(e(p), {
|
|
119
|
+
value: l.value.engineVersion,
|
|
120
|
+
"onUpdate:value": s[3] || (s[3] = (o) => l.value.engineVersion = o),
|
|
121
|
+
type: "text"
|
|
122
|
+
}, null, 8, ["value"])
|
|
123
|
+
]),
|
|
124
|
+
_: 1
|
|
125
|
+
}, 8, ["label"])
|
|
126
|
+
], 2)
|
|
127
|
+
]),
|
|
128
|
+
_: 1
|
|
129
|
+
}, 8, ["title"]),
|
|
130
|
+
H(r.$slots, "mods")
|
|
131
|
+
]),
|
|
132
|
+
c("div", me, [
|
|
133
|
+
a(e(L), {
|
|
134
|
+
title: e(t)("games.steam_info"),
|
|
135
|
+
size: "small",
|
|
136
|
+
class: "mb-3",
|
|
137
|
+
"header-class": "g-card-header",
|
|
138
|
+
segmented: {
|
|
139
|
+
content: !0,
|
|
140
|
+
footer: "soft"
|
|
141
|
+
}
|
|
142
|
+
}, {
|
|
143
|
+
default: d(() => [
|
|
144
|
+
v.loading ? (_(), w(e(C), { key: 0 })) : R("", !0),
|
|
145
|
+
c("div", {
|
|
146
|
+
class: h(v.loading ? "hidden" : "")
|
|
147
|
+
}, [
|
|
148
|
+
a(e(m), {
|
|
149
|
+
label: e(t)("labels.steam_app_id_linux"),
|
|
150
|
+
path: "steamAppIdLinux"
|
|
151
|
+
}, {
|
|
152
|
+
default: d(() => [
|
|
153
|
+
a(e(p), {
|
|
154
|
+
value: l.value.steamAppIdLinux,
|
|
155
|
+
"onUpdate:value": s[4] || (s[4] = (o) => l.value.steamAppIdLinux = o),
|
|
156
|
+
type: "text"
|
|
157
|
+
}, null, 8, ["value"])
|
|
158
|
+
]),
|
|
159
|
+
_: 1
|
|
160
|
+
}, 8, ["label"]),
|
|
161
|
+
a(e(m), {
|
|
162
|
+
label: e(t)("labels.steam_app_id_windows"),
|
|
163
|
+
path: "steamAppIdWindows"
|
|
164
|
+
}, {
|
|
165
|
+
default: d(() => [
|
|
166
|
+
a(e(p), {
|
|
167
|
+
value: l.value.steamAppIdWindows,
|
|
168
|
+
"onUpdate:value": s[5] || (s[5] = (o) => l.value.steamAppIdWindows = o),
|
|
169
|
+
type: "text"
|
|
170
|
+
}, null, 8, ["value"])
|
|
171
|
+
]),
|
|
172
|
+
_: 1
|
|
173
|
+
}, 8, ["label"]),
|
|
174
|
+
a(e(m), {
|
|
175
|
+
label: e(t)("labels.steam_app_set_config"),
|
|
176
|
+
path: "steamAppSetConfig"
|
|
177
|
+
}, {
|
|
178
|
+
default: d(() => [
|
|
179
|
+
a(e(p), {
|
|
180
|
+
value: l.value.steamAppSetConfig,
|
|
181
|
+
"onUpdate:value": s[6] || (s[6] = (o) => l.value.steamAppSetConfig = o),
|
|
182
|
+
type: "text"
|
|
183
|
+
}, null, 8, ["value"])
|
|
184
|
+
]),
|
|
185
|
+
_: 1
|
|
186
|
+
}, 8, ["label"])
|
|
187
|
+
], 2)
|
|
188
|
+
]),
|
|
189
|
+
_: 1
|
|
190
|
+
}, 8, ["title"]),
|
|
191
|
+
a(e(L), {
|
|
192
|
+
title: e(t)("games.repositories_local"),
|
|
193
|
+
size: "small",
|
|
194
|
+
class: "mb-3",
|
|
195
|
+
"header-class": "g-card-header",
|
|
196
|
+
segmented: {
|
|
197
|
+
content: !0,
|
|
198
|
+
footer: "soft"
|
|
199
|
+
}
|
|
200
|
+
}, {
|
|
201
|
+
default: d(() => [
|
|
202
|
+
v.loading ? (_(), w(e(C), { key: 0 })) : R("", !0),
|
|
203
|
+
c("div", {
|
|
204
|
+
class: h(v.loading ? "hidden" : "")
|
|
205
|
+
}, [
|
|
206
|
+
a(e(m), {
|
|
207
|
+
label: e(t)("labels.local_repository_linux"),
|
|
208
|
+
path: "localRepositoryLinux"
|
|
209
|
+
}, {
|
|
210
|
+
default: d(() => [
|
|
211
|
+
a(e(p), {
|
|
212
|
+
value: l.value.localRepositoryLinux,
|
|
213
|
+
"onUpdate:value": s[7] || (s[7] = (o) => l.value.localRepositoryLinux = o),
|
|
214
|
+
type: "text"
|
|
215
|
+
}, null, 8, ["value"])
|
|
216
|
+
]),
|
|
217
|
+
_: 1
|
|
218
|
+
}, 8, ["label"]),
|
|
219
|
+
a(e(m), {
|
|
220
|
+
label: e(t)("labels.local_repository_windows"),
|
|
221
|
+
path: "localRepositoryWindows"
|
|
222
|
+
}, {
|
|
223
|
+
default: d(() => [
|
|
224
|
+
a(e(p), {
|
|
225
|
+
value: l.value.localRepositoryWindows,
|
|
226
|
+
"onUpdate:value": s[8] || (s[8] = (o) => l.value.localRepositoryWindows = o),
|
|
227
|
+
type: "text"
|
|
228
|
+
}, null, 8, ["value"])
|
|
229
|
+
]),
|
|
230
|
+
_: 1
|
|
231
|
+
}, 8, ["label"])
|
|
232
|
+
], 2)
|
|
233
|
+
]),
|
|
234
|
+
_: 1
|
|
235
|
+
}, 8, ["title"]),
|
|
236
|
+
a(e(L), {
|
|
237
|
+
title: e(t)("games.repositories_remote"),
|
|
238
|
+
size: "small",
|
|
239
|
+
class: "mb-3",
|
|
240
|
+
"header-class": "g-card-header",
|
|
241
|
+
segmented: {
|
|
242
|
+
content: !0,
|
|
243
|
+
footer: "soft"
|
|
244
|
+
}
|
|
245
|
+
}, {
|
|
246
|
+
default: d(() => [
|
|
247
|
+
v.loading ? (_(), w(e(C), { key: 0 })) : R("", !0),
|
|
248
|
+
c("div", {
|
|
249
|
+
class: h(v.loading ? "hidden" : "")
|
|
250
|
+
}, [
|
|
251
|
+
a(e(m), {
|
|
252
|
+
label: e(t)("labels.remote_repository_linux"),
|
|
253
|
+
path: "remoteRepositoryLinux"
|
|
254
|
+
}, {
|
|
255
|
+
default: d(() => [
|
|
256
|
+
a(e(p), {
|
|
257
|
+
value: l.value.remoteRepositoryLinux,
|
|
258
|
+
"onUpdate:value": s[9] || (s[9] = (o) => l.value.remoteRepositoryLinux = o),
|
|
259
|
+
type: "text"
|
|
260
|
+
}, null, 8, ["value"])
|
|
261
|
+
]),
|
|
262
|
+
_: 1
|
|
263
|
+
}, 8, ["label"]),
|
|
264
|
+
a(e(m), {
|
|
265
|
+
label: e(t)("labels.remote_repository_windows"),
|
|
266
|
+
path: "remoteRepositoryWindows"
|
|
267
|
+
}, {
|
|
268
|
+
default: d(() => [
|
|
269
|
+
a(e(p), {
|
|
270
|
+
value: l.value.remoteRepositoryWindows,
|
|
271
|
+
"onUpdate:value": s[10] || (s[10] = (o) => l.value.remoteRepositoryWindows = o),
|
|
272
|
+
type: "text"
|
|
273
|
+
}, null, 8, ["value"])
|
|
274
|
+
]),
|
|
275
|
+
_: 1
|
|
276
|
+
}, 8, ["label"])
|
|
277
|
+
], 2)
|
|
278
|
+
]),
|
|
279
|
+
_: 1
|
|
280
|
+
}, 8, ["title"])
|
|
281
|
+
])
|
|
282
|
+
])
|
|
283
|
+
]),
|
|
284
|
+
_: 3
|
|
285
|
+
}, 8, ["model"]),
|
|
286
|
+
a(z, {
|
|
287
|
+
color: "green",
|
|
288
|
+
onClick: b
|
|
289
|
+
}, {
|
|
290
|
+
default: d(() => [
|
|
291
|
+
a(e(B), {
|
|
292
|
+
name: "save",
|
|
293
|
+
class: "mr-0.5"
|
|
294
|
+
}),
|
|
295
|
+
c("span", pe, " " + $(e(t)("main.save")), 1)
|
|
296
|
+
]),
|
|
297
|
+
_: 1
|
|
298
|
+
})
|
|
299
|
+
]));
|
|
300
|
+
}
|
|
301
|
+
}, Re = {
|
|
302
|
+
__name: "AdminGamesEdit",
|
|
303
|
+
setup(v) {
|
|
304
|
+
const U = ne(), x = ie(), l = X(), g = oe(), W = M(() => [
|
|
305
|
+
{ route: "/", text: "GameAP", icon: "gicon gicon-gameap" },
|
|
306
|
+
{ route: { name: "admin.games.index" }, text: t("games.games") },
|
|
307
|
+
{ text: t("games.title_edit") }
|
|
308
|
+
]), { gameCode: b, game: r, mods: s } = de(l);
|
|
309
|
+
J(() => {
|
|
310
|
+
l.setGameCode(U.params.code), n.value.code = b.value, l.fetchGame().then(() => {
|
|
311
|
+
n.value.name = r.value.name, n.value.engine = r.value.engine, n.value.engineVersion = r.value.engine_version, n.value.steamAppIdLinux = r.value.steam_app_id_linux, n.value.steamAppIdWindows = r.value.steam_app_id_windows, n.value.steamAppSetConfig = r.value.steam_app_set_config, n.value.localRepositoryLinux = r.value.local_repository_linux, n.value.localRepositoryWindows = r.value.local_repository_windows, n.value.remoteRepositoryLinux = r.value.remote_repository_linux, n.value.remoteRepositoryWindows = r.value.remote_repository_windows;
|
|
312
|
+
}), l.fetchMods();
|
|
313
|
+
});
|
|
314
|
+
const o = M(() => l.loading || g.loading), E = M(() => {
|
|
315
|
+
let u = [];
|
|
316
|
+
return s.value.forEach((i) => {
|
|
317
|
+
u.push({
|
|
318
|
+
id: i.id,
|
|
319
|
+
name: i.name,
|
|
320
|
+
gameCode: b.value
|
|
321
|
+
});
|
|
322
|
+
}), u;
|
|
323
|
+
}), q = (u) => {
|
|
324
|
+
g.fetchGames().then(() => {
|
|
325
|
+
f.value = {
|
|
326
|
+
game: b.value,
|
|
327
|
+
name: "",
|
|
328
|
+
remoteRepositoryLinux: "",
|
|
329
|
+
remoteRepositoryWindows: ""
|
|
330
|
+
}, V.value = !0;
|
|
331
|
+
}).catch((i) => {
|
|
332
|
+
k(i);
|
|
333
|
+
});
|
|
334
|
+
}, n = A({}), V = A(!1), f = A({
|
|
335
|
+
game: null,
|
|
336
|
+
name: "",
|
|
337
|
+
remoteRepositoryLinux: "",
|
|
338
|
+
remoteRepositoryWindows: ""
|
|
339
|
+
}), F = () => {
|
|
340
|
+
const u = {
|
|
341
|
+
name: f.value.name,
|
|
342
|
+
game_code: f.value.game,
|
|
343
|
+
remote_repository_linux: f.value.remoteRepositoryLinux,
|
|
344
|
+
remote_repository_windows: f.value.remoteRepositoryWindows
|
|
345
|
+
};
|
|
346
|
+
g.createGameMod(u).then(({ id: i }) => {
|
|
347
|
+
G({
|
|
348
|
+
content: t("games.mod_create_success_msg"),
|
|
349
|
+
type: "success"
|
|
350
|
+
}, () => {
|
|
351
|
+
g.fetchAllGameMods();
|
|
352
|
+
});
|
|
353
|
+
}).catch((i) => {
|
|
354
|
+
k(i);
|
|
355
|
+
}).finally(() => {
|
|
356
|
+
V.value = !1;
|
|
357
|
+
});
|
|
358
|
+
}, T = (u, i) => {
|
|
359
|
+
x.push({ name: "admin.games.mods.edit", params: { code: u, id: i } });
|
|
360
|
+
}, D = (u) => {
|
|
361
|
+
window.$dialog.success({
|
|
362
|
+
title: t("games.delete_mod_confirm_msg"),
|
|
363
|
+
positiveText: t("main.yes"),
|
|
364
|
+
negativeText: t("main.no"),
|
|
365
|
+
closable: !1,
|
|
366
|
+
onPositiveClick: () => {
|
|
367
|
+
P(u);
|
|
368
|
+
},
|
|
369
|
+
onNegativeClick: () => {
|
|
370
|
+
}
|
|
371
|
+
});
|
|
372
|
+
}, P = (u) => {
|
|
373
|
+
g.deleteModById(u).then(() => {
|
|
374
|
+
l.fetchMods();
|
|
375
|
+
}).catch((i) => {
|
|
376
|
+
k(i);
|
|
377
|
+
});
|
|
378
|
+
}, O = () => {
|
|
379
|
+
const u = {
|
|
380
|
+
name: n.value.name,
|
|
381
|
+
engine: n.value.engine,
|
|
382
|
+
engine_version: n.value.engineVersion,
|
|
383
|
+
steam_app_id_linux: n.value.steamAppIdLinux,
|
|
384
|
+
steam_app_id_windows: n.value.steamAppIdWindows,
|
|
385
|
+
steam_app_set_config: n.value.steamAppSetConfig,
|
|
386
|
+
local_repository_linux: n.value.localRepositoryLinux,
|
|
387
|
+
local_repository_windows: n.value.localRepositoryWindows,
|
|
388
|
+
remote_repository_linux: n.value.remoteRepositoryLinux,
|
|
389
|
+
remote_repository_windows: n.value.remoteRepositoryWindows
|
|
390
|
+
};
|
|
391
|
+
l.saveGame(u).then(() => {
|
|
392
|
+
G({
|
|
393
|
+
content: t("games.update_success_msg"),
|
|
394
|
+
type: "success"
|
|
395
|
+
}, () => {
|
|
396
|
+
x.push({ name: "admin.games.index" });
|
|
397
|
+
});
|
|
398
|
+
}).catch((i) => {
|
|
399
|
+
k(i);
|
|
400
|
+
});
|
|
401
|
+
};
|
|
402
|
+
return (u, i) => (_(), S(K, null, [
|
|
403
|
+
a(e(Y), { items: W.value }, null, 8, ["items"]),
|
|
404
|
+
a(z, {
|
|
405
|
+
class: "mr-1",
|
|
406
|
+
color: "orange",
|
|
407
|
+
onClick: i[0] || (i[0] = (y) => q())
|
|
408
|
+
}, {
|
|
409
|
+
default: d(() => [
|
|
410
|
+
a(e(B), { name: "cat" }),
|
|
411
|
+
Q(" " + $(e(t)("games.add_mod")), 1)
|
|
412
|
+
]),
|
|
413
|
+
_: 1
|
|
414
|
+
}),
|
|
415
|
+
a(ve, {
|
|
416
|
+
loading: o.value,
|
|
417
|
+
modelValue: n.value,
|
|
418
|
+
"onUpdate:modelValue": i[1] || (i[1] = (y) => n.value = y),
|
|
419
|
+
onUpdate: O
|
|
420
|
+
}, {
|
|
421
|
+
mods: d(() => [
|
|
422
|
+
a(e(L), {
|
|
423
|
+
title: e(t)("games.mods"),
|
|
424
|
+
size: "small",
|
|
425
|
+
class: "mb-3",
|
|
426
|
+
"header-class": "g-card-header",
|
|
427
|
+
segmented: {
|
|
428
|
+
content: !0,
|
|
429
|
+
footer: "soft"
|
|
430
|
+
}
|
|
431
|
+
}, {
|
|
432
|
+
default: d(() => [
|
|
433
|
+
o.value ? (_(), w(e(C), { key: 0 })) : R("", !0),
|
|
434
|
+
c("div", {
|
|
435
|
+
class: h(o.value ? "hidden" : "")
|
|
436
|
+
}, [
|
|
437
|
+
a(e(Z), {
|
|
438
|
+
items: E.value,
|
|
439
|
+
deleteCallback: D,
|
|
440
|
+
clickCallback: T
|
|
441
|
+
}, null, 8, ["items"])
|
|
442
|
+
], 2)
|
|
443
|
+
]),
|
|
444
|
+
_: 1
|
|
445
|
+
}, 8, ["title"])
|
|
446
|
+
]),
|
|
447
|
+
_: 1
|
|
448
|
+
}, 8, ["loading", "modelValue"]),
|
|
449
|
+
a(e(ae), {
|
|
450
|
+
show: V.value,
|
|
451
|
+
"onUpdate:show": i[3] || (i[3] = (y) => V.value = y),
|
|
452
|
+
class: "custom-card",
|
|
453
|
+
preset: "card",
|
|
454
|
+
title: e(t)("games.title_add_mod"),
|
|
455
|
+
bordered: !1,
|
|
456
|
+
style: { width: "600px" },
|
|
457
|
+
segmented: { content: "soft", footer: "soft" }
|
|
458
|
+
}, {
|
|
459
|
+
default: d(() => [
|
|
460
|
+
a(se, {
|
|
461
|
+
modelValue: f.value,
|
|
462
|
+
"onUpdate:modelValue": i[2] || (i[2] = (y) => f.value = y),
|
|
463
|
+
onCreate: F
|
|
464
|
+
}, null, 8, ["modelValue"])
|
|
465
|
+
]),
|
|
466
|
+
_: 1
|
|
467
|
+
}, 8, ["show", "title"])
|
|
468
|
+
], 64));
|
|
469
|
+
}
|
|
470
|
+
};
|
|
471
|
+
export {
|
|
472
|
+
Re as default
|
|
473
|
+
};
|