@burdenoff/microfe-devportal 2026.624.25 → 2026.624.27
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.
|
@@ -18,11 +18,11 @@ import { useDevportalPermission as se } from "../hooks/usePermission.js";
|
|
|
18
18
|
import { usePackageUpload as k } from "../hooks/usePackageUpload.js";
|
|
19
19
|
import { useCallback as A, useEffect as ce, useMemo as j, useRef as M, useState as N } from "react";
|
|
20
20
|
import { useI18n as P } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
21
|
-
import { AlertCircle as le, AppWindow as F, BarChart3 as I, CheckCircle as L, CheckCircle2 as
|
|
21
|
+
import { AlertCircle as le, AppWindow as F, BarChart3 as I, CheckCircle as L, CheckCircle2 as ue, Clock as de, Download as fe, Edit as pe, ExternalLink as R, FlaskConical as me, Info as z, Key as he, Loader2 as B, MoreHorizontal as ge, Plus as V, Power as _e, RefreshCw as ve, SendHorizontal as ye, Shield as H, Store as be, Upload as U, Users as W, Webhook as xe, X as Se, XCircle as Ce } from "lucide-react";
|
|
22
22
|
import { useParams as we, useSearchParams as Te } from "react-router-dom";
|
|
23
23
|
import { Fragment as G, jsx as K, jsxs as q } from "react/jsx-runtime";
|
|
24
24
|
import { gql as J } from "@apollo/client";
|
|
25
|
-
import { useMutation as
|
|
25
|
+
import { useMutation as Ee, useQuery as Y } from "@apollo/client/react";
|
|
26
26
|
//#region src/devportal/pages/ApplicationDetailPage.tsx
|
|
27
27
|
function De(e) {
|
|
28
28
|
return e ? {
|
|
@@ -103,7 +103,7 @@ function Oe(e) {
|
|
|
103
103
|
updatedAt: e.updatedAt
|
|
104
104
|
};
|
|
105
105
|
}
|
|
106
|
-
function
|
|
106
|
+
function X(e) {
|
|
107
107
|
return {
|
|
108
108
|
id: e.id,
|
|
109
109
|
applicationId: e.applicationId,
|
|
@@ -119,7 +119,7 @@ function ke(e) {
|
|
|
119
119
|
createdAt: e.createdAt
|
|
120
120
|
};
|
|
121
121
|
}
|
|
122
|
-
function
|
|
122
|
+
function ke(e) {
|
|
123
123
|
return {
|
|
124
124
|
id: e.id,
|
|
125
125
|
appId: e.appId,
|
|
@@ -141,7 +141,7 @@ function Ae(e) {
|
|
|
141
141
|
revokedBy: e.revokedBy || void 0
|
|
142
142
|
};
|
|
143
143
|
}
|
|
144
|
-
var
|
|
144
|
+
var Ae = [
|
|
145
145
|
{
|
|
146
146
|
id: "overview",
|
|
147
147
|
label: "Overview",
|
|
@@ -150,7 +150,7 @@ var je = [
|
|
|
150
150
|
{
|
|
151
151
|
id: "permissions",
|
|
152
152
|
label: "Permissions",
|
|
153
|
-
icon:
|
|
153
|
+
icon: H
|
|
154
154
|
},
|
|
155
155
|
{
|
|
156
156
|
id: "webhooks",
|
|
@@ -160,7 +160,7 @@ var je = [
|
|
|
160
160
|
{
|
|
161
161
|
id: "delegations",
|
|
162
162
|
label: "Delegations",
|
|
163
|
-
icon:
|
|
163
|
+
icon: W
|
|
164
164
|
},
|
|
165
165
|
{
|
|
166
166
|
id: "analytics",
|
|
@@ -170,20 +170,20 @@ var je = [
|
|
|
170
170
|
{
|
|
171
171
|
id: "playground",
|
|
172
172
|
label: "API Playground",
|
|
173
|
-
icon:
|
|
173
|
+
icon: R
|
|
174
174
|
},
|
|
175
175
|
{
|
|
176
176
|
id: "store-listing",
|
|
177
177
|
label: "Marketplace Listing",
|
|
178
|
-
icon:
|
|
178
|
+
icon: be
|
|
179
179
|
}
|
|
180
|
-
],
|
|
180
|
+
], je = {
|
|
181
181
|
ACTIVE: "bg-status-success-bg-subtle text-status-success-text",
|
|
182
182
|
REVOKED: "bg-status-error-bg-subtle text-status-error-text",
|
|
183
183
|
EXPIRED: "bg-bg-sunken text-text-secondary"
|
|
184
184
|
}, Z = ({ message: e = "Loading..." }) => /* @__PURE__ */ q("div", {
|
|
185
185
|
className: "flex items-center justify-center gap-3 py-12",
|
|
186
|
-
children: [/* @__PURE__ */ K(
|
|
186
|
+
children: [/* @__PURE__ */ K(B, {
|
|
187
187
|
size: 20,
|
|
188
188
|
className: "animate-spin text-muted-foreground"
|
|
189
189
|
}), /* @__PURE__ */ K("p", {
|
|
@@ -211,59 +211,63 @@ var je = [
|
|
|
211
211
|
"analytics",
|
|
212
212
|
"playground",
|
|
213
213
|
"store-listing"
|
|
214
|
-
], T = v.get("tab"), [E, D] = N(T && C.includes(T) ? T : "overview")
|
|
214
|
+
], T = v.get("tab"), [E, D] = N(T && C.includes(T) ? T : "overview");
|
|
215
|
+
ce(() => {
|
|
216
|
+
T && C.includes(T) && T !== E && D(T);
|
|
217
|
+
}, [T]);
|
|
218
|
+
let re = (e) => {
|
|
215
219
|
D(e), b((t) => (t.set("tab", e), t), { replace: !0 });
|
|
216
|
-
}, [ie, k] = N(!1), [
|
|
220
|
+
}, [ie, k] = N(!1), [j, M] = N(!1), [I, L] = N(null), [ue, fe] = N(!1), { data: R, loading: z, error: he } = s({
|
|
217
221
|
variables: { id: g },
|
|
218
222
|
skip: !g
|
|
219
|
-
}), [
|
|
223
|
+
}), [ge, { loading: V }] = h(), [H, { loading: be }] = a(), [U, { loading: W }] = p(), [xe, { loading: Se }] = _(), { data: G, refetch: J } = f({
|
|
220
224
|
variables: {
|
|
221
225
|
applicationId: g,
|
|
222
226
|
workspaceId: c ?? void 0
|
|
223
227
|
},
|
|
224
228
|
skip: !c || !g,
|
|
225
229
|
fetchPolicy: "cache-and-network"
|
|
226
|
-
}),
|
|
230
|
+
}), Ee = G?.appInstallations?.edges?.[0]?.node ?? null, Y = A((e) => {
|
|
227
231
|
i?.(`${o}${e}`);
|
|
228
|
-
}, [i, o]),
|
|
229
|
-
let e =
|
|
232
|
+
}, [i, o]), Oe = A(async () => {
|
|
233
|
+
let e = R?.application?.appId;
|
|
230
234
|
if (e) try {
|
|
231
|
-
let t = (await
|
|
232
|
-
t &&
|
|
235
|
+
let t = (await ge({ variables: { id: e } })).data?.rotateAppSecret.clientSecret;
|
|
236
|
+
t && L(t), k(!1);
|
|
233
237
|
} catch {}
|
|
234
|
-
}, [
|
|
238
|
+
}, [R?.application?.appId, ge]), X = A(async () => {
|
|
235
239
|
if (g) try {
|
|
236
|
-
await
|
|
240
|
+
await H({ variables: { id: g } }), M(!1), Y("/apps");
|
|
237
241
|
} catch {}
|
|
238
242
|
}, [
|
|
239
243
|
g,
|
|
240
|
-
|
|
244
|
+
H,
|
|
241
245
|
Y
|
|
242
246
|
]), ke = A(async () => {
|
|
243
247
|
if (!(!g || !c)) try {
|
|
244
|
-
await
|
|
248
|
+
await U({ variables: { input: {
|
|
245
249
|
applicationId: g,
|
|
246
250
|
scope: "WORKSPACE",
|
|
247
251
|
workspaceId: c,
|
|
248
252
|
autoUpdate: !1
|
|
249
|
-
} } }),
|
|
253
|
+
} } }), J(), w("success");
|
|
250
254
|
} catch (e) {
|
|
251
255
|
console.error("[DevPortal] Test in Workspace failed:", e), w("error");
|
|
252
256
|
}
|
|
253
257
|
}, [
|
|
254
258
|
g,
|
|
255
259
|
c,
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
]),
|
|
260
|
+
U,
|
|
261
|
+
J
|
|
262
|
+
]), je = A(async (e) => {
|
|
259
263
|
try {
|
|
260
|
-
await
|
|
264
|
+
await xe({ variables: { id: e } }), J(), w("success");
|
|
261
265
|
} catch {
|
|
262
266
|
w("error");
|
|
263
267
|
}
|
|
264
|
-
}, [
|
|
265
|
-
if (
|
|
266
|
-
if (
|
|
268
|
+
}, [xe, J]);
|
|
269
|
+
if (z && !R) return /* @__PURE__ */ K(n, { message: u("devportal.loadingApplication", "Loading application...") });
|
|
270
|
+
if (he) return /* @__PURE__ */ K(y, {
|
|
267
271
|
title: u("devportal.error", "Error"),
|
|
268
272
|
backLink: `${o}/apps`,
|
|
269
273
|
backLabel: u("devportal.backToApplications", "Back to Applications"),
|
|
@@ -280,43 +284,43 @@ var je = [
|
|
|
280
284
|
}),
|
|
281
285
|
/* @__PURE__ */ K("p", {
|
|
282
286
|
className: "text-sm text-muted-foreground",
|
|
283
|
-
children:
|
|
287
|
+
children: he.message
|
|
284
288
|
})
|
|
285
289
|
]
|
|
286
290
|
})
|
|
287
291
|
});
|
|
288
|
-
let
|
|
289
|
-
return
|
|
290
|
-
title:
|
|
291
|
-
description:
|
|
292
|
+
let Z = De(R?.application);
|
|
293
|
+
return Z ? /* @__PURE__ */ q(y, {
|
|
294
|
+
title: Z.name,
|
|
295
|
+
description: Z.shortDescription,
|
|
292
296
|
backLink: `${o}/apps`,
|
|
293
297
|
backLabel: u("devportal.backToApplications", "Back to Applications"),
|
|
294
298
|
actions: /* @__PURE__ */ q("div", {
|
|
295
299
|
className: "flex items-center gap-2",
|
|
296
300
|
children: [
|
|
297
|
-
|
|
301
|
+
Z.appType !== "NODE" && Z.appType !== "WORKFLOW" && /* @__PURE__ */ q("button", {
|
|
298
302
|
onClick: () => k(!0),
|
|
299
|
-
disabled: !
|
|
300
|
-
title:
|
|
303
|
+
disabled: !Z.appId,
|
|
304
|
+
title: Z.appId ? u("devportal.rotateSecretHint", "Generate a new client secret") : u("devportal.rotateSecretNoClient", "Create an OAuth client first to enable secret rotation"),
|
|
301
305
|
className: "inline-flex items-center gap-2 rounded-md border px-4 py-2 text-sm font-medium hover:bg-muted transition-colors disabled:opacity-50 disabled:cursor-not-allowed",
|
|
302
|
-
children: [/* @__PURE__ */ K(
|
|
306
|
+
children: [/* @__PURE__ */ K(ve, { size: 16 }), u("devportal.rotateSecret", "Rotate Secret")]
|
|
303
307
|
}),
|
|
304
308
|
/* @__PURE__ */ q("button", {
|
|
305
|
-
onClick: () => Y(`/apps/${
|
|
309
|
+
onClick: () => Y(`/apps/${Z.id}/versions`),
|
|
306
310
|
className: "inline-flex items-center gap-2 rounded-md border px-4 py-2 text-sm font-medium hover:bg-muted transition-colors",
|
|
307
|
-
children: [/* @__PURE__ */ K(
|
|
311
|
+
children: [/* @__PURE__ */ K(de, { size: 16 }), u("devportal.versions", "Versions")]
|
|
308
312
|
}),
|
|
309
|
-
|
|
310
|
-
onClick: () => Y(`/apps/${
|
|
313
|
+
Z.status !== "PUBLISHED" && /* @__PURE__ */ q("button", {
|
|
314
|
+
onClick: () => Y(`/apps/${Z.id}/publish`),
|
|
311
315
|
className: "inline-flex items-center gap-2 rounded-md border border-primary/40 px-4 py-2 text-sm font-medium text-primary hover:bg-primary/10 transition-colors",
|
|
312
|
-
children: [/* @__PURE__ */ K(
|
|
316
|
+
children: [/* @__PURE__ */ K(ye, { size: 16 }), u("devportal.submitForReview", "Submit for Review")]
|
|
313
317
|
}),
|
|
314
|
-
|
|
315
|
-
onClick: () => void
|
|
316
|
-
disabled:
|
|
318
|
+
Z.appType !== "NODE" && Z.appType !== "WORKFLOW" && (Ee ? /* @__PURE__ */ q("button", {
|
|
319
|
+
onClick: () => void je(Ee.id),
|
|
320
|
+
disabled: Se || !c,
|
|
317
321
|
title: u("devportal.uninstallFromWorkspace", "Uninstall this app from your current workspace"),
|
|
318
322
|
className: "inline-flex items-center gap-2 rounded-md border border-destructive/50 px-4 py-2 text-sm font-medium text-destructive hover:bg-destructive/10 transition-colors disabled:opacity-50",
|
|
319
|
-
children: [
|
|
323
|
+
children: [Se ? /* @__PURE__ */ K(B, {
|
|
320
324
|
size: 16,
|
|
321
325
|
className: "animate-spin"
|
|
322
326
|
}) : /* @__PURE__ */ K(Ce, { size: 16 }), u("devportal.uninstallFromWorkspace", "Uninstall from Workspace")]
|
|
@@ -326,58 +330,58 @@ var je = [
|
|
|
326
330
|
"aria-disabled": !c,
|
|
327
331
|
title: c ? u("devportal.testInWorkspaceHint", "Install this app into your current workspace to test it") : u("devportal.noWorkspaceContext", "No workspace context available"),
|
|
328
332
|
className: "inline-flex items-center gap-2 rounded-md border px-4 py-2 text-sm font-medium hover:bg-muted transition-colors disabled:opacity-50",
|
|
329
|
-
children: [W ? /* @__PURE__ */ K(
|
|
333
|
+
children: [W ? /* @__PURE__ */ K(B, {
|
|
330
334
|
size: 16,
|
|
331
335
|
className: "animate-spin"
|
|
332
|
-
}) : /* @__PURE__ */ K(
|
|
336
|
+
}) : /* @__PURE__ */ K(me, { size: 16 }), u("devportal.testInWorkspace", "Test in Workspace")]
|
|
333
337
|
})),
|
|
334
|
-
|
|
335
|
-
onClick: () => i?.(`/workflows/new?nodeId=${
|
|
338
|
+
Z.appType === "NODE" && /* @__PURE__ */ q("button", {
|
|
339
|
+
onClick: () => i?.(`/workflows/new?nodeId=${Z.id}`),
|
|
336
340
|
disabled: !c,
|
|
337
341
|
"aria-disabled": !c,
|
|
338
342
|
title: c ? u("devportal.testInWorkflowBuilderHint", "Open a new workflow with this node available in the builder") : u("devportal.noWorkspaceContext", "No workspace context available"),
|
|
339
343
|
className: "inline-flex items-center gap-2 rounded-md border px-4 py-2 text-sm font-medium hover:bg-muted transition-colors disabled:opacity-50",
|
|
340
|
-
children: [/* @__PURE__ */ K(
|
|
344
|
+
children: [/* @__PURE__ */ K(me, { size: 16 }), u("devportal.testInWorkflowBuilder", "Test in Workflow Builder")]
|
|
341
345
|
}),
|
|
342
346
|
/* @__PURE__ */ q("button", {
|
|
343
|
-
onClick: () => Y(`/apps/${
|
|
347
|
+
onClick: () => Y(`/apps/${Z.id}/edit`),
|
|
344
348
|
disabled: !d,
|
|
345
349
|
"aria-disabled": !d,
|
|
346
350
|
className: "inline-flex items-center gap-2 rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground hover:bg-primary/90 transition-colors disabled:opacity-50",
|
|
347
|
-
children: [/* @__PURE__ */ K(
|
|
351
|
+
children: [/* @__PURE__ */ K(pe, { size: 16 }), u("devportal.editApp", "Edit App")]
|
|
348
352
|
}),
|
|
349
353
|
/* @__PURE__ */ q("button", {
|
|
350
|
-
onClick: () =>
|
|
354
|
+
onClick: () => M(!0),
|
|
351
355
|
disabled: !m,
|
|
352
356
|
"aria-disabled": !m,
|
|
353
357
|
className: "inline-flex items-center gap-2 rounded-md border border-border-subtle px-4 py-2 text-sm font-medium text-status-error-text hover:bg-status-error-bg-subtle transition-colors disabled:opacity-50",
|
|
354
|
-
children: [/* @__PURE__ */ K(
|
|
358
|
+
children: [/* @__PURE__ */ K(_e, { size: 16 }), u("devportal.deactivate", "Deactivate")]
|
|
355
359
|
})
|
|
356
360
|
]
|
|
357
361
|
}),
|
|
358
362
|
children: [
|
|
359
|
-
|
|
363
|
+
I && /* @__PURE__ */ K(ne, {
|
|
360
364
|
title: u("devportal.newAppSecretGenerated", "New App Secret Generated"),
|
|
361
|
-
secret:
|
|
365
|
+
secret: I,
|
|
362
366
|
description: u("devportal.appSecretRotatedDescription", "Your app secret has been rotated. The old secret is no longer valid."),
|
|
363
|
-
onDismiss: () =>
|
|
367
|
+
onDismiss: () => L(null)
|
|
364
368
|
}),
|
|
365
369
|
/* @__PURE__ */ q("div", {
|
|
366
370
|
className: "flex flex-wrap items-center gap-2",
|
|
367
371
|
children: [
|
|
368
372
|
/* @__PURE__ */ K(S, {
|
|
369
|
-
status:
|
|
373
|
+
status: Z.status,
|
|
370
374
|
type: "app"
|
|
371
375
|
}),
|
|
372
376
|
/* @__PURE__ */ K(S, {
|
|
373
|
-
status:
|
|
377
|
+
status: Z.visibility,
|
|
374
378
|
type: "app"
|
|
375
379
|
}),
|
|
376
|
-
|
|
377
|
-
|
|
380
|
+
Z.isVerified && /* @__PURE__ */ K(te, { verified: !0 }),
|
|
381
|
+
Z.isFeatured && /* @__PURE__ */ K(x, {}),
|
|
378
382
|
/* @__PURE__ */ K("span", {
|
|
379
383
|
className: "text-sm text-muted-foreground",
|
|
380
|
-
children: ee[
|
|
384
|
+
children: ee[Z.appType] || Z.appType
|
|
381
385
|
})
|
|
382
386
|
]
|
|
383
387
|
}),
|
|
@@ -387,7 +391,7 @@ var je = [
|
|
|
387
391
|
className: "-mb-px flex gap-4 overflow-x-auto",
|
|
388
392
|
role: "tablist",
|
|
389
393
|
"aria-label": u("devportal.applicationSections", "Application sections"),
|
|
390
|
-
children:
|
|
394
|
+
children: Ae.filter((e) => !((Z.appType === "NODE" || Z.appType === "WORKFLOW") && (e.id === "permissions" || e.id === "webhooks" || e.id === "delegations" || e.id === "playground"))).map((e) => {
|
|
391
395
|
let n = e.icon;
|
|
392
396
|
return /* @__PURE__ */ q("button", {
|
|
393
397
|
id: `application-tab-${e.id}`,
|
|
@@ -408,53 +412,53 @@ var je = [
|
|
|
408
412
|
"aria-labelledby": `application-tab-${E}`,
|
|
409
413
|
tabIndex: 0,
|
|
410
414
|
children: [
|
|
411
|
-
E === "overview" && /* @__PURE__ */ K(Le, { app:
|
|
412
|
-
E === "permissions" && /* @__PURE__ */ K(tt, { app:
|
|
415
|
+
E === "overview" && /* @__PURE__ */ K(Le, { app: Z }),
|
|
416
|
+
E === "permissions" && /* @__PURE__ */ K(tt, { app: Z }),
|
|
413
417
|
E === "webhooks" && /* @__PURE__ */ K(Pe, {
|
|
414
|
-
appId:
|
|
418
|
+
appId: Z.id,
|
|
415
419
|
onNavigate: Y
|
|
416
420
|
}),
|
|
417
421
|
E === "delegations" && /* @__PURE__ */ K(Fe, {
|
|
418
|
-
authAppId:
|
|
419
|
-
appName:
|
|
420
|
-
onGrantDelegation: () =>
|
|
422
|
+
authAppId: Z.appId || void 0,
|
|
423
|
+
appName: Z.name,
|
|
424
|
+
onGrantDelegation: () => fe(!0),
|
|
421
425
|
onNavigate: Y
|
|
422
426
|
}),
|
|
423
|
-
E === "analytics" && /* @__PURE__ */ K(Ie, { app:
|
|
424
|
-
E === "playground" && /* @__PURE__ */ K(He, { app:
|
|
425
|
-
E === "store-listing" && /* @__PURE__ */ K(Qe, { app:
|
|
427
|
+
E === "analytics" && /* @__PURE__ */ K(Ie, { app: Z }),
|
|
428
|
+
E === "playground" && /* @__PURE__ */ K(He, { app: Z }),
|
|
429
|
+
E === "store-listing" && /* @__PURE__ */ K(Qe, { app: Z })
|
|
426
430
|
]
|
|
427
431
|
}),
|
|
428
432
|
/* @__PURE__ */ K(O, {
|
|
429
433
|
open: ie,
|
|
430
434
|
onOpenChange: k,
|
|
431
|
-
onConfirm:
|
|
435
|
+
onConfirm: Oe,
|
|
432
436
|
title: u("devportal.rotateAppSecret", "Rotate App Secret"),
|
|
433
437
|
description: u("devportal.rotateAppSecretDescription", "This will generate a new client secret and invalidate the current one. All existing integrations using the old secret will stop working immediately."),
|
|
434
438
|
confirmLabel: u("devportal.rotateSecret", "Rotate Secret"),
|
|
435
439
|
cancelLabel: u("devportal.cancel", "Cancel"),
|
|
436
440
|
variant: "warning",
|
|
437
|
-
loading:
|
|
441
|
+
loading: V
|
|
438
442
|
}),
|
|
439
443
|
/* @__PURE__ */ K(O, {
|
|
440
|
-
open:
|
|
441
|
-
onOpenChange:
|
|
442
|
-
onConfirm:
|
|
444
|
+
open: j,
|
|
445
|
+
onOpenChange: M,
|
|
446
|
+
onConfirm: X,
|
|
443
447
|
title: u("devportal.deactivateApplication", "Deactivate Application"),
|
|
444
448
|
description: u("devportal.deactivateApplicationDescription", "This will deactivate the application. All OAuth clients, API keys, and webhooks associated with this app will stop functioning. This action can be reversed by reactivating the app."),
|
|
445
449
|
confirmLabel: u("devportal.deactivate", "Deactivate"),
|
|
446
450
|
cancelLabel: u("devportal.cancel", "Cancel"),
|
|
447
451
|
variant: "destructive",
|
|
448
|
-
loading:
|
|
452
|
+
loading: be
|
|
449
453
|
}),
|
|
450
454
|
/* @__PURE__ */ K(ae, {
|
|
451
|
-
open:
|
|
452
|
-
onOpenChange:
|
|
453
|
-
appId:
|
|
454
|
-
appName:
|
|
455
|
-
appScopes:
|
|
455
|
+
open: ue,
|
|
456
|
+
onOpenChange: fe,
|
|
457
|
+
appId: Z.appId || "",
|
|
458
|
+
appName: Z.name,
|
|
459
|
+
appScopes: Z.scopes?.map((e) => e.scope) ?? [],
|
|
456
460
|
onSuccess: () => {
|
|
457
|
-
|
|
461
|
+
fe(!1);
|
|
458
462
|
}
|
|
459
463
|
})
|
|
460
464
|
]
|
|
@@ -482,7 +486,7 @@ var je = [
|
|
|
482
486
|
let { t: o } = P(), s = (e, t) => {
|
|
483
487
|
let n = o(e);
|
|
484
488
|
return n === e ? t : n;
|
|
485
|
-
}, { data: c, loading: l, error: u, refetch: d } = i(), [f] = m(), [p, h] = N([]), [g, _] = N(!1), [v, y] = N(/* @__PURE__ */ new Set()), [b, ee] = N(null), x = j(() => c?.currentUserDelegations?.delegations ? c.currentUserDelegations.delegations.filter((t) => t.appId === e).map(
|
|
489
|
+
}, { data: c, loading: l, error: u, refetch: d } = i(), [f] = m(), [p, h] = N([]), [g, _] = N(!1), [v, y] = N(/* @__PURE__ */ new Set()), [b, ee] = N(null), x = j(() => c?.currentUserDelegations?.delegations ? c.currentUserDelegations.delegations.filter((t) => t.appId === e).map(ke) : [], [e, c]), S = j(() => x.filter((e) => e.status === "ACTIVE"), [x]), te = j(() => S.filter((e) => v.has(e.id)), [S, v]), C = S.length > 0 && S.every((e) => v.has(e.id)), w = S.some((e) => v.has(e.id)) && !C, ne = A((e, t) => {
|
|
486
490
|
y((n) => {
|
|
487
491
|
let r = new Set(n);
|
|
488
492
|
return t ? r.add(e) : r.delete(e), r;
|
|
@@ -549,13 +553,13 @@ var je = [
|
|
|
549
553
|
loading: g
|
|
550
554
|
})
|
|
551
555
|
] }) : /* @__PURE__ */ K(r, {
|
|
552
|
-
icon: /* @__PURE__ */ K(
|
|
556
|
+
icon: /* @__PURE__ */ K(H, { size: 32 }),
|
|
553
557
|
title: s("devportal.linkAuthAppFirst", "Link an auth app first"),
|
|
554
558
|
description: s("devportal.linkAuthAppFirstDescription", "Delegations are managed through auth apps. Create or link an auth app before granting app-as-user access."),
|
|
555
559
|
action: /* @__PURE__ */ q("button", {
|
|
556
560
|
onClick: () => a("/oauth"),
|
|
557
561
|
className: "inline-flex items-center gap-2 rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground hover:bg-primary/90",
|
|
558
|
-
children: [/* @__PURE__ */ K(
|
|
562
|
+
children: [/* @__PURE__ */ K(R, { size: 16 }), s("devportal.manageOAuthApps", "Manage OAuth Apps")]
|
|
559
563
|
})
|
|
560
564
|
});
|
|
561
565
|
}, Ie = ({ app: e }) => {
|
|
@@ -644,7 +648,7 @@ var je = [
|
|
|
644
648
|
})]
|
|
645
649
|
});
|
|
646
650
|
}
|
|
647
|
-
return _ ? /* @__PURE__ */ K(Z, { message: n("devportal.loadingAnalytics", "Loading analytics...") }) : v ? /* @__PURE__ */ K(Me, { message: v.message }) : /* @__PURE__ */ K(Be, { analytics: (g?.applicationAnalytics ?? []).map(
|
|
651
|
+
return _ ? /* @__PURE__ */ K(Z, { message: n("devportal.loadingAnalytics", "Loading analytics...") }) : v ? /* @__PURE__ */ K(Me, { message: v.message }) : /* @__PURE__ */ K(Be, { analytics: (g?.applicationAnalytics ?? []).map(X) });
|
|
648
652
|
}, Le = ({ app: t }) => {
|
|
649
653
|
let { t: n } = P(), r = (e, t) => {
|
|
650
654
|
let r = n(e);
|
|
@@ -704,7 +708,7 @@ var je = [
|
|
|
704
708
|
children: c.map((e, t) => /* @__PURE__ */ q("div", {
|
|
705
709
|
className: "flex items-center gap-2 text-sm",
|
|
706
710
|
children: [
|
|
707
|
-
e.done ? /* @__PURE__ */ K(
|
|
711
|
+
e.done ? /* @__PURE__ */ K(ue, {
|
|
708
712
|
size: 14,
|
|
709
713
|
className: "text-status-success-text shrink-0"
|
|
710
714
|
}) : /* @__PURE__ */ K("div", { className: "h-3.5 w-3.5 rounded-full border-2 border-muted-foreground/40 shrink-0" }),
|
|
@@ -870,7 +874,7 @@ var je = [
|
|
|
870
874
|
}), /* @__PURE__ */ q("button", {
|
|
871
875
|
onClick: () => n(`/apps/${e}/webhooks/new`),
|
|
872
876
|
className: "inline-flex items-center gap-2 rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground hover:bg-primary/90 transition-colors",
|
|
873
|
-
children: [/* @__PURE__ */ K(
|
|
877
|
+
children: [/* @__PURE__ */ K(V, { size: 16 }), a("devportal.addWebhook", "Add Webhook")]
|
|
874
878
|
})]
|
|
875
879
|
}), t.length > 0 ? /* @__PURE__ */ K("div", {
|
|
876
880
|
className: "space-y-4",
|
|
@@ -894,7 +898,7 @@ var je = [
|
|
|
894
898
|
})] }), /* @__PURE__ */ K("button", {
|
|
895
899
|
onClick: () => n(`/apps/${e}/webhooks/${t.id}`),
|
|
896
900
|
className: "rounded-md p-1 hover:bg-muted",
|
|
897
|
-
children: /* @__PURE__ */ K(
|
|
901
|
+
children: /* @__PURE__ */ K(ge, { size: 20 })
|
|
898
902
|
})]
|
|
899
903
|
}),
|
|
900
904
|
/* @__PURE__ */ q("div", { children: [/* @__PURE__ */ K("p", {
|
|
@@ -956,7 +960,7 @@ var je = [
|
|
|
956
960
|
action: /* @__PURE__ */ q("button", {
|
|
957
961
|
onClick: () => n(`/apps/${e}/webhooks/new`),
|
|
958
962
|
className: "inline-flex items-center gap-2 rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground hover:bg-primary/90",
|
|
959
|
-
children: [/* @__PURE__ */ K(
|
|
963
|
+
children: [/* @__PURE__ */ K(V, { size: 16 }), a("devportal.addWebhook", "Add Webhook")]
|
|
960
964
|
})
|
|
961
965
|
})]
|
|
962
966
|
});
|
|
@@ -996,7 +1000,7 @@ var je = [
|
|
|
996
1000
|
})] }), /* @__PURE__ */ q("button", {
|
|
997
1001
|
onClick: i,
|
|
998
1002
|
className: "inline-flex items-center gap-2 rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground hover:bg-primary/90 transition-colors",
|
|
999
|
-
children: [/* @__PURE__ */ K(
|
|
1003
|
+
children: [/* @__PURE__ */ K(V, { size: 16 }), m("devportal.grantDelegation", "Grant Delegation")]
|
|
1000
1004
|
})]
|
|
1001
1005
|
}),
|
|
1002
1006
|
h.length > 0 && /* @__PURE__ */ K("div", {
|
|
@@ -1062,7 +1066,7 @@ var je = [
|
|
|
1062
1066
|
className: "font-medium",
|
|
1063
1067
|
children: ["Delegation #", e.id.slice(0, 8)]
|
|
1064
1068
|
}), /* @__PURE__ */ K("span", {
|
|
1065
|
-
className: t("rounded-full px-2 py-0.5 text-xs font-medium",
|
|
1069
|
+
className: t("rounded-full px-2 py-0.5 text-xs font-medium", je[e.status]),
|
|
1066
1070
|
children: e.status
|
|
1067
1071
|
})]
|
|
1068
1072
|
}), /* @__PURE__ */ q("p", {
|
|
@@ -1109,7 +1113,7 @@ var je = [
|
|
|
1109
1113
|
e.expiresAt && /* @__PURE__ */ q("span", {
|
|
1110
1114
|
className: "flex items-center gap-1",
|
|
1111
1115
|
children: [
|
|
1112
|
-
/* @__PURE__ */ K(
|
|
1116
|
+
/* @__PURE__ */ K(de, { size: 12 }),
|
|
1113
1117
|
m("devportal.expires", "Expires"),
|
|
1114
1118
|
" ",
|
|
1115
1119
|
new Date(e.expiresAt).toLocaleDateString()
|
|
@@ -1139,13 +1143,13 @@ var je = [
|
|
|
1139
1143
|
]
|
|
1140
1144
|
}, e.id))
|
|
1141
1145
|
}) : /* @__PURE__ */ K(r, {
|
|
1142
|
-
icon: /* @__PURE__ */ K(
|
|
1146
|
+
icon: /* @__PURE__ */ K(W, { size: 32 }),
|
|
1143
1147
|
title: m("devportal.noDelegations", "No delegations"),
|
|
1144
1148
|
description: m("devportal.noDelegationsDescription", "Grant a delegation to allow this app to act on your behalf"),
|
|
1145
1149
|
action: /* @__PURE__ */ q("button", {
|
|
1146
1150
|
onClick: i,
|
|
1147
1151
|
className: "inline-flex items-center gap-2 rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground hover:bg-primary/90",
|
|
1148
|
-
children: [/* @__PURE__ */ K(
|
|
1152
|
+
children: [/* @__PURE__ */ K(V, { size: 16 }), m("devportal.grantDelegation", "Grant Delegation")]
|
|
1149
1153
|
})
|
|
1150
1154
|
})
|
|
1151
1155
|
]
|
|
@@ -1294,7 +1298,7 @@ var je = [
|
|
|
1294
1298
|
})] }), /* @__PURE__ */ q("button", {
|
|
1295
1299
|
onClick: x,
|
|
1296
1300
|
className: "flex items-center gap-2 rounded-md border px-3 py-1.5 text-sm font-medium hover:bg-accent transition-colors",
|
|
1297
|
-
children: [/* @__PURE__ */ K(
|
|
1301
|
+
children: [/* @__PURE__ */ K(he, { size: 14 }), o("devportal.autoFillCredentials", "Auto-fill Credentials")]
|
|
1298
1302
|
})]
|
|
1299
1303
|
}),
|
|
1300
1304
|
y && /* @__PURE__ */ q("div", {
|
|
@@ -1395,10 +1399,10 @@ var je = [
|
|
|
1395
1399
|
onClick: ee,
|
|
1396
1400
|
disabled: p,
|
|
1397
1401
|
className: "flex items-center gap-2 rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground hover:bg-primary/90 transition-colors disabled:opacity-50",
|
|
1398
|
-
children: [p ? /* @__PURE__ */ K(
|
|
1402
|
+
children: [p ? /* @__PURE__ */ K(B, {
|
|
1399
1403
|
size: 16,
|
|
1400
1404
|
className: "animate-spin"
|
|
1401
|
-
}) : /* @__PURE__ */ K(
|
|
1405
|
+
}) : /* @__PURE__ */ K(R, { size: 16 }), p ? o("devportal.executing", "Executing...") : o("devportal.executeQuery", "Execute Query")]
|
|
1402
1406
|
}),
|
|
1403
1407
|
d && /* @__PURE__ */ q("div", { children: [/* @__PURE__ */ K("label", {
|
|
1404
1408
|
className: "block text-sm font-medium mb-1",
|
|
@@ -1430,12 +1434,12 @@ var je = [
|
|
|
1430
1434
|
src: n,
|
|
1431
1435
|
alt: e,
|
|
1432
1436
|
className: "w-full h-full object-cover"
|
|
1433
|
-
}) : /* @__PURE__ */ K(
|
|
1437
|
+
}) : /* @__PURE__ */ K(U, {
|
|
1434
1438
|
size: 18,
|
|
1435
1439
|
className: "text-text-secondary opacity-40"
|
|
1436
1440
|
}), c && /* @__PURE__ */ q("div", {
|
|
1437
1441
|
className: "absolute inset-0 bg-black/40 flex flex-col items-center justify-center gap-1",
|
|
1438
|
-
children: [/* @__PURE__ */ K(
|
|
1442
|
+
children: [/* @__PURE__ */ K(B, {
|
|
1439
1443
|
size: 14,
|
|
1440
1444
|
className: "animate-spin text-white"
|
|
1441
1445
|
}), /* @__PURE__ */ q("span", {
|
|
@@ -1468,7 +1472,7 @@ var je = [
|
|
|
1468
1472
|
disabled: c,
|
|
1469
1473
|
onClick: () => d.current?.click(),
|
|
1470
1474
|
className: "inline-flex items-center gap-1.5 rounded-md border px-2.5 py-1 text-xs font-medium hover:bg-muted transition-colors disabled:opacity-50",
|
|
1471
|
-
children: [/* @__PURE__ */ K(
|
|
1475
|
+
children: [/* @__PURE__ */ K(U, { size: 11 }), c ? `Uploading… ${l}%` : "Upload image"]
|
|
1472
1476
|
}),
|
|
1473
1477
|
u && /* @__PURE__ */ K("p", {
|
|
1474
1478
|
className: "text-xs text-status-error-text",
|
|
@@ -1522,13 +1526,13 @@ var je = [
|
|
|
1522
1526
|
disabled: i,
|
|
1523
1527
|
onClick: () => s.current?.click(),
|
|
1524
1528
|
className: t("w-36 aspect-video rounded-lg border-2 border-dashed border-border flex flex-col items-center justify-center gap-1.5 text-text-secondary hover:border-border-strong hover:bg-bg-sunken transition-colors disabled:opacity-50"),
|
|
1525
|
-
children: i ? /* @__PURE__ */ q(G, { children: [/* @__PURE__ */ K(
|
|
1529
|
+
children: i ? /* @__PURE__ */ q(G, { children: [/* @__PURE__ */ K(B, {
|
|
1526
1530
|
size: 18,
|
|
1527
1531
|
className: "animate-spin text-primary"
|
|
1528
1532
|
}), /* @__PURE__ */ q("span", {
|
|
1529
1533
|
className: "text-xs",
|
|
1530
1534
|
children: [a, "%"]
|
|
1531
|
-
})] }) : /* @__PURE__ */ q(G, { children: [/* @__PURE__ */ K(
|
|
1535
|
+
})] }) : /* @__PURE__ */ q(G, { children: [/* @__PURE__ */ K(U, { size: 18 }), /* @__PURE__ */ K("span", {
|
|
1532
1536
|
className: "text-xs",
|
|
1533
1537
|
children: "Add screenshot"
|
|
1534
1538
|
})] })
|
|
@@ -1673,11 +1677,11 @@ var Ye = J`
|
|
|
1673
1677
|
return n === e ? t : n;
|
|
1674
1678
|
}, [d, f] = N(() => Je(n)), [p, m] = N(!1), [h, _] = N(!1), y = M(n);
|
|
1675
1679
|
y.current = n;
|
|
1676
|
-
let { data: ee } =
|
|
1680
|
+
let { data: ee } = Y(Ye, { fetchPolicy: "cache-first" }), x = ee?.myPublisher?.id ?? null, { data: S } = Y(Xe, {
|
|
1677
1681
|
variables: { publisherId: x ?? "" },
|
|
1678
1682
|
fetchPolicy: "cache-first",
|
|
1679
1683
|
skip: !x
|
|
1680
|
-
}), te = S?.products?.find((e) => e.productId === n.id)?.id ?? null, [C] =
|
|
1684
|
+
}), te = S?.products?.find((e) => e.productId === n.id)?.id ?? null, [C] = Ee(Ze), [ne] = v(), [T, { loading: E }] = g();
|
|
1681
1685
|
ce(() => {
|
|
1682
1686
|
f(Je(y.current));
|
|
1683
1687
|
}, [n.id]);
|
|
@@ -1747,7 +1751,7 @@ var Ye = J`
|
|
|
1747
1751
|
} catch {
|
|
1748
1752
|
w("error");
|
|
1749
1753
|
}
|
|
1750
|
-
}, se = M(null), j = M(null), { upload: F, uploading: I, progress:
|
|
1754
|
+
}, se = M(null), j = M(null), { upload: F, uploading: I, progress: ue, error: pe } = k(r, i, a, o), { upload: R, uploading: me, progress: he, error: ge } = k(r, i, a, o, "/DevPortal/Assets"), { upload: V, uploading: _e, progress: ve, error: H } = k(r, i, a, o, "/DevPortal/Assets"), { upload: W, uploading: xe, progress: Se, error: Ce } = k(r, i, a, o, "/DevPortal/Assets"), we = A(async (e) => {
|
|
1751
1755
|
let t = e.target.files?.[0];
|
|
1752
1756
|
if (t) {
|
|
1753
1757
|
e.target.value = "";
|
|
@@ -1804,9 +1808,9 @@ var Ye = J`
|
|
|
1804
1808
|
compatibility: { minPlatformVersion: d.manifestMinPlatformVersion }
|
|
1805
1809
|
}, i = new Blob([JSON.stringify(r, null, 2)], { type: "application/json" }), a = URL.createObjectURL(i), o = document.createElement("a");
|
|
1806
1810
|
o.href = a, o.download = `${n.slug}-manifest.json`, o.click(), URL.revokeObjectURL(a);
|
|
1807
|
-
}, [n.slug, d]), Oe = Ge.has(d.manifestItemType),
|
|
1811
|
+
}, [n.slug, d]), Oe = Ge.has(d.manifestItemType), X = d.manifestInstallType === "builtin", ke = d.pricingType !== "FREE", Ae = d.manifestRegistryUrl ? d.manifestRegistryUrl.split("/").pop()?.split("?")[0] ?? "" : "";
|
|
1808
1812
|
n.status;
|
|
1809
|
-
let
|
|
1813
|
+
let je = n.status === "SUBMITTED", Z = n.status === "PUBLISHED", Me = n.appType === "NODE" || n.appType === "WORKFLOW", Ne = [
|
|
1810
1814
|
{
|
|
1811
1815
|
label: "Short description",
|
|
1812
1816
|
done: !!d.shortDescription.trim()
|
|
@@ -1841,7 +1845,7 @@ var Ye = J`
|
|
|
1841
1845
|
children: [
|
|
1842
1846
|
/* @__PURE__ */ q("li", {
|
|
1843
1847
|
className: "flex items-start gap-2",
|
|
1844
|
-
children: [/* @__PURE__ */ K(
|
|
1848
|
+
children: [/* @__PURE__ */ K(be, {
|
|
1845
1849
|
size: 14,
|
|
1846
1850
|
className: "mt-0.5 shrink-0 text-primary"
|
|
1847
1851
|
}), /* @__PURE__ */ q("span", { children: [
|
|
@@ -1852,7 +1856,7 @@ var Ye = J`
|
|
|
1852
1856
|
}),
|
|
1853
1857
|
Me && /* @__PURE__ */ q("li", {
|
|
1854
1858
|
className: "flex items-start gap-2",
|
|
1855
|
-
children: [/* @__PURE__ */ K(
|
|
1859
|
+
children: [/* @__PURE__ */ K(de, {
|
|
1856
1860
|
size: 14,
|
|
1857
1861
|
className: "mt-0.5 shrink-0 text-primary"
|
|
1858
1862
|
}), /* @__PURE__ */ q("span", { children: [
|
|
@@ -1869,7 +1873,7 @@ var Ye = J`
|
|
|
1869
1873
|
}),
|
|
1870
1874
|
/* @__PURE__ */ q("li", {
|
|
1871
1875
|
className: "flex items-start gap-2",
|
|
1872
|
-
children: [/* @__PURE__ */ K(
|
|
1876
|
+
children: [/* @__PURE__ */ K(ye, {
|
|
1873
1877
|
size: 14,
|
|
1874
1878
|
className: "mt-0.5 shrink-0 text-primary"
|
|
1875
1879
|
}), /* @__PURE__ */ K("span", { children: u("devportal.submitTabDesc", "When your listing is ready, click \"Submit for Review\" to send it to the review team.") })]
|
|
@@ -1935,9 +1939,9 @@ var Ye = J`
|
|
|
1935
1939
|
]
|
|
1936
1940
|
})]
|
|
1937
1941
|
})]
|
|
1938
|
-
}) :
|
|
1942
|
+
}) : je ? /* @__PURE__ */ q("div", {
|
|
1939
1943
|
className: "flex items-start gap-3 rounded-lg border border-primary/30 bg-primary/5 px-4 py-3",
|
|
1940
|
-
children: [/* @__PURE__ */ K(
|
|
1944
|
+
children: [/* @__PURE__ */ K(de, {
|
|
1941
1945
|
size: 16,
|
|
1942
1946
|
className: "text-primary mt-0.5 shrink-0"
|
|
1943
1947
|
}), /* @__PURE__ */ q("div", {
|
|
@@ -1975,7 +1979,7 @@ var Ye = J`
|
|
|
1975
1979
|
}),
|
|
1976
1980
|
Me ? /* @__PURE__ */ q("div", {
|
|
1977
1981
|
className: "rounded-lg border border-border-subtle bg-bg-sunken px-4 py-4 flex items-start gap-3",
|
|
1978
|
-
children: [/* @__PURE__ */ K(
|
|
1982
|
+
children: [/* @__PURE__ */ K(z, {
|
|
1979
1983
|
size: 16,
|
|
1980
1984
|
className: "shrink-0 mt-0.5 text-muted-foreground"
|
|
1981
1985
|
}), /* @__PURE__ */ q("div", {
|
|
@@ -2040,7 +2044,7 @@ var Ye = J`
|
|
|
2040
2044
|
className: "flex items-center gap-2 text-sm cursor-pointer select-none",
|
|
2041
2045
|
children: [/* @__PURE__ */ K("input", {
|
|
2042
2046
|
type: "checkbox",
|
|
2043
|
-
checked:
|
|
2047
|
+
checked: X,
|
|
2044
2048
|
onChange: (e) => O("manifestInstallType", e.target.checked ? "builtin" : "zip"),
|
|
2045
2049
|
className: "h-4 w-4 rounded border-border accent-primary"
|
|
2046
2050
|
}), /* @__PURE__ */ K("span", {
|
|
@@ -2049,10 +2053,10 @@ var Ye = J`
|
|
|
2049
2053
|
})]
|
|
2050
2054
|
})]
|
|
2051
2055
|
}),
|
|
2052
|
-
!
|
|
2056
|
+
!X && /* @__PURE__ */ q(G, { children: [
|
|
2053
2057
|
/* @__PURE__ */ q("div", {
|
|
2054
2058
|
className: "flex gap-3 rounded-lg border border-border-subtle bg-bg-sunken p-3 text-sm text-text-secondary",
|
|
2055
|
-
children: [/* @__PURE__ */ K(
|
|
2059
|
+
children: [/* @__PURE__ */ K(z, {
|
|
2056
2060
|
size: 15,
|
|
2057
2061
|
className: "mt-0.5 shrink-0"
|
|
2058
2062
|
}), /* @__PURE__ */ q("span", { children: [
|
|
@@ -2079,7 +2083,7 @@ var Ye = J`
|
|
|
2079
2083
|
className: "hidden",
|
|
2080
2084
|
onChange: (e) => void we(e)
|
|
2081
2085
|
}), I ? /* @__PURE__ */ q(G, { children: [
|
|
2082
|
-
/* @__PURE__ */ K(
|
|
2086
|
+
/* @__PURE__ */ K(B, {
|
|
2083
2087
|
size: 28,
|
|
2084
2088
|
className: "animate-spin text-primary"
|
|
2085
2089
|
}),
|
|
@@ -2088,7 +2092,7 @@ var Ye = J`
|
|
|
2088
2092
|
children: [
|
|
2089
2093
|
u("devportal.uploading", "Uploading…"),
|
|
2090
2094
|
" ",
|
|
2091
|
-
|
|
2095
|
+
ue,
|
|
2092
2096
|
"%"
|
|
2093
2097
|
]
|
|
2094
2098
|
}), /* @__PURE__ */ K("p", {
|
|
@@ -2099,19 +2103,19 @@ var Ye = J`
|
|
|
2099
2103
|
className: "w-48 h-1.5 rounded-full bg-muted overflow-hidden",
|
|
2100
2104
|
children: /* @__PURE__ */ K("div", {
|
|
2101
2105
|
className: "h-full bg-primary transition-all",
|
|
2102
|
-
style: { width: `${
|
|
2106
|
+
style: { width: `${ue}%` }
|
|
2103
2107
|
})
|
|
2104
2108
|
})
|
|
2105
|
-
] }) :
|
|
2109
|
+
] }) : Ae ? /* @__PURE__ */ q(G, { children: [/* @__PURE__ */ K(L, {
|
|
2106
2110
|
size: 28,
|
|
2107
2111
|
className: "text-status-success-text"
|
|
2108
2112
|
}), /* @__PURE__ */ q("div", { children: [/* @__PURE__ */ K("p", {
|
|
2109
2113
|
className: "text-sm font-medium",
|
|
2110
|
-
children:
|
|
2114
|
+
children: Ae
|
|
2111
2115
|
}), /* @__PURE__ */ K("p", {
|
|
2112
2116
|
className: "text-xs text-text-secondary mt-0.5",
|
|
2113
2117
|
children: u("devportal.clickToReplace", "Click or drag to replace")
|
|
2114
|
-
})] })] }) : /* @__PURE__ */ q(G, { children: [/* @__PURE__ */ K(
|
|
2118
|
+
})] })] }) : /* @__PURE__ */ q(G, { children: [/* @__PURE__ */ K(U, {
|
|
2115
2119
|
size: 28,
|
|
2116
2120
|
className: "text-text-secondary"
|
|
2117
2121
|
}), /* @__PURE__ */ q("div", { children: [/* @__PURE__ */ K("p", {
|
|
@@ -2122,14 +2126,14 @@ var Ye = J`
|
|
|
2122
2126
|
children: u("devportal.orClickToBrowse", "or click to browse")
|
|
2123
2127
|
})] })] })]
|
|
2124
2128
|
}),
|
|
2125
|
-
|
|
2129
|
+
pe && /* @__PURE__ */ K("p", {
|
|
2126
2130
|
className: "text-xs text-status-error-text",
|
|
2127
|
-
children:
|
|
2131
|
+
children: pe
|
|
2128
2132
|
})
|
|
2129
2133
|
] }),
|
|
2130
|
-
|
|
2134
|
+
X && /* @__PURE__ */ q("div", {
|
|
2131
2135
|
className: "flex gap-3 rounded-lg border border-border-subtle bg-bg-sunken p-3 text-sm text-text-secondary",
|
|
2132
|
-
children: [/* @__PURE__ */ K(
|
|
2136
|
+
children: [/* @__PURE__ */ K(z, {
|
|
2133
2137
|
size: 15,
|
|
2134
2138
|
className: "mt-0.5 shrink-0"
|
|
2135
2139
|
}), /* @__PURE__ */ K("span", { children: u("devportal.builtinHint", "Built-in items are pre-installed by the platform. No package upload is needed.") })]
|
|
@@ -2154,13 +2158,13 @@ var Ye = J`
|
|
|
2154
2158
|
type: "button",
|
|
2155
2159
|
onClick: () => se.current?.click(),
|
|
2156
2160
|
className: "inline-flex items-center gap-1.5 rounded-md border px-2.5 py-1 text-xs font-medium hover:bg-muted transition-colors",
|
|
2157
|
-
children: [/* @__PURE__ */ K(
|
|
2161
|
+
children: [/* @__PURE__ */ K(U, { size: 12 }), u("devportal.importManifest", "Import")]
|
|
2158
2162
|
}),
|
|
2159
2163
|
/* @__PURE__ */ q("button", {
|
|
2160
2164
|
type: "button",
|
|
2161
2165
|
onClick: De,
|
|
2162
2166
|
className: "inline-flex items-center gap-1.5 rounded-md border px-2.5 py-1 text-xs font-medium hover:bg-muted transition-colors",
|
|
2163
|
-
children: [/* @__PURE__ */ K(
|
|
2167
|
+
children: [/* @__PURE__ */ K(fe, { size: 12 }), u("devportal.exportManifest", "Export")]
|
|
2164
2168
|
}),
|
|
2165
2169
|
/* @__PURE__ */ K("span", {
|
|
2166
2170
|
className: "text-xs text-text-secondary",
|
|
@@ -2185,20 +2189,20 @@ var Ye = J`
|
|
|
2185
2189
|
onChange: (e) => O("iconUrl", e),
|
|
2186
2190
|
hint: u("devportal.iconUrlHint", "Square, 256×256 px recommended"),
|
|
2187
2191
|
aspectClass: "aspect-square",
|
|
2188
|
-
upload:
|
|
2189
|
-
uploading:
|
|
2190
|
-
progress:
|
|
2191
|
-
error:
|
|
2192
|
+
upload: R,
|
|
2193
|
+
uploading: me,
|
|
2194
|
+
progress: he,
|
|
2195
|
+
error: ge
|
|
2192
2196
|
}), /* @__PURE__ */ K(Ue, {
|
|
2193
2197
|
label: u("devportal.bannerUrl", "Banner"),
|
|
2194
2198
|
value: d.bannerUrl,
|
|
2195
2199
|
onChange: (e) => O("bannerUrl", e),
|
|
2196
2200
|
hint: u("devportal.bannerUrlHint", "1280×640 px recommended"),
|
|
2197
2201
|
aspectClass: "aspect-video",
|
|
2198
|
-
upload:
|
|
2199
|
-
uploading:
|
|
2200
|
-
progress:
|
|
2201
|
-
error:
|
|
2202
|
+
upload: V,
|
|
2203
|
+
uploading: _e,
|
|
2204
|
+
progress: ve,
|
|
2205
|
+
error: H
|
|
2202
2206
|
})]
|
|
2203
2207
|
}),
|
|
2204
2208
|
/* @__PURE__ */ K(D, {
|
|
@@ -2226,7 +2230,7 @@ var Ye = J`
|
|
|
2226
2230
|
/* @__PURE__ */ K(We, {
|
|
2227
2231
|
urls: d.screenshotsText.split("\n").map((e) => e.trim()).filter(Boolean),
|
|
2228
2232
|
onChange: (e) => O("screenshotsText", e.join("\n")),
|
|
2229
|
-
upload:
|
|
2233
|
+
upload: W,
|
|
2230
2234
|
uploading: xe,
|
|
2231
2235
|
progress: Se,
|
|
2232
2236
|
error: Ce
|
|
@@ -2297,7 +2301,7 @@ var Ye = J`
|
|
|
2297
2301
|
className: t("rounded-md border px-3 py-1.5 text-sm font-medium transition-colors", d.pricingType === e.value ? "bg-primary text-primary-foreground border-primary" : "hover:bg-muted"),
|
|
2298
2302
|
children: e.label
|
|
2299
2303
|
}, e.value))
|
|
2300
|
-
})] }),
|
|
2304
|
+
})] }), ke && /* @__PURE__ */ q("div", {
|
|
2301
2305
|
className: "grid gap-4 sm:grid-cols-2",
|
|
2302
2306
|
children: [/* @__PURE__ */ K(D, {
|
|
2303
2307
|
label: u("devportal.price", "Price"),
|
|
@@ -2322,24 +2326,24 @@ var Ye = J`
|
|
|
2322
2326
|
onClick: ae,
|
|
2323
2327
|
disabled: p,
|
|
2324
2328
|
className: "inline-flex items-center gap-2 rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground hover:bg-primary/90 transition-colors disabled:opacity-50",
|
|
2325
|
-
children: p ? /* @__PURE__ */ q(G, { children: [/* @__PURE__ */ K(
|
|
2329
|
+
children: p ? /* @__PURE__ */ q(G, { children: [/* @__PURE__ */ K(B, {
|
|
2326
2330
|
size: 16,
|
|
2327
2331
|
className: "animate-spin"
|
|
2328
|
-
}), u("devportal.saving", "Saving…")] }) : /* @__PURE__ */ q(G, { children: [/* @__PURE__ */ K(
|
|
2332
|
+
}), u("devportal.saving", "Saving…")] }) : /* @__PURE__ */ q(G, { children: [/* @__PURE__ */ K(be, { size: 16 }), u("devportal.saveMarketplaceListing", "Save Marketplace Listing")] })
|
|
2329
2333
|
}),
|
|
2330
|
-
!Z && !
|
|
2334
|
+
!Z && !je && /* @__PURE__ */ K("button", {
|
|
2331
2335
|
type: "button",
|
|
2332
2336
|
onClick: () => void oe(),
|
|
2333
2337
|
disabled: E || p,
|
|
2334
2338
|
className: "inline-flex items-center gap-2 rounded-md border border-primary px-4 py-2 text-sm font-medium text-primary hover:bg-primary/5 transition-colors disabled:opacity-50",
|
|
2335
|
-
children: E ? /* @__PURE__ */ q(G, { children: [/* @__PURE__ */ K(
|
|
2339
|
+
children: E ? /* @__PURE__ */ q(G, { children: [/* @__PURE__ */ K(B, {
|
|
2336
2340
|
size: 16,
|
|
2337
2341
|
className: "animate-spin"
|
|
2338
|
-
}), u("devportal.submitting", "Submitting…")] }) : /* @__PURE__ */ q(G, { children: [/* @__PURE__ */ K(
|
|
2342
|
+
}), u("devportal.submitting", "Submitting…")] }) : /* @__PURE__ */ q(G, { children: [/* @__PURE__ */ K(ye, { size: 16 }), u("devportal.submitForReview", "Submit for Review")] })
|
|
2339
2343
|
}),
|
|
2340
|
-
!Z &&
|
|
2344
|
+
!Z && je && /* @__PURE__ */ q("p", {
|
|
2341
2345
|
className: "text-xs text-muted-foreground flex items-center gap-1.5",
|
|
2342
|
-
children: [/* @__PURE__ */ K(
|
|
2346
|
+
children: [/* @__PURE__ */ K(de, { size: 12 }), u("devportal.awaitingReview", "Your listing is under review. You can still update and save — changes take effect after approval.")]
|
|
2343
2347
|
})
|
|
2344
2348
|
]
|
|
2345
2349
|
})
|
|
@@ -2377,7 +2381,7 @@ var Ye = J`
|
|
|
2377
2381
|
target: "_blank",
|
|
2378
2382
|
rel: "noopener noreferrer",
|
|
2379
2383
|
className: "flex items-center gap-2 text-sm text-primary hover:underline",
|
|
2380
|
-
children: [/* @__PURE__ */ K(
|
|
2384
|
+
children: [/* @__PURE__ */ K(R, { size: 14 }), e]
|
|
2381
2385
|
}), $e = [
|
|
2382
2386
|
{
|
|
2383
2387
|
id: "auth",
|
|
@@ -2537,7 +2541,7 @@ var tt = ({ app: e }) => {
|
|
|
2537
2541
|
}),
|
|
2538
2542
|
/* @__PURE__ */ q("div", {
|
|
2539
2543
|
className: "rounded-lg border border-border-subtle bg-muted/30 p-3 flex gap-2 text-xs text-muted-foreground",
|
|
2540
|
-
children: [/* @__PURE__ */ K(
|
|
2544
|
+
children: [/* @__PURE__ */ K(z, {
|
|
2541
2545
|
size: 14,
|
|
2542
2546
|
className: "flex-shrink-0 mt-0.5"
|
|
2543
2547
|
}), /* @__PURE__ */ q("span", { children: [/* @__PURE__ */ K("strong", { children: "Read & Write" }), " implies Read. Request only what your app genuinely needs — fewer permissions build more user trust."] })]
|
|
@@ -2552,10 +2556,10 @@ var tt = ({ app: e }) => {
|
|
|
2552
2556
|
onClick: () => void u(),
|
|
2553
2557
|
disabled: i,
|
|
2554
2558
|
className: "inline-flex items-center gap-2 rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground hover:bg-primary/90 transition-colors disabled:opacity-50",
|
|
2555
|
-
children: [i ? /* @__PURE__ */ K(
|
|
2559
|
+
children: [i ? /* @__PURE__ */ K(B, {
|
|
2556
2560
|
size: 14,
|
|
2557
2561
|
className: "animate-spin"
|
|
2558
|
-
}) : /* @__PURE__ */ K(
|
|
2562
|
+
}) : /* @__PURE__ */ K(H, { size: 14 }), "Save Permissions"]
|
|
2559
2563
|
})]
|
|
2560
2564
|
})
|
|
2561
2565
|
]
|