@burdenoff/microfe-devportal 2026.830.1 → 2026.830.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/devportal/AdminDevportalRoot.d.ts.map +1 -1
- package/dist/devportal/AdminDevportalRoot.js +16 -19
- package/dist/devportal/AdminDevportalRoot.js.map +1 -1
- package/dist/devportal/DevportalRoot.d.ts.map +1 -1
- package/dist/devportal/DevportalRoot.js +36 -39
- package/dist/devportal/DevportalRoot.js.map +1 -1
- package/dist/devportal/components/AppCard.js +41 -41
- package/dist/devportal/components/ConfirmDialog.d.ts.map +1 -1
- package/dist/devportal/components/ConfirmDialog.js +19 -22
- package/dist/devportal/components/ConfirmDialog.js.map +1 -1
- package/dist/devportal/components/DataTable.d.ts.map +1 -1
- package/dist/devportal/components/DataTable.js +31 -34
- package/dist/devportal/components/DataTable.js.map +1 -1
- package/dist/devportal/components/FeatureFlaggedRoute.js +8 -8
- package/dist/devportal/components/FormField.d.ts.map +1 -1
- package/dist/devportal/components/FormField.js +26 -32
- package/dist/devportal/components/FormField.js.map +1 -1
- package/dist/devportal/components/GrantDelegationModal.js +64 -64
- package/dist/devportal/components/GrantDelegationModal.js.map +1 -1
- package/dist/devportal/components/LoadingState.d.ts.map +1 -1
- package/dist/devportal/components/LoadingState.js +5 -8
- package/dist/devportal/components/LoadingState.js.map +1 -1
- package/dist/devportal/components/PageLayout.d.ts.map +1 -1
- package/dist/devportal/components/PageLayout.js +10 -13
- package/dist/devportal/components/PageLayout.js.map +1 -1
- package/dist/devportal/components/PermissionGuard.d.ts.map +1 -1
- package/dist/devportal/components/PermissionGuard.js +11 -14
- package/dist/devportal/components/PermissionGuard.js.map +1 -1
- package/dist/devportal/components/SecretDisplay.d.ts.map +1 -1
- package/dist/devportal/components/SecretDisplay.js +24 -30
- package/dist/devportal/components/SecretDisplay.js.map +1 -1
- package/dist/devportal/components/SectionNav.d.ts.map +1 -1
- package/dist/devportal/components/SectionNav.js +24 -27
- package/dist/devportal/components/SectionNav.js.map +1 -1
- package/dist/devportal/components/StatusBadge.d.ts.map +1 -1
- package/dist/devportal/components/StatusBadge.js +24 -33
- package/dist/devportal/components/StatusBadge.js.map +1 -1
- package/dist/devportal/index.d.ts +1 -0
- package/dist/devportal/index.d.ts.map +1 -1
- package/dist/devportal/index.js +1 -0
- package/dist/devportal/pages/AdminReviewPage.js +172 -172
- package/dist/devportal/pages/AnalyticsDashboardPage.js +43 -43
- package/dist/devportal/pages/AnalyticsDashboardPage.js.map +1 -1
- package/dist/devportal/pages/ApiKeysPage.js +119 -119
- package/dist/devportal/pages/ApiKeysPage.js.map +1 -1
- package/dist/devportal/pages/AppLogsPage.js +45 -45
- package/dist/devportal/pages/ApplicationDetailPage.js +607 -607
- package/dist/devportal/pages/ApplicationVersionsPage.js +13 -13
- package/dist/devportal/pages/ApplicationsPage.d.ts.map +1 -1
- package/dist/devportal/pages/ApplicationsPage.js +104 -101
- package/dist/devportal/pages/ApplicationsPage.js.map +1 -1
- package/dist/devportal/pages/CreateApiKeyPage.js +45 -45
- package/dist/devportal/pages/CreateApplicationPage.js +38 -38
- package/dist/devportal/pages/CreateApplicationPage.js.map +1 -1
- package/dist/devportal/pages/CreateOAuthClientPage.js +52 -52
- package/dist/devportal/pages/CreateOrganizationPage.js +26 -26
- package/dist/devportal/pages/CreateWebhookPage.d.ts.map +1 -1
- package/dist/devportal/pages/CreateWebhookPage.js +48 -48
- package/dist/devportal/pages/CreateWebhookPage.js.map +1 -1
- package/dist/devportal/pages/DashboardPage.d.ts.map +1 -1
- package/dist/devportal/pages/DashboardPage.js +66 -72
- package/dist/devportal/pages/DashboardPage.js.map +1 -1
- package/dist/devportal/pages/DelegationsPage.js +174 -174
- package/dist/devportal/pages/DocumentationPage.js +93 -93
- package/dist/devportal/pages/EditApplicationPage.js +14 -14
- package/dist/devportal/pages/EditApplicationPage.js.map +1 -1
- package/dist/devportal/pages/ListingPreviewPage.js +76 -76
- package/dist/devportal/pages/OAuthClientDetailPage.js +75 -75
- package/dist/devportal/pages/OAuthClientDetailPage.js.map +1 -1
- package/dist/devportal/pages/OAuthClientsPage.js +64 -64
- package/dist/devportal/pages/OrganizationDetailPage.js +189 -189
- package/dist/devportal/pages/OrganizationDetailPage.js.map +1 -1
- package/dist/devportal/pages/OrganizationMembersPage.js +10 -10
- package/dist/devportal/pages/OrganizationsPage.d.ts.map +1 -1
- package/dist/devportal/pages/OrganizationsPage.js +163 -154
- package/dist/devportal/pages/OrganizationsPage.js.map +1 -1
- package/dist/devportal/pages/PublishPage.js +104 -104
- package/dist/devportal/pages/PublishPage.js.map +1 -1
- package/dist/devportal/pages/PublisherProfilePage.js +55 -55
- package/dist/devportal/pages/ResourcesPage.js +60 -60
- package/dist/devportal/pages/RevenueDashboardPage.js +60 -60
- package/dist/devportal/pages/RevenueDashboardPage.js.map +1 -1
- package/dist/devportal/pages/SellerDashboardPage.js +83 -83
- package/dist/devportal/pages/SellerItemsPage.js +163 -163
- package/dist/devportal/pages/SellerItemsPage.js.map +1 -1
- package/dist/devportal/pages/SellerOrdersPage.js +63 -63
- package/dist/devportal/pages/SettingsPage.js +21 -21
- package/dist/devportal/pages/SetupPage.js +183 -183
- package/dist/devportal/pages/SetupPage.js.map +1 -1
- package/dist/devportal/pages/StoreSubmissionPage.js +5 -5
- package/dist/devportal/pages/WebhookDetailPage.js +123 -123
- package/dist/devportal/pages/WebhookDetailPage.js.map +1 -1
- package/dist/devportal/pages/WebhooksPage.js +118 -118
- package/dist/devportal/pages/WebhooksPage.js.map +1 -1
- package/dist/devportal/utils/i18n.d.ts +9 -2
- package/dist/devportal/utils/i18n.d.ts.map +1 -1
- package/dist/devportal/utils/i18n.js +13 -10
- package/dist/devportal/utils/i18n.js.map +1 -1
- package/dist/index.js +2 -1
- package/dist/translations/en.d.ts +1251 -0
- package/dist/translations/en.d.ts.map +1 -0
- package/dist/translations/en.js +1235 -0
- package/dist/translations/en.js.map +1 -0
- package/package.json +1 -1
|
@@ -10,9 +10,9 @@ import "../components/index.js";
|
|
|
10
10
|
import { useDevportalPermission as ee } from "../hooks/usePermission.js";
|
|
11
11
|
import { DEVPORTAL_PERMISSIONS as te } from "../constants/permissions.js";
|
|
12
12
|
import { useCallback as u, useEffect as d, useMemo as ne, useState as f } from "react";
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
13
|
+
import { AlertCircle as p, AlertTriangle as m, Bot as h, Clock as g, Cog as _, Loader2 as v, Shield as y, Users as b, XCircle as x, Zap as S } from "lucide-react";
|
|
14
|
+
import { Fragment as re, jsx as C, jsxs as w } from "react/jsx-runtime";
|
|
15
|
+
import { useI18n as T } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
16
16
|
import { EmphasisPanel as ie, GlassCard as E } from "@burdenoff/fe-libs/ui";
|
|
17
17
|
//#region src/devportal/pages/DelegationsPage.tsx
|
|
18
18
|
function D(e) {
|
|
@@ -50,12 +50,12 @@ function k(e) {
|
|
|
50
50
|
var A = ({ type: t, className: n }) => {
|
|
51
51
|
let r = { className: e("h-5 w-5", n) };
|
|
52
52
|
switch (t) {
|
|
53
|
-
case "SERVICE": return /* @__PURE__ */
|
|
54
|
-
case "BOT": return /* @__PURE__ */
|
|
55
|
-
case "INTEGRATION": return /* @__PURE__ */
|
|
56
|
-
default: return /* @__PURE__ */
|
|
53
|
+
case "SERVICE": return /* @__PURE__ */ C(_, { ...r });
|
|
54
|
+
case "BOT": return /* @__PURE__ */ C(h, { ...r });
|
|
55
|
+
case "INTEGRATION": return /* @__PURE__ */ C(S, { ...r });
|
|
56
|
+
default: return /* @__PURE__ */ C(y, { ...r });
|
|
57
57
|
}
|
|
58
|
-
}, j = ({ status: t }) => /* @__PURE__ */
|
|
58
|
+
}, j = ({ status: t }) => /* @__PURE__ */ C("span", {
|
|
59
59
|
className: e("inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium", {
|
|
60
60
|
ACTIVE: "bg-status-success-bg-subtle text-status-success-text",
|
|
61
61
|
REVOKED: "bg-status-error-bg-subtle text-status-error-text",
|
|
@@ -65,28 +65,28 @@ var A = ({ type: t, className: n }) => {
|
|
|
65
65
|
}), ae = ({ message: e, onDismiss: t }) => (d(() => {
|
|
66
66
|
let e = setTimeout(t, 5e3);
|
|
67
67
|
return () => clearTimeout(e);
|
|
68
|
-
}, [t]), /* @__PURE__ */
|
|
68
|
+
}, [t]), /* @__PURE__ */ C("div", {
|
|
69
69
|
className: "rounded-lg border border-border-subtle bg-status-success-bg-subtle p-4",
|
|
70
|
-
children: /* @__PURE__ */
|
|
70
|
+
children: /* @__PURE__ */ w("div", {
|
|
71
71
|
className: "flex items-center gap-3",
|
|
72
|
-
children: [/* @__PURE__ */
|
|
72
|
+
children: [/* @__PURE__ */ C(y, { className: "h-5 w-5 text-status-success-text" }), /* @__PURE__ */ C("p", {
|
|
73
73
|
className: "text-sm font-medium text-status-success-text",
|
|
74
74
|
children: e
|
|
75
75
|
})]
|
|
76
76
|
})
|
|
77
77
|
})), oe = ({ message: e, onRetry: t }) => {
|
|
78
|
-
let { t: n } =
|
|
79
|
-
return /* @__PURE__ */
|
|
78
|
+
let { t: n } = T();
|
|
79
|
+
return /* @__PURE__ */ C("div", {
|
|
80
80
|
className: "rounded-lg border border-status-error-border/50 bg-status-error-bg/10 p-4",
|
|
81
|
-
children: /* @__PURE__ */
|
|
81
|
+
children: /* @__PURE__ */ w("div", {
|
|
82
82
|
className: "flex items-center gap-3",
|
|
83
83
|
children: [
|
|
84
|
-
/* @__PURE__ */
|
|
85
|
-
/* @__PURE__ */
|
|
84
|
+
/* @__PURE__ */ C(p, { className: "h-5 w-5 text-status-error-text" }),
|
|
85
|
+
/* @__PURE__ */ C("p", {
|
|
86
86
|
className: "flex-1 text-sm text-status-error-text",
|
|
87
87
|
children: e
|
|
88
88
|
}),
|
|
89
|
-
t && /* @__PURE__ */
|
|
89
|
+
t && /* @__PURE__ */ C("button", {
|
|
90
90
|
onClick: t,
|
|
91
91
|
className: "rounded-md border px-3 py-1.5 text-xs font-medium hover:bg-bg-sunken transition-colors",
|
|
92
92
|
children: ((e, t) => {
|
|
@@ -98,88 +98,88 @@ var A = ({ type: t, className: n }) => {
|
|
|
98
98
|
})
|
|
99
99
|
});
|
|
100
100
|
}, se = ({ delegation: t, onRevoke: n, isRevoking: r, selected: i, onToggleSelect: a, canRevoke: o }) => {
|
|
101
|
-
let { t: c } =
|
|
101
|
+
let { t: c } = T(), l = (e, t) => {
|
|
102
102
|
let n = c(e);
|
|
103
103
|
return n === e ? t : n;
|
|
104
104
|
};
|
|
105
|
-
return /* @__PURE__ */
|
|
105
|
+
return /* @__PURE__ */ C("div", {
|
|
106
106
|
className: e("rounded-card border border-border-seam bg-bg-surface p-5 transition-colors hover:border-border-subtle/80", i && "border-primary bg-action-primary-bg/5", t.status !== "ACTIVE" && "opacity-60"),
|
|
107
|
-
children: /* @__PURE__ */
|
|
107
|
+
children: /* @__PURE__ */ w("div", {
|
|
108
108
|
className: "flex items-start justify-between gap-4",
|
|
109
|
-
children: [/* @__PURE__ */
|
|
109
|
+
children: [/* @__PURE__ */ w("div", {
|
|
110
110
|
className: "flex items-start gap-4 min-w-0",
|
|
111
111
|
children: [
|
|
112
|
-
t.status === "ACTIVE" && /* @__PURE__ */
|
|
112
|
+
t.status === "ACTIVE" && /* @__PURE__ */ C("div", {
|
|
113
113
|
onClick: (e) => e.stopPropagation(),
|
|
114
|
-
children: /* @__PURE__ */
|
|
114
|
+
children: /* @__PURE__ */ C(s, {
|
|
115
115
|
checked: i,
|
|
116
116
|
onChange: a,
|
|
117
117
|
ariaLabel: l("devportal.selectDelegationAriaLabel", `Select delegation ${t.app?.name ?? t.id}`),
|
|
118
118
|
className: "mt-1"
|
|
119
119
|
})
|
|
120
120
|
}),
|
|
121
|
-
/* @__PURE__ */
|
|
121
|
+
/* @__PURE__ */ C("div", {
|
|
122
122
|
className: e("flex h-12 w-12 shrink-0 items-center justify-center rounded-lg", t.status === "ACTIVE" ? "bg-action-primary-bg/10 text-primary" : "bg-bg-sunken text-text-secondary"),
|
|
123
|
-
children: /* @__PURE__ */
|
|
123
|
+
children: /* @__PURE__ */ C(A, {
|
|
124
124
|
type: t.app?.type ?? "SERVICE",
|
|
125
125
|
className: "h-6 w-6"
|
|
126
126
|
})
|
|
127
127
|
}),
|
|
128
|
-
/* @__PURE__ */
|
|
128
|
+
/* @__PURE__ */ w("div", {
|
|
129
129
|
className: "min-w-0 space-y-2",
|
|
130
130
|
children: [
|
|
131
|
-
/* @__PURE__ */
|
|
131
|
+
/* @__PURE__ */ w("div", {
|
|
132
132
|
className: "flex items-center gap-2",
|
|
133
|
-
children: [/* @__PURE__ */
|
|
133
|
+
children: [/* @__PURE__ */ C("h3", {
|
|
134
134
|
className: "truncate font-semibold",
|
|
135
135
|
children: t.app?.name ?? l("devportal.unknownApp", "Unknown App")
|
|
136
|
-
}), /* @__PURE__ */
|
|
136
|
+
}), /* @__PURE__ */ C(j, { status: t.status })]
|
|
137
137
|
}),
|
|
138
|
-
t.app?.description && /* @__PURE__ */
|
|
138
|
+
t.app?.description && /* @__PURE__ */ C("p", {
|
|
139
139
|
className: "text-sm text-text-secondary line-clamp-2",
|
|
140
140
|
children: t.app.description
|
|
141
141
|
}),
|
|
142
|
-
/* @__PURE__ */
|
|
142
|
+
/* @__PURE__ */ w("div", {
|
|
143
143
|
className: "flex flex-wrap items-center gap-x-4 gap-y-1 text-sm text-text-secondary",
|
|
144
144
|
children: [
|
|
145
|
-
/* @__PURE__ */
|
|
145
|
+
/* @__PURE__ */ w("span", {
|
|
146
146
|
className: "flex items-center gap-1",
|
|
147
147
|
children: [
|
|
148
|
-
/* @__PURE__ */
|
|
148
|
+
/* @__PURE__ */ C(g, { className: "h-3.5 w-3.5" }),
|
|
149
149
|
l("devportal.granted", "Granted"),
|
|
150
150
|
" ",
|
|
151
151
|
O(t.grantedAt)
|
|
152
152
|
]
|
|
153
153
|
}),
|
|
154
|
-
t.expiresAt && /* @__PURE__ */
|
|
154
|
+
t.expiresAt && /* @__PURE__ */ w("span", {
|
|
155
155
|
className: "flex items-center gap-1",
|
|
156
156
|
children: [
|
|
157
|
-
/* @__PURE__ */
|
|
157
|
+
/* @__PURE__ */ C(m, { className: "h-3.5 w-3.5" }),
|
|
158
158
|
l("devportal.expires", "Expires"),
|
|
159
159
|
" ",
|
|
160
160
|
k(t.expiresAt)
|
|
161
161
|
]
|
|
162
162
|
}),
|
|
163
|
-
/* @__PURE__ */
|
|
163
|
+
/* @__PURE__ */ C("span", {
|
|
164
164
|
className: e("rounded-md px-2 py-0.5 text-xs font-mono", "bg-bg-sunken text-text-secondary"),
|
|
165
165
|
children: t.app?.type ?? "UNKNOWN"
|
|
166
166
|
})
|
|
167
167
|
]
|
|
168
168
|
}),
|
|
169
|
-
t.scopes.length > 0 && /* @__PURE__ */
|
|
169
|
+
t.scopes.length > 0 && /* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("p", {
|
|
170
170
|
className: "mb-1.5 text-xs text-text-secondary",
|
|
171
171
|
children: l("devportal.permissions", "Permissions:")
|
|
172
|
-
}), /* @__PURE__ */
|
|
172
|
+
}), /* @__PURE__ */ C("div", {
|
|
173
173
|
className: "flex flex-wrap gap-1.5",
|
|
174
|
-
children: t.scopes.map((e) => /* @__PURE__ */
|
|
174
|
+
children: t.scopes.map((e) => /* @__PURE__ */ C("span", {
|
|
175
175
|
className: "rounded-md bg-status-info-bg-subtle px-2 py-0.5 text-xs text-status-info-text",
|
|
176
176
|
children: e
|
|
177
177
|
}, e))
|
|
178
178
|
})] }),
|
|
179
|
-
t.workspaceIds.length > 0 && /* @__PURE__ */
|
|
179
|
+
t.workspaceIds.length > 0 && /* @__PURE__ */ w("p", {
|
|
180
180
|
className: "flex items-center gap-1 text-xs text-text-secondary",
|
|
181
181
|
children: [
|
|
182
|
-
/* @__PURE__ */
|
|
182
|
+
/* @__PURE__ */ C(b, { className: "h-3.5 w-3.5" }),
|
|
183
183
|
l("devportal.accessToWorkspaces", "Access to"),
|
|
184
184
|
" ",
|
|
185
185
|
t.workspaceIds.length,
|
|
@@ -191,90 +191,90 @@ var A = ({ type: t, className: n }) => {
|
|
|
191
191
|
]
|
|
192
192
|
})
|
|
193
193
|
]
|
|
194
|
-
}), t.status === "ACTIVE" && /* @__PURE__ */
|
|
194
|
+
}), t.status === "ACTIVE" && /* @__PURE__ */ w("button", {
|
|
195
195
|
onClick: () => n(t),
|
|
196
196
|
disabled: r || !o,
|
|
197
197
|
"aria-disabled": !o,
|
|
198
198
|
className: "inline-flex shrink-0 items-center gap-2 rounded-md border border-border-subtle px-4 py-2 text-sm font-medium text-status-error-text transition-colors hover:bg-status-error-bg-subtle disabled:cursor-not-allowed disabled:opacity-50",
|
|
199
|
-
children: [r ? /* @__PURE__ */
|
|
199
|
+
children: [r ? /* @__PURE__ */ C(v, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ C(x, { className: "h-4 w-4" }), l("devportal.revoke", "Revoke")]
|
|
200
200
|
})]
|
|
201
201
|
})
|
|
202
202
|
});
|
|
203
203
|
}, ce = ({ delegation: t, onRevoke: n, isRevoking: r, selected: i, onToggleSelect: a, canRevoke: o }) => {
|
|
204
|
-
let { t: c } =
|
|
204
|
+
let { t: c } = T(), l = (e, t) => {
|
|
205
205
|
let n = c(e);
|
|
206
206
|
return n === e ? t : n;
|
|
207
207
|
};
|
|
208
|
-
return /* @__PURE__ */
|
|
208
|
+
return /* @__PURE__ */ C("div", {
|
|
209
209
|
className: e("rounded-card border border-border-seam bg-bg-surface p-5 transition-colors hover:border-border-subtle/80", i && "border-primary bg-action-primary-bg/5"),
|
|
210
|
-
children: /* @__PURE__ */
|
|
210
|
+
children: /* @__PURE__ */ w("div", {
|
|
211
211
|
className: "flex items-start justify-between gap-4",
|
|
212
|
-
children: [/* @__PURE__ */
|
|
212
|
+
children: [/* @__PURE__ */ w("div", {
|
|
213
213
|
className: "flex items-start gap-4 min-w-0",
|
|
214
214
|
children: [
|
|
215
|
-
t.status === "ACTIVE" && /* @__PURE__ */
|
|
215
|
+
t.status === "ACTIVE" && /* @__PURE__ */ C("div", {
|
|
216
216
|
onClick: (e) => e.stopPropagation(),
|
|
217
|
-
children: /* @__PURE__ */
|
|
217
|
+
children: /* @__PURE__ */ C(s, {
|
|
218
218
|
checked: i,
|
|
219
219
|
onChange: a,
|
|
220
220
|
ariaLabel: l("devportal.selectDelegationAriaLabel", `Select delegation ${t.app?.name ?? t.id}`),
|
|
221
221
|
className: "mt-1"
|
|
222
222
|
})
|
|
223
223
|
}),
|
|
224
|
-
/* @__PURE__ */
|
|
224
|
+
/* @__PURE__ */ C("div", {
|
|
225
225
|
className: "flex h-12 w-12 shrink-0 items-center justify-center rounded-lg bg-accent-purple-subtle text-accent-purple",
|
|
226
|
-
children: /* @__PURE__ */
|
|
226
|
+
children: /* @__PURE__ */ C(A, {
|
|
227
227
|
type: t.app?.type ?? "SERVICE",
|
|
228
228
|
className: "h-6 w-6"
|
|
229
229
|
})
|
|
230
230
|
}),
|
|
231
|
-
/* @__PURE__ */
|
|
231
|
+
/* @__PURE__ */ w("div", {
|
|
232
232
|
className: "min-w-0 space-y-2",
|
|
233
233
|
children: [
|
|
234
|
-
/* @__PURE__ */
|
|
234
|
+
/* @__PURE__ */ w("div", {
|
|
235
235
|
className: "flex items-center gap-2",
|
|
236
|
-
children: [/* @__PURE__ */
|
|
236
|
+
children: [/* @__PURE__ */ C("h3", {
|
|
237
237
|
className: "truncate font-semibold",
|
|
238
238
|
children: t.app?.name ?? l("devportal.unknownApp", "Unknown App")
|
|
239
|
-
}), /* @__PURE__ */
|
|
239
|
+
}), /* @__PURE__ */ C(j, { status: t.status })]
|
|
240
240
|
}),
|
|
241
|
-
/* @__PURE__ */
|
|
241
|
+
/* @__PURE__ */ w("p", {
|
|
242
242
|
className: "text-sm text-text-secondary",
|
|
243
243
|
children: [
|
|
244
244
|
l("devportal.grantedToUser", "Granted to user:"),
|
|
245
245
|
" ",
|
|
246
|
-
/* @__PURE__ */
|
|
246
|
+
/* @__PURE__ */ C("code", {
|
|
247
247
|
className: "rounded bg-bg-sunken px-1.5 py-0.5 text-xs",
|
|
248
248
|
children: t.userId
|
|
249
249
|
})
|
|
250
250
|
]
|
|
251
251
|
}),
|
|
252
|
-
/* @__PURE__ */
|
|
252
|
+
/* @__PURE__ */ w("div", {
|
|
253
253
|
className: "flex flex-wrap items-center gap-x-4 gap-y-1 text-sm text-text-secondary",
|
|
254
|
-
children: [/* @__PURE__ */
|
|
254
|
+
children: [/* @__PURE__ */ w("span", {
|
|
255
255
|
className: "flex items-center gap-1",
|
|
256
256
|
children: [
|
|
257
|
-
/* @__PURE__ */
|
|
257
|
+
/* @__PURE__ */ C(g, { className: "h-3.5 w-3.5" }),
|
|
258
258
|
l("devportal.granted", "Granted"),
|
|
259
259
|
" ",
|
|
260
260
|
O(t.grantedAt)
|
|
261
261
|
]
|
|
262
|
-
}), t.expiresAt && /* @__PURE__ */
|
|
262
|
+
}), t.expiresAt && /* @__PURE__ */ w("span", {
|
|
263
263
|
className: "flex items-center gap-1",
|
|
264
264
|
children: [
|
|
265
|
-
/* @__PURE__ */
|
|
265
|
+
/* @__PURE__ */ C(m, { className: "h-3.5 w-3.5" }),
|
|
266
266
|
l("devportal.expires", "Expires"),
|
|
267
267
|
" ",
|
|
268
268
|
new Date(t.expiresAt).toLocaleDateString()
|
|
269
269
|
]
|
|
270
270
|
})]
|
|
271
271
|
}),
|
|
272
|
-
t.scopes.length > 0 && /* @__PURE__ */
|
|
272
|
+
t.scopes.length > 0 && /* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("p", {
|
|
273
273
|
className: "mb-1.5 text-xs text-text-secondary",
|
|
274
274
|
children: l("devportal.permissionsGranted", "Permissions granted:")
|
|
275
|
-
}), /* @__PURE__ */
|
|
275
|
+
}), /* @__PURE__ */ C("div", {
|
|
276
276
|
className: "flex flex-wrap gap-1.5",
|
|
277
|
-
children: t.scopes.map((e) => /* @__PURE__ */
|
|
277
|
+
children: t.scopes.map((e) => /* @__PURE__ */ C("span", {
|
|
278
278
|
className: "rounded-md bg-accent-purple-subtle px-2 py-0.5 text-xs text-accent-purple",
|
|
279
279
|
children: e
|
|
280
280
|
}, e))
|
|
@@ -282,41 +282,41 @@ var A = ({ type: t, className: n }) => {
|
|
|
282
282
|
]
|
|
283
283
|
})
|
|
284
284
|
]
|
|
285
|
-
}), t.status === "ACTIVE" && /* @__PURE__ */
|
|
285
|
+
}), t.status === "ACTIVE" && /* @__PURE__ */ w("button", {
|
|
286
286
|
onClick: () => n(t),
|
|
287
287
|
disabled: r || !o,
|
|
288
288
|
"aria-disabled": !o,
|
|
289
289
|
className: "inline-flex shrink-0 items-center gap-2 rounded-md border border-border-subtle px-4 py-2 text-sm font-medium text-status-error-text transition-colors hover:bg-status-error-bg-subtle disabled:cursor-not-allowed disabled:opacity-50",
|
|
290
|
-
children: [r ? /* @__PURE__ */
|
|
290
|
+
children: [r ? /* @__PURE__ */ C(v, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ C(x, { className: "h-4 w-4" }), l("devportal.revoke", "Revoke")]
|
|
291
291
|
})]
|
|
292
292
|
})
|
|
293
293
|
});
|
|
294
294
|
}, le = ({ delegations: e }) => {
|
|
295
|
-
let { t } =
|
|
295
|
+
let { t } = T(), n = (e, n) => {
|
|
296
296
|
let r = t(e);
|
|
297
297
|
return r === e ? n : r;
|
|
298
298
|
};
|
|
299
|
-
return e.length === 0 ? null : /* @__PURE__ */
|
|
299
|
+
return e.length === 0 ? null : /* @__PURE__ */ w("div", {
|
|
300
300
|
className: "space-y-4",
|
|
301
|
-
children: [/* @__PURE__ */
|
|
301
|
+
children: [/* @__PURE__ */ C("h2", {
|
|
302
302
|
className: "text-lg font-semibold",
|
|
303
303
|
children: n("devportal.revocationHistory", "Revocation History")
|
|
304
|
-
}), /* @__PURE__ */
|
|
304
|
+
}), /* @__PURE__ */ C("div", {
|
|
305
305
|
className: "space-y-3 opacity-60",
|
|
306
|
-
children: e.map((e) => /* @__PURE__ */
|
|
306
|
+
children: e.map((e) => /* @__PURE__ */ w("div", {
|
|
307
307
|
className: "flex items-center justify-between rounded-lg border bg-bg-sunken/30 p-4",
|
|
308
|
-
children: [/* @__PURE__ */
|
|
308
|
+
children: [/* @__PURE__ */ w("div", {
|
|
309
309
|
className: "flex items-center gap-3",
|
|
310
|
-
children: [/* @__PURE__ */
|
|
310
|
+
children: [/* @__PURE__ */ C("div", {
|
|
311
311
|
className: "flex h-10 w-10 items-center justify-center rounded-lg bg-bg-sunken text-text-secondary",
|
|
312
|
-
children: /* @__PURE__ */
|
|
312
|
+
children: /* @__PURE__ */ C(A, {
|
|
313
313
|
type: e.app?.type ?? "SERVICE",
|
|
314
314
|
className: "h-5 w-5"
|
|
315
315
|
})
|
|
316
|
-
}), /* @__PURE__ */
|
|
316
|
+
}), /* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("h3", {
|
|
317
317
|
className: "font-medium",
|
|
318
318
|
children: e.app?.name ?? n("devportal.unknownApp", "Unknown App")
|
|
319
|
-
}), /* @__PURE__ */
|
|
319
|
+
}), /* @__PURE__ */ w("p", {
|
|
320
320
|
className: "text-sm text-text-secondary",
|
|
321
321
|
children: [
|
|
322
322
|
e.status === "REVOKED" ? n("devportal.revoked", "Revoked") : n("devportal.expired", "Expired"),
|
|
@@ -324,15 +324,15 @@ var A = ({ type: t, className: n }) => {
|
|
|
324
324
|
e.revokedAt ? O(e.revokedAt) : ""
|
|
325
325
|
]
|
|
326
326
|
})] })]
|
|
327
|
-
}), /* @__PURE__ */
|
|
327
|
+
}), /* @__PURE__ */ C(j, { status: e.status })]
|
|
328
328
|
}, e.id))
|
|
329
329
|
})]
|
|
330
330
|
});
|
|
331
331
|
}, M = () => {
|
|
332
|
-
let { t: d } =
|
|
332
|
+
let { t: d } = T(), h = (e, t) => {
|
|
333
333
|
let n = d(e);
|
|
334
334
|
return n === e ? t : n;
|
|
335
|
-
}, { allowed:
|
|
335
|
+
}, { allowed: _ } = ee(te.DELEGATION_REVOKE), [v, x] = f("acting-as-me"), [S, O] = f([]), [k, A] = f(null), [j, M] = f(/* @__PURE__ */ new Set()), { data: N, loading: ue, error: de, refetch: P } = r({ fetchPolicy: "cache-and-network" }), { data: F, loading: fe, error: pe, refetch: I } = i({ fetchPolicy: "cache-and-network" }), [L, { loading: R }] = a(), z = (N?.currentUserDelegations?.delegations ?? []).map(D), B = (F?.currentUserGrantedDelegations?.delegations ?? []).map(D), V = z.filter((e) => e.status === "ACTIVE"), H = z.filter((e) => e.status !== "ACTIVE"), U = B.filter((e) => e.status === "ACTIVE"), W = v === "acting-as-me" ? V : U, G = ne(() => W.filter((e) => j.has(e.id)), [j, W]), K = W.length > 0 && W.every((e) => j.has(e.id)), me = W.some((e) => j.has(e.id)) && !K, q = v === "acting-as-me" ? ue : fe, J = v === "acting-as-me" ? de : pe, Y = u((e) => {
|
|
336
336
|
O([e]);
|
|
337
337
|
}, []), X = u((e, t) => {
|
|
338
338
|
M((n) => {
|
|
@@ -353,249 +353,249 @@ var A = ({ type: t, className: n }) => {
|
|
|
353
353
|
G.length !== 0 && O(G);
|
|
354
354
|
}, [G]);
|
|
355
355
|
let ge = u(async () => {
|
|
356
|
-
if (
|
|
357
|
-
let e = await Promise.allSettled(
|
|
356
|
+
if (S.length !== 0) try {
|
|
357
|
+
let e = await Promise.allSettled(S.map((e) => L({ variables: {
|
|
358
358
|
id: e.id,
|
|
359
|
-
reason:
|
|
359
|
+
reason: h("devportal.userRevokedAccessReason", "User revoked access via Developer Portal")
|
|
360
360
|
} }))), t = e.filter((e) => e.status === "fulfilled").length, n = e.length - t;
|
|
361
361
|
A(`Revoked ${t} delegation${t === 1 ? "" : "s"}${n > 0 ? ` • ${n} failed` : ""}`), M((e) => {
|
|
362
362
|
let t = new Set(e);
|
|
363
|
-
return
|
|
363
|
+
return S.forEach((e) => t.delete(e.id)), t;
|
|
364
364
|
}), O([]), P(), I();
|
|
365
365
|
} catch {
|
|
366
366
|
O([]);
|
|
367
367
|
}
|
|
368
368
|
}, [
|
|
369
|
-
|
|
369
|
+
S,
|
|
370
370
|
L,
|
|
371
371
|
P,
|
|
372
372
|
I
|
|
373
373
|
]), _e = u(() => {
|
|
374
374
|
A(null);
|
|
375
375
|
}, []), Q = V.length, $ = U.length;
|
|
376
|
-
return /* @__PURE__ */
|
|
376
|
+
return /* @__PURE__ */ C(l, {
|
|
377
377
|
authOnly: !0,
|
|
378
|
-
children: /* @__PURE__ */
|
|
379
|
-
title:
|
|
380
|
-
description:
|
|
381
|
-
purpose:
|
|
378
|
+
children: /* @__PURE__ */ w(o, {
|
|
379
|
+
title: h("devportal.appDelegationsTitle", "App Delegations"),
|
|
380
|
+
description: h("devportal.appDelegationsDescription", "Manage which apps can act on your behalf. Revoke access at any time."),
|
|
381
|
+
purpose: h("devportal.appDelegationsPurpose", "Delegations are the consent grants that let an app perform actions as you within a limited scope and time window. Review what you have authorized here, see what each app can do, and revoke anything you no longer trust."),
|
|
382
382
|
children: [
|
|
383
|
-
k && /* @__PURE__ */
|
|
383
|
+
k && /* @__PURE__ */ C(ae, {
|
|
384
384
|
message: k,
|
|
385
385
|
onDismiss: _e
|
|
386
386
|
}),
|
|
387
|
-
J && /* @__PURE__ */
|
|
388
|
-
message: J.message ||
|
|
387
|
+
J && /* @__PURE__ */ C(oe, {
|
|
388
|
+
message: J.message || h("devportal.failedToLoadDelegations", "Failed to load delegations"),
|
|
389
389
|
onRetry: () => {
|
|
390
390
|
P(), I();
|
|
391
391
|
}
|
|
392
392
|
}),
|
|
393
|
-
/* @__PURE__ */
|
|
393
|
+
/* @__PURE__ */ C(ie, { children: /* @__PURE__ */ w("div", {
|
|
394
394
|
className: "grid grid-cols-2 gap-4 sm:grid-cols-4",
|
|
395
395
|
children: [
|
|
396
|
-
/* @__PURE__ */
|
|
396
|
+
/* @__PURE__ */ w(E, {
|
|
397
397
|
treatment: "metric",
|
|
398
398
|
className: "p-4",
|
|
399
|
-
children: [/* @__PURE__ */
|
|
399
|
+
children: [/* @__PURE__ */ w("div", {
|
|
400
400
|
className: "flex items-center gap-2 text-text-secondary",
|
|
401
|
-
children: [/* @__PURE__ */
|
|
401
|
+
children: [/* @__PURE__ */ C(y, { className: "h-4 w-4" }), /* @__PURE__ */ C("span", {
|
|
402
402
|
className: "text-sm",
|
|
403
|
-
children:
|
|
403
|
+
children: h("devportal.activeDelegations", "Active Delegations")
|
|
404
404
|
})]
|
|
405
|
-
}), /* @__PURE__ */
|
|
405
|
+
}), /* @__PURE__ */ C("p", {
|
|
406
406
|
className: "mt-1 text-2xl font-semibold tabular-nums",
|
|
407
407
|
children: Q
|
|
408
408
|
})]
|
|
409
409
|
}),
|
|
410
|
-
/* @__PURE__ */
|
|
410
|
+
/* @__PURE__ */ w(E, {
|
|
411
411
|
treatment: "metric",
|
|
412
412
|
className: "p-4",
|
|
413
|
-
children: [/* @__PURE__ */
|
|
413
|
+
children: [/* @__PURE__ */ w("div", {
|
|
414
414
|
className: "flex items-center gap-2 text-text-secondary",
|
|
415
|
-
children: [/* @__PURE__ */
|
|
415
|
+
children: [/* @__PURE__ */ C(b, { className: "h-4 w-4" }), /* @__PURE__ */ C("span", {
|
|
416
416
|
className: "text-sm",
|
|
417
|
-
children:
|
|
417
|
+
children: h("devportal.grantedByMe", "Granted by Me")
|
|
418
418
|
})]
|
|
419
|
-
}), /* @__PURE__ */
|
|
419
|
+
}), /* @__PURE__ */ C("p", {
|
|
420
420
|
className: "mt-1 text-2xl font-semibold tabular-nums",
|
|
421
421
|
children: $
|
|
422
422
|
})]
|
|
423
423
|
}),
|
|
424
|
-
/* @__PURE__ */
|
|
424
|
+
/* @__PURE__ */ w(E, {
|
|
425
425
|
treatment: "metric",
|
|
426
426
|
className: "p-4",
|
|
427
|
-
children: [/* @__PURE__ */
|
|
427
|
+
children: [/* @__PURE__ */ w("div", {
|
|
428
428
|
className: "flex items-center gap-2 text-status-warning-text",
|
|
429
|
-
children: [/* @__PURE__ */
|
|
429
|
+
children: [/* @__PURE__ */ C(m, { className: "h-4 w-4" }), /* @__PURE__ */ C("span", {
|
|
430
430
|
className: "text-sm",
|
|
431
|
-
children:
|
|
431
|
+
children: h("devportal.revokedExpired", "Revoked / Expired")
|
|
432
432
|
})]
|
|
433
|
-
}), /* @__PURE__ */
|
|
433
|
+
}), /* @__PURE__ */ C("p", {
|
|
434
434
|
className: "mt-1 text-2xl font-semibold tabular-nums",
|
|
435
435
|
children: H.length
|
|
436
436
|
})]
|
|
437
437
|
}),
|
|
438
|
-
/* @__PURE__ */
|
|
438
|
+
/* @__PURE__ */ w(E, {
|
|
439
439
|
treatment: "metric",
|
|
440
440
|
className: "p-4",
|
|
441
|
-
children: [/* @__PURE__ */
|
|
441
|
+
children: [/* @__PURE__ */ w("div", {
|
|
442
442
|
className: "flex items-center gap-2 text-text-secondary",
|
|
443
|
-
children: [/* @__PURE__ */
|
|
443
|
+
children: [/* @__PURE__ */ C(g, { className: "h-4 w-4" }), /* @__PURE__ */ C("span", {
|
|
444
444
|
className: "text-sm",
|
|
445
|
-
children:
|
|
445
|
+
children: h("devportal.totalAllTime", "Total All-Time")
|
|
446
446
|
})]
|
|
447
|
-
}), /* @__PURE__ */
|
|
447
|
+
}), /* @__PURE__ */ C("p", {
|
|
448
448
|
className: "mt-1 text-2xl font-semibold tabular-nums",
|
|
449
449
|
children: z.length
|
|
450
450
|
})]
|
|
451
451
|
})
|
|
452
452
|
]
|
|
453
453
|
}) }),
|
|
454
|
-
/* @__PURE__ */
|
|
454
|
+
/* @__PURE__ */ C("div", {
|
|
455
455
|
className: "border-b",
|
|
456
|
-
children: /* @__PURE__ */
|
|
456
|
+
children: /* @__PURE__ */ w("div", {
|
|
457
457
|
className: "flex overflow-x-auto",
|
|
458
458
|
role: "tablist",
|
|
459
|
-
"aria-label":
|
|
460
|
-
children: [/* @__PURE__ */
|
|
459
|
+
"aria-label": h("devportal.delegationSections", "Delegation sections"),
|
|
460
|
+
children: [/* @__PURE__ */ w("button", {
|
|
461
461
|
id: "delegations-tab-acting-as-me",
|
|
462
462
|
role: "tab",
|
|
463
|
-
"aria-selected":
|
|
463
|
+
"aria-selected": v === "acting-as-me",
|
|
464
464
|
onClick: () => {
|
|
465
|
-
Z(),
|
|
465
|
+
Z(), x("acting-as-me");
|
|
466
466
|
},
|
|
467
|
-
className: e("-mb-px border-b-2 px-4 py-3 text-sm font-medium transition-colors",
|
|
468
|
-
children: [
|
|
467
|
+
className: e("-mb-px border-b-2 px-4 py-3 text-sm font-medium transition-colors", v === "acting-as-me" ? "border-primary text-primary" : "border-transparent text-text-secondary hover:text-text-primary"),
|
|
468
|
+
children: [h("devportal.appsActingAsMe", "Apps Acting as Me"), Q > 0 && /* @__PURE__ */ C("span", {
|
|
469
469
|
className: "ml-2 inline-flex items-center justify-center rounded-full bg-action-primary-bg/10 px-2 py-0.5 text-xs font-medium text-primary",
|
|
470
470
|
children: Q
|
|
471
471
|
})]
|
|
472
|
-
}), /* @__PURE__ */
|
|
472
|
+
}), /* @__PURE__ */ w("button", {
|
|
473
473
|
id: "delegations-tab-granted-by-me",
|
|
474
474
|
role: "tab",
|
|
475
|
-
"aria-selected":
|
|
475
|
+
"aria-selected": v === "granted-by-me",
|
|
476
476
|
onClick: () => {
|
|
477
|
-
Z(),
|
|
477
|
+
Z(), x("granted-by-me");
|
|
478
478
|
},
|
|
479
|
-
className: e("-mb-px border-b-2 px-4 py-3 text-sm font-medium transition-colors",
|
|
480
|
-
children: [
|
|
479
|
+
className: e("-mb-px border-b-2 px-4 py-3 text-sm font-medium transition-colors", v === "granted-by-me" ? "border-primary text-primary" : "border-transparent text-text-secondary hover:text-text-primary"),
|
|
480
|
+
children: [h("devportal.delegationsIGranted", "Delegations I Granted"), $ > 0 && /* @__PURE__ */ C("span", {
|
|
481
481
|
className: "ml-2 inline-flex items-center justify-center rounded-full bg-action-primary-bg/10 px-2 py-0.5 text-xs font-medium text-primary",
|
|
482
482
|
children: $
|
|
483
483
|
})]
|
|
484
484
|
})]
|
|
485
485
|
})
|
|
486
486
|
}),
|
|
487
|
-
W.length > 0 && /* @__PURE__ */
|
|
487
|
+
W.length > 0 && /* @__PURE__ */ C("div", {
|
|
488
488
|
className: "rounded-card border border-border-seam bg-bg-surface p-4",
|
|
489
|
-
children: /* @__PURE__ */
|
|
489
|
+
children: /* @__PURE__ */ w("div", {
|
|
490
490
|
className: "flex flex-col gap-3 lg:flex-row lg:items-center lg:justify-between",
|
|
491
491
|
children: [
|
|
492
|
-
/* @__PURE__ */
|
|
492
|
+
/* @__PURE__ */ w("div", {
|
|
493
493
|
className: "flex flex-wrap items-center gap-3",
|
|
494
|
-
children: [/* @__PURE__ */
|
|
494
|
+
children: [/* @__PURE__ */ w("div", {
|
|
495
495
|
className: "flex items-center gap-2",
|
|
496
|
-
children: [/* @__PURE__ */
|
|
496
|
+
children: [/* @__PURE__ */ C(s, {
|
|
497
497
|
checked: K,
|
|
498
498
|
indeterminate: me,
|
|
499
499
|
onChange: he,
|
|
500
|
-
ariaLabel:
|
|
501
|
-
}), /* @__PURE__ */
|
|
500
|
+
ariaLabel: h("devportal.selectAllVisibleDelegations", "Select all visible delegations")
|
|
501
|
+
}), /* @__PURE__ */ C("span", {
|
|
502
502
|
className: "text-sm font-medium",
|
|
503
|
-
children:
|
|
503
|
+
children: h("devportal.selectAllVisible", "Select all visible")
|
|
504
504
|
})]
|
|
505
|
-
}), j.size > 0 && /* @__PURE__ */
|
|
505
|
+
}), j.size > 0 && /* @__PURE__ */ C("button", {
|
|
506
506
|
onClick: Z,
|
|
507
507
|
className: "text-sm text-text-secondary hover:text-text-primary",
|
|
508
|
-
children:
|
|
508
|
+
children: h("devportal.clearSelection", "Clear selection")
|
|
509
509
|
})]
|
|
510
510
|
}),
|
|
511
|
-
/* @__PURE__ */
|
|
511
|
+
/* @__PURE__ */ C("div", {
|
|
512
512
|
className: "flex flex-wrap items-center gap-2",
|
|
513
|
-
children: /* @__PURE__ */
|
|
513
|
+
children: /* @__PURE__ */ w("span", {
|
|
514
514
|
className: "rounded-full bg-bg-sunken px-3 py-1 text-sm font-medium text-text-secondary",
|
|
515
515
|
children: [
|
|
516
516
|
j.size,
|
|
517
517
|
" ",
|
|
518
|
-
|
|
518
|
+
h("devportal.selected", "selected")
|
|
519
519
|
]
|
|
520
520
|
})
|
|
521
521
|
}),
|
|
522
|
-
/* @__PURE__ */
|
|
522
|
+
/* @__PURE__ */ C("p", {
|
|
523
523
|
className: "mt-1 text-2xl font-semibold",
|
|
524
524
|
children: Q
|
|
525
525
|
})
|
|
526
526
|
]
|
|
527
527
|
})
|
|
528
528
|
}),
|
|
529
|
-
q && !N && !F && /* @__PURE__ */
|
|
530
|
-
!q &&
|
|
529
|
+
q && !N && !F && /* @__PURE__ */ C(t, { message: h("devportal.loadingDelegations", "Loading delegations...") }),
|
|
530
|
+
!q && v === "acting-as-me" && /* @__PURE__ */ C("div", {
|
|
531
531
|
className: "space-y-8",
|
|
532
532
|
id: "delegations-panel-acting-as-me",
|
|
533
533
|
role: "tabpanel",
|
|
534
534
|
"aria-labelledby": "delegations-tab-acting-as-me",
|
|
535
535
|
tabIndex: 0,
|
|
536
|
-
children: V.length === 0 && H.length === 0 ? /* @__PURE__ */
|
|
536
|
+
children: V.length === 0 && H.length === 0 ? /* @__PURE__ */ C(n, {
|
|
537
537
|
illustration: "empty-people",
|
|
538
|
-
title:
|
|
539
|
-
description:
|
|
540
|
-
}) : /* @__PURE__ */
|
|
538
|
+
title: h("devportal.noActiveDelegations", "No Active Delegations"),
|
|
539
|
+
description: h("devportal.noAppsAuthorizedOnYourBehalf", "No apps are currently authorized to act on your behalf.")
|
|
540
|
+
}) : /* @__PURE__ */ w(re, { children: [V.length === 0 ? /* @__PURE__ */ C(n, {
|
|
541
541
|
illustration: "empty-people",
|
|
542
|
-
icon: /* @__PURE__ */
|
|
543
|
-
title:
|
|
544
|
-
description:
|
|
545
|
-
}) : /* @__PURE__ */
|
|
542
|
+
icon: /* @__PURE__ */ C(y, { size: 32 }),
|
|
543
|
+
title: h("devportal.noActiveDelegations", "No Active Delegations"),
|
|
544
|
+
description: h("devportal.allPreviousDelegationsRevokedOrExpired", "All previous delegations have been revoked or expired.")
|
|
545
|
+
}) : /* @__PURE__ */ C("div", {
|
|
546
546
|
className: "space-y-4",
|
|
547
|
-
children: V.map((e) => /* @__PURE__ */
|
|
547
|
+
children: V.map((e) => /* @__PURE__ */ C(se, {
|
|
548
548
|
delegation: e,
|
|
549
549
|
onRevoke: Y,
|
|
550
|
-
isRevoking: R &&
|
|
550
|
+
isRevoking: R && S.some((t) => t.id === e.id),
|
|
551
551
|
selected: j.has(e.id),
|
|
552
552
|
onToggleSelect: (t) => X(e.id, t),
|
|
553
|
-
canRevoke:
|
|
553
|
+
canRevoke: _
|
|
554
554
|
}, e.id))
|
|
555
|
-
}), /* @__PURE__ */
|
|
555
|
+
}), /* @__PURE__ */ C(le, { delegations: H })] })
|
|
556
556
|
}),
|
|
557
|
-
!q &&
|
|
557
|
+
!q && v === "granted-by-me" && /* @__PURE__ */ C("div", {
|
|
558
558
|
className: "space-y-4",
|
|
559
559
|
id: "delegations-panel-granted-by-me",
|
|
560
560
|
role: "tabpanel",
|
|
561
561
|
"aria-labelledby": "delegations-tab-granted-by-me",
|
|
562
562
|
tabIndex: 0,
|
|
563
|
-
children: B.length === 0 ? /* @__PURE__ */
|
|
563
|
+
children: B.length === 0 ? /* @__PURE__ */ C(n, {
|
|
564
564
|
illustration: "empty-people",
|
|
565
|
-
title:
|
|
566
|
-
description:
|
|
567
|
-
}) : B.map((e) => /* @__PURE__ */
|
|
565
|
+
title: h("devportal.noDelegationsGranted", "No Delegations Granted"),
|
|
566
|
+
description: h("devportal.noGrantedDelegationsDescription", "You haven't granted any app delegations to other users.")
|
|
567
|
+
}) : B.map((e) => /* @__PURE__ */ C(ce, {
|
|
568
568
|
delegation: e,
|
|
569
569
|
onRevoke: Y,
|
|
570
|
-
isRevoking: R &&
|
|
570
|
+
isRevoking: R && S.some((t) => t.id === e.id),
|
|
571
571
|
selected: j.has(e.id),
|
|
572
572
|
onToggleSelect: (t) => X(e.id, t),
|
|
573
|
-
canRevoke:
|
|
573
|
+
canRevoke: _
|
|
574
574
|
}, e.id))
|
|
575
575
|
}),
|
|
576
|
-
/* @__PURE__ */
|
|
576
|
+
/* @__PURE__ */ C("div", {
|
|
577
577
|
className: "rounded-lg border border-border-subtle bg-status-info-bg-subtle p-5",
|
|
578
|
-
children: /* @__PURE__ */
|
|
578
|
+
children: /* @__PURE__ */ w("div", {
|
|
579
579
|
className: "flex gap-4",
|
|
580
|
-
children: [/* @__PURE__ */
|
|
580
|
+
children: [/* @__PURE__ */ C(p, { className: "h-6 w-6 shrink-0 text-accent-blue" }), /* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("h3", {
|
|
581
581
|
className: "font-semibold text-status-info-text",
|
|
582
|
-
children:
|
|
583
|
-
}), /* @__PURE__ */
|
|
582
|
+
children: h("devportal.aboutAppDelegations", "About App Delegations")
|
|
583
|
+
}), /* @__PURE__ */ C("p", {
|
|
584
584
|
className: "mt-1 text-sm text-status-info-text",
|
|
585
|
-
children:
|
|
585
|
+
children: h("devportal.aboutAppDelegationsText", "App delegations allow automated services, bots, and integrations to perform actions on your behalf. Each delegation specifies which permissions (scopes) and workspaces the app can access. You can revoke access at any time, which immediately prevents the app from acting as you.")
|
|
586
586
|
})] })]
|
|
587
587
|
})
|
|
588
588
|
}),
|
|
589
|
-
/* @__PURE__ */
|
|
590
|
-
open:
|
|
589
|
+
/* @__PURE__ */ C(c, {
|
|
590
|
+
open: S.length > 0,
|
|
591
591
|
onOpenChange: (e) => {
|
|
592
592
|
e || O([]);
|
|
593
593
|
},
|
|
594
594
|
onConfirm: ge,
|
|
595
|
-
title:
|
|
596
|
-
description:
|
|
597
|
-
confirmLabel:
|
|
598
|
-
cancelLabel:
|
|
595
|
+
title: S.length > 1 ? h("devportal.revokeDelegations", "Revoke Delegations") : h("devportal.revokeDelegation", "Revoke Delegation"),
|
|
596
|
+
description: S.length > 1 ? h("devportal.revokeDelegationsBulkConfirm", `Are you sure you want to revoke ${S.length} selected delegations? Those apps will no longer be able to act on the delegated users' behalf.`) : h("devportal.revokeDelegationSingleConfirm", `Are you sure you want to revoke access for "${S[0]?.app?.name ?? "this app"}"? This app will no longer be able to act on your behalf.`),
|
|
597
|
+
confirmLabel: h("devportal.revokeAccess", "Revoke Access"),
|
|
598
|
+
cancelLabel: h("devportal.cancel", "Cancel"),
|
|
599
599
|
variant: "danger",
|
|
600
600
|
loading: R
|
|
601
601
|
})
|