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