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