@gameap/frontend 4.1.0-dev13 → 4.1.0-dev15
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 → AdminClientCertificatesView-Cdat-6ub.js} +56 -66
- package/dist/{AdminDaemonTaskListView-DbJp0aqQ.js → AdminDaemonTaskListView-C0Jy1oat.js} +28 -29
- package/dist/{AdminDaemonTaskOutputView-DNCHQfxx.js → AdminDaemonTaskOutputView-BdstVc5K.js} +23 -25
- package/dist/{AdminGamesEdit-jco7cBfk.js → AdminGamesEdit-BOxBjeqI.js} +28 -31
- package/dist/{AdminGamesList-CMjsgEpx.js → AdminGamesList-C6nSWKdx.js} +136 -143
- package/dist/{AdminModEdit-BlRu_09M.js → AdminModEdit-diCpKnO2.js} +8 -8
- package/dist/{AdminNodeShowView-BHxJkjYJ.js → AdminNodeShowView-BIUiXpmk.js} +51 -61
- package/dist/{AdminNodesCreateView-DihmM46W.js → AdminNodesCreateView-Brzzh4HN.js} +13 -12
- package/dist/{AdminNodesEditView-CVACSido.js → AdminNodesEditView-Dwr2kt82.js} +16 -15
- package/dist/{AdminNodesView-CHtiU6dZ.js → AdminNodesView-DyiGZ1lZ.js} +25 -25
- package/dist/{AdminPluginsView-CRjF3BPs.js → AdminPluginsView-CUe4i8kM.js} +96 -105
- package/dist/{AdminServersCreate-5f8x6eZO.js → AdminServersCreate-iNMqnGK9.js} +26 -25
- package/dist/{AdminServersEdit-CA7711nJ.js → AdminServersEdit-DVI74EZc.js} +24 -23
- package/dist/{AdminServersList-De5ZMEGZ.js → AdminServersList-CkjyJfPK.js} +28 -28
- package/dist/{AdminUsersEditView-DeYo98vi.js → AdminUsersEditView-BTscuJ86.js} +2 -2
- package/dist/{AdminUsersView-C8fKEhpr.js → AdminUsersView-D-fJfjLH.js} +95 -105
- package/dist/{CreateModForm-CqkvVLfN.js → CreateModForm-CDqlkWYW.js} +3 -3
- package/dist/{CreateNodeModal-DOXVtVLQ.js → CreateNodeModal-CcpGS94Z.js} +1 -1
- package/dist/{DsIpSelector-C676Y19X.js → DsIpSelector-B_sWnbEP.js} +1 -1
- package/dist/{EmptyView-Bf6zmQQt.js → EmptyView-CopbPCy6.js} +1 -1
- package/dist/{FileManager-DSa9v4Ex.js → FileManager-JXa457rg.js} +691 -690
- package/dist/GCard-BmZwrZ1e.js +50 -0
- package/dist/GDataTable-DC0a2vJJ.js +60 -0
- package/dist/GDivider-tYaNzeM5.js +16 -0
- package/dist/GEmpty-Bkw6u0WR.js +35 -0
- package/dist/GModal-C4shXjCa.js +53 -0
- package/dist/GSwitch-1wlrRoUA.js +42 -0
- package/dist/GTable-DRH5VONX.js +38 -0
- package/dist/{GameModSelector-CQBT8ZLu.js → GameModSelector-BzBYr5Bl.js} +2 -2
- package/dist/{InputManyList-DUOtepb8.js → InputManyList-B65AFbLu.js} +21 -20
- package/dist/{InputTextList-lPhVIV04.js → InputTextList-DUpEA_--.js} +1 -1
- package/dist/PluginPendingView-CaK51oA9.js +35 -0
- package/dist/{ProfileView-Dw2T3X8m.js → ProfileView-BTXGnm4R.js} +74 -83
- package/dist/{RconConsole-CvxNBv0B.js → RconConsole-BSienrhk.js} +2 -2
- package/dist/{RconPlayers-odUKa0Ps.js → RconPlayers-jIqnphJ1.js} +111 -118
- package/dist/{ServerConsole-B9v2PcWb.js → ServerConsole-BdF95Ef6.js} +1 -1
- package/dist/{ServerControlButton-D_zJbxr6.js → ServerControlButton-7Un9i8tt.js} +6 -6
- package/dist/{ServerIdView-_vGQRk7y.js → ServerIdView-1X_6i-s6.js} +69 -67
- package/dist/{ServerSelector-6fCqL3e9.js → ServerSelector-Y4fSKiM2.js} +1 -1
- package/dist/{ServerSettings-C6-tkLTH.js → ServerSettings-DsIlowVa.js} +23 -21
- package/dist/{ServerStatus-CcqB0h1r.js → ServerStatus-BblAtet5.js} +1 -1
- package/dist/{ServerTasks-BcaZzvz7.js → ServerTasks-2jQBkpL9.js} +1 -1
- package/dist/{ServersView-S_G_kuGj.js → ServersView-CmDavKT_.js} +76 -76
- package/dist/{SettingsParameters-u3Awy4Vf.js → SettingsParameters-jT8ffL4p.js} +4 -3
- package/dist/{SmartPortSelector-BRSQFVqT.js → SmartPortSelector-BuREMnLx.js} +1 -1
- package/dist/{TokensView-C1RFJSB5.js → TokensView-Cw5j1Ivk.js} +60 -64
- package/dist/{UpdateNodeForm-BAhzQLt-.js → UpdateNodeForm-BnIqe7rC.js} +11 -10
- package/dist/{UserServerPrivileges-Q2wQMyHi.js → UserServerPrivileges-CvGlXrzS.js} +82 -92
- package/dist/{_createCompounder-CXjx5-CF.js → _createCompounder-vPBqoT5p.js} +3 -3
- package/dist/{camelCase-CSrB2MWj.js → camelCase-BSEkxKhA.js} +2 -2
- package/dist/{capitalize-BZSBvd6d.js → capitalize-BVfQSCbg.js} +5 -5
- package/dist/{clientCertificates-C0FlDwsb.js → clientCertificates-DHDjG6a2.js} +1 -1
- package/dist/frontend.css +1 -1
- package/dist/{gameList-kucszmx0.js → gameList-BuPam-HN.js} +1 -1
- package/dist/{index-9fvX7FD-.js → index-CiR3a1Cv.js} +180 -179
- package/dist/index.js +1 -1
- package/dist/{isEmpty-D0Z8Rneq.js → isEmpty-CLFmjU_j.js} +11 -11
- package/dist/{loader-qtG-Lf6M.js → loader-DStCgv0r.js} +1 -1
- package/dist/mockServiceWorker.js +1 -1
- package/dist/{snakeCase-nnM4dAra.js → snakeCase-lCSKsq6x.js} +1 -1
- package/dist/{validators-ChBGsKft.js → validators-r6Rit4O6.js} +2 -2
- package/package.json +2 -2
- package/dist/PluginPendingView-DaDaN30Q.js +0 -34
|
@@ -1,15 +1,18 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
import { b as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { ref as _, computed as z, onMounted as le, onUnmounted as ce, watch as he, createElementBlock as m, openBlock as o, createCommentVNode as x, createVNode as r, unref as t, createElementVNode as u, createBlock as T, toDisplayString as a, Fragment as ae, renderList as _e, normalizeStyle as ye, normalizeClass as oe, withCtx as k, createTextVNode as I, h as i } from "vue";
|
|
2
|
+
import { b as F, q as be, l as X, a as p, t as s, _ as $, e as q, m as ke, n as Q } from "./index-CiR3a1Cv.js";
|
|
3
|
+
import { _ as se } from "./GDataTable-DC0a2vJJ.js";
|
|
4
|
+
import { _ as de } from "./GModal-C4shXjCa.js";
|
|
5
|
+
import { NSelect as we, NTabs as Pe, NTabPane as ue, NPagination as Ce, NSpin as Se } from "naive-ui";
|
|
6
|
+
import { _ as re } from "./GEmpty-Bkw6u0WR.js";
|
|
7
|
+
import { defineStore as $e, storeToRefs as ze } from "pinia";
|
|
8
|
+
const Ue = $e("pluginStore", () => {
|
|
9
|
+
const n = _([]), b = _(1), h = _(0), w = _(1), v = _(15), V = _([]), C = _([]), U = _(null), M = _([]), E = _(1), j = _(1), f = _(0), D = z(() => f.value > 0), c = z(
|
|
7
10
|
() => n.value.filter((l) => l.installed === !0)
|
|
8
11
|
), d = z(
|
|
9
12
|
() => n.value.filter(
|
|
10
13
|
(l) => l.installed === !0 && l.installed_version && l.latest_version && l.installed_version !== l.latest_version
|
|
11
14
|
)
|
|
12
|
-
),
|
|
15
|
+
), y = z(
|
|
13
16
|
() => V.value.map((l) => ({
|
|
14
17
|
label: l.name,
|
|
15
18
|
value: l.slug
|
|
@@ -20,15 +23,15 @@ const Ue = we("pluginStore", () => {
|
|
|
20
23
|
value: l.slug,
|
|
21
24
|
color: l.color
|
|
22
25
|
}))
|
|
23
|
-
),
|
|
26
|
+
), N = (l = {}) => ({
|
|
24
27
|
...l,
|
|
25
28
|
lang: be()
|
|
26
29
|
});
|
|
27
30
|
async function Y() {
|
|
28
31
|
f.value++;
|
|
29
32
|
try {
|
|
30
|
-
const l = await
|
|
31
|
-
params:
|
|
33
|
+
const l = await F.get("/api/plugin-store/categories", {
|
|
34
|
+
params: N()
|
|
32
35
|
});
|
|
33
36
|
V.value = l.data;
|
|
34
37
|
} finally {
|
|
@@ -38,8 +41,8 @@ const Ue = we("pluginStore", () => {
|
|
|
38
41
|
async function Z() {
|
|
39
42
|
f.value++;
|
|
40
43
|
try {
|
|
41
|
-
const l = await
|
|
42
|
-
params:
|
|
44
|
+
const l = await F.get("/api/plugin-store/labels", {
|
|
45
|
+
params: N()
|
|
43
46
|
});
|
|
44
47
|
C.value = l.data;
|
|
45
48
|
} finally {
|
|
@@ -49,12 +52,12 @@ const Ue = we("pluginStore", () => {
|
|
|
49
52
|
async function ee(l = {}) {
|
|
50
53
|
f.value++;
|
|
51
54
|
try {
|
|
52
|
-
const P =
|
|
55
|
+
const P = N({
|
|
53
56
|
page: l.page || b.value,
|
|
54
57
|
per_page: l.perPage || v.value
|
|
55
58
|
});
|
|
56
59
|
l.category && (P.category = l.category), l.label && (P.label = l.label), l.search && (P.search = l.search);
|
|
57
|
-
const S = await
|
|
60
|
+
const S = await F.get("/api/plugin-store/plugins", { params: P });
|
|
58
61
|
n.value = S.data.data, b.value = S.data.current_page, h.value = S.data.total, w.value = S.data.last_page;
|
|
59
62
|
} finally {
|
|
60
63
|
f.value--;
|
|
@@ -63,8 +66,8 @@ const Ue = we("pluginStore", () => {
|
|
|
63
66
|
async function te(l) {
|
|
64
67
|
f.value++;
|
|
65
68
|
try {
|
|
66
|
-
const P = await
|
|
67
|
-
params:
|
|
69
|
+
const P = await F.get(`/api/plugin-store/plugins/${l}`, {
|
|
70
|
+
params: N()
|
|
68
71
|
});
|
|
69
72
|
U.value = P.data;
|
|
70
73
|
} finally {
|
|
@@ -74,13 +77,13 @@ const Ue = we("pluginStore", () => {
|
|
|
74
77
|
async function O(l, P = 1) {
|
|
75
78
|
f.value++;
|
|
76
79
|
try {
|
|
77
|
-
const S = await
|
|
78
|
-
params:
|
|
80
|
+
const S = await F.get(`/api/plugin-store/plugins/${l}/versions`, {
|
|
81
|
+
params: N({
|
|
79
82
|
page: P,
|
|
80
83
|
per_page: 20
|
|
81
84
|
})
|
|
82
85
|
});
|
|
83
|
-
|
|
86
|
+
M.value = S.data.data, E.value = S.data.current_page, j.value = S.data.last_page;
|
|
84
87
|
} finally {
|
|
85
88
|
f.value--;
|
|
86
89
|
}
|
|
@@ -89,8 +92,8 @@ const Ue = we("pluginStore", () => {
|
|
|
89
92
|
f.value++;
|
|
90
93
|
try {
|
|
91
94
|
const S = P ? { version: P } : {};
|
|
92
|
-
return (await
|
|
93
|
-
params:
|
|
95
|
+
return (await F.post(`/api/plugin-store/plugins/${l}/install`, S, {
|
|
96
|
+
params: N()
|
|
94
97
|
})).data;
|
|
95
98
|
} finally {
|
|
96
99
|
f.value--;
|
|
@@ -100,8 +103,8 @@ const Ue = we("pluginStore", () => {
|
|
|
100
103
|
f.value++;
|
|
101
104
|
try {
|
|
102
105
|
const S = P ? { version: P } : {};
|
|
103
|
-
return (await
|
|
104
|
-
params:
|
|
106
|
+
return (await F.post(`/api/plugin-store/plugins/${l}/update`, S, {
|
|
107
|
+
params: N()
|
|
105
108
|
})).data;
|
|
106
109
|
} finally {
|
|
107
110
|
f.value--;
|
|
@@ -110,15 +113,15 @@ const Ue = we("pluginStore", () => {
|
|
|
110
113
|
async function A(l) {
|
|
111
114
|
f.value++;
|
|
112
115
|
try {
|
|
113
|
-
return (await
|
|
114
|
-
params:
|
|
116
|
+
return (await F.delete(`/api/plugin-store/plugins/${l}`, {
|
|
117
|
+
params: N()
|
|
115
118
|
})).data;
|
|
116
119
|
} finally {
|
|
117
120
|
f.value--;
|
|
118
121
|
}
|
|
119
122
|
}
|
|
120
123
|
function R() {
|
|
121
|
-
U.value = null,
|
|
124
|
+
U.value = null, M.value = [], E.value = 1, j.value = 1;
|
|
122
125
|
}
|
|
123
126
|
return {
|
|
124
127
|
// State
|
|
@@ -130,15 +133,15 @@ const Ue = we("pluginStore", () => {
|
|
|
130
133
|
categories: V,
|
|
131
134
|
labels: C,
|
|
132
135
|
currentPlugin: U,
|
|
133
|
-
currentPluginVersions:
|
|
134
|
-
versionsCurrentPage:
|
|
136
|
+
currentPluginVersions: M,
|
|
137
|
+
versionsCurrentPage: E,
|
|
135
138
|
versionsLastPage: j,
|
|
136
139
|
apiProcesses: f,
|
|
137
140
|
// Getters
|
|
138
|
-
loading:
|
|
141
|
+
loading: D,
|
|
139
142
|
installedPlugins: c,
|
|
140
143
|
updatablePlugins: d,
|
|
141
|
-
categoryOptions:
|
|
144
|
+
categoryOptions: y,
|
|
142
145
|
labelOptions: B,
|
|
143
146
|
// Actions
|
|
144
147
|
fetchCategories: Y,
|
|
@@ -151,10 +154,10 @@ const Ue = we("pluginStore", () => {
|
|
|
151
154
|
uninstallPlugin: A,
|
|
152
155
|
clearCurrentPlugin: R
|
|
153
156
|
};
|
|
154
|
-
}),
|
|
157
|
+
}), De = { class: "plugin-details" }, Me = {
|
|
155
158
|
key: 0,
|
|
156
159
|
class: "flex justify-center py-8"
|
|
157
|
-
},
|
|
160
|
+
}, Ne = { key: 1 }, Ve = { class: "flex items-start gap-4 mb-4" }, Le = ["src", "alt"], Te = { class: "flex-1" }, qe = { class: "flex items-center gap-2 flex-wrap" }, je = { class: "text-xl font-bold whitespace-nowrap" }, Fe = ["href"], Ee = {
|
|
158
161
|
key: 2,
|
|
159
162
|
class: "hidden md:inline px-2 py-0.5 text-xs font-medium rounded-full bg-lime-100 text-lime-800 dark:bg-lime-900 dark:text-lime-300 whitespace-nowrap"
|
|
160
163
|
}, Be = {
|
|
@@ -190,7 +193,7 @@ const Ue = we("pluginStore", () => {
|
|
|
190
193
|
}, pt = { class: "text-sm font-medium whitespace-nowrap" }, mt = { class: "text-xs text-stone-500" }, ft = ["href"], xt = { class: "text-sm font-medium text-blue-500" }, vt = {
|
|
191
194
|
key: 0,
|
|
192
195
|
class: "mb-4"
|
|
193
|
-
}, ht = { class: "font-semibold mb-2" },
|
|
196
|
+
}, ht = { class: "font-semibold mb-2" }, _t = { class: "text-sm whitespace-pre-wrap" }, yt = {
|
|
194
197
|
key: 1,
|
|
195
198
|
class: "flex justify-center gap-6 mb-4 p-3 bg-stone-100 dark:bg-stone-800 rounded-lg"
|
|
196
199
|
}, bt = { class: "flex flex-col items-center text-center" }, kt = { class: "text-sm font-medium whitespace-nowrap" }, wt = { class: "text-xs text-stone-500" }, Pt = { class: "flex flex-col items-center text-center" }, Ct = { class: "text-sm font-medium whitespace-nowrap" }, St = { class: "text-xs text-stone-500" }, $t = {
|
|
@@ -214,7 +217,7 @@ const Ue = we("pluginStore", () => {
|
|
|
214
217
|
},
|
|
215
218
|
emits: ["install", "update", "uninstall"],
|
|
216
219
|
setup(n, { emit: b }) {
|
|
217
|
-
const h = n, w =
|
|
220
|
+
const h = n, w = _(null), v = _(window.innerWidth < 768), V = () => {
|
|
218
221
|
v.value = window.innerWidth < 768;
|
|
219
222
|
};
|
|
220
223
|
le(() => {
|
|
@@ -223,10 +226,10 @@ const Ue = we("pluginStore", () => {
|
|
|
223
226
|
window.removeEventListener("resize", V);
|
|
224
227
|
});
|
|
225
228
|
const C = z(() => h.plugin?.installed ? h.plugin.installed_version !== h.plugin.latest_version : !1), U = z(() => h.plugin?.requires_subscription && h.plugin?.has_subscription !== !0);
|
|
226
|
-
function
|
|
229
|
+
function M() {
|
|
227
230
|
h.plugin?.subscription_url && window.open(h.plugin.subscription_url, "_blank");
|
|
228
231
|
}
|
|
229
|
-
const
|
|
232
|
+
const E = z(() => h.versions.map((c) => ({
|
|
230
233
|
label: c.version,
|
|
231
234
|
value: c.version
|
|
232
235
|
})));
|
|
@@ -234,19 +237,19 @@ const Ue = we("pluginStore", () => {
|
|
|
234
237
|
d?.latest_version ? w.value = d.latest_version : c?.length > 0 && (w.value = c[0].version);
|
|
235
238
|
}, { immediate: !0 });
|
|
236
239
|
function j(c) {
|
|
237
|
-
const d = Math.floor(c || 0),
|
|
238
|
-
return "★".repeat(d) + (
|
|
240
|
+
const d = Math.floor(c || 0), y = (c || 0) - d >= 0.5, B = 5 - d - (y ? 1 : 0);
|
|
241
|
+
return "★".repeat(d) + (y ? "½" : "") + "☆".repeat(B);
|
|
239
242
|
}
|
|
240
243
|
function f(c) {
|
|
241
244
|
return c ? c >= 1e6 ? (c / 1e6).toFixed(1) + "M" : c >= 1e3 ? (c / 1e3).toFixed(1) + "K" : c.toString() : "0";
|
|
242
245
|
}
|
|
243
|
-
function
|
|
246
|
+
function D(c) {
|
|
244
247
|
return c ? new Date(c).toLocaleDateString() : "";
|
|
245
248
|
}
|
|
246
|
-
return (c, d) => (o(), m("div",
|
|
247
|
-
n.loading && !n.plugin ? (o(), m("div",
|
|
249
|
+
return (c, d) => (o(), m("div", De, [
|
|
250
|
+
n.loading && !n.plugin ? (o(), m("div", Me, [
|
|
248
251
|
r(t(X))
|
|
249
|
-
])) : n.plugin ? (o(), m("div",
|
|
252
|
+
])) : n.plugin ? (o(), m("div", Ne, [
|
|
250
253
|
u("div", Ve, [
|
|
251
254
|
n.plugin.icon_url ? (o(), m("img", {
|
|
252
255
|
key: 0,
|
|
@@ -273,16 +276,16 @@ const Ue = we("pluginStore", () => {
|
|
|
273
276
|
class: "text-blue-500 hover:text-blue-600"
|
|
274
277
|
}, [
|
|
275
278
|
r(t(p), { name: "external-link" })
|
|
276
|
-
], 8,
|
|
277
|
-
n.plugin.installed ? (o(), m("span",
|
|
279
|
+
], 8, Fe)) : x("", !0),
|
|
280
|
+
n.plugin.installed ? (o(), m("span", Ee, a(t(s)("plugins.already_installed")), 1)) : x("", !0)
|
|
278
281
|
]),
|
|
279
282
|
n.plugin.summary ? (o(), m("div", Be, a(n.plugin.summary), 1)) : x("", !0),
|
|
280
283
|
n.plugin.labels?.length > 0 ? (o(), m("div", Ie, [
|
|
281
|
-
(o(!0), m(ae, null,
|
|
282
|
-
key:
|
|
283
|
-
class: oe(["px-2 py-0.5 text-xs font-medium rounded-full",
|
|
284
|
-
style:
|
|
285
|
-
}, a(
|
|
284
|
+
(o(!0), m(ae, null, _e(n.plugin.labels, (y) => (o(), m("span", {
|
|
285
|
+
key: y.id,
|
|
286
|
+
class: oe(["px-2 py-0.5 text-xs font-medium rounded-full", y.color ? "" : "bg-stone-100 text-stone-800 dark:bg-stone-700 dark:text-stone-300"]),
|
|
287
|
+
style: ye(y.color ? { backgroundColor: y.color, color: "#fff" } : {})
|
|
288
|
+
}, a(y.name), 7))), 128))
|
|
286
289
|
])) : x("", !0),
|
|
287
290
|
u("div", Oe, [
|
|
288
291
|
u("span", We, a(j(n.plugin.rating_avg)), 1),
|
|
@@ -299,7 +302,7 @@ const Ue = we("pluginStore", () => {
|
|
|
299
302
|
key: 0,
|
|
300
303
|
color: "orange",
|
|
301
304
|
size: v.value ? "small" : "medium",
|
|
302
|
-
onClick:
|
|
305
|
+
onClick: M
|
|
303
306
|
}, {
|
|
304
307
|
default: k(() => [
|
|
305
308
|
r(t(p), {
|
|
@@ -310,11 +313,11 @@ const Ue = we("pluginStore", () => {
|
|
|
310
313
|
]),
|
|
311
314
|
_: 1
|
|
312
315
|
}, 8, ["size"])) : (o(), m(ae, { key: 1 }, [
|
|
313
|
-
!n.plugin.installed || C.value ? (o(), T(t(
|
|
316
|
+
!n.plugin.installed || C.value ? (o(), T(t(we), {
|
|
314
317
|
key: 0,
|
|
315
318
|
value: w.value,
|
|
316
|
-
"onUpdate:value": d[0] || (d[0] = (
|
|
317
|
-
options:
|
|
319
|
+
"onUpdate:value": d[0] || (d[0] = (y) => w.value = y),
|
|
320
|
+
options: E.value,
|
|
318
321
|
placeholder: t(s)("plugins.select_version"),
|
|
319
322
|
style: { width: "120px" },
|
|
320
323
|
size: v.value ? "small" : "large"
|
|
@@ -323,7 +326,7 @@ const Ue = we("pluginStore", () => {
|
|
|
323
326
|
key: 1,
|
|
324
327
|
color: "green",
|
|
325
328
|
size: v.value ? "small" : "medium",
|
|
326
|
-
onClick: d[1] || (d[1] = (
|
|
329
|
+
onClick: d[1] || (d[1] = (y) => c.$emit("install", w.value))
|
|
327
330
|
}, {
|
|
328
331
|
default: k(() => [
|
|
329
332
|
r(t(p), {
|
|
@@ -339,7 +342,7 @@ const Ue = we("pluginStore", () => {
|
|
|
339
342
|
key: 2,
|
|
340
343
|
color: "blue",
|
|
341
344
|
size: v.value ? "small" : "medium",
|
|
342
|
-
onClick: d[2] || (d[2] = (
|
|
345
|
+
onClick: d[2] || (d[2] = (y) => c.$emit("update", w.value))
|
|
343
346
|
}, {
|
|
344
347
|
default: k(() => [
|
|
345
348
|
r(t(p), {
|
|
@@ -354,7 +357,7 @@ const Ue = we("pluginStore", () => {
|
|
|
354
357
|
key: 3,
|
|
355
358
|
color: "red",
|
|
356
359
|
size: v.value ? "small" : "medium",
|
|
357
|
-
onClick: d[3] || (d[3] = (
|
|
360
|
+
onClick: d[3] || (d[3] = (y) => c.$emit("uninstall"))
|
|
358
361
|
}, {
|
|
359
362
|
default: k(() => [
|
|
360
363
|
r(t(p), {
|
|
@@ -405,7 +408,7 @@ const Ue = we("pluginStore", () => {
|
|
|
405
408
|
name: "calendar",
|
|
406
409
|
class: "text-xl text-stone-500 dark:text-stone-400 mb-1"
|
|
407
410
|
}),
|
|
408
|
-
u("span", ot, a(
|
|
411
|
+
u("span", ot, a(D(n.plugin.published_at)), 1),
|
|
409
412
|
u("span", ut, a(t(s)("plugins.published_at")), 1)
|
|
410
413
|
])) : x("", !0),
|
|
411
414
|
n.plugin.has_subscription && n.plugin.subscription_expires_at ? (o(), m("div", rt, [
|
|
@@ -413,7 +416,7 @@ const Ue = we("pluginStore", () => {
|
|
|
413
416
|
name: "star",
|
|
414
417
|
class: "text-xl text-yellow-500 mb-1"
|
|
415
418
|
}),
|
|
416
|
-
u("span", ct, a(
|
|
419
|
+
u("span", ct, a(D(n.plugin.subscription_expires_at)), 1),
|
|
417
420
|
u("span", dt, a(t(s)("plugins.subscription_expires")), 1)
|
|
418
421
|
])) : x("", !0),
|
|
419
422
|
n.plugin.min_gameap_version ? (o(), m("div", gt, [
|
|
@@ -439,9 +442,9 @@ const Ue = we("pluginStore", () => {
|
|
|
439
442
|
]),
|
|
440
443
|
n.plugin.description ? (o(), m("div", vt, [
|
|
441
444
|
u("h3", ht, a(t(s)("plugins.description")), 1),
|
|
442
|
-
u("div",
|
|
445
|
+
u("div", _t, a(n.plugin.description), 1)
|
|
443
446
|
])) : x("", !0),
|
|
444
|
-
n.plugin.installed ? (o(), m("div",
|
|
447
|
+
n.plugin.installed ? (o(), m("div", yt, [
|
|
445
448
|
u("div", bt, [
|
|
446
449
|
r(t(p), {
|
|
447
450
|
name: "box",
|
|
@@ -463,10 +466,10 @@ const Ue = we("pluginStore", () => {
|
|
|
463
466
|
])) : x("", !0)
|
|
464
467
|
]));
|
|
465
468
|
}
|
|
466
|
-
}, Ut = { class: "space-y-4" },
|
|
469
|
+
}, Ut = { class: "space-y-4" }, Dt = { class: "text-stone-600 dark:text-stone-400" }, Mt = {
|
|
467
470
|
key: 0,
|
|
468
471
|
class: "flex items-center gap-3 p-3 bg-stone-50 dark:bg-stone-800 rounded-lg"
|
|
469
|
-
},
|
|
472
|
+
}, Nt = ["src", "alt"], Vt = { class: "font-medium" }, Lt = { class: "text-sm text-stone-500" }, Tt = { class: "flex justify-end gap-2" }, qt = {
|
|
470
473
|
__name: "SubscriptionModal",
|
|
471
474
|
props: {
|
|
472
475
|
show: {
|
|
@@ -489,17 +492,15 @@ const Ue = we("pluginStore", () => {
|
|
|
489
492
|
}
|
|
490
493
|
return (C, U) => (o(), T(t(de), {
|
|
491
494
|
show: v.value,
|
|
492
|
-
"onUpdate:show": U[1] || (U[1] = (
|
|
493
|
-
preset: "card",
|
|
495
|
+
"onUpdate:show": U[1] || (U[1] = (M) => v.value = M),
|
|
494
496
|
title: t(s)("plugins.subscription_required"),
|
|
495
|
-
bordered: !1,
|
|
496
497
|
style: { width: "500px", "max-width": "90vw" }
|
|
497
498
|
}, {
|
|
498
499
|
footer: k(() => [
|
|
499
500
|
u("div", Tt, [
|
|
500
501
|
r($, {
|
|
501
502
|
color: "gray",
|
|
502
|
-
onClick: U[0] || (U[0] = (
|
|
503
|
+
onClick: U[0] || (U[0] = (M) => v.value = !1)
|
|
503
504
|
}, {
|
|
504
505
|
default: k(() => [
|
|
505
506
|
I(a(t(s)("main.close")), 1)
|
|
@@ -523,14 +524,14 @@ const Ue = we("pluginStore", () => {
|
|
|
523
524
|
]),
|
|
524
525
|
default: k(() => [
|
|
525
526
|
u("div", Ut, [
|
|
526
|
-
u("p",
|
|
527
|
-
n.plugin ? (o(), m("div",
|
|
527
|
+
u("p", Dt, a(t(s)("plugins.subscription_info")), 1),
|
|
528
|
+
n.plugin ? (o(), m("div", Mt, [
|
|
528
529
|
n.plugin.icon_url ? (o(), m("img", {
|
|
529
530
|
key: 0,
|
|
530
531
|
src: n.plugin.icon_url,
|
|
531
532
|
alt: n.plugin.name,
|
|
532
533
|
class: "w-12 h-12 rounded"
|
|
533
|
-
}, null, 8,
|
|
534
|
+
}, null, 8, Nt)) : (o(), T(t(p), {
|
|
534
535
|
key: 1,
|
|
535
536
|
name: "plugin",
|
|
536
537
|
class: "text-4xl text-stone-400"
|
|
@@ -548,10 +549,10 @@ const Ue = we("pluginStore", () => {
|
|
|
548
549
|
}, jt = {
|
|
549
550
|
key: 0,
|
|
550
551
|
class: "mb-6"
|
|
551
|
-
},
|
|
552
|
+
}, Ft = { class: "text-lg font-semibold mb-2" }, Et = {
|
|
552
553
|
key: 0,
|
|
553
554
|
class: "flex justify-center mt-4"
|
|
554
|
-
},
|
|
555
|
+
}, Ht = {
|
|
555
556
|
__name: "AdminPluginsView",
|
|
556
557
|
setup(n) {
|
|
557
558
|
const b = Ue(), {
|
|
@@ -561,17 +562,17 @@ const Ue = we("pluginStore", () => {
|
|
|
561
562
|
currentPluginVersions: V,
|
|
562
563
|
loading: C,
|
|
563
564
|
installedPlugins: U,
|
|
564
|
-
updatablePlugins:
|
|
565
|
-
} =
|
|
565
|
+
updatablePlugins: M
|
|
566
|
+
} = ze(b), E = z(() => [
|
|
566
567
|
{ route: "/", text: "GameAP", icon: "gicon gicon-gameap" },
|
|
567
568
|
{ route: { name: "admin.plugins.index" }, text: s("plugins.plugins") }
|
|
568
|
-
]), j =
|
|
569
|
+
]), j = _("installed"), f = _(!1), D = _(!1), c = _(1), d = _(window.innerWidth < 768), y = _(!1), B = _(null), N = () => {
|
|
569
570
|
d.value = window.innerWidth < 768;
|
|
570
571
|
};
|
|
571
572
|
le(() => {
|
|
572
|
-
window.addEventListener("resize",
|
|
573
|
+
window.addEventListener("resize", N);
|
|
573
574
|
}), ce(() => {
|
|
574
|
-
window.removeEventListener("resize",
|
|
575
|
+
window.removeEventListener("resize", N);
|
|
575
576
|
});
|
|
576
577
|
const Y = z(() => [...U.value].sort((e, g) => e.name.localeCompare(g.name))), Z = {
|
|
577
578
|
pageSize: 15
|
|
@@ -762,7 +763,7 @@ const Ue = we("pluginStore", () => {
|
|
|
762
763
|
return e ? e >= 1e6 ? (e / 1e6).toFixed(1) + "M" : e >= 1e3 ? (e / 1e3).toFixed(1) + "K" : e.toString() : "0";
|
|
763
764
|
}
|
|
764
765
|
function R(e) {
|
|
765
|
-
B.value = e,
|
|
766
|
+
B.value = e, y.value = !0;
|
|
766
767
|
}
|
|
767
768
|
function l(e) {
|
|
768
769
|
return e.requires_subscription && e.has_subscription !== !0 && !e.installed;
|
|
@@ -791,23 +792,23 @@ const Ue = we("pluginStore", () => {
|
|
|
791
792
|
f.value = !1, b.clearCurrentPlugin();
|
|
792
793
|
}
|
|
793
794
|
function pe(e) {
|
|
794
|
-
v.value && (
|
|
795
|
+
v.value && (D.value = !0, b.installPlugin(v.value.id, e).then(() => {
|
|
795
796
|
Q({
|
|
796
797
|
content: s("plugins.install_success_msg"),
|
|
797
798
|
type: "success"
|
|
798
799
|
}), K(), J();
|
|
799
800
|
}).catch(q).finally(() => {
|
|
800
|
-
|
|
801
|
+
D.value = !1;
|
|
801
802
|
}));
|
|
802
803
|
}
|
|
803
804
|
function me(e) {
|
|
804
|
-
v.value && (
|
|
805
|
+
v.value && (D.value = !0, b.updatePlugin(v.value.id, e).then(() => {
|
|
805
806
|
Q({
|
|
806
807
|
content: s("plugins.update_success_msg"),
|
|
807
808
|
type: "success"
|
|
808
809
|
}), K(), J();
|
|
809
810
|
}).catch(q).finally(() => {
|
|
810
|
-
|
|
811
|
+
D.value = !1;
|
|
811
812
|
}));
|
|
812
813
|
}
|
|
813
814
|
function fe() {
|
|
@@ -817,13 +818,13 @@ const Ue = we("pluginStore", () => {
|
|
|
817
818
|
negativeText: s("main.no"),
|
|
818
819
|
closable: !1,
|
|
819
820
|
onPositiveClick: () => {
|
|
820
|
-
|
|
821
|
+
D.value = !0, b.uninstallPlugin(v.value.id).then(() => {
|
|
821
822
|
Q({
|
|
822
823
|
content: s("plugins.uninstall_success_msg"),
|
|
823
824
|
type: "success"
|
|
824
825
|
}), K(), J();
|
|
825
826
|
}).catch(q).finally(() => {
|
|
826
|
-
|
|
827
|
+
D.value = !1;
|
|
827
828
|
});
|
|
828
829
|
}
|
|
829
830
|
});
|
|
@@ -850,8 +851,8 @@ const Ue = we("pluginStore", () => {
|
|
|
850
851
|
return le(() => {
|
|
851
852
|
b.fetchPlugins({ page: 1, perPage: 100 }).catch(q);
|
|
852
853
|
}), (e, g) => (o(), m(ae, null, [
|
|
853
|
-
r(t(ke), { items:
|
|
854
|
-
r(t(
|
|
854
|
+
r(t(ke), { items: E.value }, null, 8, ["items"]),
|
|
855
|
+
r(t(Pe), {
|
|
855
856
|
value: j.value,
|
|
856
857
|
"onUpdate:value": [
|
|
857
858
|
g[1] || (g[1] = (L) => j.value = L),
|
|
@@ -866,13 +867,11 @@ const Ue = we("pluginStore", () => {
|
|
|
866
867
|
tab: t(s)("plugins.installed")
|
|
867
868
|
}, {
|
|
868
869
|
default: k(() => [
|
|
869
|
-
t(
|
|
870
|
-
u("h3",
|
|
870
|
+
t(M).length > 0 ? (o(), m("div", jt, [
|
|
871
|
+
u("h3", Ft, a(t(s)("plugins.updates_available")), 1),
|
|
871
872
|
r(t(se), {
|
|
872
|
-
bordered: !1,
|
|
873
|
-
"single-line": !0,
|
|
874
873
|
columns: O.value,
|
|
875
|
-
data: t(
|
|
874
|
+
data: t(M),
|
|
876
875
|
loading: t(C),
|
|
877
876
|
size: "small"
|
|
878
877
|
}, {
|
|
@@ -883,8 +882,6 @@ const Ue = we("pluginStore", () => {
|
|
|
883
882
|
}, 8, ["columns", "data", "loading"])
|
|
884
883
|
])) : x("", !0),
|
|
885
884
|
r(t(se), {
|
|
886
|
-
bordered: !1,
|
|
887
|
-
"single-line": !0,
|
|
888
885
|
columns: O.value,
|
|
889
886
|
data: Y.value,
|
|
890
887
|
loading: t(C),
|
|
@@ -909,8 +906,6 @@ const Ue = we("pluginStore", () => {
|
|
|
909
906
|
}, {
|
|
910
907
|
default: k(() => [
|
|
911
908
|
r(t(se), {
|
|
912
|
-
bordered: !1,
|
|
913
|
-
"single-line": !0,
|
|
914
909
|
columns: ne.value,
|
|
915
910
|
data: t(h),
|
|
916
911
|
loading: t(C),
|
|
@@ -926,8 +921,8 @@ const Ue = we("pluginStore", () => {
|
|
|
926
921
|
]),
|
|
927
922
|
_: 1
|
|
928
923
|
}, 8, ["columns", "data", "loading"]),
|
|
929
|
-
t(w) > 1 ? (o(), m("div",
|
|
930
|
-
r(t(
|
|
924
|
+
t(w) > 1 ? (o(), m("div", Et, [
|
|
925
|
+
r(t(Ce), {
|
|
931
926
|
page: c.value,
|
|
932
927
|
"onUpdate:page": [
|
|
933
928
|
g[0] || (g[0] = (L) => c.value = L),
|
|
@@ -945,15 +940,11 @@ const Ue = we("pluginStore", () => {
|
|
|
945
940
|
r(t(de), {
|
|
946
941
|
show: f.value,
|
|
947
942
|
"onUpdate:show": g[2] || (g[2] = (L) => f.value = L),
|
|
948
|
-
class: "custom-card",
|
|
949
|
-
preset: "card",
|
|
950
943
|
title: t(v)?.name || "",
|
|
951
|
-
|
|
952
|
-
style: { width: "900px", "max-width": "90vw" },
|
|
953
|
-
segmented: { content: "soft", footer: "soft" }
|
|
944
|
+
style: { width: "900px", "max-width": "90vw" }
|
|
954
945
|
}, {
|
|
955
946
|
default: k(() => [
|
|
956
|
-
r(t(
|
|
947
|
+
r(t(Se), { show: D.value }, {
|
|
957
948
|
default: k(() => [
|
|
958
949
|
t(v) ? (o(), T(zt, {
|
|
959
950
|
key: 0,
|
|
@@ -972,13 +963,13 @@ const Ue = we("pluginStore", () => {
|
|
|
972
963
|
_: 1
|
|
973
964
|
}, 8, ["show", "title"]),
|
|
974
965
|
r(qt, {
|
|
975
|
-
show:
|
|
976
|
-
"onUpdate:show": g[3] || (g[3] = (L) =>
|
|
966
|
+
show: y.value,
|
|
967
|
+
"onUpdate:show": g[3] || (g[3] = (L) => y.value = L),
|
|
977
968
|
plugin: B.value
|
|
978
969
|
}, null, 8, ["show", "plugin"])
|
|
979
970
|
], 64));
|
|
980
971
|
}
|
|
981
972
|
};
|
|
982
973
|
export {
|
|
983
|
-
|
|
974
|
+
Ht as default
|
|
984
975
|
};
|