@gameap/frontend 4.1.0-dev1 → 4.1.0-dev2

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.
Files changed (61) hide show
  1. package/dist/AdminClientCertificatesView-DQTMJ6LY.js +368 -0
  2. package/dist/AdminDaemonTaskListView-Bx3e0Miy.js +316 -0
  3. package/dist/AdminDaemonTaskOutputView-BJtLdoAq.js +87 -0
  4. package/dist/AdminGamesEdit-hDe3Pr-7.js +470 -0
  5. package/dist/AdminGamesList-CM1xADCW.js +500 -0
  6. package/dist/AdminModEdit-DDKd6Vga.js +526 -0
  7. package/dist/AdminNodeShowView-DMoEY2Cu.js +167 -0
  8. package/dist/AdminNodesCreateView-BXZDQIJ1.js +85 -0
  9. package/dist/AdminNodesEditView-xO7-szjJ.js +66 -0
  10. package/dist/AdminNodesView-ugTPiC4h.js +161 -0
  11. package/dist/AdminServersCreate-DOygFz_E.js +345 -0
  12. package/dist/AdminServersEdit-cZX6UGB1.js +400 -0
  13. package/dist/AdminServersList-CC50WRsv.js +165 -0
  14. package/dist/AdminUsersEditView-CXpMKFfI.js +305 -0
  15. package/dist/AdminUsersView-DGuGEHVR.js +443 -0
  16. package/dist/CreateModForm-CqhcrNFp.js +122 -0
  17. package/dist/CreateNodeModal-BvbJTKhD.js +93 -0
  18. package/dist/DsIpSelector-DN9IyT4L.js +90 -0
  19. package/dist/FileManager-8TWHezyM.js +31882 -0
  20. package/dist/GameModSelector-DRIaCbGY.js +94 -0
  21. package/dist/InputManyList-By5xECIK.js +110 -0
  22. package/dist/InputTextList-Bm2Ofq5J.js +63 -0
  23. package/dist/PluginPendingView-DHd_yijv.js +31 -0
  24. package/dist/RconConsole-DH9XeOu3.js +75 -0
  25. package/dist/RconPlayers-GrvCMJX3.js +420 -0
  26. package/dist/ServerConsole-BHHnpxJy.js +98 -0
  27. package/dist/ServerIdView-BfqrYuar.js +577 -0
  28. package/dist/ServerSelector-QMK1qiXa.js +52 -0
  29. package/dist/ServerSettings-Cz6C8Dlh.js +84 -0
  30. package/dist/ServerStatus-DBJW9C6H.js +63 -0
  31. package/dist/ServerTasks-Bs3iGYY3.js +854 -0
  32. package/dist/SettingsParameters-DCqhqxHk.js +87 -0
  33. package/dist/SmartPortSelector-DektJC6p.js +161 -0
  34. package/dist/UpdateNodeForm-CwirLUIK.js +648 -0
  35. package/dist/UserServerPrivileges-utyKdh7O.js +318 -0
  36. package/dist/_commonjsHelpers-C6fGbg64.js +6 -0
  37. package/dist/_createCompounder-DSupx5mD.js +241 -0
  38. package/dist/camelCase-WcUYdRB3.js +8 -0
  39. package/dist/capitalize-DRKkBaYR.js +40 -0
  40. package/dist/clientCertificates-BsJdUHYw.js +53 -0
  41. package/dist/favicon-32x32.png +0 -0
  42. package/dist/favicon-96x96.png +0 -0
  43. package/dist/favicon.ico +0 -0
  44. package/dist/fonts/gicon.eot +0 -0
  45. package/dist/fonts/gicon.svg +33 -0
  46. package/dist/fonts/gicon.ttf +0 -0
  47. package/dist/fonts/gicon.woff +0 -0
  48. package/dist/fonts/gicon.woff2 +0 -0
  49. package/dist/frontend.css +14 -0
  50. package/dist/gameList-DpGDCxFE.js +115 -0
  51. package/dist/images/gap_logo_white.png +0 -0
  52. package/dist/images/gap_logo_white_mini.png +0 -0
  53. package/dist/images/gicon.svg +18 -0
  54. package/dist/images/icons/save-white.svg +1 -0
  55. package/dist/images/icons/save.svg +1 -0
  56. package/dist/index-60qEjGuU.js +5371 -0
  57. package/dist/index.js +1 -0
  58. package/dist/loader-CrZTMKcy.js +131 -0
  59. package/dist/mockServiceWorker.js +349 -0
  60. package/dist/snakeCase-CTCA7tap.js +7 -0
  61. package/package.json +1 -2
