@burdenoff/microfe-sandbox 2026.624.1 → 2026.624.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/sandbox/components/ExtendTTLModal.js +57 -64
- package/dist/sandbox/components/ExtendTTLModal.js.map +1 -1
- package/dist/sandbox/components/PageLayout.js +1 -1
- package/dist/sandbox/components/PageLayout.js.map +1 -1
- package/dist/sandbox/pages/AdminTemplatesPage.js +90 -72
- package/dist/sandbox/pages/AdminTemplatesPage.js.map +1 -1
- package/dist/sandbox/pages/SandboxCreatePage.js +1 -1
- package/dist/sandbox/pages/SandboxCreatePage.js.map +1 -1
- package/dist/sandbox/pages/SandboxListPage.js +209 -193
- package/dist/sandbox/pages/SandboxListPage.js.map +1 -1
- package/dist/sandbox/pages/TemplateDetailPage.js +1 -1
- package/dist/sandbox/pages/TemplateDetailPage.js.map +1 -1
- package/package.json +1 -1
|
@@ -17,10 +17,11 @@ import { SandboxKind as d } from "../../generated/wspace-types.js";
|
|
|
17
17
|
import { nativeImpact as xe, nativeNotify as Se } from "../../utils/nativeBridge.js";
|
|
18
18
|
import { useCallback as f, useMemo as p, useState as m } from "react";
|
|
19
19
|
import { PermissionGate as Ce } from "@burdenoff/fe-libs/shared/components";
|
|
20
|
-
import { AlertCircle as we, Box as Te, CheckCircle2 as Ee, ChevronLeft as De, ChevronRight as Oe, Container as ke, Database as Ae, Filter as
|
|
20
|
+
import { AlertCircle as we, Box as Te, CheckCircle2 as Ee, ChevronLeft as De, ChevronRight as Oe, Container as ke, Database as Ae, Filter as je, Loader2 as h, Plus as Me, Search as g, StopCircle as _, Timer as Ne, Trash2 as Pe, X as v } from "lucide-react";
|
|
21
21
|
import { useApolloClient as Fe } from "@apollo/client/react";
|
|
22
22
|
import { useI18n as Ie } from "@burdenoff/fe-libs/shared/providers/shell";
|
|
23
23
|
import { Fragment as y, jsx as b, jsxs as x } from "react/jsx-runtime";
|
|
24
|
+
import { AlertDialog as Le, AlertDialogAction as Re, AlertDialogCancel as ze, AlertDialogContent as Be, AlertDialogDescription as Ve, AlertDialogFooter as He, AlertDialogHeader as Ue, AlertDialogTitle as We } from "@burdenoff/fe-libs/ui";
|
|
24
25
|
//#region src/sandbox/pages/SandboxListPage.tsx
|
|
25
26
|
var S = ["RUNNING"], C = ["RUNNING", "PENDING"], w = [
|
|
26
27
|
"STOPPED",
|
|
@@ -28,14 +29,14 @@ var S = ["RUNNING"], C = ["RUNNING", "PENDING"], w = [
|
|
|
28
29
|
"EXPIRED",
|
|
29
30
|
"FAILED"
|
|
30
31
|
], T = 5;
|
|
31
|
-
function
|
|
32
|
+
function Ge(e) {
|
|
32
33
|
let t = Date.now() - new Date(e).getTime(), n = Math.floor(t / 6e4);
|
|
33
34
|
if (n < 1) return "just now";
|
|
34
35
|
if (n < 60) return `${n}m ago`;
|
|
35
36
|
let r = Math.floor(n / 60);
|
|
36
37
|
return r < 24 ? `${r}h ago` : `${Math.floor(r / 24)}d ago`;
|
|
37
38
|
}
|
|
38
|
-
function
|
|
39
|
+
function Ke(e) {
|
|
39
40
|
return {
|
|
40
41
|
...e.search?.trim() ? { search: e.search.trim() } : {},
|
|
41
42
|
...e.template && e.template !== "all" ? { template: e.template } : {},
|
|
@@ -43,23 +44,23 @@ function Re(e) {
|
|
|
43
44
|
kind: d.User
|
|
44
45
|
};
|
|
45
46
|
}
|
|
46
|
-
function
|
|
47
|
+
function qe(e) {
|
|
47
48
|
return S.includes(e.status);
|
|
48
49
|
}
|
|
49
|
-
function
|
|
50
|
+
function Je(e) {
|
|
50
51
|
return C.includes(e.status);
|
|
51
52
|
}
|
|
52
|
-
function
|
|
53
|
+
function Ye(e) {
|
|
53
54
|
return w.includes(e.status);
|
|
54
55
|
}
|
|
55
56
|
function E(e, t) {
|
|
56
57
|
return e instanceof Error && e.message.trim() ? e.message : t;
|
|
57
58
|
}
|
|
58
|
-
function
|
|
59
|
+
function Xe(e, t, n, r) {
|
|
59
60
|
let i = [`${e} ${t} sandbox${t === 1 ? "" : "es"}`];
|
|
60
61
|
return n > 0 && i.push(`${n} failed`), r > 0 && i.push(`${r} skipped`), i.join(" • ");
|
|
61
62
|
}
|
|
62
|
-
async function
|
|
63
|
+
async function Ze(e, t, n = T) {
|
|
63
64
|
let r = [];
|
|
64
65
|
for (let i = 0; i < e.length; i += n) {
|
|
65
66
|
let a = e.slice(i, i + n), o = await Promise.allSettled(a.map(t));
|
|
@@ -67,18 +68,18 @@ async function He(e, t, n = T) {
|
|
|
67
68
|
}
|
|
68
69
|
return r;
|
|
69
70
|
}
|
|
70
|
-
function
|
|
71
|
-
let { basePath: d = "/", navigate: S } = e(), { sandboxFilter: C, updateFilter: w, resetFilter: T } = le(),
|
|
71
|
+
function D() {
|
|
72
|
+
let { basePath: d = "/", navigate: S } = e(), { sandboxFilter: C, updateFilter: w, resetFilter: T } = le(), D = Fe(), { t: O } = Ie(), [k, Qe] = m(!1), [A, j] = m(1), [M, N] = m(/* @__PURE__ */ new Map()), [P, F] = m(null), [I, L] = m(null), [$e, R] = m(null), { workspaceId: z } = e(), B = Ke(C), { data: et, loading: tt, refetch: V } = ve({
|
|
72
73
|
variables: {
|
|
73
74
|
context: { workspaceId: z },
|
|
74
75
|
filter: B,
|
|
75
76
|
pagination: {
|
|
76
|
-
page:
|
|
77
|
+
page: A,
|
|
77
78
|
limit: 20
|
|
78
79
|
}
|
|
79
80
|
},
|
|
80
81
|
skip: !z
|
|
81
|
-
}), [H] = be(), [U] = ge(), [
|
|
82
|
+
}), [H] = be(), [U] = ge(), [nt] = _e(), rt = ue(), [it, at] = m(!1);
|
|
82
83
|
ye({
|
|
83
84
|
variables: { workspaceId: z },
|
|
84
85
|
skip: !z,
|
|
@@ -87,44 +88,44 @@ function O() {
|
|
|
87
88
|
t && (t.changeType === "CREATED" || t.changeType === "DELETED") && V();
|
|
88
89
|
}
|
|
89
90
|
});
|
|
90
|
-
let
|
|
91
|
-
w({ search: e }),
|
|
92
|
-
}, [w]),
|
|
93
|
-
T(),
|
|
94
|
-
}, [T]),
|
|
91
|
+
let ot = et?.listSandboxes?.items ?? [], W = et?.listSandboxes?.total ?? 0, st = tt, ct = ot, G = Math.ceil(W / 20), K = ct, q = C.search || C.template && C.template !== "all" || C.status && C.status !== "all", J = ot.filter((e) => e.status === "RUNNING").length, lt = W, ut = p(() => Array.from(M.keys()), [M]), Y = p(() => Array.from(M.values()), [M]), X = p(() => K.filter((e) => M.has(e.id)).length, [K, M]), Z = p(() => Y.filter(qe), [Y]), Q = p(() => Y.filter(Ye), [Y]), dt = ut.length > 0, ft = K.length > 0 && X === K.length, pt = X > 0 && X < K.length, $ = P !== null, mt = P === "select-all", ht = P === "stop", gt = P === "delete", _t = f((e) => {
|
|
92
|
+
w({ search: e }), j(1);
|
|
93
|
+
}, [w]), vt = f(() => {
|
|
94
|
+
T(), j(1);
|
|
95
|
+
}, [T]), yt = () => {
|
|
95
96
|
S?.(t(d, "new"));
|
|
96
|
-
},
|
|
97
|
+
}, bt = (e) => {
|
|
97
98
|
S?.(t(d, e));
|
|
98
|
-
},
|
|
99
|
-
|
|
99
|
+
}, xt = f((e, t) => {
|
|
100
|
+
N((n) => {
|
|
100
101
|
let r = new Map(n);
|
|
101
102
|
return t ? r.set(e.id, e) : r.delete(e.id), r;
|
|
102
103
|
});
|
|
103
|
-
}, []),
|
|
104
|
-
|
|
104
|
+
}, []), St = f((e) => {
|
|
105
|
+
N((t) => {
|
|
105
106
|
let n = new Map(t);
|
|
106
107
|
for (let t of K) e ? n.set(t.id, t) : n.delete(t.id);
|
|
107
108
|
return n;
|
|
108
109
|
});
|
|
109
|
-
}, [K]),
|
|
110
|
-
|
|
111
|
-
}, []),
|
|
112
|
-
|
|
110
|
+
}, [K]), Ct = f(() => {
|
|
111
|
+
N(/* @__PURE__ */ new Map());
|
|
112
|
+
}, []), wt = f((e) => {
|
|
113
|
+
N((t) => {
|
|
113
114
|
if (!t.has(e)) return t;
|
|
114
115
|
let n = new Map(t);
|
|
115
116
|
return n.delete(e), n;
|
|
116
117
|
});
|
|
117
|
-
}, []),
|
|
118
|
-
|
|
118
|
+
}, []), Tt = f((e) => {
|
|
119
|
+
N((t) => {
|
|
119
120
|
if (!t.has(e.id)) return t;
|
|
120
121
|
let n = new Map(t);
|
|
121
122
|
return n.set(e.id, e), n;
|
|
122
123
|
});
|
|
123
|
-
}, []),
|
|
124
|
+
}, []), Et = f(async () => {
|
|
124
125
|
if (!z) return [];
|
|
125
126
|
let e = [], t = 1;
|
|
126
127
|
for (;;) {
|
|
127
|
-
let n = (await
|
|
128
|
+
let n = (await D.query({
|
|
128
129
|
query: he,
|
|
129
130
|
variables: {
|
|
130
131
|
context: { workspaceId: z },
|
|
@@ -141,23 +142,23 @@ function O() {
|
|
|
141
142
|
}
|
|
142
143
|
return e;
|
|
143
144
|
}, [
|
|
144
|
-
|
|
145
|
+
D,
|
|
145
146
|
B,
|
|
146
147
|
z
|
|
147
|
-
]),
|
|
148
|
+
]), Dt = f(async (e) => {
|
|
148
149
|
try {
|
|
149
150
|
let t = (await H({ variables: {
|
|
150
151
|
context: { workspaceId: z },
|
|
151
152
|
id: e.id
|
|
152
153
|
} })).data?.stopSandbox;
|
|
153
154
|
if (!t) throw Error(`Failed to stop sandbox "${e.name}".`);
|
|
154
|
-
|
|
155
|
+
Tt({
|
|
155
156
|
...e,
|
|
156
157
|
status: t.status,
|
|
157
158
|
stoppedAt: t.stoppedAt ?? e.stoppedAt
|
|
158
159
|
}), await V();
|
|
159
160
|
} catch (t) {
|
|
160
|
-
|
|
161
|
+
L({
|
|
161
162
|
kind: "error",
|
|
162
163
|
message: E(t, `Failed to stop sandbox "${e.name}".`)
|
|
163
164
|
});
|
|
@@ -165,18 +166,18 @@ function O() {
|
|
|
165
166
|
}, [
|
|
166
167
|
V,
|
|
167
168
|
H,
|
|
168
|
-
|
|
169
|
+
Tt,
|
|
169
170
|
z
|
|
170
|
-
]),
|
|
171
|
+
]), Ot = f(async (e) => {
|
|
171
172
|
xe("medium");
|
|
172
173
|
try {
|
|
173
174
|
if (!(await U({ variables: {
|
|
174
175
|
context: { workspaceId: z },
|
|
175
176
|
id: e.id
|
|
176
177
|
} })).data?.deleteSandbox) throw Error(`Failed to delete sandbox "${e.name}".`);
|
|
177
|
-
Se("success"),
|
|
178
|
+
Se("success"), rt.sandboxDeleted({ sandboxId: e.id }), wt(e.id), await V();
|
|
178
179
|
} catch (t) {
|
|
179
|
-
Se("error"),
|
|
180
|
+
Se("error"), L({
|
|
180
181
|
kind: "error",
|
|
181
182
|
message: E(t, `Failed to delete sandbox "${e.name}".`)
|
|
182
183
|
});
|
|
@@ -184,37 +185,37 @@ function O() {
|
|
|
184
185
|
}, [
|
|
185
186
|
U,
|
|
186
187
|
V,
|
|
187
|
-
|
|
188
|
-
|
|
188
|
+
wt,
|
|
189
|
+
rt,
|
|
189
190
|
z
|
|
190
|
-
]),
|
|
191
|
-
|
|
191
|
+
]), kt = f(async () => {
|
|
192
|
+
F("select-all");
|
|
192
193
|
try {
|
|
193
|
-
let e = await
|
|
194
|
-
|
|
194
|
+
let e = await Et();
|
|
195
|
+
N(new Map(e.map((e) => [e.id, e]))), L({
|
|
195
196
|
kind: "success",
|
|
196
197
|
message: `Selected ${e.length} sandbox${e.length === 1 ? "" : "es"}.`
|
|
197
198
|
});
|
|
198
199
|
} catch (e) {
|
|
199
|
-
|
|
200
|
+
L({
|
|
200
201
|
kind: "error",
|
|
201
202
|
message: E(e, "Failed to select all matching sandboxes.")
|
|
202
203
|
});
|
|
203
204
|
} finally {
|
|
204
|
-
|
|
205
|
+
F(null);
|
|
205
206
|
}
|
|
206
|
-
}, [
|
|
207
|
+
}, [Et]), At = f(async () => {
|
|
207
208
|
if (Z.length === 0) {
|
|
208
|
-
|
|
209
|
+
L({
|
|
209
210
|
kind: "error",
|
|
210
211
|
message: "Select at least one running sandbox to stop."
|
|
211
212
|
});
|
|
212
213
|
return;
|
|
213
214
|
}
|
|
214
215
|
let e = Y.length - Z.length;
|
|
215
|
-
|
|
216
|
+
F("stop");
|
|
216
217
|
try {
|
|
217
|
-
let t = await
|
|
218
|
+
let t = await Ze(Z, async (e) => {
|
|
218
219
|
let t = await H({ variables: {
|
|
219
220
|
context: { workspaceId: z },
|
|
220
221
|
id: e.id
|
|
@@ -222,17 +223,17 @@ function O() {
|
|
|
222
223
|
if (!t.data?.stopSandbox) throw Error(`Failed to stop sandbox "${e.name}".`);
|
|
223
224
|
return t.data.stopSandbox;
|
|
224
225
|
}), n = t.filter((e) => e.status === "fulfilled").length, r = t.length - n;
|
|
225
|
-
|
|
226
|
+
N(/* @__PURE__ */ new Map()), await V(), L({
|
|
226
227
|
kind: r === 0 ? "success" : "error",
|
|
227
|
-
message:
|
|
228
|
+
message: Xe("Stopped", n, r, e)
|
|
228
229
|
});
|
|
229
230
|
} catch (e) {
|
|
230
|
-
|
|
231
|
+
L({
|
|
231
232
|
kind: "error",
|
|
232
233
|
message: E(e, "Failed to stop selected sandboxes.")
|
|
233
234
|
});
|
|
234
235
|
} finally {
|
|
235
|
-
|
|
236
|
+
F(null);
|
|
236
237
|
}
|
|
237
238
|
}, [
|
|
238
239
|
V,
|
|
@@ -240,38 +241,40 @@ function O() {
|
|
|
240
241
|
Z,
|
|
241
242
|
H,
|
|
242
243
|
z
|
|
243
|
-
]),
|
|
244
|
+
]), jt = f(() => {
|
|
244
245
|
if (Q.length === 0) {
|
|
245
|
-
|
|
246
|
+
L({
|
|
246
247
|
kind: "error",
|
|
247
248
|
message: "Select at least one stopped, failed, expired, or errored sandbox to delete."
|
|
248
249
|
});
|
|
249
250
|
return;
|
|
250
251
|
}
|
|
251
252
|
let e = Y.length - Q.length;
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
}
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
}
|
|
253
|
+
R({ message: e > 0 ? `Delete ${Q.length} selected sandbox(es)? ${e} selected sandbox(es) cannot be deleted right now and will be skipped. This cannot be undone.` : `Delete ${Q.length} selected sandbox(es)? This cannot be undone.` });
|
|
254
|
+
}, [Q.length, Y.length]), Mt = f(async () => {
|
|
255
|
+
if (R(null), Q.length === 0) return;
|
|
256
|
+
let e = Y.length - Q.length;
|
|
257
|
+
F("delete");
|
|
258
|
+
try {
|
|
259
|
+
let t = await Ze(Q, async (e) => {
|
|
260
|
+
let t = await U({ variables: {
|
|
261
|
+
context: { workspaceId: z },
|
|
262
|
+
id: e.id
|
|
263
|
+
} });
|
|
264
|
+
if (!t.data?.deleteSandbox) throw Error(`Failed to delete sandbox "${e.name}".`);
|
|
265
|
+
return t.data.deleteSandbox;
|
|
266
|
+
}), n = t.filter((e) => e.status === "fulfilled").length, r = t.length - n;
|
|
267
|
+
N(/* @__PURE__ */ new Map()), await V(), L({
|
|
268
|
+
kind: r === 0 ? "success" : "error",
|
|
269
|
+
message: Xe("Deleted", n, r, e)
|
|
270
|
+
});
|
|
271
|
+
} catch (e) {
|
|
272
|
+
L({
|
|
273
|
+
kind: "error",
|
|
274
|
+
message: E(e, "Failed to delete selected sandboxes.")
|
|
275
|
+
});
|
|
276
|
+
} finally {
|
|
277
|
+
F(null);
|
|
275
278
|
}
|
|
276
279
|
}, [
|
|
277
280
|
U,
|
|
@@ -281,28 +284,28 @@ function O() {
|
|
|
281
284
|
z
|
|
282
285
|
]);
|
|
283
286
|
return /* @__PURE__ */ x(fe, {
|
|
284
|
-
title: u(
|
|
285
|
-
subtitle: u(
|
|
287
|
+
title: u(O, "sandbox.list.title", "Sandboxes"),
|
|
288
|
+
subtitle: u(O, "sandbox.list.subtitle", "Manage ephemeral sandbox environments for development and testing"),
|
|
286
289
|
icon: /* @__PURE__ */ b(Te, { size: 24 }),
|
|
287
290
|
headerActions: /* @__PURE__ */ b(Ce, {
|
|
288
291
|
permission: "sandbox:create",
|
|
289
292
|
children: /* @__PURE__ */ x(r, {
|
|
290
|
-
onClick:
|
|
293
|
+
onClick: yt,
|
|
291
294
|
size: "lg",
|
|
292
295
|
"data-tour": "sandbox-list-create-button",
|
|
293
|
-
children: [/* @__PURE__ */ b(
|
|
296
|
+
children: [/* @__PURE__ */ b(Me, { size: 18 }), u(O, "sandbox.list.actions.create", "Create Sandbox")]
|
|
294
297
|
})
|
|
295
298
|
}),
|
|
296
|
-
headerContent:
|
|
299
|
+
headerContent: lt > 0 ? /* @__PURE__ */ x("div", {
|
|
297
300
|
className: "flex items-center gap-3 flex-wrap",
|
|
298
301
|
children: [/* @__PURE__ */ b(n, {
|
|
299
302
|
variant: "secondary",
|
|
300
303
|
className: "gap-1.5",
|
|
301
|
-
children: u(
|
|
304
|
+
children: u(O, "sandbox.list.header.total", "{count} total", { count: lt })
|
|
302
305
|
}), /* @__PURE__ */ b(n, {
|
|
303
306
|
variant: "default",
|
|
304
307
|
className: "gap-1.5 bg-status-success-bg-subtle text-status-success-text border-border-default",
|
|
305
|
-
children: u(
|
|
308
|
+
children: u(O, "sandbox.list.header.running", "{count} running", { count: J })
|
|
306
309
|
})]
|
|
307
310
|
}) : null,
|
|
308
311
|
children: [
|
|
@@ -319,34 +322,34 @@ function O() {
|
|
|
319
322
|
/* @__PURE__ */ b(r, {
|
|
320
323
|
variant: "outline",
|
|
321
324
|
size: "sm",
|
|
322
|
-
onClick: () =>
|
|
323
|
-
"aria-label": u(
|
|
325
|
+
onClick: () => at(!0),
|
|
326
|
+
"aria-label": u(O, "sandbox.list.actions.export.ariaLabel", "Export sandboxes"),
|
|
324
327
|
className: "self-start sm:self-auto",
|
|
325
|
-
children: u(
|
|
328
|
+
children: u(O, "sandbox.list.actions.export.label", "Export")
|
|
326
329
|
}),
|
|
327
330
|
/* @__PURE__ */ x("div", {
|
|
328
331
|
className: "flex-1 relative group",
|
|
329
|
-
children: [/* @__PURE__ */ b(
|
|
332
|
+
children: [/* @__PURE__ */ b(g, {
|
|
330
333
|
size: 18,
|
|
331
334
|
className: "absolute left-3 top-1/2 -translate-y-1/2 text-text-secondary group-focus-within:text-primary transition-colors"
|
|
332
335
|
}), /* @__PURE__ */ b(ee, {
|
|
333
336
|
type: "text",
|
|
334
|
-
placeholder: u(
|
|
337
|
+
placeholder: u(O, "sandbox.list.search.placeholder", "Search sandboxes by name, description, or ID..."),
|
|
335
338
|
value: C.search,
|
|
336
|
-
onChange: (e) =>
|
|
339
|
+
onChange: (e) => _t(e.target.value),
|
|
337
340
|
className: "pl-[3.25rem] h-10",
|
|
338
|
-
"aria-label": u(
|
|
341
|
+
"aria-label": u(O, "sandbox.list.search.ariaLabel", "Search sandboxes"),
|
|
339
342
|
"data-tour": "sandbox-list-search-input"
|
|
340
343
|
})]
|
|
341
344
|
}),
|
|
342
345
|
/* @__PURE__ */ x(r, {
|
|
343
|
-
variant:
|
|
344
|
-
onClick: () =>
|
|
345
|
-
"aria-label": u(
|
|
346
|
+
variant: k || q ? "default" : "outline",
|
|
347
|
+
onClick: () => Qe(!k),
|
|
348
|
+
"aria-label": u(O, "sandbox.list.filters.toggle.ariaLabel", "Toggle filters"),
|
|
346
349
|
"data-tour": "sandbox-list-filters-button",
|
|
347
350
|
children: [
|
|
348
|
-
/* @__PURE__ */ b(
|
|
349
|
-
|
|
351
|
+
/* @__PURE__ */ b(je, { size: 16 }),
|
|
352
|
+
k ? u(O, "sandbox.list.filters.toggle.hide", "Hide") : u(O, "sandbox.list.filters.toggle.show", "Filter"),
|
|
350
353
|
q && /* @__PURE__ */ b(n, {
|
|
351
354
|
variant: "secondary",
|
|
352
355
|
className: "ml-1 h-5 min-w-5 px-1.5",
|
|
@@ -360,7 +363,7 @@ function O() {
|
|
|
360
363
|
})
|
|
361
364
|
]
|
|
362
365
|
}),
|
|
363
|
-
|
|
366
|
+
k && /* @__PURE__ */ b(i, {
|
|
364
367
|
className: "animate-in slide-in-from-top-2 duration-200",
|
|
365
368
|
children: /* @__PURE__ */ x(a, {
|
|
366
369
|
className: "p-4",
|
|
@@ -368,16 +371,16 @@ function O() {
|
|
|
368
371
|
className: "flex items-center justify-between mb-4",
|
|
369
372
|
children: [/* @__PURE__ */ x("h3", {
|
|
370
373
|
className: "font-semibold text-text-primary flex items-center gap-2",
|
|
371
|
-
children: [/* @__PURE__ */ b(
|
|
374
|
+
children: [/* @__PURE__ */ b(je, {
|
|
372
375
|
size: 16,
|
|
373
376
|
className: "text-primary"
|
|
374
|
-
}), u(
|
|
377
|
+
}), u(O, "sandbox.list.filters.panel.title", "Filter Sandboxes")]
|
|
375
378
|
}), q && /* @__PURE__ */ x(r, {
|
|
376
379
|
variant: "ghost",
|
|
377
380
|
size: "sm",
|
|
378
|
-
onClick:
|
|
381
|
+
onClick: vt,
|
|
379
382
|
className: "text-text-secondary hover:text-status-error-text",
|
|
380
|
-
children: [/* @__PURE__ */ b(v, { size: 16 }), u(
|
|
383
|
+
children: [/* @__PURE__ */ b(v, { size: 16 }), u(O, "sandbox.list.filters.clearAll", "Clear All")]
|
|
381
384
|
})]
|
|
382
385
|
}), /* @__PURE__ */ x("div", {
|
|
383
386
|
className: "grid grid-cols-1 sm:grid-cols-2 gap-4",
|
|
@@ -385,32 +388,32 @@ function O() {
|
|
|
385
388
|
className: "space-y-2",
|
|
386
389
|
children: [/* @__PURE__ */ b("label", {
|
|
387
390
|
className: "block text-sm font-medium text-text-primary",
|
|
388
|
-
children: u(
|
|
391
|
+
children: u(O, "sandbox.list.filters.template.label", "Template")
|
|
389
392
|
}), /* @__PURE__ */ x(te, {
|
|
390
393
|
value: C.template || "all",
|
|
391
394
|
onValueChange: (e) => {
|
|
392
|
-
w({ template: e }),
|
|
395
|
+
w({ template: e }), j(1);
|
|
393
396
|
},
|
|
394
|
-
children: [/* @__PURE__ */ b(re, { children: /* @__PURE__ */ b(ie, { placeholder: u(
|
|
397
|
+
children: [/* @__PURE__ */ b(re, { children: /* @__PURE__ */ b(ie, { placeholder: u(O, "sandbox.list.filters.template.all", "All Templates") }) }), /* @__PURE__ */ x(ne, { children: [
|
|
395
398
|
/* @__PURE__ */ b(s, {
|
|
396
399
|
value: "all",
|
|
397
|
-
children: u(
|
|
400
|
+
children: u(O, "sandbox.list.filters.template.all", "All Templates")
|
|
398
401
|
}),
|
|
399
402
|
/* @__PURE__ */ b(s, {
|
|
400
403
|
value: "AI_BUILDER",
|
|
401
|
-
children: u(
|
|
404
|
+
children: u(O, "sandbox.list.filters.template.aiBuilder", "AI Builder")
|
|
402
405
|
}),
|
|
403
406
|
/* @__PURE__ */ b(s, {
|
|
404
407
|
value: "WORKFLOW_MULTI_NODE",
|
|
405
|
-
children: u(
|
|
408
|
+
children: u(O, "sandbox.list.filters.template.workflowMultiNode", "Workflow Multi-Node")
|
|
406
409
|
}),
|
|
407
410
|
/* @__PURE__ */ b(s, {
|
|
408
411
|
value: "MISC_SHELL",
|
|
409
|
-
children: u(
|
|
412
|
+
children: u(O, "sandbox.list.filters.template.miscShell", "Misc Shell")
|
|
410
413
|
}),
|
|
411
414
|
/* @__PURE__ */ b(s, {
|
|
412
415
|
value: "CUSTOM",
|
|
413
|
-
children: u(
|
|
416
|
+
children: u(O, "sandbox.list.filters.template.custom", "Custom")
|
|
414
417
|
})
|
|
415
418
|
] })]
|
|
416
419
|
})]
|
|
@@ -418,48 +421,48 @@ function O() {
|
|
|
418
421
|
className: "space-y-2",
|
|
419
422
|
children: [/* @__PURE__ */ b("label", {
|
|
420
423
|
className: "block text-sm font-medium text-text-primary",
|
|
421
|
-
children: u(
|
|
424
|
+
children: u(O, "sandbox.list.filters.status.label", "Status")
|
|
422
425
|
}), /* @__PURE__ */ x(te, {
|
|
423
426
|
value: C.status || "all",
|
|
424
427
|
onValueChange: (e) => {
|
|
425
|
-
w({ status: e }),
|
|
428
|
+
w({ status: e }), j(1);
|
|
426
429
|
},
|
|
427
|
-
children: [/* @__PURE__ */ b(re, { children: /* @__PURE__ */ b(ie, { placeholder: u(
|
|
430
|
+
children: [/* @__PURE__ */ b(re, { children: /* @__PURE__ */ b(ie, { placeholder: u(O, "sandbox.list.filters.status.all", "All Statuses") }) }), /* @__PURE__ */ x(ne, { children: [
|
|
428
431
|
/* @__PURE__ */ b(s, {
|
|
429
432
|
value: "all",
|
|
430
|
-
children: u(
|
|
433
|
+
children: u(O, "sandbox.list.filters.status.all", "All Statuses")
|
|
431
434
|
}),
|
|
432
435
|
/* @__PURE__ */ b(s, {
|
|
433
436
|
value: "PENDING",
|
|
434
|
-
children: u(
|
|
437
|
+
children: u(O, "sandbox.list.filters.status.pending", "Pending")
|
|
435
438
|
}),
|
|
436
439
|
/* @__PURE__ */ b(s, {
|
|
437
440
|
value: "PROVISIONING",
|
|
438
|
-
children: u(
|
|
441
|
+
children: u(O, "sandbox.list.filters.status.provisioning", "Provisioning")
|
|
439
442
|
}),
|
|
440
443
|
/* @__PURE__ */ b(s, {
|
|
441
444
|
value: "RUNNING",
|
|
442
|
-
children: u(
|
|
445
|
+
children: u(O, "sandbox.list.filters.status.running", "Running")
|
|
443
446
|
}),
|
|
444
447
|
/* @__PURE__ */ b(s, {
|
|
445
448
|
value: "STOPPING",
|
|
446
|
-
children: u(
|
|
449
|
+
children: u(O, "sandbox.list.filters.status.stopping", "Stopping")
|
|
447
450
|
}),
|
|
448
451
|
/* @__PURE__ */ b(s, {
|
|
449
452
|
value: "STOPPED",
|
|
450
|
-
children: u(
|
|
453
|
+
children: u(O, "sandbox.list.filters.status.stopped", "Stopped")
|
|
451
454
|
}),
|
|
452
455
|
/* @__PURE__ */ b(s, {
|
|
453
456
|
value: "ERROR",
|
|
454
|
-
children: u(
|
|
457
|
+
children: u(O, "sandbox.list.filters.status.error", "Error")
|
|
455
458
|
}),
|
|
456
459
|
/* @__PURE__ */ b(s, {
|
|
457
460
|
value: "EXPIRED",
|
|
458
|
-
children: u(
|
|
461
|
+
children: u(O, "sandbox.list.filters.status.expired", "Expired")
|
|
459
462
|
}),
|
|
460
463
|
/* @__PURE__ */ b(s, {
|
|
461
464
|
value: "FAILED",
|
|
462
|
-
children: u(
|
|
465
|
+
children: u(O, "sandbox.list.filters.status.failed", "Failed")
|
|
463
466
|
})
|
|
464
467
|
] })]
|
|
465
468
|
})]
|
|
@@ -467,36 +470,36 @@ function O() {
|
|
|
467
470
|
})]
|
|
468
471
|
})
|
|
469
472
|
}),
|
|
470
|
-
|
|
471
|
-
className: l("border-l-4",
|
|
473
|
+
I && /* @__PURE__ */ b(i, {
|
|
474
|
+
className: l("border-l-4", I.kind === "success" ? "border-l-status-success-text bg-status-success-bg-subtle" : "border-l-destructive bg-status-error-bg/5"),
|
|
472
475
|
children: /* @__PURE__ */ x(a, {
|
|
473
476
|
className: "p-4 flex items-start justify-between gap-3",
|
|
474
477
|
children: [/* @__PURE__ */ x("div", {
|
|
475
|
-
role:
|
|
478
|
+
role: I.kind === "error" ? "alert" : "status",
|
|
476
479
|
className: "flex items-start gap-2 text-sm",
|
|
477
|
-
children: [
|
|
480
|
+
children: [I.kind === "success" ? /* @__PURE__ */ b(Ee, {
|
|
478
481
|
size: 16,
|
|
479
482
|
className: "mt-0.5 text-status-success-text"
|
|
480
483
|
}) : /* @__PURE__ */ b(we, {
|
|
481
484
|
size: 16,
|
|
482
485
|
className: "mt-0.5 text-status-error-text"
|
|
483
486
|
}), /* @__PURE__ */ b("span", {
|
|
484
|
-
className: l("font-medium",
|
|
485
|
-
children:
|
|
487
|
+
className: l("font-medium", I.kind === "success" ? "text-status-success-text" : "text-status-error-text"),
|
|
488
|
+
children: I.message
|
|
486
489
|
})]
|
|
487
490
|
}), /* @__PURE__ */ b(r, {
|
|
488
491
|
variant: "ghost",
|
|
489
492
|
size: "icon",
|
|
490
|
-
onClick: () =>
|
|
491
|
-
"aria-label": u(
|
|
493
|
+
onClick: () => L(null),
|
|
494
|
+
"aria-label": u(O, "sandbox.list.bulk.feedback.dismiss.ariaLabel", "Dismiss bulk action message"),
|
|
492
495
|
children: /* @__PURE__ */ b(v, { size: 16 })
|
|
493
496
|
})]
|
|
494
497
|
})
|
|
495
498
|
})
|
|
496
499
|
]
|
|
497
500
|
}),
|
|
498
|
-
|
|
499
|
-
className: "space-y-4 animate-in fade-in-0 duration-
|
|
501
|
+
st && /* @__PURE__ */ b("div", {
|
|
502
|
+
className: "space-y-4 animate-in fade-in-0 duration-200",
|
|
500
503
|
children: [...[
|
|
501
504
|
,
|
|
502
505
|
,
|
|
@@ -519,11 +522,11 @@ function O() {
|
|
|
519
522
|
})
|
|
520
523
|
}) }, t))
|
|
521
524
|
}),
|
|
522
|
-
!
|
|
525
|
+
!st && /* @__PURE__ */ b("div", {
|
|
523
526
|
className: "space-y-4",
|
|
524
527
|
children: K.length > 0 ? /* @__PURE__ */ x(y, { children: [
|
|
525
528
|
/* @__PURE__ */ b(i, {
|
|
526
|
-
className: "animate-in fade-in-0 duration-
|
|
529
|
+
className: "animate-in fade-in-0 duration-200",
|
|
527
530
|
children: /* @__PURE__ */ x(a, {
|
|
528
531
|
className: "p-4 space-y-3",
|
|
529
532
|
children: [/* @__PURE__ */ x("div", {
|
|
@@ -535,61 +538,61 @@ function O() {
|
|
|
535
538
|
/* @__PURE__ */ x("label", {
|
|
536
539
|
className: "inline-flex items-center gap-2 text-sm font-medium text-text-primary",
|
|
537
540
|
children: [/* @__PURE__ */ b(o, {
|
|
538
|
-
checked:
|
|
539
|
-
onCheckedChange: (e) =>
|
|
540
|
-
"aria-label": u(
|
|
541
|
-
}), /* @__PURE__ */ b("span", { children: u(
|
|
541
|
+
checked: ft ? !0 : pt ? "indeterminate" : !1,
|
|
542
|
+
onCheckedChange: (e) => St(e === !0),
|
|
543
|
+
"aria-label": u(O, "sandbox.list.bulk.selectPage.ariaLabel", "Select all sandboxes on this page")
|
|
544
|
+
}), /* @__PURE__ */ b("span", { children: u(O, "sandbox.list.bulk.selectPage.label", "Select page") })]
|
|
542
545
|
}),
|
|
543
546
|
W > K.length && /* @__PURE__ */ x(r, {
|
|
544
547
|
variant: "ghost",
|
|
545
548
|
size: "sm",
|
|
546
|
-
onClick:
|
|
549
|
+
onClick: kt,
|
|
547
550
|
disabled: $,
|
|
548
|
-
children: [
|
|
551
|
+
children: [mt ? /* @__PURE__ */ b(h, {
|
|
549
552
|
size: 14,
|
|
550
553
|
className: "animate-spin"
|
|
551
|
-
}) : null, u(
|
|
554
|
+
}) : null, u(O, "sandbox.list.bulk.selectAll", "Select all {count}", { count: W })]
|
|
552
555
|
}),
|
|
553
|
-
|
|
556
|
+
dt && /* @__PURE__ */ b(r, {
|
|
554
557
|
variant: "ghost",
|
|
555
558
|
size: "sm",
|
|
556
|
-
onClick:
|
|
559
|
+
onClick: Ct,
|
|
557
560
|
disabled: $,
|
|
558
|
-
children: u(
|
|
561
|
+
children: u(O, "sandbox.list.bulk.clearSelection", "Clear selection")
|
|
559
562
|
})
|
|
560
563
|
]
|
|
561
564
|
}), /* @__PURE__ */ x("div", {
|
|
562
565
|
className: "flex flex-wrap items-center gap-2",
|
|
563
566
|
children: [
|
|
564
567
|
/* @__PURE__ */ b(n, {
|
|
565
|
-
variant:
|
|
568
|
+
variant: dt ? "default" : "secondary",
|
|
566
569
|
className: "gap-1.5",
|
|
567
|
-
children: u(
|
|
570
|
+
children: u(O, "sandbox.list.bulk.selectedCount", "{count} selected", { count: ut.length })
|
|
568
571
|
}),
|
|
569
572
|
/* @__PURE__ */ x(r, {
|
|
570
573
|
variant: "outline",
|
|
571
|
-
onClick:
|
|
574
|
+
onClick: At,
|
|
572
575
|
disabled: $ || Z.length === 0,
|
|
573
576
|
children: [
|
|
574
|
-
|
|
577
|
+
ht ? /* @__PURE__ */ b(h, {
|
|
575
578
|
size: 16,
|
|
576
579
|
className: "animate-spin"
|
|
577
580
|
}) : /* @__PURE__ */ b(_, { size: 16 }),
|
|
578
|
-
u(
|
|
581
|
+
u(O, "sandbox.list.bulk.stopSelected", "Stop Selected"),
|
|
579
582
|
Z.length > 0 ? ` (${Z.length})` : ""
|
|
580
583
|
]
|
|
581
584
|
}),
|
|
582
585
|
/* @__PURE__ */ x(r, {
|
|
583
586
|
variant: "outline",
|
|
584
587
|
className: "text-status-error-text border-status-error-border/50 hover:bg-status-error-bg/10",
|
|
585
|
-
onClick:
|
|
588
|
+
onClick: jt,
|
|
586
589
|
disabled: $ || Q.length === 0,
|
|
587
590
|
children: [
|
|
588
|
-
|
|
591
|
+
gt ? /* @__PURE__ */ b(h, {
|
|
589
592
|
size: 16,
|
|
590
593
|
className: "animate-spin"
|
|
591
594
|
}) : /* @__PURE__ */ b(Pe, { size: 16 }),
|
|
592
|
-
u(
|
|
595
|
+
u(O, "sandbox.list.bulk.deleteSelected", "Delete Selected"),
|
|
593
596
|
Q.length > 0 ? ` (${Q.length})` : ""
|
|
594
597
|
]
|
|
595
598
|
})
|
|
@@ -597,21 +600,21 @@ function O() {
|
|
|
597
600
|
})]
|
|
598
601
|
}), /* @__PURE__ */ b("p", {
|
|
599
602
|
className: "text-xs text-text-secondary",
|
|
600
|
-
children: u(
|
|
603
|
+
children: u(O, "sandbox.list.bulk.helpText", "Select one, many, or every sandbox on the current filter set. Only running sandboxes can be stopped, and only stopped, failed, expired, or errored sandboxes can be deleted.")
|
|
601
604
|
})]
|
|
602
605
|
})
|
|
603
606
|
}),
|
|
604
607
|
/* @__PURE__ */ b("div", {
|
|
605
608
|
className: "space-y-3",
|
|
606
609
|
children: K.map((e, t) => {
|
|
607
|
-
let n =
|
|
610
|
+
let n = M.has(e.id);
|
|
608
611
|
return /* @__PURE__ */ b(i, {
|
|
609
612
|
className: l("cursor-pointer overflow-hidden group", "hover:shadow-md hover:border-primary/30 transition-all duration-200", "animate-in fade-in-0 slide-in-from-bottom-2", n && "border-primary/60 bg-action-primary-bg/5 shadow-sm"),
|
|
610
613
|
style: { animationDelay: `${t * 40}ms` },
|
|
611
|
-
onClick: () =>
|
|
614
|
+
onClick: () => bt(e.id),
|
|
612
615
|
tabIndex: 0,
|
|
613
616
|
onKeyDown: (t) => {
|
|
614
|
-
(t.key === "Enter" || t.key === " ") && (t.preventDefault(),
|
|
617
|
+
(t.key === "Enter" || t.key === " ") && (t.preventDefault(), bt(e.id));
|
|
615
618
|
},
|
|
616
619
|
"data-tour": "sandbox-list-item-card",
|
|
617
620
|
children: /* @__PURE__ */ b(a, {
|
|
@@ -623,9 +626,9 @@ function O() {
|
|
|
623
626
|
className: "pt-1",
|
|
624
627
|
children: /* @__PURE__ */ b(o, {
|
|
625
628
|
checked: n,
|
|
626
|
-
onCheckedChange: (t) =>
|
|
629
|
+
onCheckedChange: (t) => xt(e, t === !0),
|
|
627
630
|
onClick: (e) => e.stopPropagation(),
|
|
628
|
-
"aria-label": u(
|
|
631
|
+
"aria-label": u(O, "sandbox.list.item.select.ariaLabel", "Select sandbox {name}", { name: e.name })
|
|
629
632
|
})
|
|
630
633
|
}),
|
|
631
634
|
/* @__PURE__ */ b("div", {
|
|
@@ -655,36 +658,36 @@ function O() {
|
|
|
655
658
|
}), /* @__PURE__ */ x("div", {
|
|
656
659
|
className: l("flex items-center gap-1 transition-opacity flex-shrink-0", n ? "opacity-100" : "opacity-0 group-hover:opacity-100"),
|
|
657
660
|
children: [
|
|
658
|
-
|
|
661
|
+
qe(e) && /* @__PURE__ */ b(r, {
|
|
659
662
|
variant: "ghost",
|
|
660
663
|
size: "icon",
|
|
661
664
|
onClick: (t) => {
|
|
662
|
-
t.stopPropagation(),
|
|
665
|
+
t.stopPropagation(), Dt(e);
|
|
663
666
|
},
|
|
664
|
-
"aria-label": u(
|
|
667
|
+
"aria-label": u(O, "sandbox.list.item.actions.stop.ariaLabel", "Stop sandbox"),
|
|
665
668
|
children: /* @__PURE__ */ b(_, { size: 16 })
|
|
666
669
|
}),
|
|
667
|
-
|
|
670
|
+
Je(e) && /* @__PURE__ */ b(r, {
|
|
668
671
|
variant: "ghost",
|
|
669
672
|
size: "icon",
|
|
670
673
|
onClick: (t) => {
|
|
671
|
-
t.stopPropagation(),
|
|
674
|
+
t.stopPropagation(), nt({ variables: {
|
|
672
675
|
context: { workspaceId: z },
|
|
673
676
|
id: e.id,
|
|
674
677
|
additionalSeconds: 3600
|
|
675
678
|
} }).then(() => V());
|
|
676
679
|
},
|
|
677
|
-
"aria-label": u(
|
|
680
|
+
"aria-label": u(O, "sandbox.list.item.actions.extendTtl.ariaLabel", "Extend TTL"),
|
|
678
681
|
children: /* @__PURE__ */ b(Ne, { size: 16 })
|
|
679
682
|
}),
|
|
680
|
-
|
|
683
|
+
Ye(e) && /* @__PURE__ */ b(r, {
|
|
681
684
|
variant: "ghost",
|
|
682
685
|
size: "icon",
|
|
683
686
|
className: "text-status-error-text hover:text-status-error-text",
|
|
684
687
|
onClick: (t) => {
|
|
685
|
-
t.stopPropagation(),
|
|
688
|
+
t.stopPropagation(), Ot(e);
|
|
686
689
|
},
|
|
687
|
-
"aria-label": u(
|
|
690
|
+
"aria-label": u(O, "sandbox.list.item.actions.delete.ariaLabel", "Delete sandbox"),
|
|
688
691
|
children: /* @__PURE__ */ b(Pe, { size: 16 })
|
|
689
692
|
})
|
|
690
693
|
]
|
|
@@ -715,7 +718,7 @@ function O() {
|
|
|
715
718
|
className: "inline-flex items-center gap-1",
|
|
716
719
|
children: [
|
|
717
720
|
/* @__PURE__ */ b(Ae, { size: 12 }),
|
|
718
|
-
e.storage.mode === "EPHEMERAL" ? u(
|
|
721
|
+
e.storage.mode === "EPHEMERAL" ? u(O, "sandbox.list.item.storage.ephemeral", "Ephemeral") : u(O, "sandbox.list.item.storage.persistent", "Persistent"),
|
|
719
722
|
e.storage.sizeGi && ` ${e.storage.sizeGi}Gi`
|
|
720
723
|
]
|
|
721
724
|
})] }),
|
|
@@ -724,7 +727,7 @@ function O() {
|
|
|
724
727
|
children: "|"
|
|
725
728
|
}), /* @__PURE__ */ x("span", {
|
|
726
729
|
className: "inline-flex items-center gap-1",
|
|
727
|
-
children: [/* @__PURE__ */ b(ke, { size: 12 }), u(
|
|
730
|
+
children: [/* @__PURE__ */ b(ke, { size: 12 }), u(O, "sandbox.list.item.containers", "{count} container{count, plural, one {} other {s}}", { count: e.containers.length })]
|
|
728
731
|
})] }),
|
|
729
732
|
e.expiresAt && e.status === "RUNNING" && /* @__PURE__ */ x(y, { children: [/* @__PURE__ */ b("span", {
|
|
730
733
|
className: "text-text-secondary/40",
|
|
@@ -737,7 +740,7 @@ function O() {
|
|
|
737
740
|
className: "text-text-secondary/40",
|
|
738
741
|
children: "|"
|
|
739
742
|
}),
|
|
740
|
-
/* @__PURE__ */ b("span", { children: u(
|
|
743
|
+
/* @__PURE__ */ b("span", { children: u(O, "sandbox.list.item.created", "Created {time}", { time: Ge(e.createdAt) }) })
|
|
741
744
|
]
|
|
742
745
|
}),
|
|
743
746
|
e.errorMessage && /* @__PURE__ */ x("div", {
|
|
@@ -759,14 +762,14 @@ function O() {
|
|
|
759
762
|
})
|
|
760
763
|
}),
|
|
761
764
|
G > 1 && /* @__PURE__ */ b(i, {
|
|
762
|
-
className: "animate-in fade-in-0 duration-
|
|
765
|
+
className: "animate-in fade-in-0 duration-200",
|
|
763
766
|
children: /* @__PURE__ */ x(a, {
|
|
764
767
|
className: "p-4 flex flex-col sm:flex-row items-center justify-between gap-3",
|
|
765
768
|
children: [/* @__PURE__ */ b("p", {
|
|
766
769
|
className: "text-sm text-text-secondary",
|
|
767
|
-
children: u(
|
|
768
|
-
from: (
|
|
769
|
-
to: Math.min(
|
|
770
|
+
children: u(O, "sandbox.list.pagination.showing", "Showing {from}-{to} of {total}", {
|
|
771
|
+
from: (A - 1) * 20 + 1,
|
|
772
|
+
to: Math.min(A * 20, W),
|
|
770
773
|
total: W
|
|
771
774
|
})
|
|
772
775
|
}), /* @__PURE__ */ x("div", {
|
|
@@ -775,25 +778,25 @@ function O() {
|
|
|
775
778
|
/* @__PURE__ */ b(r, {
|
|
776
779
|
variant: "outline",
|
|
777
780
|
size: "icon",
|
|
778
|
-
onClick: () =>
|
|
779
|
-
disabled:
|
|
780
|
-
"aria-label": u(
|
|
781
|
+
onClick: () => j((e) => Math.max(1, e - 1)),
|
|
782
|
+
disabled: A === 1,
|
|
783
|
+
"aria-label": u(O, "sandbox.list.pagination.previous.ariaLabel", "Previous page"),
|
|
781
784
|
children: /* @__PURE__ */ b(De, { size: 18 })
|
|
782
785
|
}),
|
|
783
786
|
/* @__PURE__ */ b(n, {
|
|
784
787
|
variant: "secondary",
|
|
785
788
|
className: "px-4 py-2 text-sm",
|
|
786
|
-
children: u(
|
|
787
|
-
current:
|
|
789
|
+
children: u(O, "sandbox.list.pagination.pageOf", "Page {current} of {total}", {
|
|
790
|
+
current: A,
|
|
788
791
|
total: G
|
|
789
792
|
})
|
|
790
793
|
}),
|
|
791
794
|
/* @__PURE__ */ b(r, {
|
|
792
795
|
variant: "outline",
|
|
793
796
|
size: "icon",
|
|
794
|
-
onClick: () =>
|
|
795
|
-
disabled:
|
|
796
|
-
"aria-label": u(
|
|
797
|
+
onClick: () => j((e) => Math.min(G, e + 1)),
|
|
798
|
+
disabled: A === G,
|
|
799
|
+
"aria-label": u(O, "sandbox.list.pagination.next.ariaLabel", "Next page"),
|
|
797
800
|
children: /* @__PURE__ */ b(Oe, { size: 18 })
|
|
798
801
|
})
|
|
799
802
|
]
|
|
@@ -801,28 +804,41 @@ function O() {
|
|
|
801
804
|
})
|
|
802
805
|
})
|
|
803
806
|
] }) : /* @__PURE__ */ b(de, {
|
|
804
|
-
icon: b(q ?
|
|
805
|
-
title: q ? u(
|
|
806
|
-
description: q ? u(
|
|
807
|
+
icon: b(q ? g : Te, { size: 48 }),
|
|
808
|
+
title: q ? u(O, "sandbox.list.empty.filtered.title", "No matching sandboxes") : u(O, "sandbox.list.empty.title", "No sandboxes yet"),
|
|
809
|
+
description: q ? u(O, "sandbox.list.empty.filtered.description", "Try adjusting your search or filters to find what you're looking for.") : u(O, "sandbox.list.empty.description", "Create your first sandbox to start building and testing in isolated environments."),
|
|
807
810
|
action: q ? /* @__PURE__ */ x(r, {
|
|
808
811
|
variant: "outline",
|
|
809
|
-
onClick:
|
|
810
|
-
children: [/* @__PURE__ */ b(v, { size: 16 }), u(
|
|
812
|
+
onClick: vt,
|
|
813
|
+
children: [/* @__PURE__ */ b(v, { size: 16 }), u(O, "sandbox.list.empty.filtered.clearFilters", "Clear Filters")]
|
|
811
814
|
}) : /* @__PURE__ */ x(r, {
|
|
812
|
-
onClick:
|
|
813
|
-
children: [/* @__PURE__ */ b(
|
|
815
|
+
onClick: yt,
|
|
816
|
+
children: [/* @__PURE__ */ b(Me, { size: 16 }), u(O, "sandbox.list.empty.createFirst", "Create First Sandbox")]
|
|
814
817
|
})
|
|
815
818
|
})
|
|
816
819
|
}),
|
|
817
820
|
/* @__PURE__ */ b(me, {
|
|
818
821
|
workspaceId: z ?? "",
|
|
819
|
-
open:
|
|
820
|
-
onClose: () =>
|
|
822
|
+
open: it,
|
|
823
|
+
onClose: () => at(!1)
|
|
824
|
+
}),
|
|
825
|
+
/* @__PURE__ */ b(Le, {
|
|
826
|
+
open: $e !== null,
|
|
827
|
+
onOpenChange: (e) => {
|
|
828
|
+
e || R(null);
|
|
829
|
+
},
|
|
830
|
+
children: /* @__PURE__ */ x(Be, { children: [/* @__PURE__ */ x(Ue, { children: [/* @__PURE__ */ b(We, { children: u(O, "sandbox.list.bulk.deleteSelected", "Delete Selected") }), /* @__PURE__ */ b(Ve, { children: $e?.message })] }), /* @__PURE__ */ x(He, { children: [/* @__PURE__ */ b(ze, { children: "Cancel" }), /* @__PURE__ */ b(Re, {
|
|
831
|
+
className: "bg-status-error-bg text-status-error-text hover:bg-status-error-bg/90",
|
|
832
|
+
onClick: () => {
|
|
833
|
+
Mt();
|
|
834
|
+
},
|
|
835
|
+
children: "Delete"
|
|
836
|
+
})] })] })
|
|
821
837
|
})
|
|
822
838
|
]
|
|
823
839
|
});
|
|
824
840
|
}
|
|
825
841
|
//#endregion
|
|
826
|
-
export {
|
|
842
|
+
export { D as SandboxListPage };
|
|
827
843
|
|
|
828
844
|
//# sourceMappingURL=SandboxListPage.js.map
|