@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,308 @@
|
|
|
1
|
+
import { mergeModels as S, ref as q, useModel as E, resolveComponent as R, createElementBlock as M, openBlock as c, normalizeClass as f, createVNode as a, unref as e, withCtx as d, createElementVNode as i, createBlock as U, createCommentVNode as V, toDisplayString as z, computed as A, onMounted as B, Fragment as F } from "vue";
|
|
2
|
+
import { f as $, t as s, l as y, _ as I, a as P, e as x, m as D, n as G } from "./index-9fvX7FD-.js";
|
|
3
|
+
import { NForm as L, NCard as k, NFormItem as v, NInput as p, NSelect as O } from "naive-ui";
|
|
4
|
+
import { d as T, i as W, a as j, s as H, b as J, r as N } from "./validators-ChBGsKft.js";
|
|
5
|
+
import { useRoute as K, useRouter as Q } from "vue-router";
|
|
6
|
+
import { storeToRefs as X } from "pinia";
|
|
7
|
+
const Y = { class: "flex-wrap mt-2 md:grid md:grid-cols-2 gap-8" }, Z = { class: "gap-x-4 w-full" }, ee = { class: "flex-wrap md:grid mt-2" }, le = { class: "md:w-full" }, ae = { class: "hidden lg:inline" }, se = {
|
|
8
|
+
__name: "UpdateUserForm",
|
|
9
|
+
props: /* @__PURE__ */ S({
|
|
10
|
+
loading: {
|
|
11
|
+
type: Boolean,
|
|
12
|
+
required: !1
|
|
13
|
+
}
|
|
14
|
+
}, {
|
|
15
|
+
modelValue: {},
|
|
16
|
+
modelModifiers: {}
|
|
17
|
+
}),
|
|
18
|
+
emits: /* @__PURE__ */ S(["update"], ["update:modelValue"]),
|
|
19
|
+
setup(u, { emit: g }) {
|
|
20
|
+
const b = $(), r = q({}), t = E(u, "modelValue"), w = {
|
|
21
|
+
login: {
|
|
22
|
+
required: !0,
|
|
23
|
+
validator: N(s("labels.login"))
|
|
24
|
+
},
|
|
25
|
+
email: {
|
|
26
|
+
required: !0,
|
|
27
|
+
validator: N(s("labels.email"))
|
|
28
|
+
},
|
|
29
|
+
name: {
|
|
30
|
+
required: !0,
|
|
31
|
+
validator: N(s("labels.name"))
|
|
32
|
+
},
|
|
33
|
+
password: {
|
|
34
|
+
validator: W(
|
|
35
|
+
j(
|
|
36
|
+
J(s("labels.password"), 8),
|
|
37
|
+
H(
|
|
38
|
+
s("labels.password"),
|
|
39
|
+
s("labels.password_confirmation"),
|
|
40
|
+
() => t.value.passwordConfirmation
|
|
41
|
+
)
|
|
42
|
+
)
|
|
43
|
+
)
|
|
44
|
+
},
|
|
45
|
+
roles: {
|
|
46
|
+
required: !0,
|
|
47
|
+
validator: T(s("labels.roles"))
|
|
48
|
+
}
|
|
49
|
+
}, C = [
|
|
50
|
+
{
|
|
51
|
+
label: "Administrator",
|
|
52
|
+
value: "admin"
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
label: "User",
|
|
56
|
+
value: "user"
|
|
57
|
+
}
|
|
58
|
+
], o = g, h = () => {
|
|
59
|
+
r.value.validate().then(() => {
|
|
60
|
+
o("update");
|
|
61
|
+
});
|
|
62
|
+
};
|
|
63
|
+
return (m, l) => {
|
|
64
|
+
const _ = R("UserServerPrivileges");
|
|
65
|
+
return c(), M("div", {
|
|
66
|
+
class: f(m.$attrs.class)
|
|
67
|
+
}, [
|
|
68
|
+
a(e(L), {
|
|
69
|
+
"label-placement": "top",
|
|
70
|
+
"label-width": "auto",
|
|
71
|
+
ref_key: "formRef",
|
|
72
|
+
ref: r,
|
|
73
|
+
model: t.value,
|
|
74
|
+
rules: w
|
|
75
|
+
}, {
|
|
76
|
+
default: d(() => [
|
|
77
|
+
i("div", Y, [
|
|
78
|
+
i("div", null, [
|
|
79
|
+
a(e(k), {
|
|
80
|
+
title: e(s)("users.user"),
|
|
81
|
+
size: "small",
|
|
82
|
+
class: "mb-3",
|
|
83
|
+
"header-class": "g-card-header",
|
|
84
|
+
segmented: {
|
|
85
|
+
content: !0,
|
|
86
|
+
footer: "soft"
|
|
87
|
+
}
|
|
88
|
+
}, {
|
|
89
|
+
default: d(() => [
|
|
90
|
+
u.loading ? (c(), U(e(y), { key: 0 })) : V("", !0),
|
|
91
|
+
i("div", {
|
|
92
|
+
class: f(u.loading ? "hidden" : "")
|
|
93
|
+
}, [
|
|
94
|
+
a(e(v), {
|
|
95
|
+
label: e(s)("labels.login"),
|
|
96
|
+
path: "login"
|
|
97
|
+
}, {
|
|
98
|
+
default: d(() => [
|
|
99
|
+
a(e(p), {
|
|
100
|
+
disabled: "",
|
|
101
|
+
value: t.value.login,
|
|
102
|
+
"onUpdate:value": l[0] || (l[0] = (n) => t.value.login = n),
|
|
103
|
+
type: "text"
|
|
104
|
+
}, null, 8, ["value"])
|
|
105
|
+
]),
|
|
106
|
+
_: 1
|
|
107
|
+
}, 8, ["label"]),
|
|
108
|
+
a(e(v), {
|
|
109
|
+
label: e(s)("labels.email"),
|
|
110
|
+
path: "email"
|
|
111
|
+
}, {
|
|
112
|
+
default: d(() => [
|
|
113
|
+
a(e(p), {
|
|
114
|
+
value: t.value.email,
|
|
115
|
+
"onUpdate:value": l[1] || (l[1] = (n) => t.value.email = n),
|
|
116
|
+
type: "text"
|
|
117
|
+
}, null, 8, ["value"])
|
|
118
|
+
]),
|
|
119
|
+
_: 1
|
|
120
|
+
}, 8, ["label"]),
|
|
121
|
+
a(e(v), {
|
|
122
|
+
label: e(s)("labels.name"),
|
|
123
|
+
path: "name"
|
|
124
|
+
}, {
|
|
125
|
+
default: d(() => [
|
|
126
|
+
a(e(p), {
|
|
127
|
+
value: t.value.name,
|
|
128
|
+
"onUpdate:value": l[2] || (l[2] = (n) => t.value.name = n),
|
|
129
|
+
type: "text"
|
|
130
|
+
}, null, 8, ["value"])
|
|
131
|
+
]),
|
|
132
|
+
_: 1
|
|
133
|
+
}, 8, ["label"]),
|
|
134
|
+
a(e(v), {
|
|
135
|
+
label: e(s)("labels.roles"),
|
|
136
|
+
path: "roles"
|
|
137
|
+
}, {
|
|
138
|
+
default: d(() => [
|
|
139
|
+
a(e(O), {
|
|
140
|
+
value: t.value.roles,
|
|
141
|
+
"onUpdate:value": l[3] || (l[3] = (n) => t.value.roles = n),
|
|
142
|
+
multiple: "",
|
|
143
|
+
options: C
|
|
144
|
+
}, null, 8, ["value"])
|
|
145
|
+
]),
|
|
146
|
+
_: 1
|
|
147
|
+
}, 8, ["label"])
|
|
148
|
+
], 2)
|
|
149
|
+
]),
|
|
150
|
+
_: 1
|
|
151
|
+
}, 8, ["title"])
|
|
152
|
+
]),
|
|
153
|
+
i("div", null, [
|
|
154
|
+
a(e(k), {
|
|
155
|
+
title: e(s)("users.update_password"),
|
|
156
|
+
size: "small",
|
|
157
|
+
class: "mb-3",
|
|
158
|
+
"header-class": "g-card-header",
|
|
159
|
+
segmented: {
|
|
160
|
+
content: !0,
|
|
161
|
+
footer: "soft"
|
|
162
|
+
}
|
|
163
|
+
}, {
|
|
164
|
+
default: d(() => [
|
|
165
|
+
u.loading ? (c(), U(e(y), { key: 0 })) : V("", !0),
|
|
166
|
+
i("div", {
|
|
167
|
+
class: f(u.loading ? "hidden" : "")
|
|
168
|
+
}, [
|
|
169
|
+
a(e(v), {
|
|
170
|
+
label: e(s)("labels.password"),
|
|
171
|
+
path: "password"
|
|
172
|
+
}, {
|
|
173
|
+
default: d(() => [
|
|
174
|
+
i("div", Z, [
|
|
175
|
+
a(e(p), {
|
|
176
|
+
value: t.value.password,
|
|
177
|
+
"onUpdate:value": l[4] || (l[4] = (n) => t.value.password = n),
|
|
178
|
+
type: "password",
|
|
179
|
+
"show-password-on": "click",
|
|
180
|
+
"input-props": { autocomplete: "one-time-code" }
|
|
181
|
+
}, null, 8, ["value"]),
|
|
182
|
+
a(e(p), {
|
|
183
|
+
class: "mt-6",
|
|
184
|
+
value: t.value.passwordConfirmation,
|
|
185
|
+
"onUpdate:value": l[5] || (l[5] = (n) => t.value.passwordConfirmation = n),
|
|
186
|
+
type: "password",
|
|
187
|
+
"show-password-on": "click",
|
|
188
|
+
"input-props": { autocomplete: "one-time-code" },
|
|
189
|
+
placeholder: e(s)("labels.password_confirmation")
|
|
190
|
+
}, null, 8, ["value", "placeholder"])
|
|
191
|
+
])
|
|
192
|
+
]),
|
|
193
|
+
_: 1
|
|
194
|
+
}, 8, ["label"])
|
|
195
|
+
], 2)
|
|
196
|
+
]),
|
|
197
|
+
_: 1
|
|
198
|
+
}, 8, ["title"])
|
|
199
|
+
])
|
|
200
|
+
]),
|
|
201
|
+
i("div", ee, [
|
|
202
|
+
i("div", le, [
|
|
203
|
+
a(e(k), {
|
|
204
|
+
title: e(s)("users.servers"),
|
|
205
|
+
size: "small",
|
|
206
|
+
class: "mb-3",
|
|
207
|
+
"header-class": "g-card-header",
|
|
208
|
+
segmented: {
|
|
209
|
+
content: !0,
|
|
210
|
+
footer: "soft"
|
|
211
|
+
}
|
|
212
|
+
}, {
|
|
213
|
+
default: d(() => [
|
|
214
|
+
u.loading ? (c(), U(e(y), { key: 0 })) : V("", !0),
|
|
215
|
+
i("div", {
|
|
216
|
+
class: f(u.loading ? "hidden" : "")
|
|
217
|
+
}, [
|
|
218
|
+
a(_, {
|
|
219
|
+
"user-id": e(b).userId,
|
|
220
|
+
modelValue: t.value.servers,
|
|
221
|
+
"onUpdate:modelValue": l[6] || (l[6] = (n) => t.value.servers = n)
|
|
222
|
+
}, null, 8, ["user-id", "modelValue"])
|
|
223
|
+
], 2)
|
|
224
|
+
]),
|
|
225
|
+
_: 1
|
|
226
|
+
}, 8, ["title"])
|
|
227
|
+
])
|
|
228
|
+
])
|
|
229
|
+
]),
|
|
230
|
+
_: 1
|
|
231
|
+
}, 8, ["model"]),
|
|
232
|
+
a(I, {
|
|
233
|
+
color: "green",
|
|
234
|
+
onClick: h,
|
|
235
|
+
class: "mt-4"
|
|
236
|
+
}, {
|
|
237
|
+
default: d(() => [
|
|
238
|
+
a(e(P), {
|
|
239
|
+
name: "save",
|
|
240
|
+
class: "mr-0.5"
|
|
241
|
+
}),
|
|
242
|
+
i("span", ae, " " + z(e(s)("main.save")), 1)
|
|
243
|
+
]),
|
|
244
|
+
_: 1
|
|
245
|
+
})
|
|
246
|
+
], 2);
|
|
247
|
+
};
|
|
248
|
+
}
|
|
249
|
+
}, ue = {
|
|
250
|
+
__name: "AdminUsersEditView",
|
|
251
|
+
setup(u) {
|
|
252
|
+
const g = K(), b = Q(), r = $(), t = A(() => [
|
|
253
|
+
{ route: "/", text: "GameAP", icon: "gicon gicon-gameap" },
|
|
254
|
+
{ route: { name: "admin.users.index" }, text: s("users.users") },
|
|
255
|
+
{ text: s("users.title_edit") }
|
|
256
|
+
]), { loading: w, user: C } = X(r);
|
|
257
|
+
B(() => {
|
|
258
|
+
r.setUserId(Number(g.params.id)), r.fetchUser().then(() => {
|
|
259
|
+
o.value.login = r.user.login, o.value.email = r.user.email, o.value.name = r.user.name, o.value.roles = r.user.roles;
|
|
260
|
+
}).catch((m) => {
|
|
261
|
+
x(m);
|
|
262
|
+
}), r.fetchServers().then(() => {
|
|
263
|
+
o.value.servers = r.servers;
|
|
264
|
+
}).catch((m) => {
|
|
265
|
+
x(m);
|
|
266
|
+
});
|
|
267
|
+
});
|
|
268
|
+
const o = q({
|
|
269
|
+
login: "",
|
|
270
|
+
email: "",
|
|
271
|
+
name: "",
|
|
272
|
+
roles: [],
|
|
273
|
+
password: "",
|
|
274
|
+
servers: []
|
|
275
|
+
}), h = () => {
|
|
276
|
+
const m = {
|
|
277
|
+
login: o.value.login,
|
|
278
|
+
email: o.value.email,
|
|
279
|
+
name: o.value.name,
|
|
280
|
+
roles: o.value.roles,
|
|
281
|
+
password: o.value.password,
|
|
282
|
+
servers: o.value.servers.map((l) => l.id)
|
|
283
|
+
};
|
|
284
|
+
r.saveUser(m).then(() => {
|
|
285
|
+
G({
|
|
286
|
+
content: s("users.update_success_msg"),
|
|
287
|
+
type: "success"
|
|
288
|
+
}, () => {
|
|
289
|
+
b.push({ name: "admin.users.index" });
|
|
290
|
+
});
|
|
291
|
+
}).catch((l) => {
|
|
292
|
+
x(l);
|
|
293
|
+
});
|
|
294
|
+
};
|
|
295
|
+
return (m, l) => (c(), M(F, null, [
|
|
296
|
+
a(e(D), { items: t.value }, null, 8, ["items"]),
|
|
297
|
+
a(se, {
|
|
298
|
+
loading: e(w),
|
|
299
|
+
modelValue: o.value,
|
|
300
|
+
"onUpdate:modelValue": l[0] || (l[0] = (_) => o.value = _),
|
|
301
|
+
onUpdate: h
|
|
302
|
+
}, null, 8, ["loading", "modelValue"])
|
|
303
|
+
], 64));
|
|
304
|
+
}
|
|
305
|
+
};
|
|
306
|
+
export {
|
|
307
|
+
ue as default
|
|
308
|
+
};
|