@burdenoff/microfe-vibecontrols 2026.709.2 → 2026.710.1
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/components/agent-manager/AgentManagerBookmarksDrawer.js +87 -85
- package/dist/components/agent-manager/AgentManagerBookmarksDrawer.js.map +1 -1
- package/dist/components/ai/InstructionFilesManager.js +138 -136
- package/dist/components/ai/InstructionFilesManager.js.map +1 -1
- package/dist/components/ai/PluginHarnessPicker.js +70 -64
- package/dist/components/ai/PluginHarnessPicker.js.map +1 -1
- package/dist/components/docs/DocsEditPanel.js +1 -1
- package/dist/components/docs/DocsEditPanel.js.map +1 -1
- package/dist/components/docs/DocsPageTree.js +1 -1
- package/dist/components/docs/DocsPageTree.js.map +1 -1
- package/dist/components/docs/DocsTabPanel.js +108 -106
- package/dist/components/docs/DocsTabPanel.js.map +1 -1
- package/dist/components/notes/NotesTabPanel.js +99 -99
- package/dist/components/notes/NotesTabPanel.js.map +1 -1
- package/dist/components/scorecard/ScorecardPanel.js +309 -308
- package/dist/components/scorecard/ScorecardPanel.js.map +1 -1
- package/dist/components/sessions/SessionPublicLinkPanel.js +104 -102
- package/dist/components/sessions/SessionPublicLinkPanel.js.map +1 -1
- package/dist/components/settings/AdvancedSection.js +92 -90
- package/dist/components/settings/AdvancedSection.js.map +1 -1
- package/dist/components/vibedeck/VibeDeckPublicLinkPanel.js +104 -102
- package/dist/components/vibedeck/VibeDeckPublicLinkPanel.js.map +1 -1
- package/dist/constants/permissions.js +7 -0
- package/dist/constants/permissions.js.map +1 -1
- package/dist/pages/ActionsPage.js +303 -303
- package/dist/pages/ActionsPage.js.map +1 -1
- package/dist/pages/AgentDetailsPage.js +520 -516
- package/dist/pages/AgentDetailsPage.js.map +1 -1
- package/dist/pages/AgentsPage.js +287 -283
- package/dist/pages/AgentsPage.js.map +1 -1
- package/dist/pages/TargetsPage.js +554 -549
- package/dist/pages/TargetsPage.js.map +1 -1
- package/dist/pages/VibeAuditPage.js +2 -2
- package/dist/pages/VibeAuditPage.js.map +1 -1
- package/dist/pages/VibeDeckPage.js +257 -257
- package/dist/pages/VibeDeckPage.js.map +1 -1
- package/dist/pages/VibeDetailsPage.js +688 -693
- package/dist/pages/VibeDetailsPage.js.map +1 -1
- package/dist/pages/VibesPage.js +49 -41
- package/dist/pages/VibesPage.js.map +1 -1
- package/dist/pages/WebhooksPage.js +162 -138
- package/dist/pages/WebhooksPage.js.map +1 -1
- package/dist/pages/tunnels/DomainsTab.js +54 -47
- package/dist/pages/tunnels/DomainsTab.js.map +1 -1
- package/package.json +1 -1
|
@@ -11,9 +11,9 @@ import { SearchInput as ce } from "../components/shared/SearchInput.js";
|
|
|
11
11
|
import { FilterDropdown as le } from "../components/shared/FilterDropdown.js";
|
|
12
12
|
import { Card as ue } from "../components/shared/Card.js";
|
|
13
13
|
import { GetHelpButton as de } from "../components/shared/GetHelpButton.js";
|
|
14
|
-
import { SelectionCheckbox as
|
|
14
|
+
import { SelectionCheckbox as fe } from "../components/shared/SelectionCheckbox.js";
|
|
15
15
|
import "../components/shared/index.js";
|
|
16
|
-
import { isNative as
|
|
16
|
+
import { isNative as o, nativeImpact as pe, nativeNotify as me } from "../utils/nativeBridge.js";
|
|
17
17
|
import { VIBE_PERMISSIONS as s } from "../constants/permissions.js";
|
|
18
18
|
import { PageSkeleton as he } from "../components/shared/PageSkeleton.js";
|
|
19
19
|
import { WEBHOOK_EVENTS as ge, isCustomEvent as c } from "../components/webhooks/types.js";
|
|
@@ -24,10 +24,10 @@ import { usePermissions as Ae } from "@burdenoff/fe-libs/shared/providers/shell"
|
|
|
24
24
|
import { AnimatePresence as je } from "framer-motion";
|
|
25
25
|
import { jsx as m, jsxs as h } from "react/jsx-runtime";
|
|
26
26
|
import { Button as Me, CTAOverflowMenu as Ne, PagePurpose as Pe } from "@burdenoff/fe-libs/ui";
|
|
27
|
-
import { AccessDenied as Fe, PermissionButton as
|
|
28
|
-
import { MotionItem as
|
|
27
|
+
import { AccessDenied as Fe, PermissionButton as g } from "@burdenoff/fe-libs/shared/components";
|
|
28
|
+
import { MotionItem as Ie, MotionList as Le, MotionPage as _ } from "@burdenoff/fe-libs/shared/motion";
|
|
29
29
|
//#region src/pages/WebhooksPage.tsx
|
|
30
|
-
var
|
|
30
|
+
var Re = [
|
|
31
31
|
{
|
|
32
32
|
value: "all",
|
|
33
33
|
label: "All Statuses"
|
|
@@ -45,24 +45,24 @@ var ze = [
|
|
|
45
45
|
label: "Has Errors"
|
|
46
46
|
}
|
|
47
47
|
];
|
|
48
|
-
function
|
|
48
|
+
function ze() {
|
|
49
49
|
ne();
|
|
50
|
-
let
|
|
51
|
-
let n =
|
|
50
|
+
let ze = re(), { t: Be } = ve(), { hasPermission: Ve, isLoading: He, permissions: Ue } = Ae(), v = (e, t) => {
|
|
51
|
+
let n = Be(e);
|
|
52
52
|
return n === e ? t : n;
|
|
53
|
-
}, We =
|
|
53
|
+
}, We = Ve(s.WEBHOOK_LIST), Ge = Ve(s.WEBHOOK_CREATE), Ke = He || !We, [y, qe] = d(""), [b, Je] = d("all"), [x, Ye] = d("list"), [S, C] = d(!1), [w, T] = d(null), [Xe, E] = d(null), [D, Ze] = d(!1), [O, k] = d(null), [Qe, A] = d(null), [j, M] = d([]), [N, P] = d([]), [F, I] = d(!1), [L, R] = d(""), [z, B] = d(/* @__PURE__ */ new Set()), [V, H] = d(null), [U, W] = d(null);
|
|
54
54
|
_e(() => {
|
|
55
|
-
if (!
|
|
56
|
-
let e = window.setTimeout(() =>
|
|
55
|
+
if (!O) return;
|
|
56
|
+
let e = window.setTimeout(() => k(null), 4e3);
|
|
57
57
|
return () => window.clearTimeout(e);
|
|
58
|
-
}, [
|
|
58
|
+
}, [O]), _e(() => {
|
|
59
59
|
if (!S) return;
|
|
60
60
|
let e = (e) => {
|
|
61
|
-
e.key === "Escape" && !
|
|
61
|
+
e.key === "Escape" && !D && C(!1);
|
|
62
62
|
};
|
|
63
63
|
return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
|
|
64
|
-
}, [
|
|
65
|
-
let
|
|
64
|
+
}, [D, S]);
|
|
65
|
+
let $e = u(null), et = u(null), tt = u(null), nt = u(null), [rt] = e({ refetchQueries: ["ListWebhooks"] }), [it] = i({ refetchQueries: ["ListWebhooks"] }), [at] = r({ refetchQueries: ["ListWebhooks"] }), [ot] = t({ refetchQueries: ["ListWebhooks"] }), { agents: st } = ie(), ct = l(() => st.map((e) => ({
|
|
66
66
|
id: e.id,
|
|
67
67
|
name: e.name
|
|
68
68
|
})), [st]), { data: lt, loading: G, error: ut, refetch: K } = n({
|
|
@@ -99,111 +99,111 @@ function Be() {
|
|
|
99
99
|
q,
|
|
100
100
|
y,
|
|
101
101
|
b
|
|
102
|
-
]), Y = l(() => q.filter((e) =>
|
|
103
|
-
|
|
102
|
+
]), Y = l(() => q.filter((e) => z.has(e.id)), [q, z]), X = Y.filter((e) => e.isActive), Z = Y.filter((e) => !e.isActive), dt = J.length > 0 && J.every((e) => z.has(e.id)), ft = J.some((e) => z.has(e.id)) && !dt, pt = () => {
|
|
103
|
+
E(null), A(null), M([]), P([]), I(!1), R(""), C(!0);
|
|
104
104
|
}, mt = (e) => {
|
|
105
|
-
|
|
105
|
+
M((t) => t.includes(e) ? t.filter((t) => t !== e) : [...t, e]);
|
|
106
106
|
}, ht = async () => {
|
|
107
|
-
let e =
|
|
107
|
+
let e = $e.current?.value?.trim(), t = et.current?.value?.trim(), n = tt.current?.value?.trim() || void 0, r = nt.current?.value?.trim() || void 0;
|
|
108
108
|
if (!e) {
|
|
109
|
-
|
|
109
|
+
E(v("webhooks.nameRequired", "Name is required"));
|
|
110
110
|
return;
|
|
111
111
|
}
|
|
112
112
|
if (!t) {
|
|
113
|
-
|
|
113
|
+
E(v("webhooks.urlRequired", "URL is required"));
|
|
114
114
|
return;
|
|
115
115
|
}
|
|
116
116
|
try {
|
|
117
117
|
let e = new URL(t);
|
|
118
118
|
if (!["http:", "https:"].includes(e.protocol)) {
|
|
119
|
-
|
|
119
|
+
E(v("webhooks.urlProtocolRequired", "URL must use http:// or https:// protocol"));
|
|
120
120
|
return;
|
|
121
121
|
}
|
|
122
122
|
} catch {
|
|
123
|
-
|
|
123
|
+
E(v("webhooks.urlInvalid", "Please enter a valid URL (e.g., https://example.com/webhook)"));
|
|
124
124
|
return;
|
|
125
125
|
}
|
|
126
|
-
if (
|
|
127
|
-
|
|
126
|
+
if (j.length === 0) {
|
|
127
|
+
E(v("webhooks.eventRequired", "At least one event must be selected"));
|
|
128
128
|
return;
|
|
129
129
|
}
|
|
130
|
-
|
|
130
|
+
Ze(!0), E(null), A(null);
|
|
131
131
|
try {
|
|
132
132
|
await rt({ variables: { input: {
|
|
133
133
|
name: e,
|
|
134
134
|
url: t,
|
|
135
|
-
events:
|
|
135
|
+
events: j,
|
|
136
136
|
secret: n,
|
|
137
137
|
...r ? { signingKey: r } : {},
|
|
138
|
-
...
|
|
139
|
-
} } }), C(!1),
|
|
138
|
+
...N.length > 0 ? { agentIds: N } : {}
|
|
139
|
+
} } }), C(!1), k(v("webhooks.createdSuccess", "Webhook created successfully")), setTimeout(() => k(null), 3e3);
|
|
140
140
|
} catch (e) {
|
|
141
141
|
if (te(e)) {
|
|
142
|
-
C(!1),
|
|
142
|
+
C(!1), W({
|
|
143
143
|
title: "Webhook Quota Reached",
|
|
144
144
|
message: "You have reached the webhook limit for your current plan. Upgrade to create more webhooks."
|
|
145
145
|
});
|
|
146
146
|
return;
|
|
147
147
|
}
|
|
148
|
-
|
|
148
|
+
E(e instanceof Error ? e.message : v("webhooks.failedCreate", "Failed to create webhook"));
|
|
149
149
|
} finally {
|
|
150
|
-
|
|
150
|
+
Ze(!1);
|
|
151
151
|
}
|
|
152
152
|
}, gt = async (e) => {
|
|
153
153
|
try {
|
|
154
|
-
|
|
154
|
+
A(null), await it({ variables: {
|
|
155
155
|
id: e.id,
|
|
156
156
|
input: { isActive: !e.isActive }
|
|
157
|
-
} }),
|
|
157
|
+
} }), k(e.isActive ? v("webhooks.disabledSuccess", "Webhook disabled successfully") : v("webhooks.enabledSuccess", "Webhook enabled successfully"));
|
|
158
158
|
} catch (e) {
|
|
159
|
-
console.error("Failed to toggle webhook:", e),
|
|
159
|
+
console.error("Failed to toggle webhook:", e), A(e instanceof Error ? e.message : v("webhooks.failedToggle", "Failed to update webhook state"));
|
|
160
160
|
}
|
|
161
161
|
}, _t = async (e) => {
|
|
162
|
-
|
|
162
|
+
T(e.id);
|
|
163
163
|
try {
|
|
164
|
-
|
|
164
|
+
A(null), await at({ variables: { id: e.id } }), k(v("webhooks.testSuccess", "Webhook test delivery completed"));
|
|
165
165
|
} catch (e) {
|
|
166
166
|
if (te(e)) {
|
|
167
|
-
|
|
167
|
+
W({
|
|
168
168
|
title: "Webhook Test Quota Reached",
|
|
169
169
|
message: "You have used the webhook test quota for your current plan. Upgrade to continue testing deliveries."
|
|
170
170
|
});
|
|
171
171
|
return;
|
|
172
172
|
}
|
|
173
|
-
console.error("Failed to test webhook:", e),
|
|
173
|
+
console.error("Failed to test webhook:", e), A(e instanceof Error ? e.message : v("webhooks.failedTest", "Failed to test webhook"));
|
|
174
174
|
} finally {
|
|
175
|
-
|
|
175
|
+
T(null);
|
|
176
176
|
}
|
|
177
177
|
}, vt = async (e) => {
|
|
178
178
|
try {
|
|
179
|
-
|
|
179
|
+
A(null), await ot({ variables: { id: e.id } }), k(v("webhooks.deletedSuccess", "Webhook deleted successfully")), o() && me("success");
|
|
180
180
|
} catch (e) {
|
|
181
|
-
console.error("Failed to delete webhook:", e),
|
|
181
|
+
console.error("Failed to delete webhook:", e), A(e instanceof Error ? e.message : v("webhooks.failedDelete", "Failed to delete webhook")), o() && me("error");
|
|
182
182
|
}
|
|
183
183
|
}, yt = (e, t) => {
|
|
184
|
-
|
|
184
|
+
B((n) => {
|
|
185
185
|
let r = new Set(n);
|
|
186
186
|
return t ? r.add(e) : r.delete(e), r;
|
|
187
187
|
});
|
|
188
188
|
}, bt = (e) => {
|
|
189
|
-
|
|
189
|
+
B((t) => {
|
|
190
190
|
let n = new Set(t);
|
|
191
191
|
return J.forEach((t) => {
|
|
192
192
|
e ? n.add(t.id) : n.delete(t.id);
|
|
193
193
|
}), n;
|
|
194
194
|
});
|
|
195
|
-
}, Q = () =>
|
|
195
|
+
}, Q = () => B(/* @__PURE__ */ new Set()), xt = async (e) => {
|
|
196
196
|
let t = e ? Z : X;
|
|
197
197
|
if (t.length === 0) return;
|
|
198
198
|
let n = await Promise.allSettled(t.map((t) => it({ variables: {
|
|
199
199
|
id: t.id,
|
|
200
200
|
input: { isActive: e }
|
|
201
201
|
} }))), r = n.filter((e) => e.status === "fulfilled").length, i = n.length - r;
|
|
202
|
-
|
|
202
|
+
k(`${e ? "Enabled" : "Disabled"} ${r} webhook${r === 1 ? "" : "s"}${i > 0 ? ` • ${i} failed` : ""}`), setTimeout(() => k(null), 4e3), H(null), Q(), await K();
|
|
203
203
|
}, St = async () => {
|
|
204
204
|
if (Y.length === 0) return;
|
|
205
205
|
let e = await Promise.allSettled(Y.map((e) => ot({ variables: { id: e.id } }))), t = e.filter((e) => e.status === "fulfilled").length, n = e.length - t;
|
|
206
|
-
|
|
206
|
+
k(`Deleted ${t} webhook${t === 1 ? "" : "s"}${n > 0 ? ` • ${n} failed` : ""}`), setTimeout(() => k(null), 4e3), H(null), Q(), await K();
|
|
207
207
|
}, $ = {
|
|
208
208
|
total: q.length,
|
|
209
209
|
active: q.filter((e) => e.isActive).length,
|
|
@@ -213,44 +213,44 @@ function Be() {
|
|
|
213
213
|
let t = Date.now() - new Date(e).getTime();
|
|
214
214
|
return t < 6e4 ? v("webhooks.justNow", "Just now") : t < 36e5 ? `${Math.floor(t / 6e4)}m ago` : t < 864e5 ? `${Math.floor(t / 36e5)}h ago` : `${Math.floor(t / 864e5)}d ago`;
|
|
215
215
|
};
|
|
216
|
-
return He ? /* @__PURE__ */ m(
|
|
216
|
+
return He ? /* @__PURE__ */ m(_, {
|
|
217
217
|
className: "space-y-6 px-6 lg:px-8 py-6 bg-bg-canvas min-h-screen",
|
|
218
218
|
children: /* @__PURE__ */ m(he, {
|
|
219
219
|
variant: "rows",
|
|
220
220
|
count: 6
|
|
221
221
|
})
|
|
222
|
-
}) : Ue && Ue.permissionStrings?.length > 0 && !We ? /* @__PURE__ */ m(
|
|
222
|
+
}) : Ue && Ue.permissionStrings?.length > 0 && !We ? /* @__PURE__ */ m(_, {
|
|
223
223
|
className: "space-y-6 px-6 lg:px-8 py-6 bg-bg-canvas min-h-screen",
|
|
224
224
|
children: /* @__PURE__ */ m(Fe, {
|
|
225
225
|
title: v("common.accessDeniedTitle", "Access Denied"),
|
|
226
226
|
description: v("webhooks.accessDeniedDescription", "You don't have permission to view webhooks."),
|
|
227
227
|
details: "Required permission: webhook:list"
|
|
228
228
|
})
|
|
229
|
-
}) : ut && q.length === 0 ? /* @__PURE__ */ m(
|
|
229
|
+
}) : ut && q.length === 0 ? /* @__PURE__ */ m(_, {
|
|
230
230
|
className: "space-y-6 px-6 lg:px-8 py-6 bg-bg-canvas min-h-screen",
|
|
231
231
|
children: /* @__PURE__ */ m(oe, {
|
|
232
232
|
title: v("webhooks.failedLoad", "Failed to load webhooks"),
|
|
233
233
|
message: ut.message,
|
|
234
234
|
onRetry: () => K()
|
|
235
235
|
})
|
|
236
|
-
}) : /* @__PURE__ */ h(
|
|
236
|
+
}) : /* @__PURE__ */ h(_, {
|
|
237
237
|
className: "space-y-6 px-6 lg:px-8 py-6 bg-bg-canvas min-h-screen",
|
|
238
238
|
children: [
|
|
239
|
-
|
|
239
|
+
O && /* @__PURE__ */ m("div", {
|
|
240
240
|
className: "fixed top-4 left-4 right-4 sm:left-auto z-50 bg-status-success-bg text-status-success-text px-4 py-3 rounded-md shadow-lg",
|
|
241
|
-
children:
|
|
241
|
+
children: O
|
|
242
242
|
}),
|
|
243
|
-
|
|
243
|
+
Qe && /* @__PURE__ */ m("div", {
|
|
244
244
|
role: "alert",
|
|
245
245
|
className: "rounded-card border border-status-error-border bg-status-error-bg-subtle px-4 py-3 text-sm text-status-error-text",
|
|
246
|
-
children:
|
|
246
|
+
children: Qe
|
|
247
247
|
}),
|
|
248
248
|
/* @__PURE__ */ m(ae, {
|
|
249
249
|
title: v("nav.webhooks", "Webhooks"),
|
|
250
250
|
description: `${$.active} of ${$.total} webhooks active`,
|
|
251
251
|
actions: /* @__PURE__ */ h("div", {
|
|
252
252
|
className: "flex items-center gap-2",
|
|
253
|
-
children: [/* @__PURE__ */ m(
|
|
253
|
+
children: [/* @__PURE__ */ m(g, {
|
|
254
254
|
permission: s.WEBHOOK_CREATE,
|
|
255
255
|
children: /* @__PURE__ */ h(Me, {
|
|
256
256
|
type: "button",
|
|
@@ -300,7 +300,7 @@ function Be() {
|
|
|
300
300
|
children: /* @__PURE__ */ m(le, {
|
|
301
301
|
label: v("webhooks.status", "Status"),
|
|
302
302
|
value: b,
|
|
303
|
-
options:
|
|
303
|
+
options: Re,
|
|
304
304
|
onChange: Je
|
|
305
305
|
})
|
|
306
306
|
})]
|
|
@@ -350,7 +350,7 @@ function Be() {
|
|
|
350
350
|
className: "flex flex-wrap items-center gap-3",
|
|
351
351
|
children: [/* @__PURE__ */ h("div", {
|
|
352
352
|
className: "flex items-center gap-2",
|
|
353
|
-
children: [/* @__PURE__ */ m(
|
|
353
|
+
children: [/* @__PURE__ */ m(fe, {
|
|
354
354
|
checked: dt,
|
|
355
355
|
indeterminate: ft,
|
|
356
356
|
onChange: bt,
|
|
@@ -359,7 +359,7 @@ function Be() {
|
|
|
359
359
|
className: "text-sm font-medium text-text-primary",
|
|
360
360
|
children: "Select all visible"
|
|
361
361
|
})]
|
|
362
|
-
}),
|
|
362
|
+
}), z.size > 0 && /* @__PURE__ */ m("button", {
|
|
363
363
|
type: "button",
|
|
364
364
|
onClick: Q,
|
|
365
365
|
className: "text-sm text-text-secondary hover:text-text-primary",
|
|
@@ -370,28 +370,40 @@ function Be() {
|
|
|
370
370
|
children: [
|
|
371
371
|
/* @__PURE__ */ h("span", {
|
|
372
372
|
className: "rounded-full bg-bg-sunken px-3 py-1 text-sm font-medium text-text-secondary",
|
|
373
|
-
children: [
|
|
373
|
+
children: [z.size, " selected"]
|
|
374
374
|
}),
|
|
375
|
-
/* @__PURE__ */
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
375
|
+
/* @__PURE__ */ m(g, {
|
|
376
|
+
permission: s.WEBHOOK_UPDATE,
|
|
377
|
+
deniedBehavior: "hide",
|
|
378
|
+
children: /* @__PURE__ */ h("button", {
|
|
379
|
+
type: "button",
|
|
380
|
+
onClick: () => H("enable"),
|
|
381
|
+
disabled: Z.length === 0,
|
|
382
|
+
className: "rounded-md border border-status-success-border px-3 py-2 text-sm font-medium text-status-success-text hover:bg-status-success-bg disabled:cursor-not-allowed disabled:opacity-50",
|
|
383
|
+
children: ["Enable Selected", Z.length > 0 ? ` (${Z.length})` : ""]
|
|
384
|
+
})
|
|
381
385
|
}),
|
|
382
|
-
/* @__PURE__ */
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
386
|
+
/* @__PURE__ */ m(g, {
|
|
387
|
+
permission: s.WEBHOOK_UPDATE,
|
|
388
|
+
deniedBehavior: "hide",
|
|
389
|
+
children: /* @__PURE__ */ h("button", {
|
|
390
|
+
type: "button",
|
|
391
|
+
onClick: () => H("disable"),
|
|
392
|
+
disabled: X.length === 0,
|
|
393
|
+
className: "rounded-md border border-status-warning-border px-3 py-2 text-sm font-medium text-status-warning-text hover:bg-status-warning-bg disabled:cursor-not-allowed disabled:opacity-50",
|
|
394
|
+
children: ["Disable Selected", X.length > 0 ? ` (${X.length})` : ""]
|
|
395
|
+
})
|
|
388
396
|
}),
|
|
389
|
-
/* @__PURE__ */
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
397
|
+
/* @__PURE__ */ m(g, {
|
|
398
|
+
permission: s.WEBHOOK_DELETE,
|
|
399
|
+
deniedBehavior: "hide",
|
|
400
|
+
children: /* @__PURE__ */ h("button", {
|
|
401
|
+
type: "button",
|
|
402
|
+
onClick: () => H("delete"),
|
|
403
|
+
disabled: Y.length === 0,
|
|
404
|
+
className: "rounded-md border border-status-error-bg px-3 py-2 text-sm font-medium text-status-error-text hover:bg-status-error-bg disabled:cursor-not-allowed disabled:opacity-50",
|
|
405
|
+
children: ["Delete Selected", Y.length > 0 ? ` (${Y.length})` : ""]
|
|
406
|
+
})
|
|
395
407
|
})
|
|
396
408
|
]
|
|
397
409
|
})]
|
|
@@ -402,9 +414,9 @@ function Be() {
|
|
|
402
414
|
children: G && q.length === 0 ? /* @__PURE__ */ m(he, {
|
|
403
415
|
variant: "rows",
|
|
404
416
|
count: 6
|
|
405
|
-
}) : J.length > 0 ? /* @__PURE__ */ m(
|
|
417
|
+
}) : J.length > 0 ? /* @__PURE__ */ m(Le, {
|
|
406
418
|
className: x === "grid" ? "grid grid-cols-1 gap-4 xl:grid-cols-2" : "space-y-4",
|
|
407
|
-
children: J.map((e) => /* @__PURE__ */ m(
|
|
419
|
+
children: J.map((e) => /* @__PURE__ */ m(Ie, {
|
|
408
420
|
variant: "fadeRight",
|
|
409
421
|
children: /* @__PURE__ */ m(ue, {
|
|
410
422
|
className: "p-4",
|
|
@@ -415,8 +427,8 @@ function Be() {
|
|
|
415
427
|
children: [
|
|
416
428
|
/* @__PURE__ */ m("div", {
|
|
417
429
|
onClick: (e) => e.stopPropagation(),
|
|
418
|
-
children: /* @__PURE__ */ m(
|
|
419
|
-
checked:
|
|
430
|
+
children: /* @__PURE__ */ m(fe, {
|
|
431
|
+
checked: z.has(e.id),
|
|
420
432
|
onChange: (t) => yt(e.id, t),
|
|
421
433
|
ariaLabel: `Select webhook ${e.name}`,
|
|
422
434
|
className: "mt-2"
|
|
@@ -503,28 +515,40 @@ function Be() {
|
|
|
503
515
|
}), /* @__PURE__ */ h("div", {
|
|
504
516
|
className: "flex items-center gap-2 flex-shrink-0",
|
|
505
517
|
children: [
|
|
506
|
-
/* @__PURE__ */
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
518
|
+
/* @__PURE__ */ m(g, {
|
|
519
|
+
permission: s.WEBHOOK_EXECUTE,
|
|
520
|
+
deniedBehavior: "hide",
|
|
521
|
+
children: /* @__PURE__ */ h("button", {
|
|
522
|
+
type: "button",
|
|
523
|
+
onClick: () => _t(e),
|
|
524
|
+
disabled: w === e.id,
|
|
525
|
+
className: "flex items-center gap-1 px-3 py-1.5 text-sm bg-bg-sunken text-text-primary hover:bg-action-secondary-bg-hover rounded-md transition-colors disabled:opacity-50",
|
|
526
|
+
children: [w === e.id ? /* @__PURE__ */ m(De, { className: "size-4 animate-spin" }) : /* @__PURE__ */ m(Ee, { className: "size-4" }), v("webhooks.test", "Test")]
|
|
527
|
+
})
|
|
512
528
|
}),
|
|
513
|
-
/* @__PURE__ */ m(
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
529
|
+
/* @__PURE__ */ m(g, {
|
|
530
|
+
permission: s.WEBHOOK_UPDATE,
|
|
531
|
+
deniedBehavior: "hide",
|
|
532
|
+
children: /* @__PURE__ */ m("button", {
|
|
533
|
+
type: "button",
|
|
534
|
+
onClick: () => gt(e),
|
|
535
|
+
className: `p-2 rounded-button transition-colors ${e.isActive ? "bg-status-success-bg-subtle text-status-success-text hover:bg-bg-sunken" : "bg-bg-sunken text-text-secondary hover:bg-action-secondary-bg-hover"}`,
|
|
536
|
+
title: e.isActive ? v("webhooks.disable", "Disable") : v("webhooks.enable", "Enable"),
|
|
537
|
+
children: e.isActive ? /* @__PURE__ */ m(xe, { className: "size-4" }) : /* @__PURE__ */ m(ke, { className: "size-4" })
|
|
538
|
+
})
|
|
519
539
|
}),
|
|
520
|
-
/* @__PURE__ */ m(
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
540
|
+
/* @__PURE__ */ m(g, {
|
|
541
|
+
permission: s.WEBHOOK_DELETE,
|
|
542
|
+
deniedBehavior: "hide",
|
|
543
|
+
children: /* @__PURE__ */ m("button", {
|
|
544
|
+
type: "button",
|
|
545
|
+
onClick: () => {
|
|
546
|
+
pe("medium"), vt(e);
|
|
547
|
+
},
|
|
548
|
+
className: "p-2 text-status-error-text hover:bg-status-error-bg rounded-md transition-colors",
|
|
549
|
+
title: v("common.delete", "Delete"),
|
|
550
|
+
children: /* @__PURE__ */ m(Oe, { className: "size-4" })
|
|
551
|
+
})
|
|
528
552
|
})
|
|
529
553
|
]
|
|
530
554
|
})]
|
|
@@ -560,9 +584,9 @@ function Be() {
|
|
|
560
584
|
className: "text-lg font-semibold text-text-primary mb-4",
|
|
561
585
|
children: v("webhooks.newWebhook", "New Webhook")
|
|
562
586
|
}),
|
|
563
|
-
|
|
587
|
+
Xe && /* @__PURE__ */ m("div", {
|
|
564
588
|
className: "mb-4 p-3 bg-status-error-bg text-status-error-text rounded-md text-sm",
|
|
565
|
-
children:
|
|
589
|
+
children: Xe
|
|
566
590
|
}),
|
|
567
591
|
/* @__PURE__ */ h("div", {
|
|
568
592
|
className: "space-y-4",
|
|
@@ -572,7 +596,7 @@ function Be() {
|
|
|
572
596
|
children: v("webhooks.name", "Name")
|
|
573
597
|
}), /* @__PURE__ */ m("input", {
|
|
574
598
|
"aria-label": "control",
|
|
575
|
-
ref:
|
|
599
|
+
ref: $e,
|
|
576
600
|
type: "text",
|
|
577
601
|
placeholder: v("webhooks.namePlaceholder", "Slack Notifications"),
|
|
578
602
|
className: "w-full px-3 py-2 bg-bg-sunken border border-border-default rounded-md text-text-primary placeholder:text-text-placeholder"
|
|
@@ -582,7 +606,7 @@ function Be() {
|
|
|
582
606
|
children: v("webhooks.url", "URL")
|
|
583
607
|
}), /* @__PURE__ */ m("input", {
|
|
584
608
|
"aria-label": "control",
|
|
585
|
-
ref:
|
|
609
|
+
ref: et,
|
|
586
610
|
type: "url",
|
|
587
611
|
placeholder: v("webhooks.urlPlaceholder", "https://hooks.slack.com/services/..."),
|
|
588
612
|
className: "w-full px-3 py-2 bg-bg-sunken border border-border-default rounded-md text-text-primary placeholder:text-text-placeholder"
|
|
@@ -592,7 +616,7 @@ function Be() {
|
|
|
592
616
|
children: v("webhooks.secret", "Secret")
|
|
593
617
|
}), /* @__PURE__ */ m("input", {
|
|
594
618
|
"aria-label": "control",
|
|
595
|
-
ref:
|
|
619
|
+
ref: tt,
|
|
596
620
|
type: "password",
|
|
597
621
|
placeholder: v("webhooks.secretPlaceholder", "Optional signing secret"),
|
|
598
622
|
className: "w-full px-3 py-2 bg-bg-sunken border border-border-default rounded-md text-text-primary placeholder:text-text-placeholder"
|
|
@@ -609,7 +633,7 @@ function Be() {
|
|
|
609
633
|
children: [/* @__PURE__ */ m("input", {
|
|
610
634
|
"aria-label": "control",
|
|
611
635
|
type: "checkbox",
|
|
612
|
-
checked:
|
|
636
|
+
checked: j.includes(e),
|
|
613
637
|
onChange: () => mt(e),
|
|
614
638
|
className: "size-4 rounded border-border-default"
|
|
615
639
|
}), /* @__PURE__ */ m("span", {
|
|
@@ -618,13 +642,13 @@ function Be() {
|
|
|
618
642
|
})]
|
|
619
643
|
}, e))
|
|
620
644
|
}),
|
|
621
|
-
|
|
645
|
+
j.filter(c).length > 0 && /* @__PURE__ */ m("div", {
|
|
622
646
|
className: "flex flex-wrap gap-1 mt-2",
|
|
623
|
-
children:
|
|
647
|
+
children: j.filter(c).map((e) => /* @__PURE__ */ h("span", {
|
|
624
648
|
className: "inline-flex items-center gap-1 px-2 py-0.5 text-xs bg-[var(--color-accent-soft)] text-text-primary border border-dashed border-border-strong rounded",
|
|
625
649
|
children: [e, /* @__PURE__ */ m("button", {
|
|
626
650
|
type: "button",
|
|
627
|
-
onClick: () =>
|
|
651
|
+
onClick: () => M((t) => t.filter((t) => t !== e)),
|
|
628
652
|
className: "hover:text-status-error-text",
|
|
629
653
|
children: /* @__PURE__ */ m(ke, { className: "size-3" })
|
|
630
654
|
})]
|
|
@@ -635,22 +659,22 @@ function Be() {
|
|
|
635
659
|
children: [/* @__PURE__ */ m("input", {
|
|
636
660
|
"aria-label": "control",
|
|
637
661
|
type: "text",
|
|
638
|
-
value:
|
|
639
|
-
onChange: (e) =>
|
|
662
|
+
value: L,
|
|
663
|
+
onChange: (e) => R(e.target.value),
|
|
640
664
|
placeholder: v("webhooks.customEventPlaceholder", "custom:event-name"),
|
|
641
665
|
className: "flex-1 px-3 py-1.5 text-sm bg-bg-sunken border border-border-default rounded-md text-text-primary placeholder:text-text-placeholder font-mono",
|
|
642
666
|
onKeyDown: (e) => {
|
|
643
667
|
if (e.key === "Enter") {
|
|
644
668
|
e.preventDefault();
|
|
645
|
-
let t =
|
|
646
|
-
/^[a-z][a-z0-9_-]*:[a-z][a-z0-9_.-]*$/.test(t) && !
|
|
669
|
+
let t = L.trim();
|
|
670
|
+
/^[a-z][a-z0-9_-]*:[a-z][a-z0-9_.-]*$/.test(t) && !j.includes(t) && (M((e) => [...e, t]), R(""));
|
|
647
671
|
}
|
|
648
672
|
}
|
|
649
673
|
}), /* @__PURE__ */ m("button", {
|
|
650
674
|
type: "button",
|
|
651
675
|
onClick: () => {
|
|
652
|
-
let e =
|
|
653
|
-
/^[a-z][a-z0-9_-]*:[a-z][a-z0-9_.-]*$/.test(e) && !
|
|
676
|
+
let e = L.trim();
|
|
677
|
+
/^[a-z][a-z0-9_-]*:[a-z][a-z0-9_.-]*$/.test(e) && !j.includes(e) && (M((t) => [...t, e]), R(""));
|
|
654
678
|
},
|
|
655
679
|
className: "px-3 py-1.5 text-sm bg-bg-sunken text-text-primary hover:bg-action-secondary-bg-hover rounded-md transition-colors",
|
|
656
680
|
children: /* @__PURE__ */ m(f, { className: "size-4" })
|
|
@@ -670,15 +694,15 @@ function Be() {
|
|
|
670
694
|
className: "relative",
|
|
671
695
|
children: [/* @__PURE__ */ m("input", {
|
|
672
696
|
"aria-label": "control",
|
|
673
|
-
ref:
|
|
674
|
-
type:
|
|
697
|
+
ref: nt,
|
|
698
|
+
type: F ? "text" : "password",
|
|
675
699
|
placeholder: v("webhooks.signingKeyPlaceholder", "HMAC signing key for delivery verification"),
|
|
676
700
|
className: "w-full px-3 py-2 pr-10 bg-bg-sunken border border-border-default rounded-md text-text-primary placeholder:text-text-placeholder font-mono text-sm"
|
|
677
701
|
}), /* @__PURE__ */ m("button", {
|
|
678
702
|
type: "button",
|
|
679
|
-
onClick: () =>
|
|
703
|
+
onClick: () => I(!F),
|
|
680
704
|
className: "absolute right-2 top-1/2 -translate-y-1/2 p-1 rounded hover:bg-bg-elevated transition-colors",
|
|
681
|
-
children: m(
|
|
705
|
+
children: m(F ? Ce : Se, { className: "size-4 text-text-secondary" })
|
|
682
706
|
})]
|
|
683
707
|
}),
|
|
684
708
|
/* @__PURE__ */ m("p", {
|
|
@@ -703,8 +727,8 @@ function Be() {
|
|
|
703
727
|
/* @__PURE__ */ m("input", {
|
|
704
728
|
"aria-label": "control",
|
|
705
729
|
type: "checkbox",
|
|
706
|
-
checked:
|
|
707
|
-
onChange: () =>
|
|
730
|
+
checked: N.includes(e.id),
|
|
731
|
+
onChange: () => P((t) => t.includes(e.id) ? t.filter((t) => t !== e.id) : [...t, e.id]),
|
|
708
732
|
className: "size-4 rounded border-border-default"
|
|
709
733
|
}),
|
|
710
734
|
/* @__PURE__ */ m(be, { className: "size-3.5 text-text-secondary" }),
|
|
@@ -723,23 +747,23 @@ function Be() {
|
|
|
723
747
|
children: [/* @__PURE__ */ m("button", {
|
|
724
748
|
type: "button",
|
|
725
749
|
onClick: () => C(!1),
|
|
726
|
-
disabled:
|
|
750
|
+
disabled: D,
|
|
727
751
|
className: "px-4 py-2 text-text-primary hover:bg-bg-sunken rounded-md transition-colors disabled:opacity-50",
|
|
728
752
|
children: v("common.cancel", "Cancel")
|
|
729
753
|
}), /* @__PURE__ */ m("button", {
|
|
730
754
|
type: "button",
|
|
731
755
|
onClick: ht,
|
|
732
|
-
disabled:
|
|
756
|
+
disabled: D,
|
|
733
757
|
className: "px-4 py-2 bg-action-primary-bg text-action-primary-text rounded-md hover:bg-action-primary-bg-hover transition-colors disabled:opacity-50",
|
|
734
|
-
children:
|
|
758
|
+
children: D ? v("webhooks.creating", "Creating...") : v("webhooks.createWebhook", "Create Webhook")
|
|
735
759
|
})]
|
|
736
760
|
})
|
|
737
761
|
]
|
|
738
762
|
})
|
|
739
763
|
}),
|
|
740
764
|
/* @__PURE__ */ m(a, {
|
|
741
|
-
isOpen:
|
|
742
|
-
onClose: () =>
|
|
765
|
+
isOpen: V === "enable",
|
|
766
|
+
onClose: () => H(null),
|
|
743
767
|
onConfirm: () => xt(!0),
|
|
744
768
|
title: "Enable selected webhooks",
|
|
745
769
|
message: `Enable ${Z.length} selected webhook${Z.length === 1 ? "" : "s"}?`,
|
|
@@ -747,8 +771,8 @@ function Be() {
|
|
|
747
771
|
variant: "default"
|
|
748
772
|
}),
|
|
749
773
|
/* @__PURE__ */ m(a, {
|
|
750
|
-
isOpen:
|
|
751
|
-
onClose: () =>
|
|
774
|
+
isOpen: V === "disable",
|
|
775
|
+
onClose: () => H(null),
|
|
752
776
|
onConfirm: () => xt(!1),
|
|
753
777
|
title: "Disable selected webhooks",
|
|
754
778
|
message: `Disable ${X.length} selected webhook${X.length === 1 ? "" : "s"}?`,
|
|
@@ -756,8 +780,8 @@ function Be() {
|
|
|
756
780
|
variant: "warning"
|
|
757
781
|
}),
|
|
758
782
|
/* @__PURE__ */ m(a, {
|
|
759
|
-
isOpen:
|
|
760
|
-
onClose: () =>
|
|
783
|
+
isOpen: V === "delete",
|
|
784
|
+
onClose: () => H(null),
|
|
761
785
|
onConfirm: St,
|
|
762
786
|
title: "Delete selected webhooks",
|
|
763
787
|
message: `Delete ${Y.length} selected webhook${Y.length === 1 ? "" : "s"}? This cannot be undone.`,
|
|
@@ -765,18 +789,18 @@ function Be() {
|
|
|
765
789
|
variant: "danger"
|
|
766
790
|
}),
|
|
767
791
|
/* @__PURE__ */ m(ee, {
|
|
768
|
-
isOpen:
|
|
769
|
-
onClose: () =>
|
|
792
|
+
isOpen: U !== null,
|
|
793
|
+
onClose: () => W(null),
|
|
770
794
|
onConfirm: () => {
|
|
771
|
-
|
|
795
|
+
W(null), ze("/billing/plans");
|
|
772
796
|
},
|
|
773
|
-
title:
|
|
774
|
-
message:
|
|
797
|
+
title: U?.title || "Quota Reached",
|
|
798
|
+
message: U?.message || "Upgrade your plan to continue."
|
|
775
799
|
})
|
|
776
800
|
]
|
|
777
801
|
});
|
|
778
802
|
}
|
|
779
803
|
//#endregion
|
|
780
|
-
export {
|
|
804
|
+
export { ze as WebhooksPage };
|
|
781
805
|
|
|
782
806
|
//# sourceMappingURL=WebhooksPage.js.map
|