@burdenoff/microfe-channel 2026.625.2 → 2026.626.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/channel/modules/channels/pages/ChannelDashboardPage.js +19 -12
- package/dist/channel/modules/channels/pages/ChannelDashboardPage.js.map +1 -1
- package/dist/channel/modules/channels/pages/ChannelDetailsPage.js +407 -353
- package/dist/channel/modules/channels/pages/ChannelDetailsPage.js.map +1 -1
- package/dist/channel/modules/channels/pages/ChannelSettingsPage.js +93 -87
- package/dist/channel/modules/channels/pages/ChannelSettingsPage.js.map +1 -1
- package/dist/channel/modules/channels/pages/ChannelUsersPage.js +154 -134
- package/dist/channel/modules/channels/pages/ChannelUsersPage.js.map +1 -1
- package/dist/channel/modules/channels/pages/ChannelsListPage.js +279 -244
- package/dist/channel/modules/channels/pages/ChannelsListPage.js.map +1 -1
- package/dist/channel/modules/channels/pages/ConnectionDetailsPage.js +277 -232
- package/dist/channel/modules/channels/pages/ConnectionDetailsPage.js.map +1 -1
- package/dist/channel/modules/channels/pages/ConnectionsListPage.js +159 -129
- package/dist/channel/modules/channels/pages/ConnectionsListPage.js.map +1 -1
- package/dist/channel/modules/channels/pages/CreateChannelPage.js +28 -22
- package/dist/channel/modules/channels/pages/CreateChannelPage.js.map +1 -1
- package/dist/channel/modules/channels/pages/CreateConnectionPage.js +72 -65
- package/dist/channel/modules/channels/pages/CreateConnectionPage.js.map +1 -1
- package/dist/channel/modules/channels/pages/DeliveryHistoryPage.js +99 -79
- package/dist/channel/modules/channels/pages/DeliveryHistoryPage.js.map +1 -1
- package/dist/channel/modules/channels/pages/EditChannelPage.js +154 -148
- package/dist/channel/modules/channels/pages/EditChannelPage.js.map +1 -1
- package/dist/channel/modules/channels/pages/EditConnectionPage.js +69 -62
- package/dist/channel/modules/channels/pages/EditConnectionPage.js.map +1 -1
- package/dist/channel/modules/channels/pages/SendMessagePage.js +131 -124
- package/dist/channel/modules/channels/pages/SendMessagePage.js.map +1 -1
- package/dist/channel/modules/channels/pages/WebhookEventsPage.js +174 -154
- package/dist/channel/modules/channels/pages/WebhookEventsPage.js.map +1 -1
- package/package.json +2 -2
|
@@ -6,14 +6,14 @@ import { AUTH_TYPE_I18N as ee, HEALTH_I18N as te, PLATFORM_I18N as ne, STATUS_I1
|
|
|
6
6
|
import { AdapterCredentialsForm as ie, CredentialValidationStatus as ae } from "../../../components/AdapterCredentialsForm.js";
|
|
7
7
|
import { useEffect as oe, useState as o } from "react";
|
|
8
8
|
import { useI18n as se } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
9
|
-
import { AlertCircle as s, AlertTriangle as c, ArrowLeft as ce, ArrowRight as l, Cable as u, CheckCircle2 as d, Clock as le, HelpCircle as f, Key as ue, Loader2 as p, Mail as de, MessageSquare as fe, Pencil as m, Phone as pe, Play as me, Plus as he, Power as ge, PowerOff as h, Radio as
|
|
10
|
-
import { useLocation as
|
|
11
|
-
import { usePermissions as
|
|
12
|
-
import { jsx as
|
|
13
|
-
import { CTAOverflowMenu as
|
|
14
|
-
import { TagBadge as
|
|
9
|
+
import { AlertCircle as s, AlertTriangle as c, ArrowLeft as ce, ArrowRight as l, Cable as u, CheckCircle2 as d, Clock as le, HelpCircle as f, Key as ue, Loader2 as p, Mail as de, MessageSquare as fe, Pencil as m, Phone as pe, Play as me, Plus as he, Power as ge, PowerOff as h, Radio as g, RefreshCw as _, Save as _e, Send as v, Trash2 as ve, Truck as y, Users as ye, X as be, XCircle as b } from "lucide-react";
|
|
10
|
+
import { useLocation as xe, useNavigate as Se, useParams as Ce } from "react-router-dom";
|
|
11
|
+
import { usePermissions as we } from "@burdenoff/fe-libs/shared/providers/shell";
|
|
12
|
+
import { jsx as x, jsxs as S } from "react/jsx-runtime";
|
|
13
|
+
import { CTAOverflowMenu as Te, EmphasisPanel as Ee, GlassCard as C, NextSteps as De, PagePurpose as Oe, ResponsiveDialog as ke, ResponsiveDialogContent as Ae, ResponsiveDialogHeader as je, ResponsiveDialogTitle as Me } from "@burdenoff/fe-libs/ui";
|
|
14
|
+
import { TagBadge as Ne } from "@burdenoff/fe-libs/tag";
|
|
15
15
|
//#region src/channel/modules/channels/pages/ChannelDetailsPage.tsx
|
|
16
|
-
var
|
|
16
|
+
var w = {
|
|
17
17
|
EMAIL: {
|
|
18
18
|
label: "Email",
|
|
19
19
|
color: "bg-accent-blue-subtle text-accent-blue"
|
|
@@ -54,7 +54,7 @@ var C = {
|
|
|
54
54
|
label: "Webchat",
|
|
55
55
|
color: "bg-accent-teal-subtle text-accent-teal"
|
|
56
56
|
}
|
|
57
|
-
},
|
|
57
|
+
}, T = {
|
|
58
58
|
ACTIVE: {
|
|
59
59
|
label: "Active",
|
|
60
60
|
color: "text-status-success-text bg-status-success-bg-subtle",
|
|
@@ -68,7 +68,7 @@ var C = {
|
|
|
68
68
|
ERROR: {
|
|
69
69
|
label: "Error",
|
|
70
70
|
color: "text-status-error-text bg-status-error-bg-subtle",
|
|
71
|
-
icon:
|
|
71
|
+
icon: b
|
|
72
72
|
},
|
|
73
73
|
SUSPENDED: {
|
|
74
74
|
label: "Suspended",
|
|
@@ -80,7 +80,7 @@ var C = {
|
|
|
80
80
|
color: "text-text-secondary bg-bg-sunken",
|
|
81
81
|
icon: h
|
|
82
82
|
}
|
|
83
|
-
},
|
|
83
|
+
}, E = {
|
|
84
84
|
HEALTHY: {
|
|
85
85
|
label: "Healthy",
|
|
86
86
|
color: "text-status-success-text",
|
|
@@ -94,7 +94,7 @@ var C = {
|
|
|
94
94
|
UNHEALTHY: {
|
|
95
95
|
label: "Unhealthy",
|
|
96
96
|
color: "text-status-error-text",
|
|
97
|
-
icon:
|
|
97
|
+
icon: b
|
|
98
98
|
},
|
|
99
99
|
UNKNOWN: {
|
|
100
100
|
label: "Unknown",
|
|
@@ -102,95 +102,95 @@ var C = {
|
|
|
102
102
|
icon: f
|
|
103
103
|
}
|
|
104
104
|
};
|
|
105
|
-
function
|
|
106
|
-
let { channelId: c } =
|
|
105
|
+
function D() {
|
|
106
|
+
let { channelId: c } = Ce(), f = Se(), D = xe(), { hasPermission: O } = we(), k = O(i.CHANNEL_UPDATE), A = O(i.CHANNEL_EXECUTE), Pe = O(i.CHANNEL_CONNECTION_CREATE), Fe = O(i.CHANNEL_CONNECTION_UPDATE), { t: Ie } = se(), j = (e, t) => {
|
|
107
107
|
let n = Ie(e);
|
|
108
108
|
return n === e ? t : n;
|
|
109
|
-
},
|
|
109
|
+
}, M = D.state, [N, P] = o(null), [F, I] = o(M?.showCredentialsForm || !1), [L, R] = o(M?.pendingCredentials || {}), [Le, z] = o(!1), [B, V] = o(null), [Re, H] = o(!1), [U, W] = o(""), [G, ze] = o(() => j("channel.testNotificationSubject", "Test Notification")), [K, Be] = o(() => j("channel.testNotificationBody", "This is a test notification from Burdenoff Channel Service.")), [q, J] = o(null);
|
|
110
110
|
oe(() => {
|
|
111
|
-
(
|
|
111
|
+
(M?.pendingCredentials || M?.showCredentialsForm) && f(D.pathname, {
|
|
112
112
|
replace: !0,
|
|
113
113
|
state: null
|
|
114
114
|
});
|
|
115
115
|
}, []);
|
|
116
|
-
let { channel:
|
|
117
|
-
|
|
116
|
+
let { channel: Y, isLoading: Ve, error: X, updateChannel: He, runHealthCheck: Ue, createConnection: We, updateConnection: Ge, deleteConnection: Ke, testConnection: qe, sendTestNotification: Je } = n(c), Ye = async () => {
|
|
117
|
+
P("health");
|
|
118
118
|
try {
|
|
119
119
|
await Ue();
|
|
120
120
|
} catch (e) {
|
|
121
121
|
console.error("[channel] Failed to run health check", e);
|
|
122
122
|
} finally {
|
|
123
|
-
|
|
123
|
+
P(null);
|
|
124
124
|
}
|
|
125
125
|
}, Xe = async () => {
|
|
126
|
-
if (
|
|
127
|
-
|
|
126
|
+
if (Y) {
|
|
127
|
+
P("status");
|
|
128
128
|
try {
|
|
129
|
-
await He({ status:
|
|
129
|
+
await He({ status: Y.status === "ACTIVE" ? "INACTIVE" : "ACTIVE" });
|
|
130
130
|
} catch (e) {
|
|
131
131
|
console.error("[channel] Failed to toggle channel status", e);
|
|
132
132
|
} finally {
|
|
133
|
-
|
|
133
|
+
P(null);
|
|
134
134
|
}
|
|
135
135
|
}
|
|
136
136
|
}, Ze = async () => {
|
|
137
|
-
if (
|
|
138
|
-
|
|
137
|
+
if (Y) {
|
|
138
|
+
P("connection");
|
|
139
139
|
try {
|
|
140
|
-
let e = "API_KEY", t =
|
|
140
|
+
let e = "API_KEY", t = Y.adapterType;
|
|
141
141
|
t?.includes("BOT") ? e = "BOT_TOKEN" : t?.includes("WEBHOOK") ? e = "WEBHOOK" : t === "SMTP" && (e = "SMTP_IMAP"), await We({
|
|
142
142
|
authType: e,
|
|
143
|
-
credentials:
|
|
144
|
-
}),
|
|
143
|
+
credentials: L
|
|
144
|
+
}), I(!1), R({}), z(!1);
|
|
145
145
|
} catch (e) {
|
|
146
146
|
console.error("[channel] Failed to create connection", e);
|
|
147
147
|
} finally {
|
|
148
|
-
|
|
148
|
+
P(null);
|
|
149
149
|
}
|
|
150
150
|
}
|
|
151
151
|
}, Qe = async (e) => {
|
|
152
|
-
|
|
152
|
+
P("connection");
|
|
153
153
|
try {
|
|
154
|
-
await Ge(e, { credentials:
|
|
154
|
+
await Ge(e, { credentials: L }), I(!1), R({}), z(!1);
|
|
155
155
|
} catch (e) {
|
|
156
156
|
console.error("[channel] Failed to update connection", e);
|
|
157
157
|
} finally {
|
|
158
|
-
|
|
158
|
+
P(null);
|
|
159
159
|
}
|
|
160
160
|
}, $e = async (n) => {
|
|
161
|
-
e("medium"),
|
|
161
|
+
e("medium"), P("delete-connection");
|
|
162
162
|
try {
|
|
163
163
|
await Ke(n), t("success");
|
|
164
164
|
} catch (e) {
|
|
165
165
|
t("error"), console.error("[channel] Failed to delete connection", e);
|
|
166
166
|
} finally {
|
|
167
|
-
|
|
167
|
+
P(null);
|
|
168
168
|
}
|
|
169
169
|
}, et = async (e) => {
|
|
170
|
-
|
|
170
|
+
P("test"), V(null);
|
|
171
171
|
try {
|
|
172
172
|
let t = await qe(e);
|
|
173
|
-
t &&
|
|
173
|
+
t && V({
|
|
174
174
|
success: t.success,
|
|
175
|
-
message: t.message || (t.success ?
|
|
175
|
+
message: t.message || (t.success ? j("channel.connectionTestSuccess", "Connection successful!") : j("channel.connectionTestFailed", "Connection failed"))
|
|
176
176
|
});
|
|
177
177
|
} catch (e) {
|
|
178
|
-
console.error("[channel] Failed to test connection", e),
|
|
178
|
+
console.error("[channel] Failed to test connection", e), V({
|
|
179
179
|
success: !1,
|
|
180
|
-
message:
|
|
180
|
+
message: j("channel.connectionTestRequestFailed", "Failed to test connection")
|
|
181
181
|
});
|
|
182
182
|
} finally {
|
|
183
|
-
|
|
183
|
+
P(null);
|
|
184
184
|
}
|
|
185
185
|
}, tt = async () => {
|
|
186
|
-
if (
|
|
187
|
-
|
|
186
|
+
if (U.trim()) {
|
|
187
|
+
P("send-test"), J(null);
|
|
188
188
|
try {
|
|
189
|
-
let e =
|
|
190
|
-
subject:
|
|
191
|
-
html: `<p>${
|
|
192
|
-
} : void 0, t = await Je(
|
|
193
|
-
t &&
|
|
189
|
+
let e = Y?.platform === "EMAIL" ? {
|
|
190
|
+
subject: G,
|
|
191
|
+
html: `<p>${K}</p>`
|
|
192
|
+
} : void 0, t = await Je(U.trim(), K, e);
|
|
193
|
+
t && J({
|
|
194
194
|
success: t.success,
|
|
195
195
|
messageId: t.messageId,
|
|
196
196
|
externalId: t.externalId,
|
|
@@ -203,8 +203,8 @@ function E() {
|
|
|
203
203
|
} : null
|
|
204
204
|
});
|
|
205
205
|
} catch (e) {
|
|
206
|
-
let t = e instanceof Error ? e.message :
|
|
207
|
-
console.error("[channel] Failed to send test notification", e),
|
|
206
|
+
let t = e instanceof Error ? e.message : j("channel.sendTestNotificationFailed", "Failed to send test notification");
|
|
207
|
+
console.error("[channel] Failed to send test notification", e), J({
|
|
208
208
|
success: !1,
|
|
209
209
|
error: {
|
|
210
210
|
code: "SEND_FAILED",
|
|
@@ -213,396 +213,450 @@ function E() {
|
|
|
213
213
|
}
|
|
214
214
|
});
|
|
215
215
|
} finally {
|
|
216
|
-
|
|
216
|
+
P(null);
|
|
217
217
|
}
|
|
218
218
|
}
|
|
219
|
-
},
|
|
219
|
+
}, nt = (e) => {
|
|
220
220
|
switch (e) {
|
|
221
|
-
case "EMAIL": return
|
|
222
|
-
case "SMS": return
|
|
223
|
-
case "PUSH": return
|
|
224
|
-
case "SLACK": return
|
|
225
|
-
case "TEAMS": return
|
|
226
|
-
case "DISCORD": return
|
|
227
|
-
case "WHATSAPP": return
|
|
228
|
-
default: return
|
|
221
|
+
case "EMAIL": return j("channel.recipientPlaceholder.email", "email@example.com");
|
|
222
|
+
case "SMS": return j("channel.recipientPlaceholder.phone", "+1234567890");
|
|
223
|
+
case "PUSH": return j("channel.recipientPlaceholder.deviceToken", "Device token");
|
|
224
|
+
case "SLACK": return j("channel.recipientPlaceholder.slack", "Channel ID or User ID");
|
|
225
|
+
case "TEAMS": return j("channel.recipientPlaceholder.channelId", "Channel ID");
|
|
226
|
+
case "DISCORD": return j("channel.recipientPlaceholder.channelId", "Channel ID");
|
|
227
|
+
case "WHATSAPP": return j("channel.recipientPlaceholder.phone", "+1234567890");
|
|
228
|
+
default: return j("channel.recipientPlaceholder.default", "Recipient");
|
|
229
229
|
}
|
|
230
|
-
},
|
|
230
|
+
}, rt = (e) => {
|
|
231
231
|
switch (e) {
|
|
232
|
-
case "EMAIL": return
|
|
232
|
+
case "EMAIL": return j("channel.recipientLabel.email", "Email Address");
|
|
233
233
|
case "SMS":
|
|
234
|
-
case "WHATSAPP": return
|
|
235
|
-
case "PUSH": return
|
|
234
|
+
case "WHATSAPP": return j("channel.recipientLabel.phone", "Phone Number");
|
|
235
|
+
case "PUSH": return j("channel.recipientLabel.deviceToken", "Device Token");
|
|
236
236
|
case "SLACK":
|
|
237
237
|
case "TEAMS":
|
|
238
|
-
case "DISCORD": return
|
|
239
|
-
default: return
|
|
238
|
+
case "DISCORD": return j("channel.recipientLabel.channelOrUserId", "Channel/User ID");
|
|
239
|
+
default: return j("channel.recipientLabel.default", "Recipient");
|
|
240
240
|
}
|
|
241
|
-
},
|
|
242
|
-
...
|
|
241
|
+
}, it = (e) => ({
|
|
242
|
+
...w[e] || {
|
|
243
243
|
label: e,
|
|
244
244
|
color: "bg-bg-sunken text-text-secondary"
|
|
245
245
|
},
|
|
246
|
-
label: a(e, ne,
|
|
247
|
-
}), it = (e) => ({
|
|
248
|
-
...w[e] || w.INACTIVE,
|
|
249
|
-
label: a(e, re, k)
|
|
246
|
+
label: a(e, ne, j)
|
|
250
247
|
}), at = (e) => ({
|
|
251
|
-
...T[e] || T.
|
|
252
|
-
label: a(e,
|
|
248
|
+
...T[e] || T.INACTIVE,
|
|
249
|
+
label: a(e, re, j)
|
|
250
|
+
}), ot = (e) => ({
|
|
251
|
+
...E[e] || E.UNKNOWN,
|
|
252
|
+
label: a(e, te, j)
|
|
253
253
|
});
|
|
254
|
-
if (Ve) return /* @__PURE__ */
|
|
254
|
+
if (Ve) return /* @__PURE__ */ x("div", {
|
|
255
255
|
className: "flex items-center justify-center min-h-screen",
|
|
256
|
-
children: /* @__PURE__ */
|
|
256
|
+
children: /* @__PURE__ */ x(p, {
|
|
257
257
|
size: 32,
|
|
258
258
|
className: "animate-spin text-accent-primary"
|
|
259
259
|
})
|
|
260
260
|
});
|
|
261
|
-
if (
|
|
261
|
+
if (X || !Y) return /* @__PURE__ */ x("div", {
|
|
262
262
|
className: "p-6",
|
|
263
|
-
children: /* @__PURE__ */
|
|
263
|
+
children: /* @__PURE__ */ S("div", {
|
|
264
264
|
className: "flex items-center gap-3 p-4 bg-status-error-bg-subtle border border-status-error-border rounded-lg",
|
|
265
265
|
children: [
|
|
266
|
-
/* @__PURE__ */
|
|
266
|
+
/* @__PURE__ */ x(s, {
|
|
267
267
|
size: 20,
|
|
268
268
|
className: "text-status-error-text"
|
|
269
269
|
}),
|
|
270
|
-
/* @__PURE__ */
|
|
270
|
+
/* @__PURE__ */ x("div", { children: /* @__PURE__ */ x("p", {
|
|
271
271
|
className: "text-sm font-medium text-status-error-text",
|
|
272
|
-
children:
|
|
272
|
+
children: X || j("channel.channelNotFound", "Channel not found")
|
|
273
273
|
}) }),
|
|
274
|
-
/* @__PURE__ */
|
|
274
|
+
/* @__PURE__ */ x("button", {
|
|
275
275
|
type: "button",
|
|
276
276
|
onClick: () => f(-1),
|
|
277
277
|
className: "ml-auto px-3 py-1 text-sm text-status-error-text hover:bg-status-error-bg-subtle rounded transition-colors",
|
|
278
|
-
children:
|
|
278
|
+
children: j("channel.goBack", "Go Back")
|
|
279
279
|
})
|
|
280
280
|
]
|
|
281
281
|
})
|
|
282
282
|
});
|
|
283
|
-
let
|
|
284
|
-
return /* @__PURE__ */
|
|
283
|
+
let st = it(Y.platform), Z = at(Y.status), Q = ot(Y.connectionHealth), ct = Z.icon, lt = Q.icon, $ = Y.connection;
|
|
284
|
+
return /* @__PURE__ */ x(r, {
|
|
285
285
|
permission: i.CHANNEL_READ,
|
|
286
|
-
children: /* @__PURE__ */
|
|
286
|
+
children: /* @__PURE__ */ S("div", {
|
|
287
287
|
className: "space-y-6 p-3 sm:p-6",
|
|
288
288
|
children: [
|
|
289
|
-
/* @__PURE__ */
|
|
289
|
+
/* @__PURE__ */ S("div", {
|
|
290
290
|
className: "flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",
|
|
291
|
-
children: [/* @__PURE__ */
|
|
291
|
+
children: [/* @__PURE__ */ S("div", {
|
|
292
292
|
className: "flex items-center gap-3",
|
|
293
|
-
children: [/* @__PURE__ */
|
|
293
|
+
children: [/* @__PURE__ */ x("button", {
|
|
294
294
|
type: "button",
|
|
295
295
|
onClick: () => f(-1),
|
|
296
296
|
className: "p-2 text-text-secondary hover:text-text-primary hover:bg-bg-sunken rounded-lg transition-colors",
|
|
297
|
-
children: /* @__PURE__ */
|
|
298
|
-
}), /* @__PURE__ */
|
|
297
|
+
children: /* @__PURE__ */ x(ce, { size: 20 })
|
|
298
|
+
}), /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ S("div", {
|
|
299
299
|
className: "flex items-center gap-2",
|
|
300
|
-
children: [/* @__PURE__ */
|
|
300
|
+
children: [/* @__PURE__ */ x(g, {
|
|
301
301
|
size: 24,
|
|
302
302
|
className: "text-accent-primary"
|
|
303
|
-
}), /* @__PURE__ */
|
|
303
|
+
}), /* @__PURE__ */ x("h1", {
|
|
304
304
|
className: "text-xl sm:text-2xl font-bold text-text-primary",
|
|
305
|
-
children:
|
|
305
|
+
children: Y.name
|
|
306
306
|
})]
|
|
307
|
-
}),
|
|
307
|
+
}), Y.description && /* @__PURE__ */ x("p", {
|
|
308
308
|
className: "text-sm text-text-secondary mt-1",
|
|
309
|
-
children:
|
|
309
|
+
children: Y.description
|
|
310
310
|
})] })]
|
|
311
|
-
}), /* @__PURE__ */
|
|
312
|
-
primary:
|
|
313
|
-
label:
|
|
314
|
-
icon: /* @__PURE__ */
|
|
311
|
+
}), /* @__PURE__ */ x(Te, {
|
|
312
|
+
primary: k ? {
|
|
313
|
+
label: j("channel.edit", "Edit"),
|
|
314
|
+
icon: /* @__PURE__ */ x(m, {
|
|
315
315
|
size: 16,
|
|
316
316
|
"aria-hidden": "true"
|
|
317
317
|
}),
|
|
318
318
|
onSelect: () => f("./edit")
|
|
319
319
|
} : void 0,
|
|
320
320
|
actions: [
|
|
321
|
-
...
|
|
322
|
-
label:
|
|
323
|
-
icon:
|
|
321
|
+
...A ? [{
|
|
322
|
+
label: j("channel.healthCheck", "Health Check"),
|
|
323
|
+
icon: N === "health" ? /* @__PURE__ */ x(p, {
|
|
324
324
|
size: 16,
|
|
325
325
|
className: "animate-spin",
|
|
326
326
|
"aria-hidden": "true"
|
|
327
|
-
}) : /* @__PURE__ */
|
|
327
|
+
}) : /* @__PURE__ */ x(_, {
|
|
328
328
|
size: 16,
|
|
329
329
|
"aria-hidden": "true"
|
|
330
330
|
}),
|
|
331
|
-
disabled:
|
|
331
|
+
disabled: N === "health",
|
|
332
332
|
onSelect: () => void Ye()
|
|
333
333
|
}] : [],
|
|
334
|
-
...
|
|
335
|
-
label:
|
|
336
|
-
icon:
|
|
334
|
+
...k ? [{
|
|
335
|
+
label: Y.status === "ACTIVE" ? j("channel.deactivate", "Deactivate") : j("channel.activate", "Activate"),
|
|
336
|
+
icon: N === "status" ? /* @__PURE__ */ x(p, {
|
|
337
337
|
size: 16,
|
|
338
338
|
className: "animate-spin",
|
|
339
339
|
"aria-hidden": "true"
|
|
340
|
-
}) :
|
|
340
|
+
}) : Y.status === "ACTIVE" ? /* @__PURE__ */ x(h, {
|
|
341
341
|
size: 16,
|
|
342
342
|
"aria-hidden": "true"
|
|
343
|
-
}) : /* @__PURE__ */
|
|
343
|
+
}) : /* @__PURE__ */ x(ge, {
|
|
344
344
|
size: 16,
|
|
345
345
|
"aria-hidden": "true"
|
|
346
346
|
}),
|
|
347
|
-
disabled:
|
|
347
|
+
disabled: N === "status",
|
|
348
348
|
onSelect: () => void Xe()
|
|
349
349
|
}] : [],
|
|
350
350
|
{
|
|
351
|
-
label:
|
|
352
|
-
icon: /* @__PURE__ */
|
|
351
|
+
label: j("channel.testChannel", "Test Channel"),
|
|
352
|
+
icon: /* @__PURE__ */ x(v, {
|
|
353
353
|
size: 16,
|
|
354
354
|
"aria-hidden": "true"
|
|
355
355
|
}),
|
|
356
|
-
disabled: !
|
|
356
|
+
disabled: !Y.connection,
|
|
357
357
|
onSelect: () => {
|
|
358
|
-
|
|
358
|
+
H(!0), J(null), W("");
|
|
359
359
|
}
|
|
360
360
|
}
|
|
361
361
|
]
|
|
362
362
|
})]
|
|
363
363
|
}),
|
|
364
|
-
/* @__PURE__ */
|
|
364
|
+
/* @__PURE__ */ x(Oe, {
|
|
365
|
+
icon: /* @__PURE__ */ x(g, {
|
|
366
|
+
size: 15,
|
|
367
|
+
"aria-hidden": "true"
|
|
368
|
+
}),
|
|
369
|
+
children: j("channel.detailsPurpose", "Everything about this one channel in a single place — its status and health, the connection that authenticates it to the provider, and shortcuts into its delivery history, incoming webhooks and connected users. Use it to wire up or refresh credentials, run a health check, send a test message, and confirm the channel is ready before you rely on it.")
|
|
370
|
+
}),
|
|
371
|
+
/* @__PURE__ */ x(De, {
|
|
372
|
+
storageKey: "channel-detail",
|
|
373
|
+
steps: [
|
|
374
|
+
...Y.connection ? A ? [{
|
|
375
|
+
id: "health",
|
|
376
|
+
label: j("channel.nextRunHealthCheck", "Run a health check"),
|
|
377
|
+
description: j("channel.nextRunHealthCheckDesc", "Confirm the connection can reach the provider right now."),
|
|
378
|
+
icon: /* @__PURE__ */ x(_, {
|
|
379
|
+
size: 16,
|
|
380
|
+
"aria-hidden": "true"
|
|
381
|
+
}),
|
|
382
|
+
onClick: () => void Ye()
|
|
383
|
+
}] : [] : [{
|
|
384
|
+
id: "connect",
|
|
385
|
+
label: j("channel.nextAddConnection", "Add a connection"),
|
|
386
|
+
description: j("channel.nextAddConnectionDesc", "Authenticate this channel to its provider so it can send."),
|
|
387
|
+
icon: /* @__PURE__ */ x(u, {
|
|
388
|
+
size: 16,
|
|
389
|
+
"aria-hidden": "true"
|
|
390
|
+
}),
|
|
391
|
+
onClick: () => I(!0)
|
|
392
|
+
}],
|
|
393
|
+
{
|
|
394
|
+
id: "test",
|
|
395
|
+
label: j("channel.nextSendTest", "Send a test message"),
|
|
396
|
+
description: j("channel.nextSendTestDesc", "Verify end-to-end delivery before you depend on this channel."),
|
|
397
|
+
icon: /* @__PURE__ */ x(v, {
|
|
398
|
+
size: 16,
|
|
399
|
+
"aria-hidden": "true"
|
|
400
|
+
}),
|
|
401
|
+
done: !Y.connection,
|
|
402
|
+
onClick: () => {
|
|
403
|
+
Y.connection && (H(!0), J(null), W(""));
|
|
404
|
+
}
|
|
405
|
+
},
|
|
406
|
+
{
|
|
407
|
+
id: "deliveries",
|
|
408
|
+
label: j("channel.nextReviewDeliveries", "Review delivery history"),
|
|
409
|
+
description: j("channel.nextReviewDeliveriesDesc", "See what has been sent and retry anything that failed."),
|
|
410
|
+
icon: /* @__PURE__ */ x(y, {
|
|
411
|
+
size: 16,
|
|
412
|
+
"aria-hidden": "true"
|
|
413
|
+
}),
|
|
414
|
+
onClick: () => f("./deliveries")
|
|
415
|
+
}
|
|
416
|
+
]
|
|
417
|
+
}),
|
|
418
|
+
/* @__PURE__ */ S("div", {
|
|
365
419
|
className: "grid gap-4 sm:grid-cols-2 lg:grid-cols-4",
|
|
366
420
|
children: [
|
|
367
|
-
/* @__PURE__ */
|
|
421
|
+
/* @__PURE__ */ S(C, {
|
|
368
422
|
treatment: "metric",
|
|
369
423
|
className: "p-4 border-border-seam",
|
|
370
|
-
children: [/* @__PURE__ */
|
|
424
|
+
children: [/* @__PURE__ */ x("p", {
|
|
371
425
|
className: "text-xs text-text-secondary mb-1",
|
|
372
|
-
children:
|
|
373
|
-
}), /* @__PURE__ */
|
|
374
|
-
className: `inline-flex px-2 py-1 text-sm font-semibold rounded-full ${
|
|
375
|
-
children:
|
|
426
|
+
children: j("channel.platform", "Platform")
|
|
427
|
+
}), /* @__PURE__ */ x("span", {
|
|
428
|
+
className: `inline-flex px-2 py-1 text-sm font-semibold rounded-full ${st.color}`,
|
|
429
|
+
children: st.label
|
|
376
430
|
})]
|
|
377
431
|
}),
|
|
378
|
-
/* @__PURE__ */
|
|
432
|
+
/* @__PURE__ */ S(C, {
|
|
379
433
|
treatment: "metric",
|
|
380
434
|
className: "p-4 border-border-seam",
|
|
381
|
-
children: [/* @__PURE__ */
|
|
435
|
+
children: [/* @__PURE__ */ x("p", {
|
|
382
436
|
className: "text-xs text-text-secondary mb-1",
|
|
383
|
-
children:
|
|
384
|
-
}), /* @__PURE__ */
|
|
437
|
+
children: j("channel.status", "Status")
|
|
438
|
+
}), /* @__PURE__ */ S("div", {
|
|
385
439
|
className: "flex items-center gap-2",
|
|
386
|
-
children: [/* @__PURE__ */
|
|
440
|
+
children: [/* @__PURE__ */ x(ct, {
|
|
387
441
|
size: 16,
|
|
388
442
|
className: Z.color.split(" ")[0]
|
|
389
|
-
}), /* @__PURE__ */
|
|
443
|
+
}), /* @__PURE__ */ x("span", {
|
|
390
444
|
className: `px-2 py-1 text-sm font-medium rounded-full ${Z.color}`,
|
|
391
445
|
children: Z.label
|
|
392
446
|
})]
|
|
393
447
|
})]
|
|
394
448
|
}),
|
|
395
|
-
/* @__PURE__ */
|
|
449
|
+
/* @__PURE__ */ S(C, {
|
|
396
450
|
treatment: "metric",
|
|
397
451
|
className: "p-4 border-border-seam",
|
|
398
452
|
children: [
|
|
399
|
-
/* @__PURE__ */
|
|
453
|
+
/* @__PURE__ */ x("p", {
|
|
400
454
|
className: "text-xs text-text-secondary mb-1",
|
|
401
|
-
children:
|
|
455
|
+
children: j("channel.connectionHealth", "Connection Health")
|
|
402
456
|
}),
|
|
403
|
-
/* @__PURE__ */
|
|
457
|
+
/* @__PURE__ */ S("div", {
|
|
404
458
|
className: "flex items-center gap-2",
|
|
405
|
-
children: [/* @__PURE__ */
|
|
459
|
+
children: [/* @__PURE__ */ x(lt, {
|
|
406
460
|
size: 16,
|
|
407
461
|
className: Q.color
|
|
408
|
-
}), /* @__PURE__ */
|
|
462
|
+
}), /* @__PURE__ */ x("span", {
|
|
409
463
|
className: `text-sm font-medium ${Q.color}`,
|
|
410
464
|
children: Q.label
|
|
411
465
|
})]
|
|
412
466
|
}),
|
|
413
|
-
|
|
467
|
+
Y.lastHealthCheckAt && /* @__PURE__ */ S("p", {
|
|
414
468
|
className: "text-xs text-text-muted mt-1",
|
|
415
469
|
children: [
|
|
416
|
-
|
|
470
|
+
j("channel.lastCheck", "Last check"),
|
|
417
471
|
":",
|
|
418
472
|
" ",
|
|
419
|
-
new Date(
|
|
473
|
+
new Date(Y.lastHealthCheckAt).toLocaleString()
|
|
420
474
|
]
|
|
421
475
|
})
|
|
422
476
|
]
|
|
423
477
|
}),
|
|
424
|
-
/* @__PURE__ */
|
|
478
|
+
/* @__PURE__ */ S(C, {
|
|
425
479
|
treatment: "metric",
|
|
426
480
|
className: "p-4 border-border-seam",
|
|
427
|
-
children: [/* @__PURE__ */
|
|
481
|
+
children: [/* @__PURE__ */ x("p", {
|
|
428
482
|
className: "text-xs text-text-secondary mb-1",
|
|
429
|
-
children:
|
|
430
|
-
}), /* @__PURE__ */
|
|
483
|
+
children: j("channel.connection", "Connection")
|
|
484
|
+
}), /* @__PURE__ */ S("div", {
|
|
431
485
|
className: "flex items-center gap-2",
|
|
432
|
-
children: [/* @__PURE__ */
|
|
486
|
+
children: [/* @__PURE__ */ x(u, {
|
|
433
487
|
size: 16,
|
|
434
|
-
className:
|
|
435
|
-
}), /* @__PURE__ */
|
|
436
|
-
className: `text-sm font-medium ${
|
|
437
|
-
children:
|
|
488
|
+
className: Y.isConnected ? "text-status-success-text" : "text-text-secondary"
|
|
489
|
+
}), /* @__PURE__ */ x("span", {
|
|
490
|
+
className: `text-sm font-medium ${Y.isConnected ? "text-status-success-text" : "text-text-secondary"}`,
|
|
491
|
+
children: Y.isConnected ? j("channel.connected", "Connected") : j("channel.notConnected", "Not Connected")
|
|
438
492
|
})]
|
|
439
493
|
})]
|
|
440
494
|
})
|
|
441
495
|
]
|
|
442
496
|
}),
|
|
443
|
-
/* @__PURE__ */
|
|
497
|
+
/* @__PURE__ */ S(Ee, {
|
|
444
498
|
className: "p-4",
|
|
445
499
|
children: [
|
|
446
|
-
/* @__PURE__ */
|
|
500
|
+
/* @__PURE__ */ x("h2", {
|
|
447
501
|
className: "text-lg font-semibold text-text-primary mb-4",
|
|
448
|
-
children:
|
|
502
|
+
children: j("channel.channelDetails", "Channel Details")
|
|
449
503
|
}),
|
|
450
|
-
/* @__PURE__ */
|
|
504
|
+
/* @__PURE__ */ S("div", {
|
|
451
505
|
className: "grid gap-4 sm:grid-cols-2",
|
|
452
506
|
children: [
|
|
453
|
-
/* @__PURE__ */
|
|
507
|
+
/* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
|
|
454
508
|
className: "text-xs text-text-secondary",
|
|
455
|
-
children:
|
|
456
|
-
}), /* @__PURE__ */
|
|
509
|
+
children: j("channel.adapterType", "Adapter Type")
|
|
510
|
+
}), /* @__PURE__ */ x("p", {
|
|
457
511
|
className: "text-sm font-medium text-text-primary",
|
|
458
|
-
children:
|
|
512
|
+
children: Y.adapterType?.replace(/_/g, " ") || j("channel.notConfigured", "Not configured")
|
|
459
513
|
})] }),
|
|
460
|
-
/* @__PURE__ */
|
|
514
|
+
/* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
|
|
461
515
|
className: "text-xs text-text-secondary",
|
|
462
|
-
children:
|
|
463
|
-
}), /* @__PURE__ */
|
|
516
|
+
children: j("channel.priority", "Priority")
|
|
517
|
+
}), /* @__PURE__ */ x("p", {
|
|
464
518
|
className: "text-sm font-medium text-text-primary",
|
|
465
|
-
children:
|
|
519
|
+
children: Y.priority
|
|
466
520
|
})] }),
|
|
467
|
-
/* @__PURE__ */
|
|
521
|
+
/* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
|
|
468
522
|
className: "text-xs text-text-secondary",
|
|
469
|
-
children:
|
|
470
|
-
}), /* @__PURE__ */
|
|
523
|
+
children: j("channel.consecutiveFailures", "Consecutive Failures")
|
|
524
|
+
}), /* @__PURE__ */ x("p", {
|
|
471
525
|
className: "text-sm font-medium text-text-primary tabular-nums",
|
|
472
|
-
children:
|
|
526
|
+
children: Y.consecutiveFailures
|
|
473
527
|
})] }),
|
|
474
|
-
/* @__PURE__ */
|
|
528
|
+
/* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
|
|
475
529
|
className: "text-xs text-text-secondary",
|
|
476
|
-
children:
|
|
477
|
-
}), /* @__PURE__ */
|
|
530
|
+
children: j("channel.messages24h", "Messages (24h)")
|
|
531
|
+
}), /* @__PURE__ */ x("p", {
|
|
478
532
|
className: "text-sm font-medium text-text-primary tabular-nums",
|
|
479
|
-
children:
|
|
533
|
+
children: Y.messageCount24h
|
|
480
534
|
})] }),
|
|
481
|
-
/* @__PURE__ */
|
|
535
|
+
/* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
|
|
482
536
|
className: "text-xs text-text-secondary",
|
|
483
|
-
children:
|
|
484
|
-
}), /* @__PURE__ */
|
|
537
|
+
children: j("channel.createdAt", "Created At")
|
|
538
|
+
}), /* @__PURE__ */ x("p", {
|
|
485
539
|
className: "text-sm font-medium text-text-primary",
|
|
486
|
-
children: new Date(
|
|
540
|
+
children: new Date(Y.createdAt).toLocaleString()
|
|
487
541
|
})] }),
|
|
488
|
-
/* @__PURE__ */
|
|
542
|
+
/* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
|
|
489
543
|
className: "text-xs text-text-secondary",
|
|
490
|
-
children:
|
|
491
|
-
}), /* @__PURE__ */
|
|
544
|
+
children: j("channel.updatedAt", "Updated At")
|
|
545
|
+
}), /* @__PURE__ */ x("p", {
|
|
492
546
|
className: "text-sm font-medium text-text-primary",
|
|
493
|
-
children: new Date(
|
|
547
|
+
children: new Date(Y.updatedAt).toLocaleString()
|
|
494
548
|
})] })
|
|
495
549
|
]
|
|
496
550
|
}),
|
|
497
|
-
|
|
551
|
+
Y.tagAssignments && Y.tagAssignments.length > 0 && /* @__PURE__ */ S("div", {
|
|
498
552
|
className: "mt-4",
|
|
499
|
-
children: [/* @__PURE__ */
|
|
553
|
+
children: [/* @__PURE__ */ x("p", {
|
|
500
554
|
className: "text-xs text-text-secondary mb-1.5",
|
|
501
|
-
children:
|
|
502
|
-
}), /* @__PURE__ */
|
|
555
|
+
children: j("channel.tags", "Tags")
|
|
556
|
+
}), /* @__PURE__ */ x("div", {
|
|
503
557
|
className: "flex flex-wrap gap-1.5",
|
|
504
558
|
"aria-label": "Channel tags",
|
|
505
|
-
children:
|
|
559
|
+
children: Y.tagAssignments.map((e) => /* @__PURE__ */ x(Ne, {
|
|
506
560
|
id: e.tagId,
|
|
507
561
|
label: e.tagId,
|
|
508
562
|
size: "md"
|
|
509
563
|
}, e.id))
|
|
510
564
|
})]
|
|
511
565
|
}),
|
|
512
|
-
|
|
566
|
+
Y.healthCheckError && /* @__PURE__ */ S("div", {
|
|
513
567
|
className: "mt-4 p-3 bg-status-error-bg-subtle border border-status-error-border rounded-lg",
|
|
514
|
-
children: [/* @__PURE__ */
|
|
568
|
+
children: [/* @__PURE__ */ x("p", {
|
|
515
569
|
className: "text-xs text-status-error-text font-medium",
|
|
516
|
-
children:
|
|
517
|
-
}), /* @__PURE__ */
|
|
570
|
+
children: j("channel.lastHealthCheckError", "Last Health Check Error")
|
|
571
|
+
}), /* @__PURE__ */ x("p", {
|
|
518
572
|
className: "text-sm text-status-error-text",
|
|
519
|
-
children:
|
|
573
|
+
children: Y.healthCheckError
|
|
520
574
|
})]
|
|
521
575
|
})
|
|
522
576
|
]
|
|
523
577
|
}),
|
|
524
|
-
/* @__PURE__ */
|
|
578
|
+
/* @__PURE__ */ S("div", {
|
|
525
579
|
className: "grid gap-3 sm:grid-cols-3",
|
|
526
580
|
children: [
|
|
527
|
-
/* @__PURE__ */
|
|
581
|
+
/* @__PURE__ */ S("button", {
|
|
528
582
|
type: "button",
|
|
529
583
|
onClick: () => f("./deliveries"),
|
|
530
584
|
className: "flex items-center gap-3 p-3 bg-gloss-card border border-border-seam rounded-lg shadow-[var(--shadow-pop)] hover:bg-action-primary-bg/10 transition-colors text-left",
|
|
531
585
|
children: [
|
|
532
|
-
/* @__PURE__ */
|
|
586
|
+
/* @__PURE__ */ x("div", {
|
|
533
587
|
className: "p-2 bg-accent-orange/10 rounded-lg",
|
|
534
|
-
children: /* @__PURE__ */ y
|
|
588
|
+
children: /* @__PURE__ */ x(y, {
|
|
535
589
|
size: 18,
|
|
536
590
|
className: "text-accent-orange"
|
|
537
591
|
})
|
|
538
592
|
}),
|
|
539
|
-
/* @__PURE__ */
|
|
593
|
+
/* @__PURE__ */ S("div", {
|
|
540
594
|
className: "flex-1 min-w-0",
|
|
541
|
-
children: [/* @__PURE__ */
|
|
595
|
+
children: [/* @__PURE__ */ x("p", {
|
|
542
596
|
className: "text-sm font-medium text-text-primary",
|
|
543
|
-
children:
|
|
544
|
-
}), /* @__PURE__ */
|
|
597
|
+
children: j("channel.deliveryHistory", "Delivery History")
|
|
598
|
+
}), /* @__PURE__ */ x("p", {
|
|
545
599
|
className: "text-xs text-text-secondary truncate",
|
|
546
|
-
children:
|
|
600
|
+
children: j("channel.viewMessageDeliveries", "View message deliveries")
|
|
547
601
|
})]
|
|
548
602
|
}),
|
|
549
|
-
/* @__PURE__ */
|
|
603
|
+
/* @__PURE__ */ x(l, {
|
|
550
604
|
size: 16,
|
|
551
605
|
className: "text-text-secondary shrink-0"
|
|
552
606
|
})
|
|
553
607
|
]
|
|
554
608
|
}),
|
|
555
|
-
/* @__PURE__ */
|
|
609
|
+
/* @__PURE__ */ S("button", {
|
|
556
610
|
type: "button",
|
|
557
611
|
onClick: () => f("./webhooks"),
|
|
558
612
|
className: "flex items-center gap-3 p-3 bg-gloss-card border border-border-seam rounded-lg shadow-[var(--shadow-pop)] hover:bg-action-primary-bg/10 transition-colors text-left",
|
|
559
613
|
children: [
|
|
560
|
-
/* @__PURE__ */
|
|
614
|
+
/* @__PURE__ */ x("div", {
|
|
561
615
|
className: "p-2 bg-accent-purple/10 rounded-lg",
|
|
562
|
-
children: /* @__PURE__ */
|
|
616
|
+
children: /* @__PURE__ */ x(le, {
|
|
563
617
|
size: 18,
|
|
564
618
|
className: "text-accent-purple"
|
|
565
619
|
})
|
|
566
620
|
}),
|
|
567
|
-
/* @__PURE__ */
|
|
621
|
+
/* @__PURE__ */ S("div", {
|
|
568
622
|
className: "flex-1 min-w-0",
|
|
569
|
-
children: [/* @__PURE__ */
|
|
623
|
+
children: [/* @__PURE__ */ x("p", {
|
|
570
624
|
className: "text-sm font-medium text-text-primary",
|
|
571
|
-
children:
|
|
572
|
-
}), /* @__PURE__ */
|
|
625
|
+
children: j("channel.webhookEvents", "Webhook Events")
|
|
626
|
+
}), /* @__PURE__ */ x("p", {
|
|
573
627
|
className: "text-xs text-text-secondary truncate",
|
|
574
|
-
children:
|
|
628
|
+
children: j("channel.viewIncomingWebhooks", "View incoming webhooks")
|
|
575
629
|
})]
|
|
576
630
|
}),
|
|
577
|
-
/* @__PURE__ */
|
|
631
|
+
/* @__PURE__ */ x(l, {
|
|
578
632
|
size: 16,
|
|
579
633
|
className: "text-text-secondary shrink-0"
|
|
580
634
|
})
|
|
581
635
|
]
|
|
582
636
|
}),
|
|
583
|
-
/* @__PURE__ */
|
|
637
|
+
/* @__PURE__ */ S("button", {
|
|
584
638
|
type: "button",
|
|
585
639
|
onClick: () => f("./users"),
|
|
586
640
|
className: "flex items-center gap-3 p-3 bg-gloss-card border border-border-seam rounded-lg shadow-[var(--shadow-pop)] hover:bg-action-primary-bg/10 transition-colors text-left",
|
|
587
641
|
children: [
|
|
588
|
-
/* @__PURE__ */
|
|
642
|
+
/* @__PURE__ */ x("div", {
|
|
589
643
|
className: "p-2 bg-accent-blue/10 rounded-lg",
|
|
590
|
-
children: /* @__PURE__ */
|
|
644
|
+
children: /* @__PURE__ */ x(ye, {
|
|
591
645
|
size: 18,
|
|
592
646
|
className: "text-accent-blue"
|
|
593
647
|
})
|
|
594
648
|
}),
|
|
595
|
-
/* @__PURE__ */
|
|
649
|
+
/* @__PURE__ */ S("div", {
|
|
596
650
|
className: "flex-1 min-w-0",
|
|
597
|
-
children: [/* @__PURE__ */
|
|
651
|
+
children: [/* @__PURE__ */ x("p", {
|
|
598
652
|
className: "text-sm font-medium text-text-primary",
|
|
599
|
-
children:
|
|
600
|
-
}), /* @__PURE__ */
|
|
653
|
+
children: j("channel.channelUsers", "Channel Users")
|
|
654
|
+
}), /* @__PURE__ */ x("p", {
|
|
601
655
|
className: "text-xs text-text-secondary truncate",
|
|
602
|
-
children:
|
|
656
|
+
children: j("channel.viewConnectedUsers", "View connected users")
|
|
603
657
|
})]
|
|
604
658
|
}),
|
|
605
|
-
/* @__PURE__ */
|
|
659
|
+
/* @__PURE__ */ x(l, {
|
|
606
660
|
size: 16,
|
|
607
661
|
className: "text-text-secondary shrink-0"
|
|
608
662
|
})
|
|
@@ -610,359 +664,359 @@ function E() {
|
|
|
610
664
|
})
|
|
611
665
|
]
|
|
612
666
|
}),
|
|
613
|
-
/* @__PURE__ */
|
|
667
|
+
/* @__PURE__ */ S(C, {
|
|
614
668
|
treatment: "plain",
|
|
615
669
|
className: "p-4 border-border-seam",
|
|
616
670
|
children: [
|
|
617
|
-
/* @__PURE__ */
|
|
671
|
+
/* @__PURE__ */ S("div", {
|
|
618
672
|
className: "flex items-center justify-between mb-4",
|
|
619
|
-
children: [/* @__PURE__ */
|
|
673
|
+
children: [/* @__PURE__ */ S("div", {
|
|
620
674
|
className: "flex items-center gap-2",
|
|
621
|
-
children: [/* @__PURE__ */
|
|
675
|
+
children: [/* @__PURE__ */ x(ue, {
|
|
622
676
|
size: 20,
|
|
623
677
|
className: "text-accent-primary"
|
|
624
|
-
}), /* @__PURE__ */
|
|
678
|
+
}), /* @__PURE__ */ x("h2", {
|
|
625
679
|
className: "text-lg font-semibold text-text-primary",
|
|
626
|
-
children:
|
|
680
|
+
children: j("channel.connectionAndCredentials", "Connection & Credentials")
|
|
627
681
|
})]
|
|
628
|
-
}), Pe && !$ && !
|
|
682
|
+
}), Pe && !$ && !F && /* @__PURE__ */ S("button", {
|
|
629
683
|
type: "button",
|
|
630
|
-
onClick: () =>
|
|
684
|
+
onClick: () => I(!0),
|
|
631
685
|
className: "flex items-center gap-2 px-3 py-2 text-sm font-medium text-action-primary-text bg-action-primary-bg hover:bg-action-primary-bg-hover rounded-lg transition-colors",
|
|
632
|
-
children: [/* @__PURE__ */
|
|
686
|
+
children: [/* @__PURE__ */ x(he, { size: 16 }), j("channel.addCredentials", "Add Credentials")]
|
|
633
687
|
})]
|
|
634
688
|
}),
|
|
635
|
-
$ && !
|
|
689
|
+
$ && !F && /* @__PURE__ */ S("div", {
|
|
636
690
|
className: "space-y-4",
|
|
637
691
|
children: [
|
|
638
|
-
/* @__PURE__ */
|
|
692
|
+
/* @__PURE__ */ S("div", {
|
|
639
693
|
className: "grid gap-4 sm:grid-cols-2",
|
|
640
694
|
children: [
|
|
641
|
-
/* @__PURE__ */
|
|
695
|
+
/* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
|
|
642
696
|
className: "text-xs text-text-secondary",
|
|
643
|
-
children:
|
|
644
|
-
}), /* @__PURE__ */
|
|
697
|
+
children: j("channel.authType", "Auth Type")
|
|
698
|
+
}), /* @__PURE__ */ x("p", {
|
|
645
699
|
className: "text-sm font-medium text-text-primary",
|
|
646
|
-
children: a($.authType, ee,
|
|
700
|
+
children: a($.authType, ee, j)
|
|
647
701
|
})] }),
|
|
648
|
-
/* @__PURE__ */
|
|
702
|
+
/* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
|
|
649
703
|
className: "text-xs text-text-secondary",
|
|
650
|
-
children:
|
|
651
|
-
}), /* @__PURE__ */
|
|
704
|
+
children: j("channel.status", "Status")
|
|
705
|
+
}), /* @__PURE__ */ S("div", {
|
|
652
706
|
className: "flex items-center gap-2",
|
|
653
|
-
children: [$.isHealthy ? /* @__PURE__ */
|
|
707
|
+
children: [$.isHealthy ? /* @__PURE__ */ x(d, {
|
|
654
708
|
size: 14,
|
|
655
709
|
className: "text-status-success-text"
|
|
656
|
-
}) : /* @__PURE__ */
|
|
710
|
+
}) : /* @__PURE__ */ x(b, {
|
|
657
711
|
size: 14,
|
|
658
712
|
className: "text-status-error-text"
|
|
659
|
-
}), /* @__PURE__ */
|
|
713
|
+
}), /* @__PURE__ */ x("span", {
|
|
660
714
|
className: `text-sm font-medium ${$.isHealthy ? "text-status-success-text" : "text-status-error-text"}`,
|
|
661
|
-
children: $.isHealthy ?
|
|
715
|
+
children: $.isHealthy ? j("channel.healthy", "Healthy") : j("channel.unhealthy", "Unhealthy")
|
|
662
716
|
})]
|
|
663
717
|
})] }),
|
|
664
|
-
/* @__PURE__ */
|
|
718
|
+
/* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
|
|
665
719
|
className: "text-xs text-text-secondary",
|
|
666
|
-
children:
|
|
667
|
-
}), /* @__PURE__ */
|
|
720
|
+
children: j("channel.lastTested", "Last Tested")
|
|
721
|
+
}), /* @__PURE__ */ x("p", {
|
|
668
722
|
className: "text-sm font-medium text-text-primary",
|
|
669
|
-
children: $.lastTestedAt ? new Date($.lastTestedAt).toLocaleString() :
|
|
723
|
+
children: $.lastTestedAt ? new Date($.lastTestedAt).toLocaleString() : j("channel.never", "Never")
|
|
670
724
|
})] }),
|
|
671
|
-
/* @__PURE__ */
|
|
725
|
+
/* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
|
|
672
726
|
className: "text-xs text-text-secondary",
|
|
673
|
-
children:
|
|
674
|
-
}), /* @__PURE__ */
|
|
727
|
+
children: j("channel.testStatus", "Test Status")
|
|
728
|
+
}), /* @__PURE__ */ x("p", {
|
|
675
729
|
className: "text-sm font-medium text-text-primary",
|
|
676
|
-
children: $.testStatus ||
|
|
730
|
+
children: $.testStatus || j("channel.notTested", "Not tested")
|
|
677
731
|
})] }),
|
|
678
|
-
$.tokenExpiresAt && /* @__PURE__ */
|
|
732
|
+
$.tokenExpiresAt && /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
|
|
679
733
|
className: "text-xs text-text-secondary",
|
|
680
|
-
children:
|
|
681
|
-
}), /* @__PURE__ */
|
|
734
|
+
children: j("channel.tokenExpires", "Token Expires")
|
|
735
|
+
}), /* @__PURE__ */ S("p", {
|
|
682
736
|
className: `text-sm font-medium ${$.needsTokenRefresh ? "text-status-warning-text" : "text-text-primary"}`,
|
|
683
|
-
children: [new Date($.tokenExpiresAt).toLocaleString(), $.daysUntilExpiry !== void 0 && /* @__PURE__ */
|
|
737
|
+
children: [new Date($.tokenExpiresAt).toLocaleString(), $.daysUntilExpiry !== void 0 && /* @__PURE__ */ S("span", {
|
|
684
738
|
className: "text-xs text-text-secondary ml-1",
|
|
685
739
|
children: [
|
|
686
740
|
"(",
|
|
687
741
|
$.daysUntilExpiry,
|
|
688
742
|
" ",
|
|
689
|
-
|
|
743
|
+
j("channel.days", "days"),
|
|
690
744
|
")"
|
|
691
745
|
]
|
|
692
746
|
})]
|
|
693
747
|
})] })
|
|
694
748
|
]
|
|
695
749
|
}),
|
|
696
|
-
|
|
697
|
-
className: `p-3 rounded-lg ${
|
|
698
|
-
children: /* @__PURE__ */
|
|
750
|
+
B && /* @__PURE__ */ x("div", {
|
|
751
|
+
className: `p-3 rounded-lg ${B.success ? "bg-status-success-bg-subtle border border-status-success-border" : "bg-status-error-bg-subtle border border-status-error-border"}`,
|
|
752
|
+
children: /* @__PURE__ */ S("div", {
|
|
699
753
|
className: "flex items-center gap-2",
|
|
700
|
-
children: [
|
|
754
|
+
children: [B.success ? /* @__PURE__ */ x(d, {
|
|
701
755
|
size: 16,
|
|
702
756
|
className: "text-status-success-text"
|
|
703
|
-
}) : /* @__PURE__ */
|
|
757
|
+
}) : /* @__PURE__ */ x(b, {
|
|
704
758
|
size: 16,
|
|
705
759
|
className: "text-status-error-text"
|
|
706
|
-
}), /* @__PURE__ */
|
|
707
|
-
className: `text-sm font-medium ${
|
|
708
|
-
children:
|
|
760
|
+
}), /* @__PURE__ */ x("p", {
|
|
761
|
+
className: `text-sm font-medium ${B.success ? "text-status-success-text" : "text-status-error-text"}`,
|
|
762
|
+
children: B.message
|
|
709
763
|
})]
|
|
710
764
|
})
|
|
711
765
|
}),
|
|
712
|
-
/* @__PURE__ */
|
|
766
|
+
/* @__PURE__ */ S("div", {
|
|
713
767
|
className: "flex items-center gap-2 pt-2",
|
|
714
768
|
children: [
|
|
715
|
-
/* @__PURE__ */
|
|
769
|
+
/* @__PURE__ */ x(r, {
|
|
716
770
|
permission: i.CHANNEL_CONNECTION_UPDATE,
|
|
717
|
-
children: /* @__PURE__ */
|
|
771
|
+
children: /* @__PURE__ */ S("button", {
|
|
718
772
|
type: "button",
|
|
719
773
|
onClick: () => et($.id),
|
|
720
|
-
disabled:
|
|
774
|
+
disabled: N === "test",
|
|
721
775
|
className: "flex items-center gap-2 px-3 py-2 text-sm text-status-info-text hover:bg-status-info-bg-subtle rounded-lg transition-colors disabled:opacity-50",
|
|
722
|
-
children: [
|
|
776
|
+
children: [N === "test" ? /* @__PURE__ */ x(p, {
|
|
723
777
|
size: 16,
|
|
724
778
|
className: "animate-spin"
|
|
725
|
-
}) : /* @__PURE__ */
|
|
779
|
+
}) : /* @__PURE__ */ x(me, { size: 16 }), j("channel.testConnection", "Test Connection")]
|
|
726
780
|
})
|
|
727
781
|
}),
|
|
728
|
-
Fe && /* @__PURE__ */
|
|
782
|
+
Fe && /* @__PURE__ */ S("button", {
|
|
729
783
|
type: "button",
|
|
730
784
|
onClick: () => {
|
|
731
|
-
|
|
785
|
+
I(!0), R($?.platformMetadata ?? {});
|
|
732
786
|
},
|
|
733
787
|
className: "flex items-center gap-2 px-3 py-2 text-sm text-text-secondary hover:text-accent-primary hover:bg-accent-primary/10 rounded-lg transition-colors",
|
|
734
|
-
children: [/* @__PURE__ */
|
|
788
|
+
children: [/* @__PURE__ */ x(m, { size: 16 }), j("channel.updateCredentials", "Update Credentials")]
|
|
735
789
|
}),
|
|
736
|
-
/* @__PURE__ */
|
|
790
|
+
/* @__PURE__ */ x(r, {
|
|
737
791
|
permission: i.CHANNEL_CONNECTION_DELETE,
|
|
738
|
-
children: /* @__PURE__ */
|
|
792
|
+
children: /* @__PURE__ */ S("button", {
|
|
739
793
|
type: "button",
|
|
740
794
|
onClick: () => $e($.id),
|
|
741
|
-
disabled:
|
|
795
|
+
disabled: N === "delete-connection",
|
|
742
796
|
className: "flex items-center gap-2 px-3 py-2 text-sm text-status-error-text hover:bg-status-error-bg-subtle rounded-lg transition-colors disabled:opacity-50",
|
|
743
|
-
children: [
|
|
797
|
+
children: [N === "delete-connection" ? /* @__PURE__ */ x(p, {
|
|
744
798
|
size: 16,
|
|
745
799
|
className: "animate-spin"
|
|
746
|
-
}) : /* @__PURE__ */
|
|
800
|
+
}) : /* @__PURE__ */ x(ve, { size: 16 }), j("channel.remove", "Remove")]
|
|
747
801
|
})
|
|
748
802
|
})
|
|
749
803
|
]
|
|
750
804
|
})
|
|
751
805
|
]
|
|
752
806
|
}),
|
|
753
|
-
!$ && !
|
|
807
|
+
!$ && !F && /* @__PURE__ */ S("div", {
|
|
754
808
|
className: "text-center py-8",
|
|
755
809
|
children: [
|
|
756
|
-
/* @__PURE__ */
|
|
810
|
+
/* @__PURE__ */ x(u, {
|
|
757
811
|
size: 32,
|
|
758
812
|
className: "mx-auto text-text-secondary mb-3"
|
|
759
813
|
}),
|
|
760
|
-
/* @__PURE__ */
|
|
814
|
+
/* @__PURE__ */ x("p", {
|
|
761
815
|
className: "text-sm text-text-secondary mb-2",
|
|
762
|
-
children:
|
|
816
|
+
children: j("channel.noCredentialsConfigured", "No credentials configured for this channel")
|
|
763
817
|
}),
|
|
764
|
-
/* @__PURE__ */
|
|
818
|
+
/* @__PURE__ */ x("p", {
|
|
765
819
|
className: "text-xs text-text-secondary",
|
|
766
|
-
children:
|
|
820
|
+
children: j("channel.addCredentialsHint", "Add credentials to enable message delivery through this channel")
|
|
767
821
|
})
|
|
768
822
|
]
|
|
769
823
|
}),
|
|
770
|
-
|
|
824
|
+
F && /* @__PURE__ */ S("div", {
|
|
771
825
|
className: "space-y-4",
|
|
772
826
|
children: [
|
|
773
|
-
!
|
|
827
|
+
!Y.adapterType && /* @__PURE__ */ x("div", {
|
|
774
828
|
className: "p-3 bg-accent-orange/10 border border-accent-orange/30 rounded-lg",
|
|
775
|
-
children: /* @__PURE__ */
|
|
829
|
+
children: /* @__PURE__ */ S("div", {
|
|
776
830
|
className: "flex items-start gap-2",
|
|
777
|
-
children: [/* @__PURE__ */
|
|
831
|
+
children: [/* @__PURE__ */ x(s, {
|
|
778
832
|
size: 16,
|
|
779
833
|
className: "text-accent-orange mt-0.5"
|
|
780
|
-
}), /* @__PURE__ */
|
|
834
|
+
}), /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
|
|
781
835
|
className: "text-sm font-medium text-accent-orange",
|
|
782
|
-
children:
|
|
783
|
-
}), /* @__PURE__ */
|
|
836
|
+
children: j("channel.noAdapterTypeConfigured", "No adapter type configured")
|
|
837
|
+
}), /* @__PURE__ */ x("p", {
|
|
784
838
|
className: "text-xs text-text-secondary mt-1",
|
|
785
|
-
children:
|
|
839
|
+
children: j("channel.noAdapterTypeConfiguredHint", "You can still add credentials below. The system will attempt to validate them when the channel is configured with an adapter type.")
|
|
786
840
|
})] })]
|
|
787
841
|
})
|
|
788
842
|
}),
|
|
789
|
-
/* @__PURE__ */
|
|
790
|
-
adapterType:
|
|
791
|
-
credentials:
|
|
792
|
-
onChange:
|
|
793
|
-
onValidationChange: (e) =>
|
|
794
|
-
disabled:
|
|
843
|
+
/* @__PURE__ */ x(ie, {
|
|
844
|
+
adapterType: Y.adapterType ?? void 0,
|
|
845
|
+
credentials: L,
|
|
846
|
+
onChange: R,
|
|
847
|
+
onValidationChange: (e) => z(e),
|
|
848
|
+
disabled: N === "connection"
|
|
795
849
|
}),
|
|
796
|
-
|
|
850
|
+
Y.adapterType && /* @__PURE__ */ x("div", {
|
|
797
851
|
className: "pt-2",
|
|
798
|
-
children: /* @__PURE__ */
|
|
799
|
-
adapterType:
|
|
800
|
-
credentials:
|
|
852
|
+
children: /* @__PURE__ */ x(ae, {
|
|
853
|
+
adapterType: Y.adapterType,
|
|
854
|
+
credentials: L
|
|
801
855
|
})
|
|
802
856
|
}),
|
|
803
|
-
/* @__PURE__ */
|
|
857
|
+
/* @__PURE__ */ S("div", {
|
|
804
858
|
className: "flex items-center gap-2 pt-2 border-t border-border-subtle",
|
|
805
|
-
children: [/* @__PURE__ */
|
|
859
|
+
children: [/* @__PURE__ */ x(r, {
|
|
806
860
|
permission: i.CHANNEL_CONNECTION_UPDATE,
|
|
807
|
-
children: /* @__PURE__ */
|
|
861
|
+
children: /* @__PURE__ */ S("button", {
|
|
808
862
|
type: "button",
|
|
809
863
|
onClick: () => {
|
|
810
864
|
$ ? Qe($.id) : Ze();
|
|
811
865
|
},
|
|
812
|
-
disabled:
|
|
866
|
+
disabled: N === "connection" || !Le && !!Y.adapterType,
|
|
813
867
|
className: "flex items-center gap-2 px-4 py-2 text-sm font-medium text-action-primary-text bg-action-primary-bg hover:bg-action-primary-bg-hover rounded-lg transition-colors disabled:opacity-50 disabled:cursor-not-allowed",
|
|
814
|
-
children: [
|
|
868
|
+
children: [N === "connection" ? /* @__PURE__ */ x(p, {
|
|
815
869
|
size: 16,
|
|
816
870
|
className: "animate-spin"
|
|
817
|
-
}) : /* @__PURE__ */
|
|
871
|
+
}) : /* @__PURE__ */ x(_e, { size: 16 }), $ ? j("channel.updateCredentials", "Update Credentials") : j("channel.saveCredentials", "Save Credentials")]
|
|
818
872
|
})
|
|
819
|
-
}), /* @__PURE__ */
|
|
873
|
+
}), /* @__PURE__ */ S("button", {
|
|
820
874
|
type: "button",
|
|
821
875
|
onClick: () => {
|
|
822
|
-
|
|
876
|
+
I(!1), R({}), z(!1);
|
|
823
877
|
},
|
|
824
878
|
className: "flex items-center gap-2 px-4 py-2 text-sm text-text-secondary hover:bg-bg-sunken rounded-lg transition-colors",
|
|
825
|
-
children: [/* @__PURE__ */
|
|
879
|
+
children: [/* @__PURE__ */ x(be, { size: 16 }), j("channel.cancel", "Cancel")]
|
|
826
880
|
})]
|
|
827
881
|
})
|
|
828
882
|
]
|
|
829
883
|
})
|
|
830
884
|
]
|
|
831
885
|
}),
|
|
832
|
-
/* @__PURE__ */
|
|
886
|
+
/* @__PURE__ */ x(ke, {
|
|
833
887
|
open: Re,
|
|
834
888
|
onOpenChange: (e) => {
|
|
835
|
-
e ||
|
|
889
|
+
e || H(!1);
|
|
836
890
|
},
|
|
837
|
-
children: /* @__PURE__ */
|
|
891
|
+
children: /* @__PURE__ */ S(Ae, {
|
|
838
892
|
className: "sm:max-w-md",
|
|
839
|
-
children: [/* @__PURE__ */
|
|
893
|
+
children: [/* @__PURE__ */ x(je, { children: /* @__PURE__ */ S(Me, {
|
|
840
894
|
className: "flex items-center gap-2",
|
|
841
895
|
children: [
|
|
842
|
-
/* @__PURE__ */
|
|
896
|
+
/* @__PURE__ */ x(v, {
|
|
843
897
|
size: 20,
|
|
844
898
|
className: "text-accent-primary"
|
|
845
899
|
}),
|
|
846
900
|
"Test ",
|
|
847
|
-
|
|
901
|
+
w[Y.platform]?.label || Y.platform,
|
|
848
902
|
" Channel"
|
|
849
903
|
]
|
|
850
|
-
}) }), /* @__PURE__ */
|
|
904
|
+
}) }), /* @__PURE__ */ S("div", {
|
|
851
905
|
className: "space-y-4",
|
|
852
906
|
children: [
|
|
853
|
-
/* @__PURE__ */
|
|
907
|
+
/* @__PURE__ */ S("div", { children: [/* @__PURE__ */ S("label", {
|
|
854
908
|
className: "block text-sm font-medium text-text-primary mb-1.5",
|
|
855
909
|
children: [
|
|
856
|
-
|
|
910
|
+
rt(Y.platform),
|
|
857
911
|
" ",
|
|
858
|
-
/* @__PURE__ */
|
|
912
|
+
/* @__PURE__ */ x("span", {
|
|
859
913
|
className: "text-status-error-text",
|
|
860
914
|
children: "*"
|
|
861
915
|
})
|
|
862
916
|
]
|
|
863
|
-
}), /* @__PURE__ */
|
|
917
|
+
}), /* @__PURE__ */ S("div", {
|
|
864
918
|
className: "relative",
|
|
865
|
-
children: [/* @__PURE__ */
|
|
866
|
-
"aria-label": Y
|
|
919
|
+
children: [/* @__PURE__ */ x("input", {
|
|
920
|
+
"aria-label": nt(Y.platform),
|
|
867
921
|
type: "text",
|
|
868
|
-
value:
|
|
869
|
-
onChange: (e) =>
|
|
870
|
-
placeholder: Y
|
|
922
|
+
value: U,
|
|
923
|
+
onChange: (e) => W(e.target.value),
|
|
924
|
+
placeholder: nt(Y.platform),
|
|
871
925
|
className: "w-full pl-9 pr-3 py-2 text-sm bg-surface border border-border-subtle rounded-lg focus:outline-none focus:ring-2 focus:ring-action-primary-bg"
|
|
872
|
-
}), /* @__PURE__ */
|
|
926
|
+
}), /* @__PURE__ */ x("div", {
|
|
873
927
|
className: "absolute left-3 top-1/2 -translate-y-1/2 text-text-secondary",
|
|
874
|
-
children:
|
|
928
|
+
children: Y.platform === "EMAIL" ? /* @__PURE__ */ x(de, { size: 16 }) : Y.platform === "SMS" || Y.platform === "WHATSAPP" ? /* @__PURE__ */ x(pe, { size: 16 }) : /* @__PURE__ */ x(fe, { size: 16 })
|
|
875
929
|
})]
|
|
876
930
|
})] }),
|
|
877
|
-
|
|
931
|
+
Y.platform === "EMAIL" && /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("label", {
|
|
878
932
|
htmlFor: "channel-details-test-subject",
|
|
879
933
|
className: "block text-sm font-medium text-text-primary mb-1.5",
|
|
880
934
|
children: "Subject"
|
|
881
|
-
}), /* @__PURE__ */
|
|
935
|
+
}), /* @__PURE__ */ x("input", {
|
|
882
936
|
id: "channel-details-test-subject",
|
|
883
937
|
"aria-label": "Email subject",
|
|
884
938
|
type: "text",
|
|
885
|
-
value:
|
|
939
|
+
value: G,
|
|
886
940
|
onChange: (e) => ze(e.target.value),
|
|
887
941
|
placeholder: "Email subject",
|
|
888
942
|
className: "w-full px-3 py-2 text-sm bg-surface border border-border-subtle rounded-lg focus:outline-none focus:ring-2 focus:ring-action-primary-bg"
|
|
889
943
|
})] }),
|
|
890
|
-
/* @__PURE__ */
|
|
944
|
+
/* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("label", {
|
|
891
945
|
htmlFor: "channel-details-test-message",
|
|
892
946
|
className: "block text-sm font-medium text-text-primary mb-1.5",
|
|
893
947
|
children: "Message"
|
|
894
|
-
}), /* @__PURE__ */
|
|
948
|
+
}), /* @__PURE__ */ x("textarea", {
|
|
895
949
|
id: "channel-details-test-message",
|
|
896
950
|
"aria-label": "Test message content",
|
|
897
|
-
value:
|
|
951
|
+
value: K,
|
|
898
952
|
onChange: (e) => Be(e.target.value),
|
|
899
953
|
placeholder: "Test message content",
|
|
900
954
|
rows: 3,
|
|
901
955
|
className: "w-full px-3 py-2 text-sm bg-surface border border-border-subtle rounded-lg focus:outline-none focus:ring-2 focus:ring-action-primary-bg resize-none"
|
|
902
956
|
})] }),
|
|
903
|
-
|
|
904
|
-
className: `p-3 rounded-lg ${
|
|
905
|
-
children: /* @__PURE__ */
|
|
957
|
+
q && /* @__PURE__ */ x("div", {
|
|
958
|
+
className: `p-3 rounded-lg ${q.success ? "bg-status-success-bg-subtle border border-status-success-border" : "bg-status-error-bg-subtle border border-status-error-border"}`,
|
|
959
|
+
children: /* @__PURE__ */ S("div", {
|
|
906
960
|
className: "flex items-start gap-2",
|
|
907
|
-
children: [
|
|
961
|
+
children: [q.success ? /* @__PURE__ */ x(d, {
|
|
908
962
|
size: 16,
|
|
909
963
|
className: "text-status-success-text mt-0.5"
|
|
910
|
-
}) : /* @__PURE__ */
|
|
964
|
+
}) : /* @__PURE__ */ x(b, {
|
|
911
965
|
size: 16,
|
|
912
966
|
className: "text-status-error-text mt-0.5"
|
|
913
|
-
}), /* @__PURE__ */
|
|
967
|
+
}), /* @__PURE__ */ S("div", {
|
|
914
968
|
className: "flex-1",
|
|
915
969
|
children: [
|
|
916
|
-
/* @__PURE__ */
|
|
917
|
-
className: `text-sm font-medium ${
|
|
918
|
-
children:
|
|
970
|
+
/* @__PURE__ */ x("p", {
|
|
971
|
+
className: `text-sm font-medium ${q.success ? "text-status-success-text" : "text-status-error-text"}`,
|
|
972
|
+
children: q.success ? j("channel.messageSentSuccess", "Message sent successfully!") : j("channel.messageSendFailed", "Failed to send message")
|
|
919
973
|
}),
|
|
920
|
-
|
|
974
|
+
q.messageId && /* @__PURE__ */ S("p", {
|
|
921
975
|
className: "text-xs text-success-600 mt-1",
|
|
922
|
-
children: ["Message ID: ",
|
|
976
|
+
children: ["Message ID: ", q.messageId]
|
|
923
977
|
}),
|
|
924
|
-
|
|
978
|
+
q.externalId && /* @__PURE__ */ S("p", {
|
|
925
979
|
className: "text-xs text-text-secondary mt-1",
|
|
926
|
-
children: ["External ID: ",
|
|
980
|
+
children: ["External ID: ", q.externalId]
|
|
927
981
|
}),
|
|
928
|
-
|
|
982
|
+
q.status && /* @__PURE__ */ S("p", {
|
|
929
983
|
className: "text-xs text-text-secondary mt-1",
|
|
930
|
-
children: ["Status: ",
|
|
984
|
+
children: ["Status: ", q.status]
|
|
931
985
|
}),
|
|
932
|
-
|
|
986
|
+
q.error && /* @__PURE__ */ S("p", {
|
|
933
987
|
className: "text-xs text-status-error-text mt-1",
|
|
934
|
-
children: [
|
|
988
|
+
children: [q.error.message, q.error.retryable && /* @__PURE__ */ x("span", {
|
|
935
989
|
className: "text-warning-600 ml-1",
|
|
936
990
|
children: "(will retry)"
|
|
937
991
|
})]
|
|
938
992
|
}),
|
|
939
|
-
|
|
993
|
+
q.sentAt && /* @__PURE__ */ S("p", {
|
|
940
994
|
className: "text-xs text-text-secondary mt-1",
|
|
941
|
-
children: ["Sent at: ", new Date(
|
|
995
|
+
children: ["Sent at: ", new Date(q.sentAt).toLocaleString()]
|
|
942
996
|
})
|
|
943
997
|
]
|
|
944
998
|
})]
|
|
945
999
|
})
|
|
946
1000
|
}),
|
|
947
|
-
/* @__PURE__ */
|
|
1001
|
+
/* @__PURE__ */ S("div", {
|
|
948
1002
|
className: "flex items-center gap-2 pt-2",
|
|
949
|
-
children: [/* @__PURE__ */
|
|
1003
|
+
children: [/* @__PURE__ */ x(r, {
|
|
950
1004
|
permission: i.CHANNEL_DELIVERY_SEND,
|
|
951
|
-
children: /* @__PURE__ */
|
|
1005
|
+
children: /* @__PURE__ */ S("button", {
|
|
952
1006
|
type: "button",
|
|
953
1007
|
onClick: tt,
|
|
954
|
-
disabled:
|
|
1008
|
+
disabled: N === "send-test" || !U.trim(),
|
|
955
1009
|
className: "flex-1 flex items-center justify-center gap-2 px-4 py-2 text-sm font-medium text-action-primary-text bg-action-primary-bg hover:bg-action-primary-bg-hover rounded-lg transition-colors disabled:opacity-50 disabled:cursor-not-allowed",
|
|
956
|
-
children: [
|
|
1010
|
+
children: [N === "send-test" ? /* @__PURE__ */ x(p, {
|
|
957
1011
|
size: 16,
|
|
958
1012
|
className: "animate-spin"
|
|
959
|
-
}) : /* @__PURE__ */
|
|
1013
|
+
}) : /* @__PURE__ */ x(v, { size: 16 }), j("channel.sendTest", "Send Test")]
|
|
960
1014
|
})
|
|
961
|
-
}), /* @__PURE__ */
|
|
1015
|
+
}), /* @__PURE__ */ x("button", {
|
|
962
1016
|
type: "button",
|
|
963
|
-
onClick: () =>
|
|
1017
|
+
onClick: () => H(!1),
|
|
964
1018
|
className: "px-4 py-2 text-sm text-text-secondary hover:bg-bg-sunken rounded-lg transition-colors",
|
|
965
|
-
children:
|
|
1019
|
+
children: j("channel.close", "Close")
|
|
966
1020
|
})]
|
|
967
1021
|
})
|
|
968
1022
|
]
|
|
@@ -974,6 +1028,6 @@ function E() {
|
|
|
974
1028
|
});
|
|
975
1029
|
}
|
|
976
1030
|
//#endregion
|
|
977
|
-
export {
|
|
1031
|
+
export { D as ChannelDetailsPage };
|
|
978
1032
|
|
|
979
1033
|
//# sourceMappingURL=ChannelDetailsPage.js.map
|