@@ -0,0 +1,305 @@
1
+ import { mergeModels as S, ref as q, useModel as z, resolveComponent as A, createElementBlock as B, openBlock as c, normalizeClass as f, createVNode as s, unref as e, withCtx as i, createElementVNode as n, createBlock as V, createCommentVNode as y, toDisplayString as E, computed as R, onMounted as F, Fragment as I } from "vue";
2
+ import { Loading as _, GBreadcrumbs as P } from "@gameap/ui";
3
+ import { d as M, y as $, t as a, B as G, v as L, z as D, A as O, o as x, _ as T, e as k, n as W } from "./index-60qEjGuU.js";
4
+ import { NForm as j, NCard as C, NFormItem as p, NInput as v, NSelect as H } from "naive-ui";
5
+ import { useRoute as J, useRouter as K } from "vue-router";
6
+ import { storeToRefs as Q } from "pinia";
7
+ const X = { class: "flex-wrap mt-2 md:grid md:grid-cols-2 gap-8" }, Y = { class: "gap-x-4 w-full" }, Z = { class: "flex-wrap md:grid mt-2" }, ee = { class: "md:w-full" }, le = { class: "hidden lg:inline" }, ae = {
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 = M(), r = q({}), t = z(u, "modelValue"), w = {
21
+ login: {
22
+ required: !0,
23
+ validator: x(a("labels.login"))
24
+ },
25
+ email: {
26
+ required: !0,
27
+ validator: x(a("labels.email"))
28
+ },
29
+ name: {
30
+ required: !0,
31
+ validator: x(a("labels.name"))
32
+ },
33
+ password: {
34
+ validator: G(
35
+ L(
36
+ O(a("labels.password"), 8),
37
+ D(
38
+ a("labels.password"),
39
+ a("labels.password_confirmation"),
40
+ () => t.value.passwordConfirmation
41
+ )
42
+ )
43
+ )
44
+ },
45
+ roles: {
46
+ required: !0,
47
+ validator: $(a("labels.roles"))
48
+ }
49
+ }, N = [
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 U = A("UserServerPrivileges");
65
+ return c(), B("div", {
66
+ class: f(m.$attrs.class)
67
+ }, [
68
+ s(e(j), {
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: i(() => [
77
+ n("div", X, [
78
+ n("div", null, [
79
+ s(e(C), {
80
+ title: e(a)("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: i(() => [
90
+ u.loading ? (c(), V(e(_), { key: 0 })) : y("", !0),
91
+ n("div", {
92
+ class: f(u.loading ? "hidden" : "")
93
+ }, [
94
+ s(e(p), {
95
+ label: e(a)("labels.login"),
96
+ path: "login"
97
+ }, {
98
+ default: i(() => [
99
+ s(e(v), {
100
+ disabled: "",
101
+ value: t.value.login,
102
+ "onUpdate:value": l[0] || (l[0] = (d) => t.value.login = d),
103
+ type: "text"
104
+ }, null, 8, ["value"])
105
+ ]),
106
+ _: 1
107
+ }, 8, ["label"]),
108
+ s(e(p), {
109
+ label: e(a)("labels.email"),
110
+ path: "email"
111
+ }, {
112
+ default: i(() => [
113
+ s(e(v), {
114
+ value: t.value.email,
115
+ "onUpdate:value": l[1] || (l[1] = (d) => t.value.email = d),
116
+ type: "text"
117
+ }, null, 8, ["value"])
118
+ ]),
119
+ _: 1
120
+ }, 8, ["label"]),
121
+ s(e(p), {
122
+ label: e(a)("labels.name"),
123
+ path: "name"
124
+ }, {
125
+ default: i(() => [
126
+ s(e(v), {
127
+ value: t.value.name,
128
+ "onUpdate:value": l[2] || (l[2] = (d) => t.value.name = d),
129
+ type: "text"
130
+ }, null, 8, ["value"])
131
+ ]),
132
+ _: 1
133
+ }, 8, ["label"]),
134
+ s(e(p), {
135
+ label: e(a)("labels.roles"),
136
+ path: "roles"
137
+ }, {
138
+ default: i(() => [
139
+ s(e(H), {
140
+ value: t.value.roles,
141
+ "onUpdate:value": l[3] || (l[3] = (d) => t.value.roles = d),
142
+ multiple: "",
143
+ options: N
144
+ }, null, 8, ["value"])
145
+ ]),
146
+ _: 1
147
+ }, 8, ["label"])
148
+ ], 2)
149
+ ]),
150
+ _: 1
151
+ }, 8, ["title"])
152
+ ]),
153
+ n("div", null, [
154
+ s(e(C), {
155
+ title: e(a)("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: i(() => [
165
+ u.loading ? (c(), V(e(_), { key: 0 })) : y("", !0),
166
+ n("div", {
167
+ class: f(u.loading ? "hidden" : "")
168
+ }, [
169
+ s(e(p), {
170
+ label: e(a)("labels.password"),
171
+ path: "password"
172
+ }, {
173
+ default: i(() => [
174
+ n("div", Y, [
175
+ s(e(v), {
176
+ value: t.value.password,
177
+ "onUpdate:value": l[4] || (l[4] = (d) => t.value.password = d),
178
+ type: "password",
179
+ "show-password-on": "click",
180
+ "input-props": { autocomplete: "one-time-code" }
181
+ }, null, 8, ["value"]),
182
+ s(e(v), {
183
+ class: "mt-6",
184
+ value: t.value.passwordConfirmation,
185
+ "onUpdate:value": l[5] || (l[5] = (d) => t.value.passwordConfirmation = d),
186
+ type: "password",
187
+ "show-password-on": "click",
188
+ "input-props": { autocomplete: "one-time-code" },
189
+ placeholder: e(a)("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
+ n("div", Z, [
202
+ n("div", ee, [
203
+ s(e(C), {
204
+ title: e(a)("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: i(() => [
214
+ u.loading ? (c(), V(e(_), { key: 0 })) : y("", !0),
215
+ n("div", {
216
+ class: f(u.loading ? "hidden" : "")
217
+ }, [
218
+ s(U, {
219
+ "user-id": e(b).userId,
220
+ modelValue: t.value.servers,
221
+ "onUpdate:modelValue": l[6] || (l[6] = (d) => t.value.servers = d)
222
+ }, null, 8, ["user-id", "modelValue"])
223
+ ], 2)
224
+ ]),
225
+ _: 1
226
+ }, 8, ["title"])
227
+ ])
228
+ ])
229
+ ]),
230
+ _: 1
231
+ }, 8, ["model"]),
232
+ s(T, {
233
+ color: "green",
234
+ onClick: h,
235
+ class: "mt-4"
236
+ }, {
237
+ default: i(() => [
238
+ l[7] || (l[7] = n("i", { class: "fa-regular fa-floppy-disk mr-0.5" }, null, -1)),
239
+ n("span", le, " " + E(e(a)("main.save")), 1)
240
+ ]),
241
+ _: 1
242
+ })
243
+ ], 2);
244
+ };
245
+ }
246
+ }, ie = {
247
+ __name: "AdminUsersEditView",
248
+ setup(u) {
249
+ const g = J(), b = K(), r = M(), t = R(() => [
250
+ { route: "/", text: "GameAP", icon: "gicon gicon-gameap" },
251
+ { route: { name: "admin.users.index" }, text: a("users.users") },
252
+ { text: a("users.title_edit") }
253
+ ]), { loading: w, user: N } = Q(r);
254
+ F(() => {
255
+ r.setUserId(g.params.id), r.fetchUser().then(() => {
256
+ o.value.login = r.user.login, o.value.email = r.user.email, o.value.name = r.user.name, o.value.roles = r.user.roles;
257
+ }).catch((m) => {
258
+ k(m);
259
+ }), r.fetchServers().then(() => {
260
+ o.value.servers = r.servers;
261
+ }).catch((m) => {
262
+ k(m);
263
+ });
264
+ });
265
+ const o = q({
266
+ login: "",
267
+ email: "",
268
+ name: "",
269
+ roles: [],
270
+ password: "",
271
+ servers: []
272
+ }), h = () => {
273
+ const m = {
274
+ login: o.value.login,
275
+ email: o.value.email,
276
+ name: o.value.name,
277
+ roles: o.value.roles,
278
+ password: o.value.password,
279
+ servers: o.value.servers.map((l) => l.id)
280
+ };
281
+ r.saveUser(m).then(() => {
282
+ W({
283
+ content: a("users.update_success_msg"),
284
+ type: "success"
285
+ }, () => {
286
+ b.push({ name: "admin.users.index" });
287
+ });
288
+ }).catch((l) => {
289
+ k(l);
290
+ });
291
+ };
292
+ return (m, l) => (c(), B(I, null, [
293
+ s(e(P), { items: t.value }, null, 8, ["items"]),
294
+ s(ae, {
295
+ loading: e(w),
296
+ modelValue: o.value,
297
+ "onUpdate:modelValue": l[0] || (l[0] = (U) => o.value = U),
298
+ onUpdate: h
299
+ }, null, 8, ["loading", "modelValue"])
300
+ ], 64));
301
+ }
302
+ };
303
+ export {
304
+ ie as default
305
+ };