@burdenoff/microfe-channel 2026.805.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/channel/ChannelRoot.d.ts.map +1 -1
- package/dist/channel/ChannelRoot.js +32 -35
- package/dist/channel/ChannelRoot.js.map +1 -1
- package/dist/channel/components/AdapterCredentialsForm.d.ts.map +1 -1
- package/dist/channel/components/AdapterCredentialsForm.js +52 -58
- package/dist/channel/components/AdapterCredentialsForm.js.map +1 -1
- package/dist/channel/components/FeatureNotEnabled.d.ts.map +1 -1
- package/dist/channel/components/FeatureNotEnabled.js +27 -22
- package/dist/channel/components/FeatureNotEnabled.js.map +1 -1
- package/dist/channel/components/MarkdownEditor.d.ts.map +1 -1
- package/dist/channel/components/MarkdownEditor.js +78 -77
- package/dist/channel/components/MarkdownEditor.js.map +1 -1
- package/dist/channel/components/PermissionGuard.d.ts.map +1 -1
- package/dist/channel/components/PermissionGuard.js +6 -9
- package/dist/channel/components/PermissionGuard.js.map +1 -1
- package/dist/channel/hooks/useTr.d.ts +17 -0
- package/dist/channel/hooks/useTr.d.ts.map +1 -0
- package/dist/channel/hooks/useTr.js +14 -0
- package/dist/channel/hooks/useTr.js.map +1 -0
- package/dist/channel/modules/channels/i18n.js +24 -24
- package/dist/channel/modules/channels/i18n.js.map +1 -1
- package/dist/channel/modules/channels/pages/ChannelDashboardPage.js +2 -2
- package/dist/channel/modules/channels/pages/ChannelDashboardPage.js.map +1 -1
- package/dist/channel/modules/channels/pages/ChannelSettingsPage.d.ts.map +1 -1
- package/dist/channel/modules/channels/pages/ChannelSettingsPage.js +232 -226
- package/dist/channel/modules/channels/pages/ChannelSettingsPage.js.map +1 -1
- package/dist/channel/modules/channels/pages/ChannelUsersPage.d.ts.map +1 -1
- package/dist/channel/modules/channels/pages/ChannelUsersPage.js +152 -146
- package/dist/channel/modules/channels/pages/ChannelUsersPage.js.map +1 -1
- package/dist/channel/modules/channels/pages/ConnectionDetailsPage.d.ts.map +1 -1
- package/dist/channel/modules/channels/pages/ConnectionDetailsPage.js +112 -114
- package/dist/channel/modules/channels/pages/ConnectionDetailsPage.js.map +1 -1
- package/dist/channel/modules/channels/pages/CreateChannelPage.d.ts.map +1 -1
- package/dist/channel/modules/channels/pages/CreateChannelPage.js +300 -269
- package/dist/channel/modules/channels/pages/CreateChannelPage.js.map +1 -1
- package/dist/channel/modules/channels/pages/CreateConnectionPage.d.ts.map +1 -1
- package/dist/channel/modules/channels/pages/CreateConnectionPage.js +108 -102
- package/dist/channel/modules/channels/pages/CreateConnectionPage.js.map +1 -1
- package/dist/channel/modules/channels/pages/EditChannelPage.d.ts.map +1 -1
- package/dist/channel/modules/channels/pages/EditChannelPage.js +384 -343
- package/dist/channel/modules/channels/pages/EditChannelPage.js.map +1 -1
- package/dist/channel/modules/channels/pages/SendMessagePage.d.ts.map +1 -1
- package/dist/channel/modules/channels/pages/SendMessagePage.js +170 -156
- package/dist/channel/modules/channels/pages/SendMessagePage.js.map +1 -1
- package/dist/channel/pages/ChannelLandingPage.d.ts.map +1 -1
- package/dist/channel/pages/ChannelLandingPage.js +47 -50
- package/dist/channel/pages/ChannelLandingPage.js.map +1 -1
- package/dist/translations/en.d.ts +271 -4
- package/dist/translations/en.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { AlertCircle as
|
|
7
|
-
import { useNavigate as
|
|
8
|
-
import { jsx as
|
|
9
|
-
import { EmphasisPanel as
|
|
1
|
+
import { useTr as e } from "../../../hooks/useTr.js";
|
|
2
|
+
import { PermissionGuard as t } from "../../../components/PermissionGuard.js";
|
|
3
|
+
import { CHANNEL_PERMISSIONS as n } from "../../../constants/permissions.js";
|
|
4
|
+
import { useChannelOrgSettings as r } from "../../../hooks/useChannelOrgSettings.js";
|
|
5
|
+
import { useEffect as i, useMemo as a, useRef as o, useState as s } from "react";
|
|
6
|
+
import { AlertCircle as c, ArrowLeft as l, Bell as u, CheckCircle2 as d, Clock as f, Database as p, Loader2 as m, Save as h, Settings as g, Shield as _ } from "lucide-react";
|
|
7
|
+
import { useNavigate as v } from "react-router";
|
|
8
|
+
import { jsx as y, jsxs as b } from "react/jsx-runtime";
|
|
9
|
+
import { EmphasisPanel as x, GlassCard as S, PagePurpose as C, ShowMore as w } from "@burdenoff/fe-libs/ui";
|
|
10
10
|
//#region src/channel/modules/channels/pages/ChannelSettingsPage.tsx
|
|
11
|
-
var
|
|
11
|
+
var T = {
|
|
12
12
|
defaultPriority: 2,
|
|
13
13
|
rateLimitPerMinute: 100,
|
|
14
14
|
rateLimitPerHour: 5e3,
|
|
@@ -17,82 +17,146 @@ var w = {
|
|
|
17
17
|
enableWebhookVerification: !0,
|
|
18
18
|
sessionTimeoutMinutes: 30
|
|
19
19
|
};
|
|
20
|
-
function
|
|
21
|
-
let
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
20
|
+
function E() {
|
|
21
|
+
let E = v(), D = e(), O = a(() => [
|
|
22
|
+
{
|
|
23
|
+
value: 0,
|
|
24
|
+
label: D("channel.priorityLabel.lowest", "0 - Lowest")
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
value: 1,
|
|
28
|
+
label: D("channel.priorityLabel.low", "1 - Low")
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
value: 2,
|
|
32
|
+
label: D("channel.priorityLabel.normal", "2 - Normal")
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
value: 3,
|
|
36
|
+
label: D("channel.priorityLabel.high", "3 - High")
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
value: 4,
|
|
40
|
+
label: D("channel.priorityLabel.highest", "4 - Highest")
|
|
41
|
+
}
|
|
42
|
+
], [D]), k = a(() => [
|
|
43
|
+
{
|
|
44
|
+
value: 1,
|
|
45
|
+
label: D("channel.duration.oneMinute", "1 minute")
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
value: 5,
|
|
49
|
+
label: D("channel.duration.fiveMinutes", "5 minutes")
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
value: 10,
|
|
53
|
+
label: D("channel.duration.tenMinutes", "10 minutes")
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
value: 15,
|
|
57
|
+
label: D("channel.duration.fifteenMinutes", "15 minutes")
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
value: 30,
|
|
61
|
+
label: D("channel.duration.thirtyMinutes", "30 minutes")
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
value: 60,
|
|
65
|
+
label: D("channel.duration.oneHour", "1 hour")
|
|
66
|
+
}
|
|
67
|
+
], [D]), A = a(() => [
|
|
68
|
+
{
|
|
69
|
+
value: 15,
|
|
70
|
+
label: D("channel.duration.fifteenMinutes", "15 minutes")
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
value: 30,
|
|
74
|
+
label: D("channel.duration.thirtyMinutes", "30 minutes")
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
value: 60,
|
|
78
|
+
label: D("channel.duration.oneHour", "1 hour")
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
value: 120,
|
|
82
|
+
label: D("channel.duration.twoHours", "2 hours")
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
value: 240,
|
|
86
|
+
label: D("channel.duration.fourHours", "4 hours")
|
|
87
|
+
}
|
|
88
|
+
], [D]), { settings: j, isLoading: M, error: N, saveSettings: P } = r(), [F, I] = s(T), [L, R] = s(!1), [z, B] = s(!1), [V, H] = s(null), U = o(null);
|
|
89
|
+
i(() => {
|
|
90
|
+
let e = U;
|
|
27
91
|
return () => {
|
|
28
92
|
e.current && clearTimeout(e.current);
|
|
29
93
|
};
|
|
30
94
|
}, []);
|
|
31
|
-
let
|
|
32
|
-
|
|
33
|
-
if (!
|
|
34
|
-
let e = `${
|
|
35
|
-
e !==
|
|
36
|
-
|
|
37
|
-
defaultPriority:
|
|
38
|
-
rateLimitPerMinute:
|
|
39
|
-
rateLimitPerHour:
|
|
40
|
-
healthCheckIntervalMinutes:
|
|
41
|
-
enableAuditLogging:
|
|
42
|
-
enableWebhookVerification:
|
|
43
|
-
sessionTimeoutMinutes:
|
|
95
|
+
let W = o(null);
|
|
96
|
+
i(() => {
|
|
97
|
+
if (!j) return;
|
|
98
|
+
let e = `${j.organizationId}:${j.updatedAt}`;
|
|
99
|
+
e !== W.current && (W.current = e, Promise.resolve().then(() => {
|
|
100
|
+
I({
|
|
101
|
+
defaultPriority: j.defaultPriority,
|
|
102
|
+
rateLimitPerMinute: j.rateLimitPerMinute,
|
|
103
|
+
rateLimitPerHour: j.rateLimitPerHour,
|
|
104
|
+
healthCheckIntervalMinutes: j.healthCheckIntervalMinutes,
|
|
105
|
+
enableAuditLogging: j.enableAuditLogging,
|
|
106
|
+
enableWebhookVerification: j.enableWebhookVerification,
|
|
107
|
+
sessionTimeoutMinutes: j.sessionTimeoutMinutes
|
|
44
108
|
});
|
|
45
109
|
}));
|
|
46
|
-
}, [
|
|
47
|
-
let
|
|
48
|
-
|
|
110
|
+
}, [j]);
|
|
111
|
+
let G = async () => {
|
|
112
|
+
R(!0), H(null), B(!1);
|
|
49
113
|
try {
|
|
50
|
-
await
|
|
51
|
-
defaultPriority:
|
|
52
|
-
rateLimitPerMinute:
|
|
53
|
-
rateLimitPerHour:
|
|
54
|
-
healthCheckIntervalMinutes:
|
|
55
|
-
enableAuditLogging:
|
|
56
|
-
enableWebhookVerification:
|
|
57
|
-
sessionTimeoutMinutes:
|
|
58
|
-
}) ? (
|
|
114
|
+
await P({
|
|
115
|
+
defaultPriority: F.defaultPriority,
|
|
116
|
+
rateLimitPerMinute: F.rateLimitPerMinute,
|
|
117
|
+
rateLimitPerHour: F.rateLimitPerHour,
|
|
118
|
+
healthCheckIntervalMinutes: F.healthCheckIntervalMinutes,
|
|
119
|
+
enableAuditLogging: F.enableAuditLogging,
|
|
120
|
+
enableWebhookVerification: F.enableWebhookVerification,
|
|
121
|
+
sessionTimeoutMinutes: F.sessionTimeoutMinutes
|
|
122
|
+
}) ? (B(!0), U.current && clearTimeout(U.current), U.current = setTimeout(() => B(!1), 3e3)) : H(D("channel.settingsSaveNotPersisted", "Settings could not be saved — organization context is unavailable."));
|
|
59
123
|
} catch (e) {
|
|
60
|
-
|
|
124
|
+
H(e instanceof Error ? e.message : D("channel.settingsSaveFailed", "Failed to save settings"));
|
|
61
125
|
} finally {
|
|
62
|
-
|
|
126
|
+
R(!1);
|
|
63
127
|
}
|
|
64
|
-
},
|
|
65
|
-
|
|
128
|
+
}, K = (e, t) => {
|
|
129
|
+
I((n) => ({
|
|
66
130
|
...n,
|
|
67
131
|
[e]: t
|
|
68
132
|
}));
|
|
69
133
|
};
|
|
70
|
-
return /* @__PURE__ */
|
|
71
|
-
permission:
|
|
72
|
-
children: /* @__PURE__ */
|
|
134
|
+
return /* @__PURE__ */ y(t, {
|
|
135
|
+
permission: n.CHANNEL_UPDATE,
|
|
136
|
+
children: /* @__PURE__ */ b("div", {
|
|
73
137
|
className: "min-h-screen bg-bg-surface",
|
|
74
|
-
children: [/* @__PURE__ */
|
|
138
|
+
children: [/* @__PURE__ */ y("div", {
|
|
75
139
|
className: "border-b bg-bg-surface",
|
|
76
|
-
children: /* @__PURE__ */
|
|
140
|
+
children: /* @__PURE__ */ y("div", {
|
|
77
141
|
className: "container mx-auto px-6 py-4",
|
|
78
|
-
children: /* @__PURE__ */
|
|
142
|
+
children: /* @__PURE__ */ y("div", {
|
|
79
143
|
className: "flex items-center justify-between",
|
|
80
|
-
children: /* @__PURE__ */
|
|
144
|
+
children: /* @__PURE__ */ b("div", {
|
|
81
145
|
className: "flex items-center gap-4",
|
|
82
|
-
children: [/* @__PURE__ */
|
|
146
|
+
children: [/* @__PURE__ */ y("button", {
|
|
83
147
|
type: "button",
|
|
84
|
-
onClick: () =>
|
|
148
|
+
onClick: () => E("./list"),
|
|
85
149
|
className: "p-2 hover:bg-bg-sunken rounded-lg transition-colors",
|
|
86
|
-
children: /* @__PURE__ */
|
|
87
|
-
}), /* @__PURE__ */
|
|
150
|
+
children: /* @__PURE__ */ y(l, { className: "size-5 " })
|
|
151
|
+
}), /* @__PURE__ */ b("div", {
|
|
88
152
|
className: "flex items-center gap-3",
|
|
89
|
-
children: [/* @__PURE__ */
|
|
153
|
+
children: [/* @__PURE__ */ y("div", {
|
|
90
154
|
className: "p-2 bg-action-primary-bg/10 rounded-lg",
|
|
91
|
-
children: /* @__PURE__ */
|
|
92
|
-
}), /* @__PURE__ */
|
|
155
|
+
children: /* @__PURE__ */ y(g, { className: "size-5 text-primary" })
|
|
156
|
+
}), /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("h1", {
|
|
93
157
|
className: "text-2xl font-bold",
|
|
94
158
|
children: D("channel.channelSettings", "Channel Settings")
|
|
95
|
-
}), /* @__PURE__ */
|
|
159
|
+
}), /* @__PURE__ */ y("p", {
|
|
96
160
|
className: "text-sm text-text-secondary",
|
|
97
161
|
children: D("channel.channelSettingsSubtitle", "Configure global channel preferences")
|
|
98
162
|
})] })]
|
|
@@ -100,115 +164,97 @@ function T() {
|
|
|
100
164
|
})
|
|
101
165
|
})
|
|
102
166
|
})
|
|
103
|
-
}), /* @__PURE__ */
|
|
167
|
+
}), /* @__PURE__ */ b("div", {
|
|
104
168
|
className: "container mx-auto px-6 py-8 max-w-2xl space-y-8",
|
|
105
169
|
children: [
|
|
106
|
-
/* @__PURE__ */
|
|
107
|
-
icon: /* @__PURE__ */
|
|
170
|
+
/* @__PURE__ */ y(C, {
|
|
171
|
+
icon: /* @__PURE__ */ y(g, {
|
|
108
172
|
size: 15,
|
|
109
173
|
"aria-hidden": "true"
|
|
110
174
|
}),
|
|
111
175
|
children: D("channel.settingsPurpose", "Organization-wide defaults that apply to every channel — how fast messages may go out (rate limits), the default priority for new channels, how often health checks run, and security policies like webhook signature verification and audit logging. Tune these to protect provider quotas, keep an audit trail, and set sensible defaults so each new channel starts configured the way you want.")
|
|
112
176
|
}),
|
|
113
|
-
|
|
177
|
+
M && /* @__PURE__ */ b("div", {
|
|
114
178
|
className: "flex items-center gap-2 text-text-secondary",
|
|
115
|
-
children: [/* @__PURE__ */
|
|
179
|
+
children: [/* @__PURE__ */ y(m, { className: "size-4 animate-spin" }), /* @__PURE__ */ y("span", {
|
|
116
180
|
className: "text-sm",
|
|
117
|
-
children: "Loading settings…"
|
|
181
|
+
children: D("channel.loadingSettings", "Loading settings…")
|
|
118
182
|
})]
|
|
119
183
|
}),
|
|
120
|
-
|
|
184
|
+
N && /* @__PURE__ */ b("div", {
|
|
121
185
|
className: "p-4 rounded-lg bg-status-error-bg-subtle border border-status-error-border flex items-center gap-3",
|
|
122
|
-
children: [/* @__PURE__ */
|
|
186
|
+
children: [/* @__PURE__ */ y(c, { className: "size-5 text-status-error-text shrink-0" }), /* @__PURE__ */ y("p", {
|
|
123
187
|
className: "text-sm text-status-error-text",
|
|
124
188
|
children: D("channel.settingsLoadError", "Failed to load settings — saving is disabled to prevent overwriting existing configuration.")
|
|
125
189
|
})]
|
|
126
190
|
}),
|
|
127
|
-
|
|
191
|
+
z && /* @__PURE__ */ b("div", {
|
|
128
192
|
className: "p-4 rounded-lg bg-status-success-bg-subtle border border-status-success-border flex items-center gap-3",
|
|
129
|
-
children: [/* @__PURE__ */
|
|
193
|
+
children: [/* @__PURE__ */ y(d, { className: "size-5 text-status-success-text shrink-0" }), /* @__PURE__ */ y("p", {
|
|
130
194
|
className: "text-sm text-status-success-text",
|
|
131
195
|
children: D("channel.settingsSaved", "Settings saved successfully")
|
|
132
196
|
})]
|
|
133
197
|
}),
|
|
134
|
-
|
|
198
|
+
V && /* @__PURE__ */ b("div", {
|
|
135
199
|
className: "p-4 rounded-lg bg-status-error-bg/10 border border-status-error-border/20 flex items-center gap-3",
|
|
136
|
-
children: [/* @__PURE__ */
|
|
200
|
+
children: [/* @__PURE__ */ y(c, { className: "size-5 text-status-error-text shrink-0" }), /* @__PURE__ */ y("p", {
|
|
137
201
|
className: "text-sm text-status-error-text",
|
|
138
|
-
children:
|
|
202
|
+
children: V
|
|
139
203
|
})]
|
|
140
204
|
}),
|
|
141
|
-
/* @__PURE__ */
|
|
205
|
+
/* @__PURE__ */ b(x, {
|
|
142
206
|
className: "space-y-4 p-6",
|
|
143
|
-
children: [/* @__PURE__ */
|
|
207
|
+
children: [/* @__PURE__ */ b("div", {
|
|
144
208
|
className: "flex items-center gap-2",
|
|
145
|
-
children: [/* @__PURE__ */
|
|
209
|
+
children: [/* @__PURE__ */ y(u, { className: "size-5 text-primary" }), /* @__PURE__ */ y("h2", {
|
|
146
210
|
className: "text-lg font-semibold",
|
|
147
211
|
children: D("channel.deliverySettings", "Delivery Settings")
|
|
148
212
|
})]
|
|
149
|
-
}), /* @__PURE__ */
|
|
213
|
+
}), /* @__PURE__ */ b("div", {
|
|
150
214
|
className: "space-y-4",
|
|
151
|
-
children: [/* @__PURE__ */
|
|
152
|
-
/* @__PURE__ */
|
|
215
|
+
children: [/* @__PURE__ */ b("div", { children: [
|
|
216
|
+
/* @__PURE__ */ y("label", {
|
|
153
217
|
className: "text-sm font-medium block mb-1",
|
|
154
218
|
children: D("channel.defaultPriority", "Default Priority")
|
|
155
219
|
}),
|
|
156
220
|
/* @__PURE__ */ y("select", {
|
|
157
|
-
value:
|
|
158
|
-
onChange: (e) =>
|
|
221
|
+
value: F.defaultPriority,
|
|
222
|
+
onChange: (e) => K("defaultPriority", Number(e.target.value)),
|
|
159
223
|
className: "w-full px-4 py-2 rounded-lg border bg-bg-surface focus:outline-none focus:ring-2 focus:ring-primary",
|
|
160
|
-
children:
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
}),
|
|
165
|
-
/* @__PURE__ */ v("option", {
|
|
166
|
-
value: 1,
|
|
167
|
-
children: "1 - Low"
|
|
168
|
-
}),
|
|
169
|
-
/* @__PURE__ */ v("option", {
|
|
170
|
-
value: 2,
|
|
171
|
-
children: "2 - Normal"
|
|
172
|
-
}),
|
|
173
|
-
/* @__PURE__ */ v("option", {
|
|
174
|
-
value: 3,
|
|
175
|
-
children: "3 - High"
|
|
176
|
-
}),
|
|
177
|
-
/* @__PURE__ */ v("option", {
|
|
178
|
-
value: 4,
|
|
179
|
-
children: "4 - Highest"
|
|
180
|
-
})
|
|
181
|
-
]
|
|
224
|
+
children: O.map((e) => /* @__PURE__ */ y("option", {
|
|
225
|
+
value: e.value,
|
|
226
|
+
children: e.label
|
|
227
|
+
}, e.value))
|
|
182
228
|
}),
|
|
183
|
-
/* @__PURE__ */
|
|
229
|
+
/* @__PURE__ */ y("p", {
|
|
184
230
|
className: "text-xs text-text-secondary mt-1",
|
|
185
|
-
children: "Priority used when creating new channels without explicit priority"
|
|
231
|
+
children: D("channel.defaultPriorityHint", "Priority used when creating new channels without explicit priority")
|
|
186
232
|
})
|
|
187
|
-
] }), /* @__PURE__ */
|
|
233
|
+
] }), /* @__PURE__ */ b("div", {
|
|
188
234
|
className: "grid grid-cols-2 gap-4",
|
|
189
|
-
children: [/* @__PURE__ */
|
|
235
|
+
children: [/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("label", {
|
|
190
236
|
htmlFor: "channel-settings-rate-limit-min",
|
|
191
237
|
className: "text-sm font-medium block mb-1",
|
|
192
238
|
children: D("channel.rateLimitPerMin", "Rate Limit (per minute)")
|
|
193
|
-
}), /* @__PURE__ */
|
|
239
|
+
}), /* @__PURE__ */ y("input", {
|
|
194
240
|
id: "channel-settings-rate-limit-min",
|
|
195
241
|
"aria-label": D("channel.rateLimitPerMin", "Rate Limit (per minute)"),
|
|
196
242
|
type: "number",
|
|
197
|
-
value:
|
|
198
|
-
onChange: (e) =>
|
|
243
|
+
value: F.rateLimitPerMinute,
|
|
244
|
+
onChange: (e) => K("rateLimitPerMinute", Number(e.target.value)),
|
|
199
245
|
min: 1,
|
|
200
246
|
max: 1e3,
|
|
201
247
|
className: "w-full px-4 py-2 rounded-lg border bg-bg-surface focus:outline-none focus:ring-2 focus:ring-primary"
|
|
202
|
-
})] }), /* @__PURE__ */
|
|
248
|
+
})] }), /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("label", {
|
|
203
249
|
htmlFor: "channel-settings-rate-limit-hour",
|
|
204
250
|
className: "text-sm font-medium block mb-1",
|
|
205
251
|
children: D("channel.rateLimitPerHour", "Rate Limit (per hour)")
|
|
206
|
-
}), /* @__PURE__ */
|
|
252
|
+
}), /* @__PURE__ */ y("input", {
|
|
207
253
|
id: "channel-settings-rate-limit-hour",
|
|
208
254
|
"aria-label": D("channel.rateLimitPerHour", "Rate Limit (per hour)"),
|
|
209
255
|
type: "number",
|
|
210
|
-
value:
|
|
211
|
-
onChange: (e) =>
|
|
256
|
+
value: F.rateLimitPerHour,
|
|
257
|
+
onChange: (e) => K("rateLimitPerHour", Number(e.target.value)),
|
|
212
258
|
min: 1,
|
|
213
259
|
max: 5e4,
|
|
214
260
|
className: "w-full px-4 py-2 rounded-lg border bg-bg-surface focus:outline-none focus:ring-2 focus:ring-primary"
|
|
@@ -216,211 +262,171 @@ function T() {
|
|
|
216
262
|
})]
|
|
217
263
|
})]
|
|
218
264
|
}),
|
|
219
|
-
/* @__PURE__ */
|
|
265
|
+
/* @__PURE__ */ b(S, {
|
|
220
266
|
treatment: "plain",
|
|
221
267
|
className: "border-border-seam p-6 space-y-4",
|
|
222
|
-
children: [/* @__PURE__ */
|
|
268
|
+
children: [/* @__PURE__ */ b("div", {
|
|
223
269
|
className: "flex items-center gap-2",
|
|
224
|
-
children: [/* @__PURE__ */
|
|
270
|
+
children: [/* @__PURE__ */ y(f, { className: "size-5 text-primary" }), /* @__PURE__ */ y("h2", {
|
|
225
271
|
className: "text-lg font-semibold",
|
|
226
272
|
children: D("channel.healthMonitoring", "Health Monitoring")
|
|
227
273
|
})]
|
|
228
|
-
}), /* @__PURE__ */
|
|
229
|
-
/* @__PURE__ */
|
|
274
|
+
}), /* @__PURE__ */ b("div", { children: [
|
|
275
|
+
/* @__PURE__ */ y("label", {
|
|
230
276
|
htmlFor: "channel-settings-health-interval",
|
|
231
277
|
className: "text-sm font-medium block mb-1",
|
|
232
|
-
children: "Health Check Interval (minutes)"
|
|
278
|
+
children: D("channel.healthCheckInterval", "Health Check Interval (minutes)")
|
|
233
279
|
}),
|
|
234
280
|
/* @__PURE__ */ y("select", {
|
|
235
281
|
id: "channel-settings-health-interval",
|
|
236
|
-
value:
|
|
237
|
-
onChange: (e) =>
|
|
282
|
+
value: F.healthCheckIntervalMinutes,
|
|
283
|
+
onChange: (e) => K("healthCheckIntervalMinutes", Number(e.target.value)),
|
|
238
284
|
className: "w-full px-4 py-2 rounded-lg border bg-bg-surface focus:outline-none focus:ring-2 focus:ring-primary",
|
|
239
|
-
children:
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
}),
|
|
244
|
-
/* @__PURE__ */ v("option", {
|
|
245
|
-
value: 5,
|
|
246
|
-
children: "5 minutes"
|
|
247
|
-
}),
|
|
248
|
-
/* @__PURE__ */ v("option", {
|
|
249
|
-
value: 10,
|
|
250
|
-
children: "10 minutes"
|
|
251
|
-
}),
|
|
252
|
-
/* @__PURE__ */ v("option", {
|
|
253
|
-
value: 15,
|
|
254
|
-
children: "15 minutes"
|
|
255
|
-
}),
|
|
256
|
-
/* @__PURE__ */ v("option", {
|
|
257
|
-
value: 30,
|
|
258
|
-
children: "30 minutes"
|
|
259
|
-
}),
|
|
260
|
-
/* @__PURE__ */ v("option", {
|
|
261
|
-
value: 60,
|
|
262
|
-
children: "1 hour"
|
|
263
|
-
})
|
|
264
|
-
]
|
|
285
|
+
children: k.map((e) => /* @__PURE__ */ y("option", {
|
|
286
|
+
value: e.value,
|
|
287
|
+
children: e.label
|
|
288
|
+
}, e.value))
|
|
265
289
|
}),
|
|
266
|
-
/* @__PURE__ */
|
|
290
|
+
/* @__PURE__ */ y("p", {
|
|
267
291
|
className: "text-xs text-text-secondary mt-1",
|
|
268
|
-
children: "How often to check connection health status"
|
|
292
|
+
children: D("channel.healthCheckIntervalHint", "How often to check connection health status")
|
|
269
293
|
})
|
|
270
294
|
] })]
|
|
271
295
|
}),
|
|
272
|
-
/* @__PURE__ */
|
|
296
|
+
/* @__PURE__ */ b(S, {
|
|
273
297
|
treatment: "plain",
|
|
274
298
|
className: "border-border-seam p-6 space-y-4",
|
|
275
|
-
children: [/* @__PURE__ */
|
|
299
|
+
children: [/* @__PURE__ */ b("div", {
|
|
276
300
|
className: "flex items-center gap-2",
|
|
277
|
-
children: [/* @__PURE__ */
|
|
301
|
+
children: [/* @__PURE__ */ y(_, { className: "size-5 text-primary" }), /* @__PURE__ */ y("h2", {
|
|
278
302
|
className: "text-lg font-semibold",
|
|
279
303
|
children: D("channel.security", "Security")
|
|
280
304
|
})]
|
|
281
|
-
}), /* @__PURE__ */
|
|
305
|
+
}), /* @__PURE__ */ b("div", {
|
|
282
306
|
className: "space-y-4",
|
|
283
307
|
children: [
|
|
284
|
-
/* @__PURE__ */
|
|
308
|
+
/* @__PURE__ */ b("label", {
|
|
285
309
|
className: "flex items-center justify-between p-4 rounded-lg border hover:bg-bg-sunken/50 cursor-pointer",
|
|
286
|
-
children: [/* @__PURE__ */
|
|
310
|
+
children: [/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("p", {
|
|
287
311
|
className: "font-medium",
|
|
288
312
|
children: D("channel.webhookSignatureVerification", "Webhook Signature Verification")
|
|
289
|
-
}), /* @__PURE__ */
|
|
313
|
+
}), /* @__PURE__ */ y("p", {
|
|
290
314
|
className: "text-sm text-text-secondary",
|
|
291
|
-
children: "Verify HMAC signatures on incoming webhooks"
|
|
292
|
-
})] }), /* @__PURE__ */
|
|
315
|
+
children: D("channel.webhookSignatureVerificationHint", "Verify HMAC signatures on incoming webhooks")
|
|
316
|
+
})] }), /* @__PURE__ */ y("input", {
|
|
293
317
|
type: "checkbox",
|
|
294
318
|
"aria-label": D("channel.webhookSignatureVerification", "Webhook Signature Verification"),
|
|
295
|
-
checked:
|
|
296
|
-
onChange: (e) =>
|
|
319
|
+
checked: F.enableWebhookVerification,
|
|
320
|
+
onChange: (e) => K("enableWebhookVerification", e.target.checked),
|
|
297
321
|
className: "size-5 rounded border-gray-300 text-primary focus:ring-primary"
|
|
298
322
|
})]
|
|
299
323
|
}),
|
|
300
|
-
/* @__PURE__ */
|
|
324
|
+
/* @__PURE__ */ b("label", {
|
|
301
325
|
className: "flex items-center justify-between p-4 rounded-lg border hover:bg-bg-sunken/50 cursor-pointer",
|
|
302
|
-
children: [/* @__PURE__ */
|
|
326
|
+
children: [/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("p", {
|
|
303
327
|
className: "font-medium",
|
|
304
328
|
children: D("channel.auditLogging", "Audit Logging")
|
|
305
|
-
}), /* @__PURE__ */
|
|
329
|
+
}), /* @__PURE__ */ y("p", {
|
|
306
330
|
className: "text-sm text-text-secondary",
|
|
307
|
-
children: "Log all channel operations for audit trail"
|
|
308
|
-
})] }), /* @__PURE__ */
|
|
331
|
+
children: D("channel.auditLoggingHint", "Log all channel operations for audit trail")
|
|
332
|
+
})] }), /* @__PURE__ */ y("input", {
|
|
309
333
|
type: "checkbox",
|
|
310
334
|
"aria-label": D("channel.auditLogging", "Audit Logging"),
|
|
311
|
-
checked:
|
|
312
|
-
onChange: (e) =>
|
|
335
|
+
checked: F.enableAuditLogging,
|
|
336
|
+
onChange: (e) => K("enableAuditLogging", e.target.checked),
|
|
313
337
|
className: "size-5 rounded border-gray-300 text-primary focus:ring-primary"
|
|
314
338
|
})]
|
|
315
339
|
}),
|
|
316
|
-
/* @__PURE__ */
|
|
340
|
+
/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("label", {
|
|
317
341
|
className: "text-sm font-medium block mb-1",
|
|
318
342
|
children: D("channel.sessionTimeout", "Session Timeout (minutes)")
|
|
319
343
|
}), /* @__PURE__ */ y("select", {
|
|
320
|
-
value:
|
|
321
|
-
onChange: (e) =>
|
|
344
|
+
value: F.sessionTimeoutMinutes,
|
|
345
|
+
onChange: (e) => K("sessionTimeoutMinutes", Number(e.target.value)),
|
|
322
346
|
className: "w-full px-4 py-2 rounded-lg border bg-bg-surface focus:outline-none focus:ring-2 focus:ring-primary",
|
|
323
|
-
children:
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
}),
|
|
328
|
-
/* @__PURE__ */ v("option", {
|
|
329
|
-
value: 30,
|
|
330
|
-
children: "30 minutes"
|
|
331
|
-
}),
|
|
332
|
-
/* @__PURE__ */ v("option", {
|
|
333
|
-
value: 60,
|
|
334
|
-
children: "1 hour"
|
|
335
|
-
}),
|
|
336
|
-
/* @__PURE__ */ v("option", {
|
|
337
|
-
value: 120,
|
|
338
|
-
children: "2 hours"
|
|
339
|
-
}),
|
|
340
|
-
/* @__PURE__ */ v("option", {
|
|
341
|
-
value: 240,
|
|
342
|
-
children: "4 hours"
|
|
343
|
-
})
|
|
344
|
-
]
|
|
347
|
+
children: A.map((e) => /* @__PURE__ */ y("option", {
|
|
348
|
+
value: e.value,
|
|
349
|
+
children: e.label
|
|
350
|
+
}, e.value))
|
|
345
351
|
})] })
|
|
346
352
|
]
|
|
347
353
|
})]
|
|
348
354
|
}),
|
|
349
|
-
/* @__PURE__ */
|
|
355
|
+
/* @__PURE__ */ b(S, {
|
|
350
356
|
treatment: "plain",
|
|
351
357
|
className: "border-border-seam p-6 space-y-4",
|
|
352
|
-
children: [/* @__PURE__ */
|
|
358
|
+
children: [/* @__PURE__ */ b("div", {
|
|
353
359
|
className: "flex items-center gap-2",
|
|
354
|
-
children: [/* @__PURE__ */
|
|
360
|
+
children: [/* @__PURE__ */ y(p, { className: "size-5 text-primary" }), /* @__PURE__ */ y("h2", {
|
|
355
361
|
className: "text-lg font-semibold",
|
|
356
362
|
children: D("channel.dataManagement", "Data Management")
|
|
357
363
|
})]
|
|
358
|
-
}), /* @__PURE__ */
|
|
364
|
+
}), /* @__PURE__ */ y(w, {
|
|
359
365
|
collapsedHeight: 96,
|
|
360
366
|
label: D("channel.showRetentionPolicies", "Show retention policies"),
|
|
361
|
-
children: /* @__PURE__ */
|
|
367
|
+
children: /* @__PURE__ */ b("div", {
|
|
362
368
|
className: "space-y-4",
|
|
363
369
|
children: [
|
|
364
|
-
/* @__PURE__ */
|
|
370
|
+
/* @__PURE__ */ b("div", {
|
|
365
371
|
className: "p-4 rounded-lg border",
|
|
366
|
-
children: [/* @__PURE__ */
|
|
372
|
+
children: [/* @__PURE__ */ b("div", {
|
|
367
373
|
className: "flex items-center justify-between mb-2",
|
|
368
|
-
children: [/* @__PURE__ */
|
|
374
|
+
children: [/* @__PURE__ */ y("p", {
|
|
369
375
|
className: "font-medium",
|
|
370
376
|
children: D("channel.webhookEventRetention", "Webhook Event Retention")
|
|
371
|
-
}), /* @__PURE__ */
|
|
377
|
+
}), /* @__PURE__ */ y("span", {
|
|
372
378
|
className: "text-sm text-text-secondary",
|
|
373
|
-
children: "
|
|
379
|
+
children: D("channel.retentionDays", "{{count}} days", { count: 7 })
|
|
374
380
|
})]
|
|
375
|
-
}), /* @__PURE__ */
|
|
381
|
+
}), /* @__PURE__ */ y("p", {
|
|
376
382
|
className: "text-sm text-text-secondary",
|
|
377
|
-
children: "Incoming webhook events are automatically deleted after 7 days"
|
|
383
|
+
children: D("channel.webhookEventRetentionHint", "Incoming webhook events are automatically deleted after 7 days")
|
|
378
384
|
})]
|
|
379
385
|
}),
|
|
380
|
-
/* @__PURE__ */
|
|
386
|
+
/* @__PURE__ */ b("div", {
|
|
381
387
|
className: "p-4 rounded-lg border",
|
|
382
|
-
children: [/* @__PURE__ */
|
|
388
|
+
children: [/* @__PURE__ */ b("div", {
|
|
383
389
|
className: "flex items-center justify-between mb-2",
|
|
384
|
-
children: [/* @__PURE__ */
|
|
390
|
+
children: [/* @__PURE__ */ y("p", {
|
|
385
391
|
className: "font-medium",
|
|
386
392
|
children: D("channel.deliveryAttemptRetention", "Delivery Attempt Retention")
|
|
387
|
-
}), /* @__PURE__ */
|
|
393
|
+
}), /* @__PURE__ */ y("span", {
|
|
388
394
|
className: "text-sm text-text-secondary",
|
|
389
|
-
children: "
|
|
395
|
+
children: D("channel.retentionDays", "{{count}} days", { count: 7 })
|
|
390
396
|
})]
|
|
391
|
-
}), /* @__PURE__ */
|
|
397
|
+
}), /* @__PURE__ */ y("p", {
|
|
392
398
|
className: "text-sm text-text-secondary",
|
|
393
|
-
children: "Successful delivery attempts are automatically deleted after 7 days"
|
|
399
|
+
children: D("channel.deliveryAttemptRetentionHint", "Successful delivery attempts are automatically deleted after 7 days")
|
|
394
400
|
})]
|
|
395
401
|
}),
|
|
396
|
-
/* @__PURE__ */
|
|
402
|
+
/* @__PURE__ */ b("div", {
|
|
397
403
|
className: "p-4 rounded-lg border border-status-warning-border bg-status-warning-bg-subtle",
|
|
398
|
-
children: [/* @__PURE__ */
|
|
404
|
+
children: [/* @__PURE__ */ b("div", {
|
|
399
405
|
className: "flex items-center justify-between mb-2",
|
|
400
|
-
children: [/* @__PURE__ */
|
|
406
|
+
children: [/* @__PURE__ */ y("p", {
|
|
401
407
|
className: "font-medium",
|
|
402
408
|
children: D("channel.failedDeliveryRetention", "Failed Delivery Retention")
|
|
403
|
-
}), /* @__PURE__ */
|
|
409
|
+
}), /* @__PURE__ */ y("span", {
|
|
404
410
|
className: "text-sm text-status-warning-text",
|
|
405
|
-
children: "
|
|
411
|
+
children: D("channel.retentionDays", "{{count}} days", { count: 30 })
|
|
406
412
|
})]
|
|
407
|
-
}), /* @__PURE__ */
|
|
413
|
+
}), /* @__PURE__ */ y("p", {
|
|
408
414
|
className: "text-sm text-text-secondary",
|
|
409
|
-
children: "Failed delivery attempts are kept for 30 days for debugging"
|
|
415
|
+
children: D("channel.failedDeliveryRetentionHint", "Failed delivery attempts are kept for 30 days for debugging")
|
|
410
416
|
})]
|
|
411
417
|
})
|
|
412
418
|
]
|
|
413
419
|
})
|
|
414
420
|
})]
|
|
415
421
|
}),
|
|
416
|
-
/* @__PURE__ */
|
|
422
|
+
/* @__PURE__ */ y("div", {
|
|
417
423
|
className: "flex justify-end pt-4",
|
|
418
|
-
children: /* @__PURE__ */
|
|
424
|
+
children: /* @__PURE__ */ b("button", {
|
|
419
425
|
type: "button",
|
|
420
|
-
onClick:
|
|
421
|
-
disabled:
|
|
426
|
+
onClick: G,
|
|
427
|
+
disabled: L || M || !!N,
|
|
422
428
|
className: "px-6 py-3 rounded-lg bg-action-primary-bg text-action-primary-text hover:bg-action-primary-bg/90 transition-colors disabled:opacity-50 flex items-center gap-2",
|
|
423
|
-
children: [
|
|
429
|
+
children: [L ? /* @__PURE__ */ y(m, { className: "size-5 animate-spin" }) : /* @__PURE__ */ y(h, { className: "size-5 " }), D("channel.saveSettings", "Save Settings")]
|
|
424
430
|
})
|
|
425
431
|
})
|
|
426
432
|
]
|
|
@@ -429,6 +435,6 @@ function T() {
|
|
|
429
435
|
});
|
|
430
436
|
}
|
|
431
437
|
//#endregion
|
|
432
|
-
export {
|
|
438
|
+
export { E as ChannelSettingsPage };
|
|
433
439
|
|
|
434
440
|
//# sourceMappingURL=ChannelSettingsPage.js.map
|