@cobaltcore-dev/aurora 0.4.0 → 0.5.0
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/README.md +73 -77
- package/dist/client/AuroraApp.d.ts +15 -0
- package/dist/client/{AuthProvider-D-5Jpa6F.mjs → AuthProvider-Co4d0WzB.mjs} +3 -3
- package/dist/client/{AuthProvider-D-5Jpa6F.mjs.map → AuthProvider-Co4d0WzB.mjs.map} +1 -1
- package/dist/client/{ContentHeader-BXZoN3B9.mjs → ContentHeader-xQVhO2yT.mjs} +20 -20
- package/dist/client/{ContentHeader-BXZoN3B9.mjs.map → ContentHeader-xQVhO2yT.mjs.map} +1 -1
- package/dist/client/{DeleteFlavorModal-BusYn32r.mjs → DeleteFlavorModal-CHTUZ3YV.mjs} +211 -202
- package/dist/client/DeleteFlavorModal-CHTUZ3YV.mjs.map +1 -0
- package/dist/client/{EditSecurityGroupModal-DK3WYikA.mjs → EditSecurityGroupModal-CWHHx2Xk.mjs} +22 -22
- package/dist/client/{EditSecurityGroupModal-DK3WYikA.mjs.map → EditSecurityGroupModal-CWHHx2Xk.mjs.map} +1 -1
- package/dist/client/{FiltersInput-OVeIJzIo.mjs → FiltersInput-UKJpNFdr.mjs} +10 -10
- package/dist/client/{FiltersInput-OVeIJzIo.mjs.map → FiltersInput-UKJpNFdr.mjs.map} +1 -1
- package/dist/client/{FloatingIpActionModals-Dok7fJss.mjs → FloatingIpActionModals-caXn6bYo.mjs} +54 -54
- package/dist/client/{FloatingIpActionModals-Dok7fJss.mjs.map → FloatingIpActionModals-caXn6bYo.mjs.map} +1 -1
- package/dist/client/{ImageToastNotifications-BG9LPnXf.mjs → ImageToastNotifications-BWimIzu_.mjs} +227 -227
- package/dist/client/{ImageToastNotifications-BG9LPnXf.mjs.map → ImageToastNotifications-BWimIzu_.mjs.map} +1 -1
- package/dist/client/{RouteError-pDEWC_k7.mjs → RouteError-CUj_m3gu.mjs} +6 -6
- package/dist/client/{RouteError-pDEWC_k7.mjs.map → RouteError-CUj_m3gu.mjs.map} +1 -1
- package/dist/client/{SortInput-DXWSqSny.mjs → SortInput-GQlQBlAj.mjs} +6 -6
- package/dist/client/{SortInput-DXWSqSny.mjs.map → SortInput-GQlQBlAj.mjs.map} +1 -1
- package/dist/client/{_auth-CJj1Cnbm.mjs → _auth-DXJkv9QO.mjs} +3 -3
- package/dist/client/{_auth-CJj1Cnbm.mjs.map → _auth-DXJkv9QO.mjs.map} +1 -1
- package/dist/client/_flavorId-C5dc1N_j.mjs +194 -0
- package/dist/client/_flavorId-C5dc1N_j.mjs.map +1 -0
- package/dist/client/{_flavorId-BoNcxYmF.mjs → _flavorId-sUWG0xuy.mjs} +15 -15
- package/dist/client/_flavorId-sUWG0xuy.mjs.map +1 -0
- package/dist/client/{_floatingIpId-DF_BSJN6.mjs → _floatingIpId-COK_TBrz2.mjs} +42 -42
- package/dist/client/_floatingIpId-COK_TBrz2.mjs.map +1 -0
- package/dist/client/{_floatingIpId-D33bOEmH.mjs → _floatingIpId-CT4y-60o.mjs} +3 -3
- package/dist/client/{_floatingIpId-D33bOEmH.mjs.map → _floatingIpId-CT4y-60o.mjs.map} +1 -1
- package/dist/client/_imageId-n3RcnhAR.mjs +534 -0
- package/dist/client/_imageId-n3RcnhAR.mjs.map +1 -0
- package/dist/client/{_pcaId-CbBhBrX1.mjs → _pcaId-B-f_6kqs.mjs} +99 -99
- package/dist/client/{_pcaId-CbBhBrX1.mjs.map → _pcaId-B-f_6kqs.mjs.map} +1 -1
- package/dist/client/{_pcaId-BYCoeK6_.mjs → _pcaId-ChnM_t-9.mjs} +3 -3
- package/dist/client/{_pcaId-BYCoeK6_.mjs.map → _pcaId-ChnM_t-9.mjs.map} +1 -1
- package/dist/client/_projectId-26bw-_rm.mjs +46 -0
- package/dist/client/_projectId-26bw-_rm.mjs.map +1 -0
- package/dist/client/{_projectId-BwLMEMGC.mjs → _projectId-BK9UqeYw.mjs} +14 -14
- package/dist/client/{_projectId-BwLMEMGC.mjs.map → _projectId-BK9UqeYw.mjs.map} +1 -1
- package/dist/client/{_projectId-D35MN1kY.mjs → _projectId-CCtpAQ8m.mjs} +78 -95
- package/dist/client/_projectId-CCtpAQ8m.mjs.map +1 -0
- package/dist/client/{_projectId-OW2xkK43.mjs → _projectId-Dhb4AyBD.mjs} +3 -3
- package/dist/client/{_projectId-OW2xkK43.mjs.map → _projectId-Dhb4AyBD.mjs.map} +1 -1
- package/dist/client/{_securityGroupId-B-Z-CzLp.mjs → _securityGroupId-CR1mKICQ.mjs} +3 -3
- package/dist/client/{_securityGroupId-B-Z-CzLp.mjs.map → _securityGroupId-CR1mKICQ.mjs.map} +1 -1
- package/dist/client/{_securityGroupId-B1bOYRbX.mjs → _securityGroupId-DroYG6cA.mjs} +254 -255
- package/dist/client/{_securityGroupId-B1bOYRbX.mjs.map → _securityGroupId-DroYG6cA.mjs.map} +1 -1
- package/dist/client/about-969pIiZ9.mjs +92 -0
- package/dist/client/{about-DLn1ShhF.mjs.map → about-969pIiZ9.mjs.map} +1 -1
- package/dist/client/aurora-DDzsst74.mjs +19 -0
- package/dist/client/{aurora-CRcxVUCo.mjs.map → aurora-DDzsst74.mjs.map} +1 -1
- package/dist/client/{build-BJDfnAyi.mjs → build-DracvfrJ.mjs} +5 -5
- package/dist/client/{build-BJDfnAyi.mjs.map → build-DracvfrJ.mjs.map} +1 -1
- package/dist/client/{buildFilterParams-TeyosGyK.mjs → buildFilterParams-DoZzMKX9.mjs} +1 -1
- package/dist/client/{buildFilterParams-TeyosGyK.mjs.map → buildFilterParams-DoZzMKX9.mjs.map} +1 -1
- package/dist/client/{cn-C3laVXMm.mjs → cn-DM4Cy3jv.mjs} +1 -1
- package/dist/client/{cn-C3laVXMm.mjs.map → cn-DM4Cy3jv.mjs.map} +1 -1
- package/dist/client/{constants-B-P2r5F1.mjs → constants-4lVQXort.mjs} +22 -22
- package/dist/client/{constants-B-P2r5F1.mjs.map → constants-4lVQXort.mjs.map} +1 -1
- package/dist/client/{containers-BjWqjNOx.mjs → containers-DGY2hoWw.mjs} +3 -3
- package/dist/client/{containers-BjWqjNOx.mjs.map → containers-DGY2hoWw.mjs.map} +1 -1
- package/dist/client/containers-ZMFTRaQL.mjs +3277 -0
- package/dist/client/containers-ZMFTRaQL.mjs.map +1 -0
- package/dist/client/{containers-DsRWc1L5.mjs → containers-xfsYgRyf.mjs} +2 -2
- package/dist/client/{containers-DsRWc1L5.mjs.map → containers-xfsYgRyf.mjs.map} +1 -1
- package/dist/client/{flavors-D8oElC2K.mjs → flavors-C4GtoybP.mjs} +2 -2
- package/dist/client/{flavors-D8oElC2K.mjs.map → flavors-C4GtoybP.mjs.map} +1 -1
- package/dist/client/{flavors-qvgPSI7J.mjs → flavors-CpirO_nr.mjs} +167 -148
- package/dist/client/flavors-CpirO_nr.mjs.map +1 -0
- package/dist/client/{flavors-BXPYAFyQ.mjs → flavors-DWMZ6TuJ.mjs} +2 -2
- package/dist/client/{flavors-BXPYAFyQ.mjs.map → flavors-DWMZ6TuJ.mjs.map} +1 -1
- package/dist/client/{floatingips-Fa6ocNUu.mjs → floatingips-BUf_oLRl.mjs} +74 -75
- package/dist/client/{floatingips-Fa6ocNUu.mjs.map → floatingips-BUf_oLRl.mjs.map} +1 -1
- package/dist/client/{formatBytes-tQBEnPoL.mjs → formatBytes-CZv_XyCY.mjs} +1 -1
- package/dist/client/{formatBytes-tQBEnPoL.mjs.map → formatBytes-CZv_XyCY.mjs.map} +1 -1
- package/dist/client/{helpers--JWXi40U.mjs → helpers-1PpYf-fC.mjs} +1 -1
- package/dist/client/{helpers--JWXi40U.mjs.map → helpers-1PpYf-fC.mjs.map} +1 -1
- package/dist/client/hooks-dSArr2Ca.mjs +2 -0
- package/dist/client/{images-tYfyOkX8.mjs → images-CsonlmFx.mjs} +3 -3
- package/dist/client/{images-tYfyOkX8.mjs.map → images-CsonlmFx.mjs.map} +1 -1
- package/dist/client/{images-CSFfefAu.mjs → images-Da1t5KPh.mjs} +507 -535
- package/dist/client/images-Da1t5KPh.mjs.map +1 -0
- package/dist/client/{images-DM9I8G0p.mjs → images-NBf2bV43.mjs} +2 -2
- package/dist/client/{images-DM9I8G0p.mjs.map → images-NBf2bV43.mjs.map} +1 -1
- package/dist/client/{images-CTLCY-yY.mjs → images-QnWf63uj.mjs} +2 -2
- package/dist/client/{images-CTLCY-yY.mjs.map → images-QnWf63uj.mjs.map} +1 -1
- package/dist/client/index.js +252 -258
- package/dist/client/index.js.map +1 -1
- package/dist/client/{md-BivyCkGC.mjs → md-sBiSNVSQ.mjs} +7 -7
- package/dist/client/{md-BivyCkGC.mjs.map → md-sBiSNVSQ.mjs.map} +1 -1
- package/dist/client/{network-rYLHyf15.mjs → network-DuZm76BZ.mjs} +2 -2
- package/dist/client/{network-rYLHyf15.mjs.map → network-DuZm76BZ.mjs.map} +1 -1
- package/dist/client/{objects-BciXwZ00.mjs → objects-B89dYCBq.mjs} +3 -3
- package/dist/client/{objects-BciXwZ00.mjs.map → objects-B89dYCBq.mjs.map} +1 -1
- package/dist/client/{objects-Cdew99tK.mjs → objects-CuFLUOe1.mjs} +2 -2
- package/dist/client/{objects-Cdew99tK.mjs.map → objects-CuFLUOe1.mjs.map} +1 -1
- package/dist/client/objects-H0NN_Sja.mjs +5460 -0
- package/dist/client/objects-H0NN_Sja.mjs.map +1 -0
- package/dist/client/{pca-oc7J0_Xd.mjs → pca-C-UFjicP.mjs} +42 -42
- package/dist/client/{pca-oc7J0_Xd.mjs.map → pca-C-UFjicP.mjs.map} +1 -1
- package/dist/client/{pca-COmKvp3J.mjs → pca-CtU6REww.mjs} +2 -2
- package/dist/client/{pca-COmKvp3J.mjs.map → pca-CtU6REww.mjs.map} +1 -1
- package/dist/client/{projects-Dl5XkXUP.mjs → projects-C-sjd9T5.mjs} +3 -3
- package/dist/client/{projects-Dl5XkXUP.mjs.map → projects-C-sjd9T5.mjs.map} +1 -1
- package/dist/client/{projects-BUabCzvw.mjs → projects-DNXsDnJM.mjs} +25 -21
- package/dist/client/projects-DNXsDnJM.mjs.map +1 -0
- package/dist/client/{projects-DI_L4oDw.mjs → projects-dhnQkuvV.mjs} +2 -2
- package/dist/client/{projects-DI_L4oDw.mjs.map → projects-dhnQkuvV.mjs.map} +1 -1
- package/dist/client/{projects-HoQ0gE5Y.mjs → projects-yiK0HGSA.mjs} +2 -2
- package/dist/client/{projects-HoQ0gE5Y.mjs.map → projects-yiK0HGSA.mjs.map} +1 -1
- package/dist/client/{securitygroups-BjkmHk2J.mjs → securitygroups-wHdrxZXd.mjs} +72 -73
- package/dist/client/{securitygroups-BjkmHk2J.mjs.map → securitygroups-wHdrxZXd.mjs.map} +1 -1
- package/dist/client/{trpcClient-BxguzNYF.mjs → trpcClient-BzPUgiM2.mjs} +1 -1
- package/dist/client/{trpcClient-BxguzNYF.mjs.map → trpcClient-BzPUgiM2.mjs.map} +1 -1
- package/dist/client/{useErrorTranslation-TZVwIAzq.mjs → useErrorTranslation-Dc0eE8Zt.mjs} +1 -1
- package/dist/client/{useErrorTranslation-TZVwIAzq.mjs.map → useErrorTranslation-Dc0eE8Zt.mjs.map} +1 -1
- package/dist/client/useListWithFiltering-DrgUwXef.mjs +157 -0
- package/dist/client/useListWithFiltering-DrgUwXef.mjs.map +1 -0
- package/dist/client/{useModal-DxxlilRm.mjs → useModal-DCs1OJh7.mjs} +1 -1
- package/dist/client/{useModal-DxxlilRm.mjs.map → useModal-DCs1OJh7.mjs.map} +1 -1
- package/dist/client/{useProjectId-OQv2KBbG.mjs → useProjectId-DBc5lpoU.mjs} +1 -1
- package/dist/client/{useProjectId-OQv2KBbG.mjs.map → useProjectId-DBc5lpoU.mjs.map} +1 -1
- package/dist/server/index.js +1281 -432
- package/package.json +6 -5
- package/dist/client/DeleteFlavorModal-BusYn32r.mjs.map +0 -1
- package/dist/client/ListToolbar-BojRTNbo.mjs +0 -129
- package/dist/client/ListToolbar-BojRTNbo.mjs.map +0 -1
- package/dist/client/_flavorId-BRonXvCo.mjs +0 -188
- package/dist/client/_flavorId-BRonXvCo.mjs.map +0 -1
- package/dist/client/_flavorId-BoNcxYmF.mjs.map +0 -1
- package/dist/client/_floatingIpId-DF_BSJN6.mjs.map +0 -1
- package/dist/client/_imageId-BL0I5_pv.mjs +0 -527
- package/dist/client/_imageId-BL0I5_pv.mjs.map +0 -1
- package/dist/client/_projectId-5NiasyXm.mjs +0 -26
- package/dist/client/_projectId-5NiasyXm.mjs.map +0 -1
- package/dist/client/_projectId-D35MN1kY.mjs.map +0 -1
- package/dist/client/about-DLn1ShhF.mjs +0 -92
- package/dist/client/aurora-CRcxVUCo.mjs +0 -19
- package/dist/client/containers-J7WFA18U.mjs +0 -3120
- package/dist/client/containers-J7WFA18U.mjs.map +0 -1
- package/dist/client/flavors-qvgPSI7J.mjs.map +0 -1
- package/dist/client/hooks-DEjb9d1F.mjs +0 -2
- package/dist/client/images-CSFfefAu.mjs.map +0 -1
- package/dist/client/objects-DaElrban.mjs +0 -5340
- package/dist/client/objects-DaElrban.mjs.map +0 -1
- package/dist/client/overview-BMhjFMIV.mjs +0 -15
- package/dist/client/overview-BMhjFMIV.mjs.map +0 -1
- package/dist/client/overview-BYIRj7_X.mjs +0 -15
- package/dist/client/overview-BYIRj7_X.mjs.map +0 -1
- package/dist/client/overview-DRCKNBH2.mjs +0 -15
- package/dist/client/overview-DRCKNBH2.mjs.map +0 -1
- package/dist/client/overview-urYLOVQE.mjs +0 -173
- package/dist/client/overview-urYLOVQE.mjs.map +0 -1
- package/dist/client/projects-BUabCzvw.mjs.map +0 -1
- package/dist/client/useListWithFiltering-CbhHJO4V.mjs +0 -32
- package/dist/client/useListWithFiltering-CbhHJO4V.mjs.map +0 -1
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
import { B as e, C as t, E as n, G as r, I as i, J as a, M as o, Q as s, R as c, T as l, U as u, Y as d, _ as f, at as p, c as m, d as h, et as g, f as _, h as v, it as y, j as b, l as x, n as ee, nt as S, ot as C, q as
|
|
2
|
-
import { n as
|
|
3
|
-
import { t as
|
|
4
|
-
import { t as
|
|
5
|
-
import { t as
|
|
6
|
-
import { t as
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import
|
|
10
|
-
import "./
|
|
11
|
-
import { n as Ae, t as je } from "./FiltersInput-OVeIJzIo.mjs";
|
|
1
|
+
import { B as e, C as t, E as n, G as r, I as i, J as a, M as o, Q as s, R as c, T as l, U as u, Y as d, _ as f, at as p, c as m, d as h, et as g, f as _, h as v, it as y, j as b, l as x, n as ee, nt as S, ot as C, q as w, r as T, w as te, x as E, y as ne } from "./build-DracvfrJ.mjs";
|
|
2
|
+
import { n as D, r as O } from "./trpcClient-BzPUgiM2.mjs";
|
|
3
|
+
import { t as re } from "./cn-DM4Cy3jv.mjs";
|
|
4
|
+
import { t as k } from "./images-QnWf63uj.mjs";
|
|
5
|
+
import { t as A } from "./ContentHeader-xQVhO2yT.mjs";
|
|
6
|
+
import { t as j } from "./SortInput-GQlQBlAj.mjs";
|
|
7
|
+
import { A as M, C as ie, D as ae, E as oe, F as N, I as P, M as F, N as I, O as L, P as R, S as z, T as se, _ as B, a as ce, b as le, c as V, d as H, f as ue, g as U, h as de, i as fe, j as pe, k as me, l as he, m as ge, n as _e, o as ve, p as ye, r as be, s as xe, t as Se, u as Ce, v as we, w as Te, x as Ee, y as De } from "./ImageToastNotifications-BWimIzu_.mjs";
|
|
8
|
+
import { t as Oe } from "./useProjectId-DBc5lpoU.mjs";
|
|
9
|
+
import "./hooks-dSArr2Ca.mjs";
|
|
10
|
+
import { n as ke, t as Ae } from "./FiltersInput-UKJpNFdr.mjs";
|
|
12
11
|
import { Fragment as W, jsx as G, jsxs as K } from "react/jsx-runtime";
|
|
13
|
-
import { Suspense as
|
|
14
|
-
import { useNavigate as
|
|
15
|
-
import { TRPCClientError as
|
|
12
|
+
import { Suspense as je, startTransition as Me, use as Ne, useCallback as Pe, useEffect as Fe, useMemo as Ie, useRef as Le, useState as q } from "react";
|
|
13
|
+
import { useNavigate as Re, useParams as J, useSearch as Y } from "@tanstack/react-router";
|
|
14
|
+
import { TRPCClientError as ze } from "@trpc/client";
|
|
16
15
|
import { Trans as X, useLingui as Z } from "@lingui/react";
|
|
17
|
-
import { i18n as
|
|
16
|
+
import { i18n as Be } from "@lingui/core";
|
|
17
|
+
import { ErrorBoundary as Ve } from "react-error-boundary";
|
|
18
18
|
import "@trpc/server";
|
|
19
19
|
//#region src/client/routes/_auth/projects/$projectId/compute/-components/Images/-components/ImageTableRow.tsx
|
|
20
20
|
function He({ image: e, isSelected: t, isPending: r, isAccepted: a, permissions: c, onEditDetails: l, onEditMetadata: u, onDelete: f, onSelect: p, onActivationStatusChange: m, onManageAccess: h, onUpdateVisibility: _, setToastData: v, uploadId: y, uploadProgressPercent: b, onMemberStatusChanged: x, showSelectColumn: ee = !1 }) {
|
|
21
|
-
let { i18n: S, _:
|
|
22
|
-
|
|
23
|
-
} }),
|
|
21
|
+
let { i18n: S, _: C } = Z(), { id: w, name: T, status: E, visibility: ne, size: D, disk_format: re, created_at: k, owner: A } = e, j = T || S._({ id: "MEIAzV" }), { projectId: M } = J({ from: "/_auth/projects/$projectId/compute/images/" }), ie = Re(), ae = O.useUtils(), oe = O.compute.updateImageMember.useMutation({ onSuccess: () => {
|
|
22
|
+
ae.compute.listImagesWithPagination.invalidate(), ae.compute.listSharedImagesByMemberStatus.invalidate();
|
|
23
|
+
} }), F = async (e) => {
|
|
24
24
|
try {
|
|
25
|
-
await
|
|
25
|
+
await oe.mutateAsync({
|
|
26
26
|
project_id: M,
|
|
27
27
|
imageId: w,
|
|
28
28
|
memberId: M,
|
|
29
29
|
status: e
|
|
30
|
-
}), v(
|
|
30
|
+
}), v(H(e, { onDismiss: () => v(null) })), x?.();
|
|
31
31
|
} catch (e) {
|
|
32
32
|
let t = e?.message;
|
|
33
|
-
v(
|
|
33
|
+
v(Ce(t, { onDismiss: () => v(null) }));
|
|
34
34
|
}
|
|
35
|
-
},
|
|
36
|
-
return
|
|
35
|
+
}, L = M === A, z = r || a, se = oe.isPending;
|
|
36
|
+
return /*#__PURE__*/ K(i, {
|
|
37
37
|
"data-testid": `image-row-${w}`,
|
|
38
|
-
onClick: () =>
|
|
38
|
+
onClick: () => ie({
|
|
39
39
|
to: "/projects/$projectId/compute/images/$imageId",
|
|
40
40
|
params: {
|
|
41
41
|
projectId: M,
|
|
@@ -43,104 +43,70 @@ function He({ image: e, isSelected: t, isPending: r, isAccepted: a, permissions:
|
|
|
43
43
|
}
|
|
44
44
|
}),
|
|
45
45
|
children: [
|
|
46
|
-
ee &&
|
|
46
|
+
ee && /*#__PURE__*/ G(o, {
|
|
47
47
|
onClick: (e) => e.stopPropagation(),
|
|
48
|
-
children:
|
|
48
|
+
children: /*#__PURE__*/ G(te, {
|
|
49
49
|
checked: t,
|
|
50
50
|
onChange: () => p(e)
|
|
51
51
|
})
|
|
52
52
|
}),
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
53
|
+
/*#__PURE__*/ G(o, { children: E }),
|
|
54
|
+
/*#__PURE__*/ G(o, { children: j }),
|
|
55
|
+
/*#__PURE__*/ G(o, { children: ne }),
|
|
56
|
+
/*#__PURE__*/ G(o, { children: e.protected ? S._({ id: "l75CjT" }) : S._({ id: "1UzENP" }) }),
|
|
57
|
+
/*#__PURE__*/ G(o, { children: y && y === w ? `${b}%` : /*#__PURE__*/ G(P, { size: D }) }),
|
|
58
|
+
/*#__PURE__*/ G(o, { children: re || S._({ id: "fj5byd" }) }),
|
|
59
|
+
/*#__PURE__*/ G(o, { children: k ? new Date(k).toLocaleDateString() : S._({ id: "fj5byd" }) }),
|
|
60
|
+
/*#__PURE__*/ G(o, {
|
|
61
61
|
onClick: (e) => e.stopPropagation(),
|
|
62
|
-
children:
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
}
|
|
75
|
-
})
|
|
76
|
-
}),
|
|
77
|
-
B && c.canUpdateMember && /* @__PURE__ */ K(W, { children: [r && /* @__PURE__ */ G(d, {
|
|
78
|
-
label: S._({ id: "g3UF2V" }),
|
|
79
|
-
onClick: V
|
|
80
|
-
}), /* @__PURE__ */ G(d, {
|
|
81
|
-
label: S._({ id: "1t/NnN" }),
|
|
82
|
-
onClick: U
|
|
83
|
-
})] }),
|
|
84
|
-
!B && c.canUpdate && /* @__PURE__ */ K(W, { children: [
|
|
85
|
-
/* @__PURE__ */ G(d, {
|
|
86
|
-
label: S._({ id: "Y1YKad" }),
|
|
87
|
-
onClick: () => l(e)
|
|
88
|
-
}),
|
|
89
|
-
/* @__PURE__ */ G(d, {
|
|
90
|
-
label: S._({ id: "SIfYq6" }),
|
|
91
|
-
onClick: () => u(e)
|
|
92
|
-
}),
|
|
93
|
-
/* @__PURE__ */ G(d, {
|
|
94
|
-
label: e.status === L.DEACTIVATED ? S._({ id: "FQBaXG" }) : S._({ id: "5y3O+A" }),
|
|
95
|
-
onClick: () => m(e)
|
|
96
|
-
}),
|
|
97
|
-
e.visibility === R.SHARED && z && (c.canCreateMember || c.canDeleteMember) && /* @__PURE__ */ G(d, {
|
|
98
|
-
label: S._({ id: "cWbW6w" }),
|
|
99
|
-
onClick: () => h(e)
|
|
100
|
-
}),
|
|
101
|
-
e.visibility === R.PRIVATE && /* @__PURE__ */ G(d, {
|
|
102
|
-
label: S._({ id: "gMYsdZ" }),
|
|
103
|
-
onClick: () => _(e.id, R.SHARED, j)
|
|
104
|
-
})
|
|
105
|
-
] }),
|
|
106
|
-
!B && c.canDelete && !e.protected && /* @__PURE__ */ G(d, {
|
|
107
|
-
label: S._({ id: "cnGeoo" }),
|
|
108
|
-
onClick: () => f(e)
|
|
62
|
+
children: se ? /*#__PURE__*/ G(s, {
|
|
63
|
+
variant: "primary",
|
|
64
|
+
size: "small"
|
|
65
|
+
}) : /*#__PURE__*/ G(g, { children: /*#__PURE__*/ K(n, { children: [
|
|
66
|
+
/*#__PURE__*/ G(d, {
|
|
67
|
+
label: S._({ id: "v0hPHE" }),
|
|
68
|
+
onClick: () => ie({
|
|
69
|
+
to: "/projects/$projectId/compute/images/$imageId",
|
|
70
|
+
params: {
|
|
71
|
+
projectId: M,
|
|
72
|
+
imageId: w
|
|
73
|
+
}
|
|
109
74
|
})
|
|
110
|
-
] }) }),
|
|
111
|
-
le && /* @__PURE__ */ G(C, {
|
|
112
|
-
title: S._({ id: "psPHye" }),
|
|
113
|
-
open: le,
|
|
114
|
-
onCancel: V,
|
|
115
|
-
confirmButtonLabel: S._({ id: "g3UF2V" }),
|
|
116
|
-
onConfirm: () => {
|
|
117
|
-
V(), se(P.ACCEPTED);
|
|
118
|
-
},
|
|
119
|
-
children: /* @__PURE__ */ K("p", { children: [
|
|
120
|
-
S._({ id: "W0MCSG" }),
|
|
121
|
-
" ",
|
|
122
|
-
/* @__PURE__ */ G("strong", { children: j }),
|
|
123
|
-
"? ",
|
|
124
|
-
S._({ id: "D/8vkD" })
|
|
125
|
-
] })
|
|
126
75
|
}),
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
S._({ id: "
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
S._({ id: "
|
|
141
|
-
|
|
76
|
+
z && c.canUpdateMember && /*#__PURE__*/ K(W, { children: [r && /*#__PURE__*/ G(d, {
|
|
77
|
+
label: S._({ id: "g3UF2V" }),
|
|
78
|
+
onClick: () => F(N.ACCEPTED)
|
|
79
|
+
}), /*#__PURE__*/ G(d, {
|
|
80
|
+
label: S._({ id: "1t/NnN" }),
|
|
81
|
+
onClick: () => F(N.REJECTED)
|
|
82
|
+
})] }),
|
|
83
|
+
!z && c.canUpdate && /*#__PURE__*/ K(W, { children: [
|
|
84
|
+
/*#__PURE__*/ G(d, {
|
|
85
|
+
label: S._({ id: "Y1YKad" }),
|
|
86
|
+
onClick: () => l(e)
|
|
87
|
+
}),
|
|
88
|
+
/*#__PURE__*/ G(d, {
|
|
89
|
+
label: S._({ id: "SIfYq6" }),
|
|
90
|
+
onClick: () => u(e)
|
|
91
|
+
}),
|
|
92
|
+
/*#__PURE__*/ G(d, {
|
|
93
|
+
label: e.status === I.DEACTIVATED ? S._({ id: "FQBaXG" }) : S._({ id: "5y3O+A" }),
|
|
94
|
+
onClick: () => m(e)
|
|
95
|
+
}),
|
|
96
|
+
e.visibility === R.SHARED && L && (c.canCreateMember || c.canDeleteMember) && /*#__PURE__*/ G(d, {
|
|
97
|
+
label: S._({ id: "cWbW6w" }),
|
|
98
|
+
onClick: () => h(e)
|
|
99
|
+
}),
|
|
100
|
+
e.visibility === R.PRIVATE && /*#__PURE__*/ G(d, {
|
|
101
|
+
label: S._({ id: "gMYsdZ" }),
|
|
102
|
+
onClick: () => _(e.id, R.SHARED, j)
|
|
103
|
+
})
|
|
104
|
+
] }),
|
|
105
|
+
!z && c.canDelete && !e.protected && /*#__PURE__*/ G(d, {
|
|
106
|
+
label: S._({ id: "cnGeoo" }),
|
|
107
|
+
onClick: () => f(e)
|
|
142
108
|
})
|
|
143
|
-
]
|
|
109
|
+
] }) })
|
|
144
110
|
})
|
|
145
111
|
]
|
|
146
112
|
}, w);
|
|
@@ -201,7 +167,7 @@ var qe = {
|
|
|
201
167
|
min_disk: 0,
|
|
202
168
|
min_ram: 0
|
|
203
169
|
}, Je = ({ isOpen: e, onClose: t, onCreate: n, isLoading: r = !1, isUploadPending: i = !1, uploadProgressPercent: a }) => {
|
|
204
|
-
let { i18n: o, _: c } = Z(), [u, d] = q({ ...qe }), [f, g] = q(""), [_, v] = q(null), [b, x] = q({}), [E,
|
|
170
|
+
let { i18n: o, _: c } = Z(), [u, d] = q({ ...qe }), [f, g] = q(""), [_, v] = q(null), [b, x] = q({}), [E, D] = q(!1), [O, k] = q(null), A = u.name.trim() !== "" && _ !== null && u.disk_format !== void 0 && u.disk_format.trim() !== "" && u.container_format !== void 0 && u.container_format.trim() !== "" && u.min_disk >= 0 && u.min_ram >= 0, j = Ie(() => u.disk_format ? Ge(u.disk_format) : [], [u.disk_format]), M = [
|
|
205
171
|
".qcow2",
|
|
206
172
|
".raw",
|
|
207
173
|
".vmdk",
|
|
@@ -214,7 +180,7 @@ var qe = {
|
|
|
214
180
|
".iso",
|
|
215
181
|
".ploop",
|
|
216
182
|
".img"
|
|
217
|
-
],
|
|
183
|
+
], ie = M.join(", "), ae = (e) => {
|
|
218
184
|
let { name: t, value: n, type: r, checked: i } = e.target;
|
|
219
185
|
d((e) => ({
|
|
220
186
|
...e,
|
|
@@ -254,7 +220,7 @@ var qe = {
|
|
|
254
220
|
let n = { ...t };
|
|
255
221
|
return delete n[e], n;
|
|
256
222
|
}));
|
|
257
|
-
},
|
|
223
|
+
}, I = (e, t) => {
|
|
258
224
|
t < 0 && (e === "min_disk" ? x((e) => ({
|
|
259
225
|
...e,
|
|
260
226
|
min_disk: o._({ id: "K3bUTE" })
|
|
@@ -264,25 +230,25 @@ var qe = {
|
|
|
264
230
|
})));
|
|
265
231
|
}, L = (e) => {
|
|
266
232
|
let t = e.name.toLowerCase();
|
|
267
|
-
|
|
233
|
+
M.some((e) => t.endsWith(e)) ? (v(e), b.file && x((e) => {
|
|
268
234
|
let t = { ...e };
|
|
269
235
|
return delete t.file, t;
|
|
270
236
|
})) : x((e) => ({
|
|
271
237
|
...e,
|
|
272
238
|
file: o._({
|
|
273
239
|
id: "qzIZOL",
|
|
274
|
-
values: { supportedFileFormats:
|
|
240
|
+
values: { supportedFileFormats: ie }
|
|
275
241
|
})
|
|
276
242
|
}));
|
|
277
|
-
},
|
|
243
|
+
}, z = (e) => {
|
|
278
244
|
let t = e.target.files?.[0];
|
|
279
245
|
t && L(t);
|
|
280
|
-
},
|
|
281
|
-
e.preventDefault(), e.stopPropagation(),
|
|
246
|
+
}, se = (e) => {
|
|
247
|
+
e.preventDefault(), e.stopPropagation(), D(!0);
|
|
282
248
|
}, B = (e) => {
|
|
283
|
-
e.preventDefault(), e.stopPropagation(),
|
|
249
|
+
e.preventDefault(), e.stopPropagation(), D(!1);
|
|
284
250
|
}, ce = (e) => {
|
|
285
|
-
e.preventDefault(), e.stopPropagation(),
|
|
251
|
+
e.preventDefault(), e.stopPropagation(), D(!1);
|
|
286
252
|
let t = e.dataTransfer.files;
|
|
287
253
|
t && t.length > 0 && L(t[0]);
|
|
288
254
|
}, le = (e) => {
|
|
@@ -310,8 +276,8 @@ var qe = {
|
|
|
310
276
|
let e = {};
|
|
311
277
|
return (!u.name || u.name.trim() === "") && (e.name = o._({ id: "wyIOMP" })), _ || (e.file = o._({ id: "aTqCTq" })), (!u.disk_format || u.disk_format.trim() === "") && (e.disk_format = o._({ id: "LK0pQN" })), (!u.container_format || u.container_format.trim() === "") && (e.container_format = o._({ id: "J4DKSM" })), u.disk_format && u.container_format && (Q(u.disk_format, u.container_format) || (e.container_format = o._({ id: "BgMp/T" }))), u.min_disk < 0 && (e.min_disk = o._({ id: "K3bUTE" })), u.min_ram < 0 && (e.min_ram = o._({ id: "PEGvy+" })), x(e), Object.keys(e).length === 0;
|
|
312
278
|
}, de = async (e) => {
|
|
313
|
-
if (e.preventDefault(),
|
|
314
|
-
|
|
279
|
+
if (e.preventDefault(), k(null), !U()) {
|
|
280
|
+
k(o._({ id: "CBFSfX" }));
|
|
315
281
|
return;
|
|
316
282
|
}
|
|
317
283
|
try {
|
|
@@ -326,12 +292,12 @@ var qe = {
|
|
|
326
292
|
min_ram: u.min_ram
|
|
327
293
|
}, _), fe();
|
|
328
294
|
} catch (e) {
|
|
329
|
-
|
|
295
|
+
k(e instanceof Error ? e.message : o._({ id: "TQn3hH" }));
|
|
330
296
|
}
|
|
331
297
|
}, fe = () => {
|
|
332
|
-
d({ ...qe }), g(""), v(null), x({}),
|
|
298
|
+
d({ ...qe }), g(""), v(null), x({}), k(null), t();
|
|
333
299
|
};
|
|
334
|
-
return
|
|
300
|
+
return /*#__PURE__*/ K(C, {
|
|
335
301
|
open: e,
|
|
336
302
|
onCancel: r ? void 0 : fe,
|
|
337
303
|
size: "large",
|
|
@@ -339,67 +305,67 @@ var qe = {
|
|
|
339
305
|
onConfirm: de,
|
|
340
306
|
confirmButtonLabel: o._({ id: "a/nTb8" }),
|
|
341
307
|
cancelButtonLabel: o._({ id: "dEgA5A" }),
|
|
342
|
-
disableConfirmButton: r || !
|
|
308
|
+
disableConfirmButton: r || !A,
|
|
343
309
|
closeable: !r,
|
|
344
310
|
closeOnEsc: !r,
|
|
345
311
|
children: [
|
|
346
|
-
r && !a &&
|
|
312
|
+
r && !a && /*#__PURE__*/ K(S, {
|
|
347
313
|
distribution: "center",
|
|
348
314
|
alignment: "center",
|
|
349
315
|
className: "mt-4",
|
|
350
316
|
children: [
|
|
351
|
-
|
|
352
|
-
!i &&
|
|
353
|
-
i &&
|
|
317
|
+
/*#__PURE__*/ G(s, { variant: "primary" }),
|
|
318
|
+
!i && /*#__PURE__*/ G(X, { id: "98Fs4G" }),
|
|
319
|
+
i && /*#__PURE__*/ G(X, { id: "3q1GLx" })
|
|
354
320
|
]
|
|
355
321
|
}),
|
|
356
|
-
r && !!a &&
|
|
322
|
+
r && !!a && /*#__PURE__*/ G("div", {
|
|
357
323
|
className: "bg-neutral-quaternary mt-4 w-full rounded-full",
|
|
358
|
-
children:
|
|
324
|
+
children: /*#__PURE__*/ K("div", {
|
|
359
325
|
className: "bg-theme-info flex h-4 items-center justify-center rounded-full p-0.5 text-center text-xs leading-none font-medium text-white",
|
|
360
326
|
style: { width: `${a}%` },
|
|
361
327
|
children: [a, "%"]
|
|
362
328
|
})
|
|
363
329
|
}),
|
|
364
|
-
!r &&
|
|
330
|
+
!r && /*#__PURE__*/ K(p, {
|
|
365
331
|
className: "mb-6",
|
|
366
332
|
children: [
|
|
367
|
-
|
|
333
|
+
O && /*#__PURE__*/ G(w, {
|
|
368
334
|
variant: "error",
|
|
369
335
|
className: "mb-6",
|
|
370
|
-
children:
|
|
336
|
+
children: O
|
|
371
337
|
}),
|
|
372
|
-
|
|
338
|
+
/*#__PURE__*/ G(ee, {
|
|
373
339
|
className: "mb-6",
|
|
374
|
-
children:
|
|
340
|
+
children: /*#__PURE__*/ G(y, { children: /*#__PURE__*/ K("div", {
|
|
375
341
|
className: "w-full",
|
|
376
342
|
children: [
|
|
377
|
-
|
|
343
|
+
/*#__PURE__*/ K("label", {
|
|
378
344
|
htmlFor: "image-file",
|
|
379
345
|
className: "mb-2 block text-sm font-medium text-gray-900",
|
|
380
|
-
children: [o._({ id: "UKwOYH" }),
|
|
346
|
+
children: [o._({ id: "UKwOYH" }), /*#__PURE__*/ G("span", {
|
|
381
347
|
className: "ml-1 text-red-500",
|
|
382
348
|
children: "*"
|
|
383
349
|
})]
|
|
384
350
|
}),
|
|
385
|
-
|
|
351
|
+
/*#__PURE__*/ G("div", {
|
|
386
352
|
className: "flex w-full items-center justify-center",
|
|
387
|
-
children:
|
|
353
|
+
children: /*#__PURE__*/ K("label", {
|
|
388
354
|
htmlFor: "image-file",
|
|
389
|
-
onDragOver:
|
|
355
|
+
onDragOver: se,
|
|
390
356
|
onDragLeave: B,
|
|
391
357
|
onDrop: ce,
|
|
392
|
-
className:
|
|
393
|
-
children: [
|
|
358
|
+
className: re("flex h-24 w-full cursor-pointer flex-col items-center justify-center rounded-lg border-2 border-dashed transition-all", E ? "border-blue-500 bg-blue-50" : "border-gray-300 bg-gray-50 hover:bg-gray-100"),
|
|
359
|
+
children: [/*#__PURE__*/ K("div", {
|
|
394
360
|
className: "flex flex-col items-center justify-center pt-3 pb-3",
|
|
395
361
|
children: [
|
|
396
|
-
|
|
397
|
-
className:
|
|
362
|
+
/*#__PURE__*/ G("svg", {
|
|
363
|
+
className: re("mb-1 h-6 w-6 transition-colors", E ? "text-blue-500" : "text-gray-500"),
|
|
398
364
|
"aria-hidden": "true",
|
|
399
365
|
xmlns: "http://www.w3.org/2000/svg",
|
|
400
366
|
fill: "none",
|
|
401
367
|
viewBox: "0 0 20 16",
|
|
402
|
-
children:
|
|
368
|
+
children: /*#__PURE__*/ G("path", {
|
|
403
369
|
stroke: "currentColor",
|
|
404
370
|
strokeLinecap: "round",
|
|
405
371
|
strokeLinejoin: "round",
|
|
@@ -407,10 +373,10 @@ var qe = {
|
|
|
407
373
|
d: "M13 13h3a3 3 0 0 0 0-6h-.025A5.56 5.56 0 0 0 16 5.5 5.5 5.5 0 0 0 5.207 5.021C5.137 5.017 5.071 5 5 5a4 4 0 0 0 0 8h2.167M10 15V6m0 0L8 8m2-2 2 2"
|
|
408
374
|
})
|
|
409
375
|
}),
|
|
410
|
-
|
|
411
|
-
className:
|
|
412
|
-
children: E ?
|
|
413
|
-
|
|
376
|
+
/*#__PURE__*/ G("p", {
|
|
377
|
+
className: re("text-xs transition-colors", E ? "font-semibold text-blue-600" : "text-gray-500"),
|
|
378
|
+
children: E ? /*#__PURE__*/ G("span", { children: o._({ id: "vXmL4D" }) }) : /*#__PURE__*/ K(W, { children: [
|
|
379
|
+
/*#__PURE__*/ G("span", {
|
|
414
380
|
className: "font-semibold",
|
|
415
381
|
children: o._({ id: "gYe+hC" })
|
|
416
382
|
}),
|
|
@@ -418,39 +384,39 @@ var qe = {
|
|
|
418
384
|
o._({ id: "Np28ib" })
|
|
419
385
|
] })
|
|
420
386
|
}),
|
|
421
|
-
|
|
387
|
+
/*#__PURE__*/ G("p", {
|
|
422
388
|
className: "text-xs text-gray-400",
|
|
423
389
|
children: o._({ id: "jBIkmi" })
|
|
424
390
|
})
|
|
425
391
|
]
|
|
426
|
-
}),
|
|
392
|
+
}), /*#__PURE__*/ G("input", {
|
|
427
393
|
id: "image-file",
|
|
428
394
|
type: "file",
|
|
429
395
|
className: "hidden",
|
|
430
|
-
onChange:
|
|
431
|
-
accept:
|
|
396
|
+
onChange: z,
|
|
397
|
+
accept: ie,
|
|
432
398
|
disabled: r
|
|
433
399
|
})]
|
|
434
400
|
})
|
|
435
401
|
}),
|
|
436
|
-
_ &&
|
|
402
|
+
_ && /*#__PURE__*/ K("div", {
|
|
437
403
|
className: "mt-2 flex items-center justify-between rounded-lg border border-green-200 bg-green-50 p-2 text-xs",
|
|
438
|
-
children: [
|
|
404
|
+
children: [/*#__PURE__*/ K("div", {
|
|
439
405
|
className: "flex items-center",
|
|
440
|
-
children: [
|
|
406
|
+
children: [/*#__PURE__*/ G("svg", {
|
|
441
407
|
className: "mr-2 h-4 w-4 text-green-600",
|
|
442
408
|
fill: "currentColor",
|
|
443
409
|
viewBox: "0 0 20 20",
|
|
444
|
-
children:
|
|
410
|
+
children: /*#__PURE__*/ G("path", {
|
|
445
411
|
fillRule: "evenodd",
|
|
446
412
|
d: "M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",
|
|
447
413
|
clipRule: "evenodd"
|
|
448
414
|
})
|
|
449
|
-
}),
|
|
415
|
+
}), /*#__PURE__*/ G("span", {
|
|
450
416
|
className: "text-gray-700",
|
|
451
417
|
children: _.name
|
|
452
418
|
})]
|
|
453
|
-
}),
|
|
419
|
+
}), /*#__PURE__*/ G("button", {
|
|
454
420
|
type: "button",
|
|
455
421
|
onClick: () => {
|
|
456
422
|
v(null), b.file && x((e) => {
|
|
@@ -463,24 +429,24 @@ var qe = {
|
|
|
463
429
|
children: o._({ id: "t/YqKh" })
|
|
464
430
|
})]
|
|
465
431
|
}),
|
|
466
|
-
b.file &&
|
|
432
|
+
b.file && /*#__PURE__*/ G("p", {
|
|
467
433
|
className: "text-theme-error mt-1 text-xs text-red-600",
|
|
468
434
|
children: b.file
|
|
469
435
|
})
|
|
470
436
|
]
|
|
471
437
|
}) })
|
|
472
438
|
}),
|
|
473
|
-
|
|
439
|
+
/*#__PURE__*/ K(ee, {
|
|
474
440
|
className: "mb-6",
|
|
475
441
|
children: [
|
|
476
|
-
|
|
442
|
+
/*#__PURE__*/ G(y, {
|
|
477
443
|
className: "mb-6",
|
|
478
|
-
children:
|
|
444
|
+
children: /*#__PURE__*/ G(l, {
|
|
479
445
|
id: "name",
|
|
480
446
|
name: "name",
|
|
481
447
|
label: o._({ id: "ExLULX" }),
|
|
482
448
|
value: u.name,
|
|
483
|
-
onChange:
|
|
449
|
+
onChange: ae,
|
|
484
450
|
onBlur: oe,
|
|
485
451
|
required: !0,
|
|
486
452
|
errortext: b.name,
|
|
@@ -488,17 +454,17 @@ var qe = {
|
|
|
488
454
|
disabled: r
|
|
489
455
|
})
|
|
490
456
|
}),
|
|
491
|
-
|
|
457
|
+
/*#__PURE__*/ G(y, {
|
|
492
458
|
className: "mb-6",
|
|
493
|
-
children:
|
|
459
|
+
children: /*#__PURE__*/ K("div", {
|
|
494
460
|
className: "w-full",
|
|
495
|
-
children: [
|
|
461
|
+
children: [/*#__PURE__*/ K(S, {
|
|
496
462
|
gap: "1",
|
|
497
463
|
direction: "horizontal",
|
|
498
464
|
alignment: "start",
|
|
499
|
-
children: [
|
|
465
|
+
children: [/*#__PURE__*/ G("div", {
|
|
500
466
|
className: "flex-1",
|
|
501
|
-
children:
|
|
467
|
+
children: /*#__PURE__*/ G(l, {
|
|
502
468
|
id: "tags",
|
|
503
469
|
name: "tags",
|
|
504
470
|
label: o._({ id: "OYHzN1" }),
|
|
@@ -509,18 +475,18 @@ var qe = {
|
|
|
509
475
|
placeholder: o._({ id: "tmpGvt" }),
|
|
510
476
|
disabled: r
|
|
511
477
|
})
|
|
512
|
-
}),
|
|
478
|
+
}), /*#__PURE__*/ G(m, {
|
|
513
479
|
variant: "primary",
|
|
514
480
|
onClick: V,
|
|
515
481
|
disabled: r || f.trim() === "",
|
|
516
|
-
children:
|
|
482
|
+
children: /*#__PURE__*/ G(X, { id: "m16xKo" })
|
|
517
483
|
})]
|
|
518
|
-
}), u.tags.length > 0 &&
|
|
484
|
+
}), u.tags.length > 0 && /*#__PURE__*/ G(S, {
|
|
519
485
|
gap: "1",
|
|
520
486
|
wrap: !0,
|
|
521
487
|
alignment: "center",
|
|
522
488
|
className: "mt-1",
|
|
523
|
-
children: u.tags.map((e) =>
|
|
489
|
+
children: u.tags.map((e) => /*#__PURE__*/ G(ne, {
|
|
524
490
|
closeable: !0,
|
|
525
491
|
pillKey: "",
|
|
526
492
|
pillValue: e,
|
|
@@ -529,9 +495,9 @@ var qe = {
|
|
|
529
495
|
})]
|
|
530
496
|
})
|
|
531
497
|
}),
|
|
532
|
-
|
|
498
|
+
/*#__PURE__*/ G(y, {
|
|
533
499
|
className: "mb-6",
|
|
534
|
-
children:
|
|
500
|
+
children: /*#__PURE__*/ K(T, {
|
|
535
501
|
id: "visibility",
|
|
536
502
|
name: "visibility",
|
|
537
503
|
label: o._({ id: "2q/Q7x" }),
|
|
@@ -540,35 +506,35 @@ var qe = {
|
|
|
540
506
|
disabled: r,
|
|
541
507
|
loading: r,
|
|
542
508
|
children: [
|
|
543
|
-
|
|
509
|
+
/*#__PURE__*/ G(h, {
|
|
544
510
|
value: R.PUBLIC,
|
|
545
511
|
label: o._({ id: "7d1a0d" })
|
|
546
512
|
}),
|
|
547
|
-
|
|
513
|
+
/*#__PURE__*/ G(h, {
|
|
548
514
|
value: R.PRIVATE,
|
|
549
515
|
label: o._({ id: "zwBp5t" })
|
|
550
516
|
}),
|
|
551
|
-
|
|
517
|
+
/*#__PURE__*/ G(h, {
|
|
552
518
|
value: R.SHARED,
|
|
553
519
|
label: o._({ id: "0Gd0NU" })
|
|
554
520
|
}),
|
|
555
|
-
|
|
521
|
+
/*#__PURE__*/ G(h, {
|
|
556
522
|
value: R.COMMUNITY,
|
|
557
523
|
label: o._({ id: "chL5IG" })
|
|
558
524
|
})
|
|
559
525
|
]
|
|
560
526
|
})
|
|
561
527
|
}),
|
|
562
|
-
|
|
528
|
+
/*#__PURE__*/ G(y, {
|
|
563
529
|
className: "mb-6",
|
|
564
|
-
children:
|
|
530
|
+
children: /*#__PURE__*/ K(S, {
|
|
565
531
|
direction: "horizontal",
|
|
566
532
|
gap: "3",
|
|
567
533
|
distribution: "evenly",
|
|
568
534
|
className: "w-full",
|
|
569
|
-
children: [
|
|
535
|
+
children: [/*#__PURE__*/ G("div", {
|
|
570
536
|
className: "flex-1",
|
|
571
|
-
children:
|
|
537
|
+
children: /*#__PURE__*/ K(T, {
|
|
572
538
|
id: "disk_format",
|
|
573
539
|
name: "disk_format",
|
|
574
540
|
label: o._({ id: "NopYGU" }),
|
|
@@ -579,65 +545,65 @@ var qe = {
|
|
|
579
545
|
required: !0,
|
|
580
546
|
errortext: b.disk_format,
|
|
581
547
|
children: [
|
|
582
|
-
|
|
583
|
-
value:
|
|
548
|
+
/*#__PURE__*/ G(h, {
|
|
549
|
+
value: F.QCOW2,
|
|
584
550
|
label: "QCOW2 - QEMU Emulator"
|
|
585
551
|
}),
|
|
586
|
-
|
|
587
|
-
value:
|
|
552
|
+
/*#__PURE__*/ G(h, {
|
|
553
|
+
value: F.RAW,
|
|
588
554
|
label: "Raw"
|
|
589
555
|
}),
|
|
590
|
-
|
|
591
|
-
value:
|
|
556
|
+
/*#__PURE__*/ G(h, {
|
|
557
|
+
value: F.VMDK,
|
|
592
558
|
label: "VMDK - Virtual Machine Disk"
|
|
593
559
|
}),
|
|
594
|
-
|
|
595
|
-
value:
|
|
560
|
+
/*#__PURE__*/ G(h, {
|
|
561
|
+
value: F.VHD,
|
|
596
562
|
label: "VHD - Virtual Hard Disk"
|
|
597
563
|
}),
|
|
598
|
-
|
|
599
|
-
value:
|
|
564
|
+
/*#__PURE__*/ G(h, {
|
|
565
|
+
value: F.VHDX,
|
|
600
566
|
label: "VHDX - Virtual Hard Disk Extended"
|
|
601
567
|
}),
|
|
602
|
-
|
|
603
|
-
value:
|
|
568
|
+
/*#__PURE__*/ G(h, {
|
|
569
|
+
value: F.VDI,
|
|
604
570
|
label: "VDI - Virtual Disk Image"
|
|
605
571
|
}),
|
|
606
|
-
|
|
607
|
-
value:
|
|
572
|
+
/*#__PURE__*/ G(h, {
|
|
573
|
+
value: F.AMI,
|
|
608
574
|
label: "AMI - Amazon Machine Image"
|
|
609
575
|
}),
|
|
610
|
-
|
|
611
|
-
value:
|
|
576
|
+
/*#__PURE__*/ G(h, {
|
|
577
|
+
value: F.ARI,
|
|
612
578
|
label: "ARI - Amazon Ramdisk Image"
|
|
613
579
|
}),
|
|
614
|
-
|
|
615
|
-
value:
|
|
580
|
+
/*#__PURE__*/ G(h, {
|
|
581
|
+
value: F.AKI,
|
|
616
582
|
label: "AKI - Amazon Kernel Image"
|
|
617
583
|
}),
|
|
618
|
-
|
|
619
|
-
value:
|
|
584
|
+
/*#__PURE__*/ G(h, {
|
|
585
|
+
value: F.ISO,
|
|
620
586
|
label: "ISO - Optical Disk Image"
|
|
621
587
|
}),
|
|
622
|
-
|
|
623
|
-
value:
|
|
588
|
+
/*#__PURE__*/ G(h, {
|
|
589
|
+
value: F.PLOOP,
|
|
624
590
|
label: "PLOOP - Virtuozzo/Parallels Loopback Disk"
|
|
625
591
|
})
|
|
626
592
|
]
|
|
627
593
|
})
|
|
628
|
-
}),
|
|
594
|
+
}), /*#__PURE__*/ G("div", {
|
|
629
595
|
className: "flex-1",
|
|
630
|
-
children:
|
|
596
|
+
children: /*#__PURE__*/ G(T, {
|
|
631
597
|
id: "container_format",
|
|
632
598
|
name: "container_format",
|
|
633
599
|
label: o._({ id: "6/xipy" }),
|
|
634
600
|
value: u.container_format,
|
|
635
601
|
onChange: (e) => N("container_format", e),
|
|
636
|
-
disabled: r || !u.disk_format || !
|
|
602
|
+
disabled: r || !u.disk_format || !j.length,
|
|
637
603
|
required: !0,
|
|
638
604
|
errortext: b.container_format,
|
|
639
|
-
helptext: !
|
|
640
|
-
children:
|
|
605
|
+
helptext: !j.length && o._({ id: "A7CVME" }),
|
|
606
|
+
children: j.map((e) => /*#__PURE__*/ G(h, {
|
|
641
607
|
value: e,
|
|
642
608
|
label: e.toUpperCase()
|
|
643
609
|
}, e))
|
|
@@ -645,53 +611,53 @@ var qe = {
|
|
|
645
611
|
})]
|
|
646
612
|
})
|
|
647
613
|
}),
|
|
648
|
-
|
|
614
|
+
/*#__PURE__*/ G(y, {
|
|
649
615
|
className: "mb-0",
|
|
650
|
-
children:
|
|
616
|
+
children: /*#__PURE__*/ G(te, {
|
|
651
617
|
id: "protected",
|
|
652
618
|
name: "protected",
|
|
653
619
|
label: o._({ id: "644xgx" }),
|
|
654
620
|
checked: u.protected,
|
|
655
|
-
onChange:
|
|
621
|
+
onChange: ae,
|
|
656
622
|
helptext: o._({ id: "aV6KPH" }),
|
|
657
623
|
disabled: r
|
|
658
624
|
})
|
|
659
625
|
})
|
|
660
626
|
]
|
|
661
627
|
}),
|
|
662
|
-
|
|
628
|
+
/*#__PURE__*/ G(ee, {
|
|
663
629
|
className: "mb-6",
|
|
664
|
-
children:
|
|
630
|
+
children: /*#__PURE__*/ G(y, {
|
|
665
631
|
className: "mb-0",
|
|
666
|
-
children:
|
|
632
|
+
children: /*#__PURE__*/ K(S, {
|
|
667
633
|
direction: "horizontal",
|
|
668
634
|
gap: "3",
|
|
669
635
|
distribution: "evenly",
|
|
670
636
|
className: "w-full",
|
|
671
|
-
children: [
|
|
637
|
+
children: [/*#__PURE__*/ G("div", {
|
|
672
638
|
className: "flex-1",
|
|
673
|
-
children:
|
|
639
|
+
children: /*#__PURE__*/ G(l, {
|
|
674
640
|
id: "min_disk",
|
|
675
641
|
name: "min_disk",
|
|
676
642
|
label: o._({ id: "NixRmA" }),
|
|
677
643
|
type: "number",
|
|
678
644
|
value: String(u.min_disk),
|
|
679
645
|
onChange: (e) => P("min_disk", e.target.value),
|
|
680
|
-
onBlur: () =>
|
|
646
|
+
onBlur: () => I("min_disk", u.min_disk),
|
|
681
647
|
helptext: o._({ id: "4fh0Wj" }),
|
|
682
648
|
errortext: b.min_disk,
|
|
683
649
|
disabled: r
|
|
684
650
|
})
|
|
685
|
-
}),
|
|
651
|
+
}), /*#__PURE__*/ G("div", {
|
|
686
652
|
className: "flex-1",
|
|
687
|
-
children:
|
|
653
|
+
children: /*#__PURE__*/ G(l, {
|
|
688
654
|
id: "min_ram",
|
|
689
655
|
name: "min_ram",
|
|
690
656
|
label: o._({ id: "CgZxr7" }),
|
|
691
657
|
type: "number",
|
|
692
658
|
value: String(u.min_ram),
|
|
693
659
|
onChange: (e) => P("min_ram", e.target.value),
|
|
694
|
-
onBlur: () =>
|
|
660
|
+
onBlur: () => I("min_ram", u.min_ram),
|
|
695
661
|
helptext: o._({ id: "KsIM0b" }),
|
|
696
662
|
errortext: b.min_ram,
|
|
697
663
|
disabled: r
|
|
@@ -706,93 +672,93 @@ var qe = {
|
|
|
706
672
|
});
|
|
707
673
|
}, Ye = ({ deletableImages: t, protectedImages: n, isOpen: r, isLoading: i, onClose: a, onDelete: o }) => {
|
|
708
674
|
let { i18n: c, _: l } = Z(), u = t.length, d = n.length;
|
|
709
|
-
return
|
|
675
|
+
return /*#__PURE__*/ K(C, {
|
|
710
676
|
onCancel: a,
|
|
711
677
|
size: "small",
|
|
712
678
|
title: c._({ id: "JtHgVz" }),
|
|
713
679
|
open: r,
|
|
714
|
-
modalFooter:
|
|
680
|
+
modalFooter: /*#__PURE__*/ G(e, {
|
|
715
681
|
className: "flex justify-end",
|
|
716
|
-
children:
|
|
682
|
+
children: /*#__PURE__*/ K(v, { children: [/*#__PURE__*/ G(m, {
|
|
717
683
|
variant: "default",
|
|
718
684
|
onClick: a,
|
|
719
|
-
children:
|
|
720
|
-
}),
|
|
685
|
+
children: /*#__PURE__*/ G(X, { id: "dEgA5A" })
|
|
686
|
+
}), /*#__PURE__*/ G(m, {
|
|
721
687
|
variant: "primary-danger",
|
|
722
688
|
onClick: (e) => {
|
|
723
689
|
e.preventDefault(), o(t);
|
|
724
690
|
},
|
|
725
691
|
disabled: i,
|
|
726
692
|
"data-testid": "delete-image-button",
|
|
727
|
-
children:
|
|
693
|
+
children: /*#__PURE__*/ G(X, { id: "cnGeoo" })
|
|
728
694
|
})] })
|
|
729
695
|
}),
|
|
730
|
-
children: [i &&
|
|
696
|
+
children: [i && /*#__PURE__*/ G(S, {
|
|
731
697
|
distribution: "center",
|
|
732
698
|
alignment: "center",
|
|
733
|
-
children:
|
|
734
|
-
}), !i &&
|
|
699
|
+
children: /*#__PURE__*/ G(s, { variant: "primary" })
|
|
700
|
+
}), !i && /*#__PURE__*/ K("div", {
|
|
735
701
|
className: "my-6",
|
|
736
702
|
children: [
|
|
737
|
-
u > 0 &&
|
|
703
|
+
u > 0 && /*#__PURE__*/ K(W, { children: [/*#__PURE__*/ G(w, {
|
|
738
704
|
text: c._({
|
|
739
705
|
id: "Dh1qvV",
|
|
740
706
|
values: { deletableCount: u }
|
|
741
707
|
}),
|
|
742
708
|
variant: "danger",
|
|
743
709
|
className: "mb-6"
|
|
744
|
-
}),
|
|
710
|
+
}), /*#__PURE__*/ K("div", {
|
|
745
711
|
className: "mb-6",
|
|
746
|
-
children: [
|
|
712
|
+
children: [/*#__PURE__*/ G("h3", {
|
|
747
713
|
className: "jn:text-theme-high mb-3 font-semibold",
|
|
748
|
-
children:
|
|
714
|
+
children: /*#__PURE__*/ G(X, {
|
|
749
715
|
id: "rwBVXS",
|
|
750
716
|
values: { deletableCount: u }
|
|
751
717
|
})
|
|
752
|
-
}),
|
|
718
|
+
}), /*#__PURE__*/ G("div", {
|
|
753
719
|
className: "jn:bg-theme-background-lvl-1 max-h-24 overflow-y-auto rounded p-4",
|
|
754
|
-
children:
|
|
720
|
+
children: /*#__PURE__*/ G("ul", {
|
|
755
721
|
className: "space-y-2",
|
|
756
|
-
children: t.map((e) =>
|
|
722
|
+
children: t.map((e) => /*#__PURE__*/ G("li", {
|
|
757
723
|
className: "jn:text-theme-default font-mono",
|
|
758
724
|
children: e
|
|
759
725
|
}, e))
|
|
760
726
|
})
|
|
761
727
|
})]
|
|
762
728
|
})] }),
|
|
763
|
-
d > 0 &&
|
|
729
|
+
d > 0 && /*#__PURE__*/ K("div", {
|
|
764
730
|
className: "mb-6",
|
|
765
|
-
children: [
|
|
731
|
+
children: [/*#__PURE__*/ G("h3", {
|
|
766
732
|
className: "jn:text-theme-high mb-3 font-semibold",
|
|
767
|
-
children:
|
|
768
|
-
}),
|
|
733
|
+
children: /*#__PURE__*/ G(X, { id: "jtnAf8" })
|
|
734
|
+
}), /*#__PURE__*/ G("div", {
|
|
769
735
|
className: "jn:bg-theme-warning/10 max-h-24 overflow-y-auto rounded border border-yellow-500/20 p-4",
|
|
770
|
-
children:
|
|
736
|
+
children: /*#__PURE__*/ G("ul", {
|
|
771
737
|
className: "space-y-2",
|
|
772
|
-
children: n.map((e) =>
|
|
738
|
+
children: n.map((e) => /*#__PURE__*/ G("li", {
|
|
773
739
|
className: "jn:text-theme-default font-mono",
|
|
774
740
|
children: e
|
|
775
741
|
}, e))
|
|
776
742
|
})
|
|
777
743
|
})]
|
|
778
744
|
}),
|
|
779
|
-
|
|
745
|
+
/*#__PURE__*/ K("div", {
|
|
780
746
|
className: "jn:bg-theme-background-lvl-2 mb-6 rounded p-4",
|
|
781
|
-
children: [u > 0 &&
|
|
747
|
+
children: [u > 0 && /*#__PURE__*/ K("div", {
|
|
782
748
|
className: "mb-2 flex justify-between",
|
|
783
|
-
children: [
|
|
749
|
+
children: [/*#__PURE__*/ G("span", {
|
|
784
750
|
className: "jn:text-theme-default",
|
|
785
|
-
children:
|
|
786
|
-
}),
|
|
751
|
+
children: /*#__PURE__*/ G(X, { id: "MJtNLd" })
|
|
752
|
+
}), /*#__PURE__*/ G("span", {
|
|
787
753
|
className: "jn:text-theme-highest font-semibold",
|
|
788
754
|
children: u
|
|
789
755
|
})]
|
|
790
|
-
}), d > 0 &&
|
|
756
|
+
}), d > 0 && /*#__PURE__*/ K("div", {
|
|
791
757
|
className: "flex justify-between",
|
|
792
|
-
children: [
|
|
758
|
+
children: [/*#__PURE__*/ G("span", {
|
|
793
759
|
className: "jn:text-theme-default",
|
|
794
|
-
children:
|
|
795
|
-
}),
|
|
760
|
+
children: /*#__PURE__*/ G(X, { id: "QxBGbh" })
|
|
761
|
+
}), /*#__PURE__*/ G("span", {
|
|
796
762
|
className: "jn:text-theme-warning font-semibold",
|
|
797
763
|
children: d
|
|
798
764
|
})]
|
|
@@ -805,7 +771,7 @@ var qe = {
|
|
|
805
771
|
let { i18n: o, _: c } = Z(), l = e.length, u = t.length, d = (t) => {
|
|
806
772
|
t.preventDefault(), a(e);
|
|
807
773
|
};
|
|
808
|
-
return
|
|
774
|
+
return /*#__PURE__*/ K(C, {
|
|
809
775
|
onCancel: i,
|
|
810
776
|
size: "small",
|
|
811
777
|
title: o._({ id: "+9CXS9" }),
|
|
@@ -816,72 +782,72 @@ var qe = {
|
|
|
816
782
|
confirmButtonLabel: o._({ id: "5y3O+A" }),
|
|
817
783
|
cancelButtonLabel: o._({ id: "dEgA5A" }),
|
|
818
784
|
disableConfirmButton: r,
|
|
819
|
-
children: [r &&
|
|
785
|
+
children: [r && /*#__PURE__*/ G(S, {
|
|
820
786
|
distribution: "center",
|
|
821
787
|
alignment: "center",
|
|
822
|
-
children:
|
|
823
|
-
}), !r &&
|
|
788
|
+
children: /*#__PURE__*/ G(s, { variant: "primary" })
|
|
789
|
+
}), !r && /*#__PURE__*/ K("div", {
|
|
824
790
|
className: "my-6",
|
|
825
791
|
children: [
|
|
826
|
-
l > 0 &&
|
|
792
|
+
l > 0 && /*#__PURE__*/ K(W, { children: [/*#__PURE__*/ G("p", {
|
|
827
793
|
className: "mb-6",
|
|
828
|
-
children:
|
|
794
|
+
children: /*#__PURE__*/ G(X, {
|
|
829
795
|
id: "zm7+/D",
|
|
830
796
|
values: { activeCount: l },
|
|
831
|
-
components: { 0:
|
|
797
|
+
components: { 0: /*#__PURE__*/ G("strong", {}) }
|
|
832
798
|
})
|
|
833
|
-
}),
|
|
799
|
+
}), /*#__PURE__*/ K("div", {
|
|
834
800
|
className: "mb-6",
|
|
835
|
-
children: [
|
|
801
|
+
children: [/*#__PURE__*/ G("h3", {
|
|
836
802
|
className: "jn:text-theme-high mb-3 font-semibold",
|
|
837
|
-
children:
|
|
803
|
+
children: /*#__PURE__*/ G(X, {
|
|
838
804
|
id: "ryxYVo",
|
|
839
805
|
values: { activeCount: l }
|
|
840
806
|
})
|
|
841
|
-
}),
|
|
807
|
+
}), /*#__PURE__*/ G("div", {
|
|
842
808
|
className: "jn:bg-theme-background-lvl-1 max-h-24 overflow-y-auto rounded p-4",
|
|
843
|
-
children:
|
|
809
|
+
children: /*#__PURE__*/ G("ul", {
|
|
844
810
|
className: "space-y-2",
|
|
845
|
-
children: e.map((e) =>
|
|
811
|
+
children: e.map((e) => /*#__PURE__*/ G("li", {
|
|
846
812
|
className: "jn:text-theme-default font-mono",
|
|
847
813
|
children: e
|
|
848
814
|
}, e))
|
|
849
815
|
})
|
|
850
816
|
})]
|
|
851
817
|
})] }),
|
|
852
|
-
u > 0 &&
|
|
818
|
+
u > 0 && /*#__PURE__*/ K("div", {
|
|
853
819
|
className: "mb-6",
|
|
854
|
-
children: [
|
|
820
|
+
children: [/*#__PURE__*/ G("h3", {
|
|
855
821
|
className: "jn:text-theme-high mb-3 font-semibold",
|
|
856
|
-
children:
|
|
857
|
-
}),
|
|
822
|
+
children: /*#__PURE__*/ G(X, { id: "JpZn1L" })
|
|
823
|
+
}), /*#__PURE__*/ G("div", {
|
|
858
824
|
className: "jn:bg-theme-background-lvl-1 max-h-24 overflow-y-auto rounded p-4",
|
|
859
|
-
children:
|
|
825
|
+
children: /*#__PURE__*/ G("ul", {
|
|
860
826
|
className: "space-y-2",
|
|
861
|
-
children: t.map((e) =>
|
|
827
|
+
children: t.map((e) => /*#__PURE__*/ G("li", {
|
|
862
828
|
className: "jn:text-theme-default font-mono",
|
|
863
829
|
children: e
|
|
864
830
|
}, e))
|
|
865
831
|
})
|
|
866
832
|
})]
|
|
867
833
|
}),
|
|
868
|
-
|
|
834
|
+
/*#__PURE__*/ K("div", {
|
|
869
835
|
className: "jn:bg-theme-background-lvl-2 mb-6 rounded p-4",
|
|
870
|
-
children: [l > 0 &&
|
|
836
|
+
children: [l > 0 && /*#__PURE__*/ K("div", {
|
|
871
837
|
className: "mb-2 flex justify-between",
|
|
872
|
-
children: [
|
|
838
|
+
children: [/*#__PURE__*/ G("span", {
|
|
873
839
|
className: "jn:text-theme-default",
|
|
874
|
-
children:
|
|
875
|
-
}),
|
|
840
|
+
children: /*#__PURE__*/ G(X, { id: "rD9yV1" })
|
|
841
|
+
}), /*#__PURE__*/ G("span", {
|
|
876
842
|
className: "jn:text-theme-highest font-semibold",
|
|
877
843
|
children: l
|
|
878
844
|
})]
|
|
879
|
-
}), u > 0 &&
|
|
845
|
+
}), u > 0 && /*#__PURE__*/ K("div", {
|
|
880
846
|
className: "flex justify-between",
|
|
881
|
-
children: [
|
|
847
|
+
children: [/*#__PURE__*/ G("span", {
|
|
882
848
|
className: "jn:text-theme-default",
|
|
883
|
-
children:
|
|
884
|
-
}),
|
|
849
|
+
children: /*#__PURE__*/ G(X, { id: "NH2fsP" })
|
|
850
|
+
}), /*#__PURE__*/ G("span", {
|
|
885
851
|
className: "jn:text-theme-warning font-semibold",
|
|
886
852
|
children: u
|
|
887
853
|
})]
|
|
@@ -892,7 +858,7 @@ var qe = {
|
|
|
892
858
|
});
|
|
893
859
|
}, Ze = ({ deactivatedImages: e, activeImages: t, isOpen: n, isLoading: r, onClose: i, onActivate: a }) => {
|
|
894
860
|
let { i18n: o, _: c } = Z(), l = e.length, u = t.length;
|
|
895
|
-
return
|
|
861
|
+
return /*#__PURE__*/ K(C, {
|
|
896
862
|
onCancel: i,
|
|
897
863
|
size: "small",
|
|
898
864
|
title: o._({ id: "UdcGJu" }),
|
|
@@ -903,72 +869,72 @@ var qe = {
|
|
|
903
869
|
confirmButtonLabel: o._({ id: "FQBaXG" }),
|
|
904
870
|
cancelButtonLabel: o._({ id: "dEgA5A" }),
|
|
905
871
|
disableConfirmButton: r,
|
|
906
|
-
children: [r &&
|
|
872
|
+
children: [r && /*#__PURE__*/ G(S, {
|
|
907
873
|
distribution: "center",
|
|
908
874
|
alignment: "center",
|
|
909
|
-
children:
|
|
910
|
-
}), !r &&
|
|
875
|
+
children: /*#__PURE__*/ G(s, { variant: "primary" })
|
|
876
|
+
}), !r && /*#__PURE__*/ K("div", {
|
|
911
877
|
className: "my-6",
|
|
912
878
|
children: [
|
|
913
|
-
l > 0 &&
|
|
879
|
+
l > 0 && /*#__PURE__*/ K(W, { children: [/*#__PURE__*/ G("p", {
|
|
914
880
|
className: "mb-6",
|
|
915
|
-
children:
|
|
881
|
+
children: /*#__PURE__*/ G(X, {
|
|
916
882
|
id: "MgZyuJ",
|
|
917
883
|
values: { deactivatedCount: l },
|
|
918
|
-
components: { 0:
|
|
884
|
+
components: { 0: /*#__PURE__*/ G("strong", {}) }
|
|
919
885
|
})
|
|
920
|
-
}),
|
|
886
|
+
}), /*#__PURE__*/ K("div", {
|
|
921
887
|
className: "mb-6",
|
|
922
|
-
children: [
|
|
888
|
+
children: [/*#__PURE__*/ G("h3", {
|
|
923
889
|
className: "jn:text-theme-high mb-3 font-semibold",
|
|
924
|
-
children:
|
|
890
|
+
children: /*#__PURE__*/ G(X, {
|
|
925
891
|
id: "shKIZu",
|
|
926
892
|
values: { deactivatedCount: l }
|
|
927
893
|
})
|
|
928
|
-
}),
|
|
894
|
+
}), /*#__PURE__*/ G("div", {
|
|
929
895
|
className: "jn:bg-theme-background-lvl-1 max-h-24 overflow-y-auto rounded p-4",
|
|
930
|
-
children:
|
|
896
|
+
children: /*#__PURE__*/ G("ul", {
|
|
931
897
|
className: "space-y-2",
|
|
932
|
-
children: e.map((e) =>
|
|
898
|
+
children: e.map((e) => /*#__PURE__*/ G("li", {
|
|
933
899
|
className: "jn:text-theme-default font-mono",
|
|
934
900
|
children: e
|
|
935
901
|
}, e))
|
|
936
902
|
})
|
|
937
903
|
})]
|
|
938
904
|
})] }),
|
|
939
|
-
u > 0 &&
|
|
905
|
+
u > 0 && /*#__PURE__*/ K("div", {
|
|
940
906
|
className: "mb-6",
|
|
941
|
-
children: [
|
|
907
|
+
children: [/*#__PURE__*/ G("h3", {
|
|
942
908
|
className: "jn:text-theme-high mb-3 font-semibold",
|
|
943
|
-
children:
|
|
944
|
-
}),
|
|
909
|
+
children: /*#__PURE__*/ G(X, { id: "pOPvlj" })
|
|
910
|
+
}), /*#__PURE__*/ G("div", {
|
|
945
911
|
className: "jn:bg-theme-warning/10 max-h-24 overflow-y-auto rounded border border-yellow-500/20 p-4",
|
|
946
|
-
children:
|
|
912
|
+
children: /*#__PURE__*/ G("ul", {
|
|
947
913
|
className: "space-y-2",
|
|
948
|
-
children: t.map((e) =>
|
|
914
|
+
children: t.map((e) => /*#__PURE__*/ G("li", {
|
|
949
915
|
className: "jn:text-theme-default font-mono",
|
|
950
916
|
children: e
|
|
951
917
|
}, e))
|
|
952
918
|
})
|
|
953
919
|
})]
|
|
954
920
|
}),
|
|
955
|
-
|
|
921
|
+
/*#__PURE__*/ K("div", {
|
|
956
922
|
className: "jn:bg-theme-background-lvl-2 mb-6 rounded p-4",
|
|
957
|
-
children: [l > 0 &&
|
|
923
|
+
children: [l > 0 && /*#__PURE__*/ K("div", {
|
|
958
924
|
className: "mb-2 flex justify-between",
|
|
959
|
-
children: [
|
|
925
|
+
children: [/*#__PURE__*/ G("span", {
|
|
960
926
|
className: "jn:text-theme-default",
|
|
961
|
-
children:
|
|
962
|
-
}),
|
|
927
|
+
children: /*#__PURE__*/ G(X, { id: "4fvDRe" })
|
|
928
|
+
}), /*#__PURE__*/ G("span", {
|
|
963
929
|
className: "jn:text-theme-highest font-semibold",
|
|
964
930
|
children: l
|
|
965
931
|
})]
|
|
966
|
-
}), u > 0 &&
|
|
932
|
+
}), u > 0 && /*#__PURE__*/ K("div", {
|
|
967
933
|
className: "flex justify-between",
|
|
968
|
-
children: [
|
|
934
|
+
children: [/*#__PURE__*/ G("span", {
|
|
969
935
|
className: "jn:text-theme-default",
|
|
970
|
-
children:
|
|
971
|
-
}),
|
|
936
|
+
children: /*#__PURE__*/ G(X, { id: "x5l/TK" })
|
|
937
|
+
}), /*#__PURE__*/ G("span", {
|
|
972
938
|
className: "jn:text-theme-warning font-semibold",
|
|
973
939
|
children: u
|
|
974
940
|
})]
|
|
@@ -978,7 +944,7 @@ var qe = {
|
|
|
978
944
|
})]
|
|
979
945
|
});
|
|
980
946
|
}, Qe = ({ isOpen: e, onClose: t, image: n, permissions: { canCreateMember: r, canDeleteMember: i } }) => {
|
|
981
|
-
let { i18n: a, _: o } = Z(), s =
|
|
947
|
+
let { i18n: a, _: o } = Z(), s = Oe(), [c, l] = q(null), [u, d] = q(!1), { data: f, isLoading: p } = O.compute.listImageMembers.useQuery({
|
|
982
948
|
project_id: s,
|
|
983
949
|
imageId: n?.id || ""
|
|
984
950
|
}, { enabled: e && !!n?.id }), m = () => {
|
|
@@ -986,7 +952,7 @@ var qe = {
|
|
|
986
952
|
};
|
|
987
953
|
if (!e || !n) return null;
|
|
988
954
|
let h = n.name || n.id;
|
|
989
|
-
return
|
|
955
|
+
return /*#__PURE__*/ G(C, {
|
|
990
956
|
onCancel: m,
|
|
991
957
|
title: a._({
|
|
992
958
|
id: "UQ7Wyv",
|
|
@@ -994,12 +960,12 @@ var qe = {
|
|
|
994
960
|
}),
|
|
995
961
|
open: e,
|
|
996
962
|
size: "xl",
|
|
997
|
-
children:
|
|
963
|
+
children: /*#__PURE__*/ K("div", { children: [c && /*#__PURE__*/ G(w, {
|
|
998
964
|
onDismiss: () => l(null),
|
|
999
965
|
text: c.text,
|
|
1000
966
|
variant: c.type,
|
|
1001
967
|
className: "mb-4"
|
|
1002
|
-
}),
|
|
968
|
+
}), /*#__PURE__*/ G(M, {
|
|
1003
969
|
projectId: s,
|
|
1004
970
|
image: n,
|
|
1005
971
|
imageMembers: f,
|
|
@@ -1014,40 +980,40 @@ var qe = {
|
|
|
1014
980
|
};
|
|
1015
981
|
//#endregion
|
|
1016
982
|
//#region src/client/routes/_auth/projects/$projectId/compute/-components/Images/-components/ImageListView.tsx
|
|
1017
|
-
function $e({ images: e, suggestedImages: t, acceptedImages: n, permissions: c, isFetching: l, currentPage: d = 1, totalPages: f = 1, onPageChange: p, children: m, selectedImages: h, setSelectedImages: g, deleteAllModalOpen: _, setDeleteAllModalOpen: v, deactivateAllModalOpen: y, setDeactivateAllModalOpen: ee, activateAllModalOpen: C, setActivateAllModalOpen:
|
|
1018
|
-
let F =
|
|
983
|
+
function $e({ images: e, suggestedImages: t, acceptedImages: n, permissions: c, isFetching: l, currentPage: d = 1, totalPages: f = 1, onPageChange: p, children: m, selectedImages: h, setSelectedImages: g, deleteAllModalOpen: _, setDeleteAllModalOpen: v, deactivateAllModalOpen: y, setDeactivateAllModalOpen: ee, activateAllModalOpen: C, setActivateAllModalOpen: w, createModalOpen: T, setCreateModalOpen: E, deletableImages: ne, protectedImages: re, activeImages: k, deactivatedImages: A, onImageUpdated: j, onImageDeleted: M, onMemberStatusChanged: N, hasAnyBulkAction: P }) {
|
|
984
|
+
let F = Oe(), [R, H] = q(null), [pe, Ce] = q(!1), [ke, Ae] = q(!1), [je, Me] = q(!1), [Ne, Pe] = q(!1), [Fe, Ie] = q(!1), [Le, Re] = q(!1), [J, Y] = q(null), [Z, Ve] = q(!1), [Ue, We] = q(null), [Ge, Ke] = q(!1), Q = O.useUtils(), qe = O.compute.deleteImage.useMutation({ onSuccess: () => {
|
|
1019
985
|
Q.compute.listImagesWithPagination.invalidate();
|
|
1020
|
-
} }), $e =
|
|
986
|
+
} }), $e = O.compute.deactivateImage.useMutation({ onSuccess: () => {
|
|
1021
987
|
Q.compute.listImagesWithPagination.invalidate(), Q.compute.getImageById.invalidate();
|
|
1022
|
-
} }), et =
|
|
988
|
+
} }), et = O.compute.reactivateImage.useMutation({ onSuccess: () => {
|
|
1023
989
|
Q.compute.listImagesWithPagination.invalidate(), Q.compute.getImageById.invalidate();
|
|
1024
|
-
} }), tt =
|
|
990
|
+
} }), tt = O.compute.deleteImages.useMutation({ onSuccess: () => {
|
|
1025
991
|
Q.compute.listImagesWithPagination.invalidate(), g([]);
|
|
1026
|
-
} }), nt =
|
|
992
|
+
} }), nt = O.compute.activateImages.useMutation({ onSuccess: () => {
|
|
1027
993
|
Q.compute.listImagesWithPagination.invalidate(), g([]);
|
|
1028
|
-
} }), rt =
|
|
994
|
+
} }), rt = O.compute.deactivateImages.useMutation({ onSuccess: () => {
|
|
1029
995
|
Q.compute.listImagesWithPagination.invalidate(), g([]);
|
|
1030
|
-
} }), it =
|
|
996
|
+
} }), it = O.compute.updateImage.useMutation({ onSuccess: (e) => {
|
|
1031
997
|
Q.compute.listImagesWithPagination.invalidate(), Q.compute.getImageById.setData({
|
|
1032
998
|
project_id: F,
|
|
1033
999
|
imageId: e.id
|
|
1034
1000
|
}, e);
|
|
1035
|
-
} }), at =
|
|
1001
|
+
} }), at = O.compute.createImage.useMutation({ onSuccess: () => {
|
|
1036
1002
|
Q.compute.listImagesWithPagination.invalidate();
|
|
1037
|
-
} }), ot =
|
|
1038
|
-
|
|
1039
|
-
} }), { data: st } =
|
|
1003
|
+
} }), ot = O.compute.updateImageVisibility.useMutation({ onSuccess: (e) => {
|
|
1004
|
+
j(e);
|
|
1005
|
+
} }), { data: st } = O.compute.watchUploadProgress.useSubscription({
|
|
1040
1006
|
project_id: F,
|
|
1041
1007
|
uploadId: Ue || ""
|
|
1042
|
-
}, { enabled: !!Ue && Ge }), ct = qe.isPending || $e.isPending || et.isPending || tt.isPending || nt.isPending || rt.isPending || it.isPending, $ = () =>
|
|
1008
|
+
}, { enabled: !!Ue && Ge }), ct = qe.isPending || $e.isPending || et.isPending || tt.isPending || nt.isPending || rt.isPending || it.isPending, $ = () => H(null), lt = async (e, t, n) => {
|
|
1043
1009
|
try {
|
|
1044
1010
|
await ot.mutateAsync({
|
|
1045
1011
|
project_id: F,
|
|
1046
1012
|
imageId: e,
|
|
1047
1013
|
visibility: t
|
|
1048
|
-
}),
|
|
1014
|
+
}), H(Te(n, t, { onDismiss: $ }));
|
|
1049
1015
|
} catch (e) {
|
|
1050
|
-
|
|
1016
|
+
H(ie(n, e?.message || Be._({
|
|
1051
1017
|
id: "J9cmxx",
|
|
1052
1018
|
values: { newVisibility: t }
|
|
1053
1019
|
}), { onDismiss: $ }));
|
|
@@ -1078,58 +1044,58 @@ function $e({ images: e, suggestedImages: t, acceptedImages: n, permissions: c,
|
|
|
1078
1044
|
imageId: t,
|
|
1079
1045
|
operations: r
|
|
1080
1046
|
});
|
|
1081
|
-
return
|
|
1047
|
+
return Ce(!1), H(z(n, { onDismiss: $ })), Y(i), j(i), !0;
|
|
1082
1048
|
} catch (e) {
|
|
1083
1049
|
let { message: t } = e;
|
|
1084
|
-
return
|
|
1050
|
+
return H(Ee(n, t, { onDismiss: $ })), Y(null), !1;
|
|
1085
1051
|
}
|
|
1086
1052
|
}, ft = async (e, t) => {
|
|
1087
1053
|
let n = e.name || "Unnamed";
|
|
1088
1054
|
try {
|
|
1089
|
-
|
|
1055
|
+
Ve(!0);
|
|
1090
1056
|
let r = await at.mutateAsync({
|
|
1091
1057
|
project_id: F,
|
|
1092
1058
|
...e
|
|
1093
1059
|
});
|
|
1094
|
-
We(r.id), Ke(!0), await
|
|
1060
|
+
We(r.id), Ke(!0), await D.compute.uploadImage.mutate(t, { context: { headers: {
|
|
1095
1061
|
"x-project-id": F,
|
|
1096
1062
|
"x-upload-id": r.id,
|
|
1097
1063
|
"x-upload-size": String(t.size)
|
|
1098
|
-
} } }),
|
|
1064
|
+
} } }), H(de(n, { onDismiss: $ })), Q.compute.listImagesWithPagination.invalidate();
|
|
1099
1065
|
} catch (e) {
|
|
1100
|
-
if (e instanceof
|
|
1066
|
+
if (e instanceof ze && e.data.path === "compute.createImage") H(ge(n, e.message, { onDismiss: $ }));
|
|
1101
1067
|
else {
|
|
1102
1068
|
let { message: n } = e;
|
|
1103
|
-
|
|
1069
|
+
H(le(t.name, n, { onDismiss: $ }));
|
|
1104
1070
|
}
|
|
1105
1071
|
} finally {
|
|
1106
|
-
|
|
1072
|
+
Ve(!1), E(!1), Ke(!1), We(null);
|
|
1107
1073
|
}
|
|
1108
1074
|
}, pt = async (e) => {
|
|
1109
|
-
|
|
1075
|
+
Ce(!1), Ae(!1);
|
|
1110
1076
|
let t = e.name || e.id, n = e.id;
|
|
1111
1077
|
try {
|
|
1112
1078
|
await qe.mutateAsync({
|
|
1113
1079
|
project_id: F,
|
|
1114
1080
|
imageId: n
|
|
1115
|
-
}),
|
|
1081
|
+
}), H(De(t, { onDismiss: $ })), M(n);
|
|
1116
1082
|
} catch (e) {
|
|
1117
1083
|
let { message: t } = e;
|
|
1118
|
-
|
|
1084
|
+
H(we(n, t, { onDismiss: $ }));
|
|
1119
1085
|
}
|
|
1120
1086
|
Y(null);
|
|
1121
1087
|
}, mt = async (e) => {
|
|
1122
|
-
e.status ===
|
|
1088
|
+
e.status === I.DEACTIVATED ? (Y(e), Ie(!0)) : (Y(e), Pe(!0));
|
|
1123
1089
|
}, ht = async (e) => {
|
|
1124
1090
|
let t = e.name || e.id, n = e.id;
|
|
1125
1091
|
try {
|
|
1126
1092
|
await et.mutateAsync({
|
|
1127
1093
|
project_id: F,
|
|
1128
1094
|
imageId: n
|
|
1129
|
-
}), Ie(!1), Y(null),
|
|
1095
|
+
}), Ie(!1), Y(null), H(ue(t, { onDismiss: $ }));
|
|
1130
1096
|
} catch (e) {
|
|
1131
1097
|
let { message: t } = e;
|
|
1132
|
-
|
|
1098
|
+
H(ye(n, t, { onDismiss: $ }));
|
|
1133
1099
|
}
|
|
1134
1100
|
}, gt = async (e) => {
|
|
1135
1101
|
let t = e.name || e.id, n = e.id;
|
|
@@ -1137,13 +1103,13 @@ function $e({ images: e, suggestedImages: t, acceptedImages: n, permissions: c,
|
|
|
1137
1103
|
await $e.mutateAsync({
|
|
1138
1104
|
project_id: F,
|
|
1139
1105
|
imageId: n
|
|
1140
|
-
}), Pe(!1), Y(null),
|
|
1106
|
+
}), Pe(!1), Y(null), H(U(t, { onDismiss: $ }));
|
|
1141
1107
|
} catch (e) {
|
|
1142
1108
|
let { message: t } = e;
|
|
1143
|
-
|
|
1109
|
+
H(B(n, t, { onDismiss: $ }));
|
|
1144
1110
|
}
|
|
1145
1111
|
}, _t = (e) => {
|
|
1146
|
-
Y(e),
|
|
1112
|
+
Y(e), Ce(!0);
|
|
1147
1113
|
}, vt = (e) => {
|
|
1148
1114
|
Y(e), Ae(!0);
|
|
1149
1115
|
}, yt = (e) => {
|
|
@@ -1151,43 +1117,43 @@ function $e({ images: e, suggestedImages: t, acceptedImages: n, permissions: c,
|
|
|
1151
1117
|
}, bt = (e) => {
|
|
1152
1118
|
Y(e), Re(!0);
|
|
1153
1119
|
};
|
|
1154
|
-
return ct ?
|
|
1120
|
+
return ct ? /*#__PURE__*/ G("div", {
|
|
1155
1121
|
"data-testid": "loading",
|
|
1156
|
-
children:
|
|
1122
|
+
children: /*#__PURE__*/ G(i, { children: /*#__PURE__*/ G(o, {
|
|
1157
1123
|
colSpan: 3,
|
|
1158
|
-
children:
|
|
1124
|
+
children: /*#__PURE__*/ K(S, {
|
|
1159
1125
|
distribution: "center",
|
|
1160
1126
|
alignment: "center",
|
|
1161
|
-
children: [
|
|
1127
|
+
children: [/*#__PURE__*/ G(s, { variant: "primary" }), /*#__PURE__*/ G(X, { id: "Z3FXyt" })]
|
|
1162
1128
|
})
|
|
1163
1129
|
}) })
|
|
1164
|
-
}) :
|
|
1165
|
-
|
|
1166
|
-
|
|
1130
|
+
}) : /*#__PURE__*/ K(W, { children: [
|
|
1131
|
+
/*#__PURE__*/ G(W, { children: m }),
|
|
1132
|
+
/*#__PURE__*/ K("div", {
|
|
1167
1133
|
className: "relative",
|
|
1168
1134
|
children: [
|
|
1169
|
-
l &&
|
|
1135
|
+
l && /*#__PURE__*/ G("div", {
|
|
1170
1136
|
className: "bg-theme-background-lvl-0/50 absolute inset-0 z-10 flex items-center justify-center backdrop-blur-sm",
|
|
1171
|
-
children:
|
|
1137
|
+
children: /*#__PURE__*/ K(S, {
|
|
1172
1138
|
direction: "vertical",
|
|
1173
1139
|
alignment: "center",
|
|
1174
1140
|
gap: "2",
|
|
1175
|
-
children: [
|
|
1141
|
+
children: [/*#__PURE__*/ G(s, {
|
|
1176
1142
|
variant: "primary",
|
|
1177
1143
|
size: "large"
|
|
1178
|
-
}),
|
|
1144
|
+
}), /*#__PURE__*/ G("span", {
|
|
1179
1145
|
className: "text-theme-high font-medium",
|
|
1180
|
-
children:
|
|
1146
|
+
children: /*#__PURE__*/ G(X, { id: "sihD20" })
|
|
1181
1147
|
})]
|
|
1182
1148
|
})
|
|
1183
1149
|
}),
|
|
1184
|
-
e.length > 0 ?
|
|
1150
|
+
e.length > 0 ? /*#__PURE__*/ K(W, { children: [/*#__PURE__*/ K(u, {
|
|
1185
1151
|
columns: P ? 9 : 8,
|
|
1186
1152
|
minContentColumns: P ? [0, 8] : [7],
|
|
1187
1153
|
className: "images",
|
|
1188
1154
|
"data-testid": "images-table",
|
|
1189
|
-
children: [
|
|
1190
|
-
P &&
|
|
1155
|
+
children: [/*#__PURE__*/ K(i, { children: [
|
|
1156
|
+
P && /*#__PURE__*/ G(r, { children: /*#__PURE__*/ G(te, {
|
|
1191
1157
|
checked: (() => {
|
|
1192
1158
|
let t = e.map((e) => e.id);
|
|
1193
1159
|
return t.length > 0 && t.every((e) => h.includes(e));
|
|
@@ -1197,15 +1163,15 @@ function $e({ images: e, suggestedImages: t, acceptedImages: n, permissions: c,
|
|
|
1197
1163
|
return t.every((e) => h.includes(e)) ? g(h.filter((e) => !t.includes(e))) : g([...new Set([...h, ...t])]);
|
|
1198
1164
|
}
|
|
1199
1165
|
}) }),
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
] }), e.map((e) =>
|
|
1166
|
+
/*#__PURE__*/ G(r, { children: /*#__PURE__*/ G(X, { id: "uAQUqI" }) }),
|
|
1167
|
+
/*#__PURE__*/ G(r, { children: /*#__PURE__*/ G(X, { id: "ExLULX" }) }),
|
|
1168
|
+
/*#__PURE__*/ G(r, { children: /*#__PURE__*/ G(X, { id: "2q/Q7x" }) }),
|
|
1169
|
+
/*#__PURE__*/ G(r, { children: /*#__PURE__*/ G(X, { id: "644xgx" }) }),
|
|
1170
|
+
/*#__PURE__*/ G(r, { children: /*#__PURE__*/ G(X, { id: "Cj2Gtd" }) }),
|
|
1171
|
+
/*#__PURE__*/ G(r, { children: /*#__PURE__*/ G(X, { id: "NopYGU" }) }),
|
|
1172
|
+
/*#__PURE__*/ G(r, { children: /*#__PURE__*/ G(X, { id: "d+F6q9" }) }),
|
|
1173
|
+
/*#__PURE__*/ G(r, {})
|
|
1174
|
+
] }), e.map((e) => /*#__PURE__*/ G(He, {
|
|
1209
1175
|
image: e,
|
|
1210
1176
|
isSelected: h.includes(e.id),
|
|
1211
1177
|
isPending: !!t.find(({ id: t }) => t === e.id),
|
|
@@ -1222,14 +1188,14 @@ function $e({ images: e, suggestedImages: t, acceptedImages: n, permissions: c,
|
|
|
1222
1188
|
},
|
|
1223
1189
|
onActivationStatusChange: mt,
|
|
1224
1190
|
onUpdateVisibility: lt,
|
|
1225
|
-
setToastData:
|
|
1191
|
+
setToastData: H,
|
|
1226
1192
|
uploadId: Ue,
|
|
1227
1193
|
uploadProgressPercent: st?.percent,
|
|
1228
|
-
onMemberStatusChanged:
|
|
1194
|
+
onMemberStatusChanged: N
|
|
1229
1195
|
}, e.id))]
|
|
1230
|
-
}), f > 1 &&
|
|
1196
|
+
}), f > 1 && /*#__PURE__*/ G("div", {
|
|
1231
1197
|
className: "flex justify-center py-4",
|
|
1232
|
-
children:
|
|
1198
|
+
children: /*#__PURE__*/ G(x, {
|
|
1233
1199
|
variant: "input",
|
|
1234
1200
|
currentPage: d,
|
|
1235
1201
|
pages: f,
|
|
@@ -1237,28 +1203,28 @@ function $e({ images: e, suggestedImages: t, acceptedImages: n, permissions: c,
|
|
|
1237
1203
|
onPressNext: () => p?.(Math.min(d + 1, f)),
|
|
1238
1204
|
onSelectChange: (e) => p?.(e)
|
|
1239
1205
|
})
|
|
1240
|
-
})] }) :
|
|
1206
|
+
})] }) : /*#__PURE__*/ G(u, {
|
|
1241
1207
|
columns: 7,
|
|
1242
1208
|
minContentColumns: [0, 6],
|
|
1243
1209
|
className: "images",
|
|
1244
1210
|
"data-testid": "no-images",
|
|
1245
|
-
children:
|
|
1211
|
+
children: /*#__PURE__*/ G(i, { children: /*#__PURE__*/ K(o, {
|
|
1246
1212
|
colSpan: 7,
|
|
1247
|
-
children: [
|
|
1213
|
+
children: [/*#__PURE__*/ G(b, { children: /*#__PURE__*/ G(X, { id: "eYlnXt" }) }), /*#__PURE__*/ G("p", { children: /*#__PURE__*/ G(X, { id: "qvF2D8" }) })]
|
|
1248
1214
|
}) })
|
|
1249
1215
|
}),
|
|
1250
|
-
J &&
|
|
1251
|
-
|
|
1252
|
-
isOpen:
|
|
1216
|
+
J && /*#__PURE__*/ K(W, { children: [
|
|
1217
|
+
/*#__PURE__*/ G(me, {
|
|
1218
|
+
isOpen: pe,
|
|
1253
1219
|
onClose: () => {
|
|
1254
|
-
Y(null),
|
|
1220
|
+
Y(null), Ce(!1);
|
|
1255
1221
|
},
|
|
1256
1222
|
image: J,
|
|
1257
1223
|
onSave: dt,
|
|
1258
1224
|
isLoading: it.isPending
|
|
1259
1225
|
}),
|
|
1260
|
-
|
|
1261
|
-
isOpen:
|
|
1226
|
+
/*#__PURE__*/ G(L, {
|
|
1227
|
+
isOpen: ke,
|
|
1262
1228
|
onClose: () => {
|
|
1263
1229
|
Y(null), Ae(!1);
|
|
1264
1230
|
},
|
|
@@ -1266,7 +1232,7 @@ function $e({ images: e, suggestedImages: t, acceptedImages: n, permissions: c,
|
|
|
1266
1232
|
onSave: dt,
|
|
1267
1233
|
isLoading: it.isPending
|
|
1268
1234
|
}),
|
|
1269
|
-
|
|
1235
|
+
/*#__PURE__*/ G(ae, {
|
|
1270
1236
|
image: J,
|
|
1271
1237
|
isOpen: je,
|
|
1272
1238
|
isLoading: ct,
|
|
@@ -1276,7 +1242,7 @@ function $e({ images: e, suggestedImages: t, acceptedImages: n, permissions: c,
|
|
|
1276
1242
|
},
|
|
1277
1243
|
onDelete: pt
|
|
1278
1244
|
}),
|
|
1279
|
-
|
|
1245
|
+
/*#__PURE__*/ G(se, {
|
|
1280
1246
|
image: J,
|
|
1281
1247
|
isOpen: Ne,
|
|
1282
1248
|
isLoading: $e.isPending,
|
|
@@ -1285,7 +1251,7 @@ function $e({ images: e, suggestedImages: t, acceptedImages: n, permissions: c,
|
|
|
1285
1251
|
},
|
|
1286
1252
|
onDeactivate: gt
|
|
1287
1253
|
}),
|
|
1288
|
-
|
|
1254
|
+
/*#__PURE__*/ G(oe, {
|
|
1289
1255
|
image: J,
|
|
1290
1256
|
isOpen: Fe,
|
|
1291
1257
|
isLoading: et.isPending,
|
|
@@ -1294,7 +1260,7 @@ function $e({ images: e, suggestedImages: t, acceptedImages: n, permissions: c,
|
|
|
1294
1260
|
},
|
|
1295
1261
|
onActivate: ht
|
|
1296
1262
|
}),
|
|
1297
|
-
|
|
1263
|
+
/*#__PURE__*/ G(Qe, {
|
|
1298
1264
|
image: J,
|
|
1299
1265
|
isOpen: Le,
|
|
1300
1266
|
onClose: () => {
|
|
@@ -1303,10 +1269,10 @@ function $e({ images: e, suggestedImages: t, acceptedImages: n, permissions: c,
|
|
|
1303
1269
|
permissions: c
|
|
1304
1270
|
})
|
|
1305
1271
|
] }),
|
|
1306
|
-
|
|
1272
|
+
/*#__PURE__*/ G(Ye, {
|
|
1307
1273
|
isOpen: _,
|
|
1308
1274
|
deletableImages: ne,
|
|
1309
|
-
protectedImages:
|
|
1275
|
+
protectedImages: re,
|
|
1310
1276
|
isLoading: ct,
|
|
1311
1277
|
onClose: () => v(!1),
|
|
1312
1278
|
onDelete: async (e) => {
|
|
@@ -1316,17 +1282,17 @@ function $e({ images: e, suggestedImages: t, acceptedImages: n, permissions: c,
|
|
|
1316
1282
|
project_id: F,
|
|
1317
1283
|
imageIds: e
|
|
1318
1284
|
}), n = t.successful.length, r = t.failed.length, i = e.length;
|
|
1319
|
-
|
|
1285
|
+
H(r === 0 ? he(n, i, { onDismiss: $ }) : n === 0 ? xe(r, i, { onDismiss: $ }) : V(n, r, { onDismiss: $ })), t.successful.length > 0 && M(t.successful);
|
|
1320
1286
|
} catch (t) {
|
|
1321
1287
|
let { message: n } = t;
|
|
1322
|
-
console.log("Bulk delete error: ", n),
|
|
1288
|
+
console.log("Bulk delete error: ", n), H(xe(e.length, e.length, { onDismiss: $ }));
|
|
1323
1289
|
}
|
|
1324
1290
|
}
|
|
1325
1291
|
}),
|
|
1326
|
-
|
|
1292
|
+
/*#__PURE__*/ G(Xe, {
|
|
1327
1293
|
isOpen: y,
|
|
1328
|
-
activeImages:
|
|
1329
|
-
deactivatedImages:
|
|
1294
|
+
activeImages: k,
|
|
1295
|
+
deactivatedImages: A,
|
|
1330
1296
|
isLoading: ct,
|
|
1331
1297
|
onClose: () => ee(!1),
|
|
1332
1298
|
onDeactivate: async (e) => {
|
|
@@ -1336,47 +1302,47 @@ function $e({ images: e, suggestedImages: t, acceptedImages: n, permissions: c,
|
|
|
1336
1302
|
project_id: F,
|
|
1337
1303
|
imageIds: e
|
|
1338
1304
|
}), n = t.successful.length, r = t.failed.length, i = e.length;
|
|
1339
|
-
|
|
1305
|
+
H(r === 0 ? ve(n, i, { onDismiss: $ }) : n === 0 ? fe(r, i, { onDismiss: $ }) : ce(n, r, { onDismiss: $ }));
|
|
1340
1306
|
} catch (t) {
|
|
1341
1307
|
let { message: n } = t;
|
|
1342
|
-
console.log("Bulk deactivate error: ", n),
|
|
1308
|
+
console.log("Bulk deactivate error: ", n), H(fe(e.length, e.length, { onDismiss: $ }));
|
|
1343
1309
|
}
|
|
1344
1310
|
}
|
|
1345
1311
|
}),
|
|
1346
|
-
|
|
1312
|
+
/*#__PURE__*/ G(Ze, {
|
|
1347
1313
|
isOpen: C,
|
|
1348
|
-
deactivatedImages:
|
|
1349
|
-
activeImages:
|
|
1314
|
+
deactivatedImages: A,
|
|
1315
|
+
activeImages: k,
|
|
1350
1316
|
isLoading: ct,
|
|
1351
|
-
onClose: () =>
|
|
1317
|
+
onClose: () => w(!1),
|
|
1352
1318
|
onActivate: async (e) => {
|
|
1353
|
-
|
|
1319
|
+
w(!1);
|
|
1354
1320
|
try {
|
|
1355
1321
|
let t = await nt.mutateAsync({
|
|
1356
1322
|
project_id: F,
|
|
1357
1323
|
imageIds: e
|
|
1358
1324
|
}), n = t.successful.length, r = t.failed.length, i = e.length;
|
|
1359
|
-
|
|
1325
|
+
H(r === 0 ? be(n, i, { onDismiss: $ }) : n === 0 ? Se(r, i, { onDismiss: $ }) : _e(n, r, { onDismiss: $ }));
|
|
1360
1326
|
} catch (t) {
|
|
1361
1327
|
let { message: n } = t;
|
|
1362
|
-
console.log("Bulk activate error: ", n),
|
|
1328
|
+
console.log("Bulk activate error: ", n), H(Se(e.length, e.length, { onDismiss: $ }));
|
|
1363
1329
|
}
|
|
1364
1330
|
}
|
|
1365
1331
|
}),
|
|
1366
|
-
|
|
1367
|
-
isOpen:
|
|
1332
|
+
/*#__PURE__*/ G(Je, {
|
|
1333
|
+
isOpen: T,
|
|
1368
1334
|
onClose: () => {
|
|
1369
1335
|
Ue && Q.compute.listImagesWithPagination.invalidate(), E(!1);
|
|
1370
1336
|
},
|
|
1371
1337
|
onCreate: ft,
|
|
1372
|
-
isLoading: at.isPending || Ge ||
|
|
1338
|
+
isLoading: at.isPending || Ge || Z,
|
|
1373
1339
|
isUploadPending: Ge && !!Ue,
|
|
1374
1340
|
uploadProgressPercent: st?.percent
|
|
1375
1341
|
})
|
|
1376
1342
|
]
|
|
1377
1343
|
}),
|
|
1378
|
-
|
|
1379
|
-
...
|
|
1344
|
+
R && /*#__PURE__*/ G(a, {
|
|
1345
|
+
...R,
|
|
1380
1346
|
className: "border-theme-light fixed top-5 right-5 z-50 rounded-lg border shadow-lg"
|
|
1381
1347
|
})
|
|
1382
1348
|
] });
|
|
@@ -1445,7 +1411,7 @@ var et = (e) => {
|
|
|
1445
1411
|
...it,
|
|
1446
1412
|
images: e
|
|
1447
1413
|
})).catch((e) => {
|
|
1448
|
-
if (e instanceof
|
|
1414
|
+
if (e instanceof ze && e.data?.code === "FORBIDDEN") return {
|
|
1449
1415
|
...it,
|
|
1450
1416
|
listError: e.message
|
|
1451
1417
|
};
|
|
@@ -1460,7 +1426,7 @@ var et = (e) => {
|
|
|
1460
1426
|
...e,
|
|
1461
1427
|
listError: void 0
|
|
1462
1428
|
})).catch((e) => {
|
|
1463
|
-
if (e instanceof
|
|
1429
|
+
if (e instanceof ze && e.data?.code === "FORBIDDEN") return {
|
|
1464
1430
|
...it,
|
|
1465
1431
|
listError: e.message
|
|
1466
1432
|
};
|
|
@@ -1483,18 +1449,18 @@ var et = (e) => {
|
|
|
1483
1449
|
canDeleteMember: i,
|
|
1484
1450
|
canUpdateMember: a ?? !1
|
|
1485
1451
|
})), st = 50;
|
|
1486
|
-
function ct({ imagesPromise: e, imageOverrides: r, deletedImageIds: i, permissionsPromise: a, searchTerm: o, setSearchTerm: s, sortSettings: l, handleSortChange: u, filterSettings: p, handleFilterChange: h, selectedImages: v, setSelectedImages: y, createModalOpen: b, setCreateModalOpen: x, deleteAllModalOpen: ee, setDeleteAllModalOpen: C, deactivateAllModalOpen:
|
|
1487
|
-
let { i18n: N, _: P } = Z(), F =
|
|
1488
|
-
if (
|
|
1489
|
-
let B = F.images.filter((e) => !i.has(e.id)).map((e) => r.get(e.id) ?? e), ce = Math.max(1, Math.ceil(B.length / st)), le = Math.min(
|
|
1490
|
-
|
|
1491
|
-
|
|
1452
|
+
function ct({ imagesPromise: e, imageOverrides: r, deletedImageIds: i, permissionsPromise: a, searchTerm: o, setSearchTerm: s, sortSettings: l, handleSortChange: u, filterSettings: p, handleFilterChange: h, selectedImages: v, setSelectedImages: y, createModalOpen: b, setCreateModalOpen: x, deleteAllModalOpen: ee, setDeleteAllModalOpen: C, deactivateAllModalOpen: w, setDeactivateAllModalOpen: T, activateAllModalOpen: ne, setActivateAllModalOpen: D, memberStatusView: O, setMemberStatusView: re, isFetching: k, currentPage: A, onPageChange: M, onImageUpdated: ie, onImageDeleted: ae, onMemberStatusChanged: oe }) {
|
|
1453
|
+
let { i18n: N, _: P } = Z(), F = Ne(e), L = Ne(a), [R, z] = q(o), se = Le(void 0);
|
|
1454
|
+
if (Fe(() => () => clearTimeout(se.current), []), F.listError) return /*#__PURE__*/ G("p", { children: F.listError });
|
|
1455
|
+
let B = F.images.filter((e) => !i.has(e.id)).map((e) => r.get(e.id) ?? e), ce = Math.max(1, Math.ceil(B.length / st)), le = Math.min(A, ce), V = B.slice((le - 1) * st, le * st);
|
|
1456
|
+
Fe(() => {
|
|
1457
|
+
A !== 1 && A > ce && M(1);
|
|
1492
1458
|
}, [
|
|
1493
1459
|
ce,
|
|
1494
|
-
|
|
1495
|
-
|
|
1460
|
+
A,
|
|
1461
|
+
M
|
|
1496
1462
|
]);
|
|
1497
|
-
let H =
|
|
1463
|
+
let H = O === "pending" || O === "accepted" ? {
|
|
1498
1464
|
...p,
|
|
1499
1465
|
filters: p.filters.filter((e) => e.filterName !== "visibility"),
|
|
1500
1466
|
selectedFilters: (p.selectedFilters || []).filter((e) => e.name !== "visibility")
|
|
@@ -1506,11 +1472,11 @@ function ct({ imagesPromise: e, imageOverrides: r, deletedImageIds: i, permissio
|
|
|
1506
1472
|
return t && t.protected;
|
|
1507
1473
|
}), pe = U.filter((e) => {
|
|
1508
1474
|
let t = B.find((t) => t.id === e);
|
|
1509
|
-
return t && t.status ===
|
|
1475
|
+
return t && t.status === I.ACTIVE;
|
|
1510
1476
|
}), me = U.filter((e) => {
|
|
1511
1477
|
let t = B.find((t) => t.id === e);
|
|
1512
|
-
return t && t.status ===
|
|
1513
|
-
}), he = !
|
|
1478
|
+
return t && t.status === I.DEACTIVATED;
|
|
1479
|
+
}), he = !L.canDelete || U.length === 0 || B.filter((e) => U.includes(e.id)).every((e) => e.protected), ge = !L.canUpdate || U.length === 0 || B.filter((e) => U.includes(e.id)).every((e) => e.status === I.DEACTIVATED), _e = !L.canUpdate || U.length === 0 || B.filter((e) => U.includes(e.id)).every((e) => e.status === I.ACTIVE), ve = {
|
|
1514
1480
|
items: [
|
|
1515
1481
|
{
|
|
1516
1482
|
label: N._({ id: "SFo0kK" }),
|
|
@@ -1525,25 +1491,25 @@ function ct({ imagesPromise: e, imageOverrides: r, deletedImageIds: i, permissio
|
|
|
1525
1491
|
value: "pending"
|
|
1526
1492
|
}
|
|
1527
1493
|
],
|
|
1528
|
-
activeItem:
|
|
1529
|
-
onActiveItemChange: (e) =>
|
|
1494
|
+
activeItem: O,
|
|
1495
|
+
onActiveItemChange: (e) => re(e)
|
|
1530
1496
|
};
|
|
1531
|
-
return
|
|
1532
|
-
|
|
1497
|
+
return /*#__PURE__*/ K(W, { children: [
|
|
1498
|
+
/*#__PURE__*/ K(S, {
|
|
1533
1499
|
distribution: "between",
|
|
1534
1500
|
alignment: "center",
|
|
1535
1501
|
gap: "2",
|
|
1536
|
-
children: [
|
|
1537
|
-
activeItem:
|
|
1502
|
+
children: [/*#__PURE__*/ G(f, {
|
|
1503
|
+
activeItem: O,
|
|
1538
1504
|
onActiveItemChange: ve.onActiveItemChange,
|
|
1539
|
-
children: ve.items.map((e) =>
|
|
1505
|
+
children: ve.items.map((e) => /*#__PURE__*/ G(E, {
|
|
1540
1506
|
label: e.label,
|
|
1541
1507
|
value: e.value
|
|
1542
1508
|
}, e.value))
|
|
1543
|
-
}),
|
|
1509
|
+
}), /*#__PURE__*/ K(S, {
|
|
1544
1510
|
gap: "0.5",
|
|
1545
1511
|
alignment: "center",
|
|
1546
|
-
children: [
|
|
1512
|
+
children: [/*#__PURE__*/ G(j, {
|
|
1547
1513
|
options: l.options,
|
|
1548
1514
|
sortBy: l.sortBy,
|
|
1549
1515
|
sortDirection: l.sortDirection ?? "desc",
|
|
@@ -1556,20 +1522,20 @@ function ct({ imagesPromise: e, imageOverrides: r, deletedImageIds: i, permissio
|
|
|
1556
1522
|
...l,
|
|
1557
1523
|
sortDirection: e
|
|
1558
1524
|
})
|
|
1559
|
-
}),
|
|
1525
|
+
}), L.canCreate && /*#__PURE__*/ G(m, {
|
|
1560
1526
|
onClick: () => x(!0),
|
|
1561
1527
|
variant: "primary",
|
|
1562
|
-
children:
|
|
1528
|
+
children: /*#__PURE__*/ G(X, { id: "a/nTb8" })
|
|
1563
1529
|
})]
|
|
1564
1530
|
})]
|
|
1565
1531
|
}),
|
|
1566
|
-
|
|
1532
|
+
/*#__PURE__*/ G(t, { children: /*#__PURE__*/ K(S, {
|
|
1567
1533
|
direction: "vertical",
|
|
1568
1534
|
gap: "2",
|
|
1569
|
-
children: [
|
|
1535
|
+
children: [/*#__PURE__*/ K(S, {
|
|
1570
1536
|
distribution: "between",
|
|
1571
1537
|
alignment: "center",
|
|
1572
|
-
children: [
|
|
1538
|
+
children: [/*#__PURE__*/ G(Ae, {
|
|
1573
1539
|
filters: H.filters,
|
|
1574
1540
|
onChange: (e) => {
|
|
1575
1541
|
let t = nt(H.selectedFilters || [], e, H.filters);
|
|
@@ -1578,22 +1544,22 @@ function ct({ imagesPromise: e, imageOverrides: r, deletedImageIds: i, permissio
|
|
|
1578
1544
|
selectedFilters: t
|
|
1579
1545
|
});
|
|
1580
1546
|
}
|
|
1581
|
-
}),
|
|
1547
|
+
}), /*#__PURE__*/ G(_, {
|
|
1582
1548
|
placeholder: N._({ id: "0cl0a5" }),
|
|
1583
1549
|
"data-testid": "searchbar",
|
|
1584
|
-
value:
|
|
1550
|
+
value: R,
|
|
1585
1551
|
onInput: (e) => {
|
|
1586
1552
|
let t = e.currentTarget.value;
|
|
1587
|
-
|
|
1553
|
+
z(t), clearTimeout(se.current), se.current = window.setTimeout(() => s(t), 500);
|
|
1588
1554
|
},
|
|
1589
1555
|
onSearch: (e) => {
|
|
1590
|
-
clearTimeout(
|
|
1556
|
+
clearTimeout(se.current), s(typeof e == "string" ? e : "");
|
|
1591
1557
|
},
|
|
1592
1558
|
onClear: () => {
|
|
1593
|
-
clearTimeout(
|
|
1559
|
+
clearTimeout(se.current), z(""), s("");
|
|
1594
1560
|
}
|
|
1595
1561
|
})]
|
|
1596
|
-
}), H.selectedFilters && H.selectedFilters.length > 0 &&
|
|
1562
|
+
}), H.selectedFilters && H.selectedFilters.length > 0 && /*#__PURE__*/ G(ke, {
|
|
1597
1563
|
selectedFilters: H.selectedFilters,
|
|
1598
1564
|
onDelete: (e) => h({
|
|
1599
1565
|
...p,
|
|
@@ -1605,77 +1571,77 @@ function ct({ imagesPromise: e, imageOverrides: r, deletedImageIds: i, permissio
|
|
|
1605
1571
|
})
|
|
1606
1572
|
})]
|
|
1607
1573
|
}) }),
|
|
1608
|
-
(
|
|
1574
|
+
(L.canDelete || L.canUpdate) && /*#__PURE__*/ G(t, { children: /*#__PURE__*/ G(S, {
|
|
1609
1575
|
distribution: "between",
|
|
1610
1576
|
alignment: "center",
|
|
1611
|
-
children:
|
|
1577
|
+
children: /*#__PURE__*/ K(S, {
|
|
1612
1578
|
gap: "2",
|
|
1613
1579
|
alignment: "center",
|
|
1614
|
-
children: [
|
|
1580
|
+
children: [/*#__PURE__*/ G(te, {
|
|
1615
1581
|
checked: U.length > 0 && V.every((e) => U.includes(e.id)),
|
|
1616
1582
|
indeterminate: U.length > 0 && !V.every((e) => U.includes(e.id)),
|
|
1617
1583
|
onChange: () => {
|
|
1618
1584
|
let e = V.map((e) => e.id);
|
|
1619
1585
|
e.every((e) => U.includes(e)) ? y(U.filter((t) => !e.includes(t))) : y([...new Set([...U, ...e])]);
|
|
1620
1586
|
}
|
|
1621
|
-
}),
|
|
1587
|
+
}), /*#__PURE__*/ K(g, { children: [/*#__PURE__*/ G(c, {
|
|
1622
1588
|
as: "div",
|
|
1623
|
-
children:
|
|
1589
|
+
children: /*#__PURE__*/ G(m, {
|
|
1624
1590
|
size: "small",
|
|
1625
1591
|
icon: "moreVert",
|
|
1626
1592
|
label: N._({ id: "7L01XJ" })
|
|
1627
1593
|
})
|
|
1628
|
-
}),
|
|
1629
|
-
|
|
1594
|
+
}), /*#__PURE__*/ K(n, { children: [
|
|
1595
|
+
L.canDelete && /*#__PURE__*/ G(d, {
|
|
1630
1596
|
disabled: he,
|
|
1631
1597
|
label: N._({ id: "c6b6fz" }),
|
|
1632
1598
|
onClick: () => C(!0)
|
|
1633
1599
|
}),
|
|
1634
|
-
|
|
1600
|
+
L.canUpdate && /*#__PURE__*/ G(d, {
|
|
1635
1601
|
disabled: ge,
|
|
1636
1602
|
label: N._({ id: "UmQ3/m" }),
|
|
1637
|
-
onClick: () =>
|
|
1603
|
+
onClick: () => T(!0)
|
|
1638
1604
|
}),
|
|
1639
|
-
|
|
1605
|
+
L.canUpdate && /*#__PURE__*/ G(d, {
|
|
1640
1606
|
disabled: _e,
|
|
1641
1607
|
label: N._({ id: "d/I0J3" }),
|
|
1642
|
-
onClick: () =>
|
|
1608
|
+
onClick: () => D(!0)
|
|
1643
1609
|
})
|
|
1644
1610
|
] })] })]
|
|
1645
1611
|
})
|
|
1646
1612
|
}) }),
|
|
1647
|
-
|
|
1613
|
+
/*#__PURE__*/ G($e, {
|
|
1648
1614
|
images: V,
|
|
1649
|
-
suggestedImages:
|
|
1650
|
-
acceptedImages:
|
|
1651
|
-
permissions:
|
|
1652
|
-
isFetching:
|
|
1615
|
+
suggestedImages: O === "pending" ? V : [],
|
|
1616
|
+
acceptedImages: O === "accepted" ? V : [],
|
|
1617
|
+
permissions: L,
|
|
1618
|
+
isFetching: k,
|
|
1653
1619
|
currentPage: le,
|
|
1654
1620
|
totalPages: ce,
|
|
1655
|
-
onPageChange:
|
|
1621
|
+
onPageChange: M,
|
|
1656
1622
|
selectedImages: v,
|
|
1657
1623
|
setSelectedImages: y,
|
|
1658
1624
|
deleteAllModalOpen: ee,
|
|
1659
1625
|
setDeleteAllModalOpen: C,
|
|
1660
|
-
deactivateAllModalOpen:
|
|
1661
|
-
setDeactivateAllModalOpen:
|
|
1626
|
+
deactivateAllModalOpen: w,
|
|
1627
|
+
setDeactivateAllModalOpen: T,
|
|
1662
1628
|
activateAllModalOpen: ne,
|
|
1663
|
-
setActivateAllModalOpen:
|
|
1629
|
+
setActivateAllModalOpen: D,
|
|
1664
1630
|
createModalOpen: b,
|
|
1665
1631
|
setCreateModalOpen: x,
|
|
1666
1632
|
deletableImages: de,
|
|
1667
1633
|
protectedImages: fe,
|
|
1668
1634
|
activeImages: pe,
|
|
1669
1635
|
deactivatedImages: me,
|
|
1670
|
-
onImageUpdated:
|
|
1671
|
-
onImageDeleted:
|
|
1636
|
+
onImageUpdated: ie,
|
|
1637
|
+
onImageDeleted: ae,
|
|
1672
1638
|
onMemberStatusChanged: oe,
|
|
1673
|
-
hasAnyBulkAction:
|
|
1639
|
+
hasAnyBulkAction: L.canDelete || L.canUpdate
|
|
1674
1640
|
})
|
|
1675
1641
|
] });
|
|
1676
1642
|
}
|
|
1677
1643
|
var $ = ({ client: e, project: t }) => {
|
|
1678
|
-
let { i18n: n, _: r } = Z(), i =
|
|
1644
|
+
let { i18n: n, _: r } = Z(), i = Re(), a = Y({ strict: !1 }), [o, c] = q({
|
|
1679
1645
|
options: [
|
|
1680
1646
|
{
|
|
1681
1647
|
label: n._({ id: "88kg0+" }),
|
|
@@ -1705,7 +1671,7 @@ var $ = ({ client: e, project: t }) => {
|
|
|
1705
1671
|
{
|
|
1706
1672
|
displayName: n._({ id: "uAQUqI" }),
|
|
1707
1673
|
filterName: "status",
|
|
1708
|
-
values: Object.values(
|
|
1674
|
+
values: Object.values(I),
|
|
1709
1675
|
supportsMultiValue: !0
|
|
1710
1676
|
},
|
|
1711
1677
|
{
|
|
@@ -1717,13 +1683,13 @@ var $ = ({ client: e, project: t }) => {
|
|
|
1717
1683
|
{
|
|
1718
1684
|
displayName: n._({ id: "NopYGU" }),
|
|
1719
1685
|
filterName: "disk_format",
|
|
1720
|
-
values: Object.values(
|
|
1686
|
+
values: Object.values(F),
|
|
1721
1687
|
supportsMultiValue: !0
|
|
1722
1688
|
},
|
|
1723
1689
|
{
|
|
1724
1690
|
displayName: n._({ id: "6/xipy" }),
|
|
1725
1691
|
filterName: "container_format",
|
|
1726
|
-
values: Object.values(
|
|
1692
|
+
values: Object.values(pe),
|
|
1727
1693
|
supportsMultiValue: !0
|
|
1728
1694
|
},
|
|
1729
1695
|
{
|
|
@@ -1734,22 +1700,22 @@ var $ = ({ client: e, project: t }) => {
|
|
|
1734
1700
|
}
|
|
1735
1701
|
],
|
|
1736
1702
|
selectedFilters: et(a)
|
|
1737
|
-
}), [d, f] = q(a.search || ""), p = a.page ?? 1, [m, h] = q([]), [g, _] = q(!1), [v, y] = q(!1), [b, x] = q(!1), [ee, C] = q(!1),
|
|
1738
|
-
|
|
1739
|
-
}, []),
|
|
1740
|
-
|
|
1703
|
+
}), [d, f] = q(a.search || ""), p = a.page ?? 1, [m, h] = q([]), [g, _] = q(!1), [v, y] = q(!1), [b, x] = q(!1), [ee, C] = q(!1), T = a.memberStatus ?? "all", [te, E] = q(!0), [ne, D] = q(/* @__PURE__ */ new Map()), [O, re] = q(/* @__PURE__ */ new Set()), [k, A] = q(() => new Promise(() => {})), [j] = q(() => ot(e, t)), M = Pe((e) => {
|
|
1704
|
+
D((t) => new Map(t).set(e.id, e));
|
|
1705
|
+
}, []), ie = Pe((e) => {
|
|
1706
|
+
re((t) => {
|
|
1741
1707
|
let n = new Set(t);
|
|
1742
1708
|
return Array.isArray(e) ? e.forEach((e) => n.add(e)) : n.add(e), n;
|
|
1743
1709
|
});
|
|
1744
|
-
}, []),
|
|
1745
|
-
|
|
1710
|
+
}, []), ae = Pe(() => {
|
|
1711
|
+
D(/* @__PURE__ */ new Map()), E(!0);
|
|
1746
1712
|
let n = a.memberStatus ?? "all", r = n === "all" ? void 0 : n;
|
|
1747
|
-
|
|
1713
|
+
Me(() => {
|
|
1748
1714
|
let i = n === "pending" || n === "accepted" ? (l.selectedFilters || []).filter((e) => e.name !== "visibility") : l.selectedFilters || [], a = at(e, t, o.sortBy, o.sortDirection, d, {
|
|
1749
1715
|
...tt(i, l.filters),
|
|
1750
1716
|
member_status: r
|
|
1751
1717
|
});
|
|
1752
|
-
a.catch(() => {}).finally(() =>
|
|
1718
|
+
a.catch(() => {}).finally(() => E(!1)), A(a);
|
|
1753
1719
|
});
|
|
1754
1720
|
}, [
|
|
1755
1721
|
e,
|
|
@@ -1758,7 +1724,7 @@ var $ = ({ client: e, project: t }) => {
|
|
|
1758
1724
|
l,
|
|
1759
1725
|
a.memberStatus
|
|
1760
1726
|
]);
|
|
1761
|
-
|
|
1727
|
+
Fe(() => {
|
|
1762
1728
|
let n = et(a), r = a.sortBy || "created_at", i = a.sortDirection || "desc", o = a.search || "";
|
|
1763
1729
|
u((e) => ({
|
|
1764
1730
|
...e,
|
|
@@ -1767,14 +1733,14 @@ var $ = ({ client: e, project: t }) => {
|
|
|
1767
1733
|
...e,
|
|
1768
1734
|
sortBy: r,
|
|
1769
1735
|
sortDirection: i
|
|
1770
|
-
})), f(o), h([]),
|
|
1736
|
+
})), f(o), h([]), D(/* @__PURE__ */ new Map()), E(!0);
|
|
1771
1737
|
let s = a.memberStatus ?? "all", d = s === "all" ? void 0 : s;
|
|
1772
|
-
|
|
1738
|
+
Me(() => {
|
|
1773
1739
|
let a = at(e, t, r, i, o, {
|
|
1774
1740
|
...tt(s === "pending" || s === "accepted" ? (n || []).filter((e) => e.name !== "visibility") : n || [], l.filters),
|
|
1775
1741
|
member_status: d
|
|
1776
1742
|
});
|
|
1777
|
-
a.catch(() => {}).finally(() =>
|
|
1743
|
+
a.catch(() => {}).finally(() => E(!1)), A(a);
|
|
1778
1744
|
});
|
|
1779
1745
|
}, [
|
|
1780
1746
|
a.status,
|
|
@@ -1787,7 +1753,7 @@ var $ = ({ client: e, project: t }) => {
|
|
|
1787
1753
|
a.search,
|
|
1788
1754
|
a.memberStatus
|
|
1789
1755
|
]);
|
|
1790
|
-
let
|
|
1756
|
+
let oe = (e) => {
|
|
1791
1757
|
let t = {
|
|
1792
1758
|
options: e.options,
|
|
1793
1759
|
sortBy: e.sortBy?.toString() || "created_at",
|
|
@@ -1802,7 +1768,7 @@ var $ = ({ client: e, project: t }) => {
|
|
|
1802
1768
|
}),
|
|
1803
1769
|
replace: !0
|
|
1804
1770
|
});
|
|
1805
|
-
},
|
|
1771
|
+
}, N = (e) => {
|
|
1806
1772
|
u(e), i({
|
|
1807
1773
|
search: (t) => rt(e.selectedFilters || [], e.filters, {
|
|
1808
1774
|
search: t.search,
|
|
@@ -1812,7 +1778,7 @@ var $ = ({ client: e, project: t }) => {
|
|
|
1812
1778
|
}),
|
|
1813
1779
|
replace: !0
|
|
1814
1780
|
});
|
|
1815
|
-
},
|
|
1781
|
+
}, P = (e) => {
|
|
1816
1782
|
let t = typeof e == "string" ? e : "";
|
|
1817
1783
|
f(t), i({
|
|
1818
1784
|
search: (e) => ({
|
|
@@ -1822,62 +1788,68 @@ var $ = ({ client: e, project: t }) => {
|
|
|
1822
1788
|
}),
|
|
1823
1789
|
replace: !0
|
|
1824
1790
|
});
|
|
1825
|
-
},
|
|
1791
|
+
}, L = (e) => {
|
|
1826
1792
|
i({ search: (t) => ({
|
|
1827
1793
|
sortBy: t.sortBy,
|
|
1828
1794
|
sortDirection: t.sortDirection,
|
|
1829
1795
|
search: t.search,
|
|
1830
1796
|
memberStatus: e === "all" ? void 0 : e
|
|
1831
1797
|
}) });
|
|
1832
|
-
},
|
|
1798
|
+
}, z = Pe((e) => {
|
|
1833
1799
|
i({ search: (t) => ({
|
|
1834
1800
|
...t,
|
|
1835
1801
|
page: e === 1 ? void 0 : e
|
|
1836
1802
|
}) });
|
|
1837
1803
|
}, [i]);
|
|
1838
|
-
return
|
|
1804
|
+
return /*#__PURE__*/ G("div", {
|
|
1839
1805
|
className: "relative",
|
|
1840
|
-
children:
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
alignment: "center",
|
|
1845
|
-
direction: "vertical",
|
|
1846
|
-
children: [/* @__PURE__ */ G(s, {
|
|
1847
|
-
variant: "primary",
|
|
1848
|
-
size: "large",
|
|
1849
|
-
className: "mb-2"
|
|
1850
|
-
}), /* @__PURE__ */ G(X, { id: "HBpi4q" })]
|
|
1806
|
+
children: /*#__PURE__*/ G(Ve, {
|
|
1807
|
+
fallbackRender: ({ error: e }) => /*#__PURE__*/ G(w, {
|
|
1808
|
+
variant: "error",
|
|
1809
|
+
text: e instanceof Error ? e.message : n._({ id: "W5A0Ly" })
|
|
1851
1810
|
}),
|
|
1852
|
-
children:
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1811
|
+
children: /*#__PURE__*/ G(je, {
|
|
1812
|
+
fallback: /*#__PURE__*/ K(S, {
|
|
1813
|
+
className: "fixed inset-0",
|
|
1814
|
+
distribution: "center",
|
|
1815
|
+
alignment: "center",
|
|
1816
|
+
direction: "vertical",
|
|
1817
|
+
children: [/*#__PURE__*/ G(s, {
|
|
1818
|
+
variant: "primary",
|
|
1819
|
+
size: "large",
|
|
1820
|
+
className: "mb-2"
|
|
1821
|
+
}), /*#__PURE__*/ G(X, { id: "HBpi4q" })]
|
|
1822
|
+
}),
|
|
1823
|
+
children: /*#__PURE__*/ G(ct, {
|
|
1824
|
+
imagesPromise: k,
|
|
1825
|
+
imageOverrides: ne,
|
|
1826
|
+
deletedImageIds: O,
|
|
1827
|
+
permissionsPromise: j,
|
|
1828
|
+
searchTerm: d,
|
|
1829
|
+
setSearchTerm: P,
|
|
1830
|
+
sortSettings: o,
|
|
1831
|
+
handleSortChange: oe,
|
|
1832
|
+
filterSettings: l,
|
|
1833
|
+
handleFilterChange: N,
|
|
1834
|
+
selectedImages: m,
|
|
1835
|
+
setSelectedImages: h,
|
|
1836
|
+
createModalOpen: g,
|
|
1837
|
+
setCreateModalOpen: _,
|
|
1838
|
+
deleteAllModalOpen: v,
|
|
1839
|
+
setDeleteAllModalOpen: y,
|
|
1840
|
+
deactivateAllModalOpen: b,
|
|
1841
|
+
setDeactivateAllModalOpen: x,
|
|
1842
|
+
activateAllModalOpen: ee,
|
|
1843
|
+
setActivateAllModalOpen: C,
|
|
1844
|
+
memberStatusView: T,
|
|
1845
|
+
setMemberStatusView: L,
|
|
1846
|
+
isFetching: te,
|
|
1847
|
+
currentPage: p,
|
|
1848
|
+
onPageChange: z,
|
|
1849
|
+
onImageUpdated: M,
|
|
1850
|
+
onImageDeleted: ie,
|
|
1851
|
+
onMemberStatusChanged: ae
|
|
1852
|
+
})
|
|
1881
1853
|
})
|
|
1882
1854
|
})
|
|
1883
1855
|
});
|
|
@@ -1885,12 +1857,12 @@ var $ = ({ client: e, project: t }) => {
|
|
|
1885
1857
|
//#endregion
|
|
1886
1858
|
//#region src/client/routes/_auth/projects/$projectId/compute/images/index.tsx?tsr-split=component
|
|
1887
1859
|
function lt() {
|
|
1888
|
-
let { i18n: e, _: t } = Z(), { projectId: n } =
|
|
1860
|
+
let { i18n: e, _: t } = Z(), { projectId: n } = k.useParams(), { trpcClient: r } = k.useRouteContext();
|
|
1889
1861
|
if (!r) throw Error("trpcClient is not available in route context");
|
|
1890
|
-
return
|
|
1862
|
+
return /*#__PURE__*/ K(W, { children: [/*#__PURE__*/ G(A, {
|
|
1891
1863
|
title: e._({ id: "an5hVd" }),
|
|
1892
1864
|
projectId: n
|
|
1893
|
-
}),
|
|
1865
|
+
}), /*#__PURE__*/ G($, {
|
|
1894
1866
|
client: r,
|
|
1895
1867
|
project: n
|
|
1896
1868
|
})] });
|
|
@@ -1898,4 +1870,4 @@ function lt() {
|
|
|
1898
1870
|
//#endregion
|
|
1899
1871
|
export { lt as component };
|
|
1900
1872
|
|
|
1901
|
-
//# sourceMappingURL=images-
|
|
1873
|
+
//# sourceMappingURL=images-Da1t5KPh.mjs.map
|