@burdenoff/microfe-channel 2026.518.2 → 2026.520.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/ChannelRoot.d.ts.map +1 -1
- package/dist/channel/ChannelRoot.js +23 -29
- package/dist/channel/ChannelRoot.js.map +1 -1
- package/dist/channel/components/AdapterCredentialsForm.js +7 -7
- package/dist/channel/components/AdapterCredentialsForm.js.map +1 -1
- package/dist/channel/components/FeatureNotEnabled.d.ts +3 -0
- package/dist/channel/components/FeatureNotEnabled.d.ts.map +1 -1
- package/dist/channel/components/FeatureNotEnabled.js +31 -13
- package/dist/channel/components/FeatureNotEnabled.js.map +1 -1
- package/dist/channel/hooks/useChannels.d.ts +17 -3
- package/dist/channel/hooks/useChannels.d.ts.map +1 -1
- package/dist/channel/hooks/useChannels.js +64 -18
- package/dist/channel/hooks/useChannels.js.map +1 -1
- package/dist/channel/modules/channels/pages/ChannelDashboardPage.d.ts.map +1 -1
- package/dist/channel/modules/channels/pages/ChannelDashboardPage.js +307 -274
- package/dist/channel/modules/channels/pages/ChannelDashboardPage.js.map +1 -1
- package/dist/channel/modules/channels/pages/ChannelDetailsPage.d.ts.map +1 -1
- package/dist/channel/modules/channels/pages/ChannelDetailsPage.js +31 -31
- package/dist/channel/modules/channels/pages/ChannelDetailsPage.js.map +1 -1
- package/dist/channel/modules/channels/pages/ChannelSettingsPage.d.ts.map +1 -1
- package/dist/channel/modules/channels/pages/ChannelSettingsPage.js +22 -22
- package/dist/channel/modules/channels/pages/ChannelSettingsPage.js.map +1 -1
- package/dist/channel/modules/channels/pages/ChannelUsersPage.d.ts.map +1 -1
- package/dist/channel/modules/channels/pages/ChannelUsersPage.js +193 -137
- package/dist/channel/modules/channels/pages/ChannelUsersPage.js.map +1 -1
- package/dist/channel/modules/channels/pages/ChannelsListPage.d.ts.map +1 -1
- package/dist/channel/modules/channels/pages/ChannelsListPage.js +320 -248
- package/dist/channel/modules/channels/pages/ChannelsListPage.js.map +1 -1
- package/dist/channel/modules/channels/pages/ConnectionDetailsPage.d.ts.map +1 -1
- package/dist/channel/modules/channels/pages/ConnectionDetailsPage.js +5 -5
- package/dist/channel/modules/channels/pages/ConnectionDetailsPage.js.map +1 -1
- package/dist/channel/modules/channels/pages/ConnectionsListPage.d.ts.map +1 -1
- package/dist/channel/modules/channels/pages/ConnectionsListPage.js +160 -112
- package/dist/channel/modules/channels/pages/ConnectionsListPage.js.map +1 -1
- package/dist/channel/modules/channels/pages/CreateChannelPage.js +4 -4
- package/dist/channel/modules/channels/pages/CreateChannelPage.js.map +1 -1
- package/dist/channel/modules/channels/pages/DeliveryHistoryPage.d.ts.map +1 -1
- package/dist/channel/modules/channels/pages/DeliveryHistoryPage.js +221 -157
- package/dist/channel/modules/channels/pages/DeliveryHistoryPage.js.map +1 -1
- package/dist/channel/modules/channels/pages/EditChannelPage.js +9 -9
- package/dist/channel/modules/channels/pages/EditChannelPage.js.map +1 -1
- package/dist/channel/modules/channels/pages/SendMessagePage.d.ts.map +1 -1
- package/dist/channel/modules/channels/pages/SendMessagePage.js +89 -89
- package/dist/channel/modules/channels/pages/SendMessagePage.js.map +1 -1
- package/dist/channel/modules/channels/pages/WebhookEventsPage.d.ts.map +1 -1
- package/dist/channel/modules/channels/pages/WebhookEventsPage.js +188 -126
- package/dist/channel/modules/channels/pages/WebhookEventsPage.js.map +1 -1
- package/dist/generated/global-operations.d.ts +2 -0
- package/dist/generated/global-operations.d.ts.map +1 -1
- package/dist/generated/global-operations.js +2 -0
- package/dist/generated/global-operations.js.map +1 -1
- package/package.json +2 -2
|
@@ -5,14 +5,14 @@ import { CHANNEL_HEALTH_CHANGED_SUBSCRIPTION as i, useChannelSubscription as a }
|
|
|
5
5
|
import { useChannels as o } from "../../../hooks/useChannels.js";
|
|
6
6
|
import { PermissionGuard as s } from "../../../components/PermissionGuard.js";
|
|
7
7
|
import { CHANNEL_PERMISSIONS as c } from "../../../constants/permissions.js";
|
|
8
|
-
import { HEALTH_I18N as ee, PLATFORM_I18N as
|
|
9
|
-
import { useCallback as
|
|
10
|
-
import { useI18n as
|
|
11
|
-
import { Activity as
|
|
12
|
-
import { useNavigate as
|
|
13
|
-
import { jsx as
|
|
8
|
+
import { HEALTH_I18N as ee, PLATFORM_I18N as te, STATUS_I18N as ne, translateLabel as l } from "../i18n.js";
|
|
9
|
+
import { useCallback as u, useEffect as d, useMemo as re, useState as f } from "react";
|
|
10
|
+
import { useI18n as ie } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
11
|
+
import { Activity as p, AlertCircle as m, AlertTriangle as h, Cable as g, CheckCircle2 as _, Eye as ae, HelpCircle as v, LayoutDashboard as y, Loader2 as b, MessageSquare as oe, Plus as x, Power as S, PowerOff as C, Radio as w, RefreshCw as T, Search as se, ShieldCheck as ce, Trash2 as le, XCircle as E } from "lucide-react";
|
|
12
|
+
import { useNavigate as ue } from "react-router-dom";
|
|
13
|
+
import { jsx as D, jsxs as O } from "react/jsx-runtime";
|
|
14
14
|
//#region src/channel/modules/channels/pages/ChannelDashboardPage.tsx
|
|
15
|
-
var
|
|
15
|
+
var k = {
|
|
16
16
|
EMAIL: {
|
|
17
17
|
label: "Email",
|
|
18
18
|
color: "bg-accent-blue-subtle text-accent-blue"
|
|
@@ -53,60 +53,60 @@ var M = {
|
|
|
53
53
|
label: "Webchat",
|
|
54
54
|
color: "bg-accent-teal-subtle text-accent-teal"
|
|
55
55
|
}
|
|
56
|
-
},
|
|
56
|
+
}, A = {
|
|
57
57
|
ACTIVE: {
|
|
58
58
|
label: "Active",
|
|
59
59
|
dotColor: "bg-success-500",
|
|
60
|
-
textColor: "text-success-
|
|
60
|
+
textColor: "text-status-success-text",
|
|
61
61
|
icon: _
|
|
62
62
|
},
|
|
63
63
|
INACTIVE: {
|
|
64
64
|
label: "Inactive",
|
|
65
65
|
dotColor: "bg-text-tertiary",
|
|
66
66
|
textColor: "text-muted-foreground",
|
|
67
|
-
icon:
|
|
67
|
+
icon: C
|
|
68
68
|
},
|
|
69
69
|
ERROR: {
|
|
70
70
|
label: "Error",
|
|
71
|
-
dotColor: "bg-error-
|
|
72
|
-
textColor: "text-error-
|
|
73
|
-
icon:
|
|
71
|
+
dotColor: "bg-status-error-bg-subtle",
|
|
72
|
+
textColor: "text-status-error-text",
|
|
73
|
+
icon: E
|
|
74
74
|
},
|
|
75
75
|
SUSPENDED: {
|
|
76
76
|
label: "Suspended",
|
|
77
77
|
dotColor: "bg-warning-500",
|
|
78
|
-
textColor: "text-warning-
|
|
78
|
+
textColor: "text-status-warning-text",
|
|
79
79
|
icon: h
|
|
80
80
|
},
|
|
81
81
|
ARCHIVED: {
|
|
82
82
|
label: "Archived",
|
|
83
83
|
dotColor: "bg-text-tertiary",
|
|
84
84
|
textColor: "text-muted-foreground",
|
|
85
|
-
icon:
|
|
85
|
+
icon: C
|
|
86
86
|
}
|
|
87
|
-
},
|
|
87
|
+
}, j = {
|
|
88
88
|
HEALTHY: {
|
|
89
89
|
label: "Healthy",
|
|
90
|
-
color: "text-success-
|
|
90
|
+
color: "text-status-success-text",
|
|
91
91
|
icon: _
|
|
92
92
|
},
|
|
93
93
|
DEGRADED: {
|
|
94
94
|
label: "Degraded",
|
|
95
|
-
color: "text-warning-
|
|
95
|
+
color: "text-status-warning-text",
|
|
96
96
|
icon: h
|
|
97
97
|
},
|
|
98
98
|
UNHEALTHY: {
|
|
99
99
|
label: "Unhealthy",
|
|
100
|
-
color: "text-error-
|
|
101
|
-
icon:
|
|
100
|
+
color: "text-status-error-text",
|
|
101
|
+
icon: E
|
|
102
102
|
},
|
|
103
103
|
UNKNOWN: {
|
|
104
104
|
label: "Unknown",
|
|
105
105
|
color: "text-muted-foreground",
|
|
106
|
-
icon:
|
|
106
|
+
icon: v
|
|
107
107
|
}
|
|
108
108
|
};
|
|
109
|
-
function
|
|
109
|
+
function de(e) {
|
|
110
110
|
let t = Date.now() - new Date(e).getTime();
|
|
111
111
|
if (Number.isNaN(t) || t < 0) return "just now";
|
|
112
112
|
let n = Math.floor(t / 1e3);
|
|
@@ -118,56 +118,69 @@ function le(e) {
|
|
|
118
118
|
let a = Math.floor(i / 24);
|
|
119
119
|
return a < 7 ? `${a}d ago` : a < 30 ? `${Math.floor(a / 7)}w ago` : `${Math.floor(a / 30)}mo ago`;
|
|
120
120
|
}
|
|
121
|
-
function
|
|
122
|
-
return /* @__PURE__ */
|
|
121
|
+
function M({ icon: e, iconClass: t, value: n, label: r, sub: i }) {
|
|
122
|
+
return /* @__PURE__ */ O("div", {
|
|
123
123
|
className: "p-4 bg-surface border border-border rounded-lg",
|
|
124
|
-
children: [/* @__PURE__ */
|
|
124
|
+
children: [/* @__PURE__ */ O("div", {
|
|
125
125
|
className: "flex items-center gap-3",
|
|
126
|
-
children: [/* @__PURE__ */
|
|
126
|
+
children: [/* @__PURE__ */ D("div", {
|
|
127
127
|
className: "p-2 rounded-lg hover:bg-action-primary-bg/10",
|
|
128
|
-
children: /* @__PURE__ */
|
|
128
|
+
children: /* @__PURE__ */ D(e, {
|
|
129
129
|
size: 18,
|
|
130
130
|
className: t
|
|
131
131
|
})
|
|
132
|
-
}), /* @__PURE__ */
|
|
132
|
+
}), /* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D("p", {
|
|
133
133
|
className: "text-2xl font-bold text-foreground leading-tight",
|
|
134
134
|
children: n
|
|
135
|
-
}), /* @__PURE__ */
|
|
135
|
+
}), /* @__PURE__ */ D("p", {
|
|
136
136
|
className: "text-xs text-muted-foreground",
|
|
137
137
|
children: r
|
|
138
138
|
})] })]
|
|
139
|
-
}), i && /* @__PURE__ */
|
|
139
|
+
}), i && /* @__PURE__ */ D("p", {
|
|
140
140
|
className: "text-[11px] text-muted-foreground mt-2 pl-11",
|
|
141
141
|
children: i
|
|
142
142
|
})]
|
|
143
143
|
});
|
|
144
144
|
}
|
|
145
|
-
function
|
|
146
|
-
let h =
|
|
145
|
+
function N() {
|
|
146
|
+
let h = ue(), { t: _ } = ie(), v = (e, t) => {
|
|
147
147
|
let n = _(e);
|
|
148
148
|
return n === e ? t : n;
|
|
149
|
-
}, [
|
|
150
|
-
...
|
|
149
|
+
}, [E, N] = f(null), [fe, P] = f(null), [F, I] = f(0), L = (e) => ({
|
|
150
|
+
...k[e] ?? {
|
|
151
151
|
label: e,
|
|
152
152
|
color: "bg-bg-sunken text-text-tertiary"
|
|
153
153
|
},
|
|
154
|
-
label:
|
|
154
|
+
label: l(e, te, v)
|
|
155
|
+
}), R = (e) => ({
|
|
156
|
+
...A[e] ?? A.INACTIVE,
|
|
157
|
+
label: l(e, ne, v)
|
|
155
158
|
}), z = (e) => ({
|
|
156
|
-
...
|
|
157
|
-
label:
|
|
158
|
-
}), B = (
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
159
|
+
...j[e] ?? j.UNKNOWN,
|
|
160
|
+
label: l(e, ee, v)
|
|
161
|
+
}), { channels: B, isLoading: V, error: H, total: U, filter: W, updateFilter: G, deleteChannel: K, activateChannel: q, deactivateChannel: J, runHealthCheck: Y, refetch: X } = o(), Z = Math.max(1, Math.ceil(U / 10));
|
|
162
|
+
d(() => {
|
|
163
|
+
X({
|
|
164
|
+
offset: F * 10,
|
|
165
|
+
limit: 10
|
|
166
|
+
});
|
|
167
|
+
}, [F]), d(() => {
|
|
168
|
+
Promise.resolve().then(() => I(0));
|
|
169
|
+
}, [
|
|
170
|
+
W.search,
|
|
171
|
+
W.platform,
|
|
172
|
+
W.status
|
|
173
|
+
]);
|
|
174
|
+
let { organizationId: Q } = e();
|
|
162
175
|
a({
|
|
163
176
|
query: i,
|
|
164
177
|
variables: { organizationId: Q },
|
|
165
178
|
operationName: "ChannelHealthChanged",
|
|
166
179
|
enabled: !!Q,
|
|
167
|
-
onData: () => void
|
|
168
|
-
pollFn:
|
|
180
|
+
onData: () => void X(),
|
|
181
|
+
pollFn: X,
|
|
169
182
|
pollIntervalMs: 6e4
|
|
170
|
-
}),
|
|
183
|
+
}), d(() => {
|
|
171
184
|
let e = [
|
|
172
185
|
"channel.created",
|
|
173
186
|
"channel.updated",
|
|
@@ -177,12 +190,12 @@ function I() {
|
|
|
177
190
|
"connection.deleted",
|
|
178
191
|
"delivery.completed",
|
|
179
192
|
"webhook.received"
|
|
180
|
-
].map((e) => r(e, () => void
|
|
193
|
+
].map((e) => r(e, () => void X()));
|
|
181
194
|
return () => e.forEach((e) => e());
|
|
182
|
-
}, [
|
|
195
|
+
}, [X]);
|
|
183
196
|
let $ = re(() => {
|
|
184
197
|
let e = 0, t = 0, n = 0, r = 0, i = 0, a = 0;
|
|
185
|
-
for (let o of
|
|
198
|
+
for (let o of B) o.status === "ACTIVE" && e++, o.status === "ERROR" && i++, o.connectionHealth === "HEALTHY" && t++, o.connectionHealth === "UNHEALTHY" && a++, o.isConnected && n++, r += o.messageCount24h ?? 0;
|
|
186
199
|
return {
|
|
187
200
|
active: e,
|
|
188
201
|
healthy: t,
|
|
@@ -191,387 +204,387 @@ function I() {
|
|
|
191
204
|
errored: i,
|
|
192
205
|
unhealthy: a
|
|
193
206
|
};
|
|
194
|
-
}, [
|
|
195
|
-
t("medium"),
|
|
207
|
+
}, [B]), pe = u(async (e) => {
|
|
208
|
+
t("medium"), P(e);
|
|
196
209
|
try {
|
|
197
|
-
await
|
|
210
|
+
await K(e), n("success"), N(null);
|
|
198
211
|
} catch (e) {
|
|
199
212
|
throw n("error"), e;
|
|
200
213
|
} finally {
|
|
201
|
-
|
|
214
|
+
P(null);
|
|
202
215
|
}
|
|
203
|
-
}, [
|
|
204
|
-
|
|
216
|
+
}, [K]), me = u(async (e) => {
|
|
217
|
+
P(e.id);
|
|
205
218
|
try {
|
|
206
|
-
e.status === "ACTIVE" ? await
|
|
219
|
+
e.status === "ACTIVE" ? await J(e.id) : await q(e.id);
|
|
207
220
|
} finally {
|
|
208
|
-
|
|
221
|
+
P(null);
|
|
209
222
|
}
|
|
210
|
-
}, [
|
|
211
|
-
|
|
223
|
+
}, [q, J]), he = u(async (e) => {
|
|
224
|
+
P(e);
|
|
212
225
|
try {
|
|
213
|
-
await
|
|
226
|
+
await Y(e);
|
|
214
227
|
} finally {
|
|
215
|
-
|
|
228
|
+
P(null);
|
|
216
229
|
}
|
|
217
|
-
}, [
|
|
218
|
-
return /* @__PURE__ */
|
|
230
|
+
}, [Y]);
|
|
231
|
+
return /* @__PURE__ */ D(s, {
|
|
219
232
|
permission: c.CHANNEL_READ,
|
|
220
|
-
children: /* @__PURE__ */
|
|
233
|
+
children: /* @__PURE__ */ O("div", {
|
|
221
234
|
className: "space-y-5 p-3 sm:p-6",
|
|
222
235
|
children: [
|
|
223
|
-
/* @__PURE__ */
|
|
236
|
+
/* @__PURE__ */ O("div", {
|
|
224
237
|
className: "flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",
|
|
225
|
-
children: [/* @__PURE__ */
|
|
238
|
+
children: [/* @__PURE__ */ O("div", {
|
|
226
239
|
className: "flex items-center gap-3",
|
|
227
|
-
children: [/* @__PURE__ */
|
|
240
|
+
children: [/* @__PURE__ */ D("div", {
|
|
228
241
|
className: "p-2 rounded-lg bg-accent-primary/10",
|
|
229
|
-
children: /* @__PURE__ */
|
|
242
|
+
children: /* @__PURE__ */ D(y, {
|
|
230
243
|
size: 20,
|
|
231
244
|
className: "text-accent-primary"
|
|
232
245
|
})
|
|
233
|
-
}), /* @__PURE__ */
|
|
246
|
+
}), /* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D("h1", {
|
|
234
247
|
className: "text-xl font-bold text-foreground",
|
|
235
|
-
children:
|
|
236
|
-
}), /* @__PURE__ */
|
|
248
|
+
children: v("channel.channelDashboard", "Channel Dashboard")
|
|
249
|
+
}), /* @__PURE__ */ D("p", {
|
|
237
250
|
className: "text-sm text-muted-foreground",
|
|
238
|
-
children:
|
|
251
|
+
children: v("channel.dashboardSubtitle", "Manage and monitor your communication channels")
|
|
239
252
|
})] })]
|
|
240
|
-
}), /* @__PURE__ */
|
|
253
|
+
}), /* @__PURE__ */ O("div", {
|
|
241
254
|
className: "flex items-center gap-2",
|
|
242
|
-
children: [/* @__PURE__ */
|
|
243
|
-
onClick: () =>
|
|
255
|
+
children: [/* @__PURE__ */ O("button", {
|
|
256
|
+
onClick: () => X(),
|
|
244
257
|
className: "inline-flex items-center gap-1.5 px-3 py-2 text-sm text-muted-foreground hover:text-foreground border border-border rounded-lg hover:hover:bg-action-primary-bg/10 transition-colors",
|
|
245
|
-
children: [/* @__PURE__ */
|
|
246
|
-
}), /* @__PURE__ */
|
|
258
|
+
children: [/* @__PURE__ */ D(T, { size: 14 }), v("channel.refresh", "Refresh")]
|
|
259
|
+
}), /* @__PURE__ */ O("button", {
|
|
247
260
|
onClick: () => h("/channels/create"),
|
|
248
261
|
className: "inline-flex items-center gap-1.5 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",
|
|
249
|
-
children: [/* @__PURE__ */
|
|
262
|
+
children: [/* @__PURE__ */ D(x, { size: 14 }), v("channel.createChannel", "Create Channel")]
|
|
250
263
|
})]
|
|
251
264
|
})]
|
|
252
265
|
}),
|
|
253
|
-
/* @__PURE__ */
|
|
254
|
-
className: "grid gap-3 grid-cols-2 lg:grid-cols-4",
|
|
266
|
+
/* @__PURE__ */ O("div", {
|
|
267
|
+
className: "grid gap-3 grid-cols-2 md:grid-cols-3 lg:grid-cols-4",
|
|
255
268
|
children: [
|
|
256
|
-
/* @__PURE__ */
|
|
257
|
-
icon:
|
|
269
|
+
/* @__PURE__ */ D(M, {
|
|
270
|
+
icon: w,
|
|
258
271
|
iconClass: "text-accent-primary",
|
|
259
|
-
value:
|
|
260
|
-
label:
|
|
261
|
-
sub: $.active > 0 ? `${$.active} ${
|
|
272
|
+
value: U,
|
|
273
|
+
label: v("channel.totalChannels", "Total Channels"),
|
|
274
|
+
sub: $.active > 0 ? `${$.active} ${v("channel.status.active", "Active").toLowerCase()}, ${U - $.active} ${v("channel.status.inactive", "Inactive").toLowerCase()}` : void 0
|
|
262
275
|
}),
|
|
263
|
-
/* @__PURE__ */
|
|
264
|
-
icon:
|
|
265
|
-
iconClass: "text-success-
|
|
276
|
+
/* @__PURE__ */ D(M, {
|
|
277
|
+
icon: ce,
|
|
278
|
+
iconClass: "text-status-success-text",
|
|
266
279
|
value: $.healthy,
|
|
267
|
-
label:
|
|
268
|
-
sub: $.unhealthy > 0 ? `${$.unhealthy} ${
|
|
280
|
+
label: v("channel.healthy", "Healthy"),
|
|
281
|
+
sub: $.unhealthy > 0 ? `${$.unhealthy} ${v("channel.health.unhealthy", "Unhealthy").toLowerCase()}` : U > 0 ? v("channel.allSystemsNominal", "All systems nominal") : void 0
|
|
269
282
|
}),
|
|
270
|
-
/* @__PURE__ */
|
|
283
|
+
/* @__PURE__ */ D(M, {
|
|
271
284
|
icon: g,
|
|
272
285
|
iconClass: "text-accent-blue",
|
|
273
286
|
value: $.connected,
|
|
274
|
-
label:
|
|
275
|
-
sub:
|
|
287
|
+
label: v("channel.connected", "Connected"),
|
|
288
|
+
sub: U > 0 ? `${U - $.connected} ${v("channel.disconnected", "Disconnected").toLowerCase()}` : void 0
|
|
276
289
|
}),
|
|
277
|
-
/* @__PURE__ */
|
|
278
|
-
icon:
|
|
290
|
+
/* @__PURE__ */ D(M, {
|
|
291
|
+
icon: oe,
|
|
279
292
|
iconClass: "text-accent-violet",
|
|
280
293
|
value: $.messages24h.toLocaleString(),
|
|
281
|
-
label:
|
|
294
|
+
label: v("channel.messages24h", "Messages (24h)")
|
|
282
295
|
})
|
|
283
296
|
]
|
|
284
297
|
}),
|
|
285
|
-
$.errored > 0 && /* @__PURE__ */
|
|
286
|
-
className: "flex items-center gap-3 p-3 border border-error-
|
|
298
|
+
$.errored > 0 && /* @__PURE__ */ O("div", {
|
|
299
|
+
className: "flex items-center gap-3 p-3 border border-status-error-border/30 bg-status-error-bg-subtle rounded-lg",
|
|
287
300
|
children: [
|
|
288
|
-
/* @__PURE__ */
|
|
301
|
+
/* @__PURE__ */ D(m, {
|
|
289
302
|
size: 16,
|
|
290
|
-
className: "text-error-
|
|
303
|
+
className: "text-status-error-text shrink-0"
|
|
291
304
|
}),
|
|
292
|
-
/* @__PURE__ */
|
|
293
|
-
className: "text-sm text-error-
|
|
305
|
+
/* @__PURE__ */ O("p", {
|
|
306
|
+
className: "text-sm text-status-error-text",
|
|
294
307
|
children: [
|
|
295
|
-
/* @__PURE__ */
|
|
308
|
+
/* @__PURE__ */ D("span", {
|
|
296
309
|
className: "font-semibold",
|
|
297
310
|
children: $.errored
|
|
298
311
|
}),
|
|
299
312
|
" ",
|
|
300
|
-
|
|
313
|
+
v($.errored === 1 ? "channel.errorStateSummarySingle" : "channel.errorStateSummaryMultiple", $.errored === 1 ? "channel in error state" : "channels in error state")
|
|
301
314
|
]
|
|
302
315
|
}),
|
|
303
|
-
/* @__PURE__ */
|
|
304
|
-
onClick: () =>
|
|
305
|
-
className: "ml-auto text-xs font-medium text-error-
|
|
306
|
-
children:
|
|
316
|
+
/* @__PURE__ */ D("button", {
|
|
317
|
+
onClick: () => G({ status: "ERROR" }),
|
|
318
|
+
className: "ml-auto text-xs font-medium text-status-error-text hover:text-status-error-text/80 transition-colors",
|
|
319
|
+
children: v("channel.showErrors", "Show errors")
|
|
307
320
|
})
|
|
308
321
|
]
|
|
309
322
|
}),
|
|
310
|
-
/* @__PURE__ */
|
|
323
|
+
/* @__PURE__ */ O("div", {
|
|
311
324
|
className: "flex flex-col gap-3 sm:flex-row sm:items-center",
|
|
312
325
|
children: [
|
|
313
|
-
/* @__PURE__ */
|
|
326
|
+
/* @__PURE__ */ O("div", {
|
|
314
327
|
className: "relative flex-1",
|
|
315
|
-
children: [/* @__PURE__ */
|
|
328
|
+
children: [/* @__PURE__ */ D(se, {
|
|
316
329
|
size: 14,
|
|
317
330
|
className: "absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground"
|
|
318
|
-
}), /* @__PURE__ */
|
|
331
|
+
}), /* @__PURE__ */ D("input", {
|
|
319
332
|
type: "text",
|
|
320
|
-
placeholder:
|
|
321
|
-
value:
|
|
322
|
-
onChange: (e) =>
|
|
333
|
+
placeholder: v("channel.searchChannels", "Search channels..."),
|
|
334
|
+
value: W.search || "",
|
|
335
|
+
onChange: (e) => G({ search: e.target.value }),
|
|
323
336
|
className: "w-full pl-9 pr-4 py-2 text-sm bg-surface border border-border rounded-lg focus:outline-none focus:ring-2 focus:ring-primary-500/50 placeholder:text-muted-foreground"
|
|
324
337
|
})]
|
|
325
338
|
}),
|
|
326
|
-
/* @__PURE__ */
|
|
327
|
-
value:
|
|
328
|
-
onChange: (e) =>
|
|
339
|
+
/* @__PURE__ */ O("select", {
|
|
340
|
+
value: W.platform || "",
|
|
341
|
+
onChange: (e) => G({ platform: e.target.value || void 0 }),
|
|
329
342
|
className: "px-3 py-2 text-sm bg-surface border border-border rounded-lg focus:outline-none focus:ring-2 focus:ring-primary-500/50 text-foreground",
|
|
330
|
-
children: [/* @__PURE__ */
|
|
343
|
+
children: [/* @__PURE__ */ D("option", {
|
|
331
344
|
value: "",
|
|
332
|
-
children:
|
|
333
|
-
}), Object.entries(
|
|
345
|
+
children: v("channel.allPlatforms", "All Platforms")
|
|
346
|
+
}), Object.entries(k).map(([e, t]) => /* @__PURE__ */ D("option", {
|
|
334
347
|
value: e,
|
|
335
348
|
children: t.label
|
|
336
349
|
}, e))]
|
|
337
350
|
}),
|
|
338
|
-
/* @__PURE__ */
|
|
339
|
-
value:
|
|
340
|
-
onChange: (e) =>
|
|
351
|
+
/* @__PURE__ */ O("select", {
|
|
352
|
+
value: W.status || "",
|
|
353
|
+
onChange: (e) => G({ status: e.target.value || void 0 }),
|
|
341
354
|
className: "px-3 py-2 text-sm bg-surface border border-border rounded-lg focus:outline-none focus:ring-2 focus:ring-primary-500/50 text-foreground",
|
|
342
|
-
children: [/* @__PURE__ */
|
|
355
|
+
children: [/* @__PURE__ */ D("option", {
|
|
343
356
|
value: "",
|
|
344
|
-
children:
|
|
345
|
-
}), Object.entries(
|
|
357
|
+
children: v("channel.allStatus", "All Status")
|
|
358
|
+
}), Object.entries(A).map(([e, t]) => /* @__PURE__ */ D("option", {
|
|
346
359
|
value: e,
|
|
347
360
|
children: t.label
|
|
348
361
|
}, e))]
|
|
349
362
|
})
|
|
350
363
|
]
|
|
351
364
|
}),
|
|
352
|
-
|
|
353
|
-
className: "flex items-center gap-3 p-4 bg-error-
|
|
365
|
+
H && /* @__PURE__ */ O("div", {
|
|
366
|
+
className: "flex items-center gap-3 p-4 bg-status-error-bg-subtle border border-status-error-border/30 rounded-lg",
|
|
354
367
|
children: [
|
|
355
|
-
/* @__PURE__ */
|
|
368
|
+
/* @__PURE__ */ D(m, {
|
|
356
369
|
size: 18,
|
|
357
|
-
className: "text-error-
|
|
370
|
+
className: "text-status-error-text shrink-0"
|
|
358
371
|
}),
|
|
359
|
-
/* @__PURE__ */
|
|
372
|
+
/* @__PURE__ */ O("div", {
|
|
360
373
|
className: "flex-1 min-w-0",
|
|
361
|
-
children: [/* @__PURE__ */
|
|
362
|
-
className: "text-sm font-medium text-error-
|
|
363
|
-
children:
|
|
364
|
-
}), /* @__PURE__ */
|
|
365
|
-
className: "text-xs text-error-
|
|
366
|
-
children:
|
|
374
|
+
children: [/* @__PURE__ */ D("p", {
|
|
375
|
+
className: "text-sm font-medium text-status-error-text",
|
|
376
|
+
children: v("channel.loadFailed", "Failed to load channels")
|
|
377
|
+
}), /* @__PURE__ */ D("p", {
|
|
378
|
+
className: "text-xs text-status-error-text/70 truncate",
|
|
379
|
+
children: H
|
|
367
380
|
})]
|
|
368
381
|
}),
|
|
369
|
-
/* @__PURE__ */
|
|
370
|
-
onClick: () =>
|
|
371
|
-
className: "shrink-0 px-3 py-1 text-sm text-error-
|
|
372
|
-
children:
|
|
382
|
+
/* @__PURE__ */ D("button", {
|
|
383
|
+
onClick: () => X(),
|
|
384
|
+
className: "shrink-0 px-3 py-1 text-sm text-status-error-text hover:bg-status-error-bg-subtle rounded transition-colors",
|
|
385
|
+
children: v("channel.retry", "Retry")
|
|
373
386
|
})
|
|
374
387
|
]
|
|
375
388
|
}),
|
|
376
|
-
|
|
389
|
+
V && B.length === 0 && /* @__PURE__ */ D("div", {
|
|
377
390
|
className: "flex items-center justify-center py-16",
|
|
378
|
-
children: /* @__PURE__ */
|
|
391
|
+
children: /* @__PURE__ */ D(b, {
|
|
379
392
|
size: 28,
|
|
380
393
|
className: "animate-spin text-accent-primary"
|
|
381
394
|
})
|
|
382
395
|
}),
|
|
383
|
-
!
|
|
396
|
+
!V && !H && B.length === 0 && /* @__PURE__ */ O("div", {
|
|
384
397
|
className: "flex flex-col items-center justify-center py-16 text-center",
|
|
385
398
|
children: [
|
|
386
|
-
/* @__PURE__ */
|
|
399
|
+
/* @__PURE__ */ D("div", {
|
|
387
400
|
className: "p-3 rounded-full bg-accent-primary/10 mb-4",
|
|
388
|
-
children: /* @__PURE__ */
|
|
401
|
+
children: /* @__PURE__ */ D(w, {
|
|
389
402
|
size: 36,
|
|
390
403
|
className: "text-accent-primary"
|
|
391
404
|
})
|
|
392
405
|
}),
|
|
393
|
-
/* @__PURE__ */
|
|
406
|
+
/* @__PURE__ */ D("h3", {
|
|
394
407
|
className: "text-lg font-semibold text-foreground mb-1",
|
|
395
|
-
children:
|
|
408
|
+
children: W.search || W.platform || W.status ? v("channel.noChannelsMatchFilter", "No channels match your filters") : v("channel.noChannels", "No channels yet")
|
|
396
409
|
}),
|
|
397
|
-
/* @__PURE__ */
|
|
410
|
+
/* @__PURE__ */ D("p", {
|
|
398
411
|
className: "text-sm text-muted-foreground max-w-sm mb-5",
|
|
399
|
-
children:
|
|
412
|
+
children: W.search || W.platform || W.status ? v("channel.adjustFilters", "Try adjusting your search or filters.") : v("channel.createFirstChannel", "Create your first communication channel to start sending messages across Email, SMS, Push, Slack and more.")
|
|
400
413
|
}),
|
|
401
|
-
!(
|
|
414
|
+
!(W.search || W.platform || W.status) && /* @__PURE__ */ O("button", {
|
|
402
415
|
onClick: () => h("/channels/create"),
|
|
403
416
|
className: "inline-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",
|
|
404
|
-
children: [/* @__PURE__ */
|
|
417
|
+
children: [/* @__PURE__ */ D(x, { size: 14 }), v("channel.createChannel", "Create Channel")]
|
|
405
418
|
})
|
|
406
419
|
]
|
|
407
420
|
}),
|
|
408
|
-
|
|
421
|
+
B.length > 0 && /* @__PURE__ */ O("div", {
|
|
409
422
|
className: "border border-border rounded-lg overflow-hidden",
|
|
410
|
-
children: [/* @__PURE__ */
|
|
423
|
+
children: [/* @__PURE__ */ D("div", {
|
|
411
424
|
className: "overflow-x-auto min-w-full",
|
|
412
|
-
children: /* @__PURE__ */
|
|
425
|
+
children: /* @__PURE__ */ O("table", {
|
|
413
426
|
className: "w-full text-sm min-w-[800px]",
|
|
414
|
-
children: [/* @__PURE__ */
|
|
427
|
+
children: [/* @__PURE__ */ D("thead", { children: /* @__PURE__ */ O("tr", {
|
|
415
428
|
className: "hover:bg-action-primary-bg/10/50 border-b border-border",
|
|
416
429
|
children: [
|
|
417
|
-
/* @__PURE__ */
|
|
430
|
+
/* @__PURE__ */ D("th", {
|
|
418
431
|
className: "text-left px-4 py-3 text-xs font-medium text-muted-foreground uppercase tracking-wider",
|
|
419
|
-
children:
|
|
432
|
+
children: v("channel.channel", "Channel")
|
|
420
433
|
}),
|
|
421
|
-
/* @__PURE__ */
|
|
434
|
+
/* @__PURE__ */ D("th", {
|
|
422
435
|
className: "text-left px-4 py-3 text-xs font-medium text-muted-foreground uppercase tracking-wider",
|
|
423
|
-
children:
|
|
436
|
+
children: v("channel.platform", "Platform")
|
|
424
437
|
}),
|
|
425
|
-
/* @__PURE__ */
|
|
438
|
+
/* @__PURE__ */ D("th", {
|
|
426
439
|
className: "text-left px-4 py-3 text-xs font-medium text-muted-foreground uppercase tracking-wider",
|
|
427
|
-
children:
|
|
440
|
+
children: v("channel.status", "Status")
|
|
428
441
|
}),
|
|
429
|
-
/* @__PURE__ */
|
|
442
|
+
/* @__PURE__ */ D("th", {
|
|
430
443
|
className: "text-left px-4 py-3 text-xs font-medium text-muted-foreground uppercase tracking-wider",
|
|
431
|
-
children:
|
|
444
|
+
children: v("channel.health", "Health")
|
|
432
445
|
}),
|
|
433
|
-
/* @__PURE__ */
|
|
446
|
+
/* @__PURE__ */ D("th", {
|
|
434
447
|
className: "text-left px-4 py-3 text-xs font-medium text-muted-foreground uppercase tracking-wider",
|
|
435
|
-
children:
|
|
448
|
+
children: v("channel.connection", "Connection")
|
|
436
449
|
}),
|
|
437
|
-
/* @__PURE__ */
|
|
450
|
+
/* @__PURE__ */ D("th", {
|
|
438
451
|
className: "text-right px-4 py-3 text-xs font-medium text-muted-foreground uppercase tracking-wider",
|
|
439
|
-
children:
|
|
452
|
+
children: v("channel.msgs24h", "Msgs 24h")
|
|
440
453
|
}),
|
|
441
|
-
/* @__PURE__ */
|
|
454
|
+
/* @__PURE__ */ D("th", {
|
|
442
455
|
className: "text-right px-4 py-3 text-xs font-medium text-muted-foreground uppercase tracking-wider",
|
|
443
|
-
children:
|
|
456
|
+
children: v("channel.updated", "Updated")
|
|
444
457
|
}),
|
|
445
|
-
/* @__PURE__ */
|
|
458
|
+
/* @__PURE__ */ D("th", {
|
|
446
459
|
className: "text-right px-4 py-3 text-xs font-medium text-muted-foreground uppercase tracking-wider",
|
|
447
|
-
children:
|
|
460
|
+
children: v("channel.actions", "Actions")
|
|
448
461
|
})
|
|
449
462
|
]
|
|
450
|
-
}) }), /* @__PURE__ */
|
|
463
|
+
}) }), /* @__PURE__ */ D("tbody", {
|
|
451
464
|
className: "divide-y divide-border",
|
|
452
|
-
children:
|
|
453
|
-
let t =
|
|
454
|
-
return /* @__PURE__ */
|
|
465
|
+
children: B.map((e) => {
|
|
466
|
+
let t = fe === e.id;
|
|
467
|
+
return /* @__PURE__ */ O("tr", {
|
|
455
468
|
className: "bg-surface hover:hover:bg-action-primary-bg/10/60 transition-colors group",
|
|
456
469
|
children: [
|
|
457
|
-
/* @__PURE__ */
|
|
470
|
+
/* @__PURE__ */ D("td", {
|
|
458
471
|
className: "px-4 py-3",
|
|
459
|
-
children: /* @__PURE__ */
|
|
472
|
+
children: /* @__PURE__ */ O("button", {
|
|
460
473
|
onClick: () => h(`/channels/${e.id}`),
|
|
461
474
|
className: "text-left group/name",
|
|
462
|
-
children: [/* @__PURE__ */
|
|
475
|
+
children: [/* @__PURE__ */ D("p", {
|
|
463
476
|
className: "font-medium text-foreground group-hover/name:text-accent-primary transition-colors truncate max-w-[200px]",
|
|
464
477
|
children: e.name
|
|
465
|
-
}), e.description && /* @__PURE__ */
|
|
478
|
+
}), e.description && /* @__PURE__ */ D("p", {
|
|
466
479
|
className: "text-xs text-muted-foreground truncate max-w-[200px]",
|
|
467
480
|
children: e.description
|
|
468
481
|
})]
|
|
469
482
|
})
|
|
470
483
|
}),
|
|
471
|
-
/* @__PURE__ */
|
|
484
|
+
/* @__PURE__ */ O("td", {
|
|
472
485
|
className: "px-4 py-3",
|
|
473
|
-
children: [/* @__PURE__ */
|
|
474
|
-
className: `inline-flex items-center px-2 py-0.5 text-[11px] font-semibold rounded-full ${
|
|
475
|
-
children:
|
|
476
|
-
}), e.adapterType && /* @__PURE__ */
|
|
486
|
+
children: [/* @__PURE__ */ D("span", {
|
|
487
|
+
className: `inline-flex items-center px-2 py-0.5 text-[11px] font-semibold rounded-full ${L(e.platform).color}`,
|
|
488
|
+
children: L(e.platform).label
|
|
489
|
+
}), e.adapterType && /* @__PURE__ */ D("p", {
|
|
477
490
|
className: "text-[10px] text-muted-foreground mt-0.5 font-mono",
|
|
478
491
|
children: e.adapterType.replace(/_/g, " ")
|
|
479
492
|
})]
|
|
480
493
|
}),
|
|
481
|
-
/* @__PURE__ */
|
|
494
|
+
/* @__PURE__ */ D("td", {
|
|
482
495
|
className: "px-4 py-3",
|
|
483
|
-
children: /* @__PURE__ */
|
|
496
|
+
children: /* @__PURE__ */ O("span", {
|
|
484
497
|
className: "inline-flex items-center gap-1.5",
|
|
485
|
-
children: [/* @__PURE__ */
|
|
486
|
-
className: `text-xs ${
|
|
487
|
-
children:
|
|
498
|
+
children: [/* @__PURE__ */ D("span", { className: `w-1.5 h-1.5 rounded-full ${R(e.status).dotColor}` }), /* @__PURE__ */ D("span", {
|
|
499
|
+
className: `text-xs ${R(e.status).textColor}`,
|
|
500
|
+
children: R(e.status).label
|
|
488
501
|
})]
|
|
489
502
|
})
|
|
490
503
|
}),
|
|
491
|
-
/* @__PURE__ */
|
|
504
|
+
/* @__PURE__ */ D("td", {
|
|
492
505
|
className: "px-4 py-3",
|
|
493
|
-
children: /* @__PURE__ */
|
|
494
|
-
className: `inline-flex items-center gap-1 text-xs ${
|
|
506
|
+
children: /* @__PURE__ */ O("span", {
|
|
507
|
+
className: `inline-flex items-center gap-1 text-xs ${z(e.connectionHealth).color}`,
|
|
495
508
|
children: [(() => {
|
|
496
|
-
let t =
|
|
497
|
-
return /* @__PURE__ */
|
|
498
|
-
})(),
|
|
509
|
+
let t = z(e.connectionHealth).icon;
|
|
510
|
+
return /* @__PURE__ */ D(t, { size: 12 });
|
|
511
|
+
})(), z(e.connectionHealth).label]
|
|
499
512
|
})
|
|
500
513
|
}),
|
|
501
|
-
/* @__PURE__ */
|
|
514
|
+
/* @__PURE__ */ D("td", {
|
|
502
515
|
className: "px-4 py-3",
|
|
503
|
-
children: /* @__PURE__ */
|
|
504
|
-
className: `text-xs ${e.isConnected ? "text-success-
|
|
505
|
-
children: e.isConnected ?
|
|
516
|
+
children: /* @__PURE__ */ D("span", {
|
|
517
|
+
className: `text-xs ${e.isConnected ? "text-status-success-text" : "text-muted-foreground"}`,
|
|
518
|
+
children: e.isConnected ? v("channel.connected", "Connected") : v("channel.disconnected", "Disconnected")
|
|
506
519
|
})
|
|
507
520
|
}),
|
|
508
|
-
/* @__PURE__ */
|
|
521
|
+
/* @__PURE__ */ D("td", {
|
|
509
522
|
className: "px-4 py-3 text-right",
|
|
510
|
-
children: /* @__PURE__ */
|
|
523
|
+
children: /* @__PURE__ */ D("span", {
|
|
511
524
|
className: "text-xs text-foreground tabular-nums",
|
|
512
525
|
children: (e.messageCount24h ?? 0).toLocaleString()
|
|
513
526
|
})
|
|
514
527
|
}),
|
|
515
|
-
/* @__PURE__ */
|
|
528
|
+
/* @__PURE__ */ D("td", {
|
|
516
529
|
className: "px-4 py-3 text-right",
|
|
517
|
-
children: /* @__PURE__ */
|
|
530
|
+
children: /* @__PURE__ */ D("span", {
|
|
518
531
|
className: "text-xs text-muted-foreground whitespace-nowrap",
|
|
519
|
-
children:
|
|
532
|
+
children: de(e.updatedAt)
|
|
520
533
|
})
|
|
521
534
|
}),
|
|
522
|
-
/* @__PURE__ */
|
|
535
|
+
/* @__PURE__ */ D("td", {
|
|
523
536
|
className: "px-4 py-3",
|
|
524
|
-
children: /* @__PURE__ */
|
|
537
|
+
children: /* @__PURE__ */ O("div", {
|
|
525
538
|
className: "flex items-center justify-end gap-0.5 opacity-0 group-hover:opacity-100 transition-opacity",
|
|
526
539
|
children: [
|
|
527
|
-
/* @__PURE__ */
|
|
540
|
+
/* @__PURE__ */ D("button", {
|
|
528
541
|
onClick: () => h(`/channels/${e.id}`),
|
|
529
542
|
className: "p-1.5 text-muted-foreground hover:text-accent-primary hover:bg-accent-primary/10 rounded transition-colors",
|
|
530
|
-
title:
|
|
531
|
-
children: /* @__PURE__ */
|
|
543
|
+
title: v("channel.view", "View"),
|
|
544
|
+
children: /* @__PURE__ */ D(ae, { size: 14 })
|
|
532
545
|
}),
|
|
533
|
-
/* @__PURE__ */
|
|
546
|
+
/* @__PURE__ */ D(s, {
|
|
534
547
|
permission: c.CHANNEL_EXECUTE,
|
|
535
|
-
children: /* @__PURE__ */
|
|
536
|
-
onClick: () =>
|
|
548
|
+
children: /* @__PURE__ */ D("button", {
|
|
549
|
+
onClick: () => he(e.id),
|
|
537
550
|
disabled: t,
|
|
538
551
|
className: "p-1.5 text-muted-foreground hover:text-accent-blue hover:bg-accent-blue-subtle rounded transition-colors disabled:opacity-40",
|
|
539
|
-
title:
|
|
540
|
-
children: t ? /* @__PURE__ */
|
|
552
|
+
title: v("channel.healthCheck", "Health Check"),
|
|
553
|
+
children: t ? /* @__PURE__ */ D(b, {
|
|
541
554
|
size: 14,
|
|
542
555
|
className: "animate-spin"
|
|
543
|
-
}) : /* @__PURE__ */
|
|
556
|
+
}) : /* @__PURE__ */ D(T, { size: 14 })
|
|
544
557
|
})
|
|
545
558
|
}),
|
|
546
|
-
/* @__PURE__ */
|
|
559
|
+
/* @__PURE__ */ D(s, {
|
|
547
560
|
permission: c.CHANNEL_UPDATE,
|
|
548
|
-
children: /* @__PURE__ */
|
|
549
|
-
onClick: () =>
|
|
561
|
+
children: /* @__PURE__ */ D("button", {
|
|
562
|
+
onClick: () => me(e),
|
|
550
563
|
disabled: t,
|
|
551
|
-
className: `p-1.5 rounded transition-colors disabled:opacity-40 ${e.status === "ACTIVE" ? "text-muted-foreground hover:text-warning-
|
|
552
|
-
title: e.status === "ACTIVE" ?
|
|
553
|
-
children: e.status === "ACTIVE" ? /* @__PURE__ */
|
|
564
|
+
className: `p-1.5 rounded transition-colors disabled:opacity-40 ${e.status === "ACTIVE" ? "text-muted-foreground hover:text-status-warning-text hover:bg-warning-500/10" : "text-muted-foreground hover:text-status-success-text hover:bg-success-500/10"}`,
|
|
565
|
+
title: e.status === "ACTIVE" ? v("channel.deactivate", "Deactivate") : v("channel.activate", "Activate"),
|
|
566
|
+
children: e.status === "ACTIVE" ? /* @__PURE__ */ D(C, { size: 14 }) : /* @__PURE__ */ D(S, { size: 14 })
|
|
554
567
|
})
|
|
555
568
|
}),
|
|
556
|
-
|
|
569
|
+
E === e.id ? /* @__PURE__ */ O("span", {
|
|
557
570
|
className: "inline-flex items-center gap-1 ml-1",
|
|
558
|
-
children: [/* @__PURE__ */
|
|
559
|
-
onClick: () =>
|
|
571
|
+
children: [/* @__PURE__ */ D("button", {
|
|
572
|
+
onClick: () => pe(e.id),
|
|
560
573
|
disabled: t,
|
|
561
|
-
className: "px-1.5 py-0.5 text-[11px] font-medium text-error-
|
|
562
|
-
children: t ? "..." :
|
|
563
|
-
}), /* @__PURE__ */
|
|
564
|
-
onClick: () =>
|
|
574
|
+
className: "px-1.5 py-0.5 text-[11px] font-medium text-status-error-text hover:bg-status-error-bg-subtle rounded transition-colors",
|
|
575
|
+
children: t ? "..." : v("channel.yes", "Yes")
|
|
576
|
+
}), /* @__PURE__ */ D("button", {
|
|
577
|
+
onClick: () => N(null),
|
|
565
578
|
className: "px-1.5 py-0.5 text-[11px] text-muted-foreground hover:hover:bg-action-primary-bg/10 rounded transition-colors",
|
|
566
|
-
children:
|
|
579
|
+
children: v("channel.no", "No")
|
|
567
580
|
})]
|
|
568
|
-
}) : /* @__PURE__ */
|
|
581
|
+
}) : /* @__PURE__ */ D(s, {
|
|
569
582
|
permission: c.CHANNEL_DELETE,
|
|
570
|
-
children: /* @__PURE__ */
|
|
571
|
-
onClick: () =>
|
|
572
|
-
className: "p-1.5 text-muted-foreground hover:text-error-
|
|
573
|
-
title:
|
|
574
|
-
children: /* @__PURE__ */
|
|
583
|
+
children: /* @__PURE__ */ D("button", {
|
|
584
|
+
onClick: () => N(e.id),
|
|
585
|
+
className: "p-1.5 text-muted-foreground hover:text-status-error-text hover:bg-status-error-bg-subtle rounded transition-colors",
|
|
586
|
+
title: v("channel.delete", "Delete"),
|
|
587
|
+
children: /* @__PURE__ */ D(le, { size: 14 })
|
|
575
588
|
})
|
|
576
589
|
})
|
|
577
590
|
]
|
|
@@ -582,89 +595,109 @@ function I() {
|
|
|
582
595
|
})
|
|
583
596
|
})]
|
|
584
597
|
})
|
|
585
|
-
}), /* @__PURE__ */
|
|
586
|
-
className: "px-4 py-2.5
|
|
587
|
-
children: [/* @__PURE__ */
|
|
598
|
+
}), /* @__PURE__ */ O("div", {
|
|
599
|
+
className: "px-4 py-2.5 border-t border-border flex items-center justify-between",
|
|
600
|
+
children: [/* @__PURE__ */ O("p", {
|
|
588
601
|
className: "text-xs text-muted-foreground",
|
|
589
602
|
children: [
|
|
590
|
-
|
|
603
|
+
v("channel.showing", "Showing"),
|
|
591
604
|
" ",
|
|
592
|
-
/* @__PURE__ */
|
|
605
|
+
/* @__PURE__ */ O("span", {
|
|
593
606
|
className: "font-medium text-foreground",
|
|
594
|
-
children:
|
|
607
|
+
children: [
|
|
608
|
+
U === 0 ? 0 : F * 10 + 1,
|
|
609
|
+
"–",
|
|
610
|
+
Math.min((F + 1) * 10, U)
|
|
611
|
+
]
|
|
595
612
|
}),
|
|
596
613
|
" ",
|
|
597
|
-
|
|
614
|
+
v("channel.of", "of"),
|
|
598
615
|
" ",
|
|
599
|
-
/* @__PURE__ */
|
|
616
|
+
/* @__PURE__ */ D("span", {
|
|
600
617
|
className: "font-medium text-foreground",
|
|
601
|
-
children:
|
|
618
|
+
children: U
|
|
602
619
|
}),
|
|
603
620
|
" ",
|
|
604
|
-
|
|
621
|
+
v("channel.channelsLower", "channels")
|
|
605
622
|
]
|
|
606
|
-
}),
|
|
607
|
-
|
|
608
|
-
className: "inline-flex items-center gap-1 text-xs font-medium text-accent-primary hover:text-action-primary-bg transition-colors",
|
|
623
|
+
}), /* @__PURE__ */ O("div", {
|
|
624
|
+
className: "flex items-center gap-2",
|
|
609
625
|
children: [
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
626
|
+
/* @__PURE__ */ D("button", {
|
|
627
|
+
onClick: () => I((e) => Math.max(0, e - 1)),
|
|
628
|
+
disabled: F === 0,
|
|
629
|
+
className: "px-2.5 py-1 text-xs border border-border rounded hover:bg-muted transition-colors disabled:opacity-40 disabled:cursor-not-allowed",
|
|
630
|
+
children: v("channel.previous", "Prev")
|
|
631
|
+
}),
|
|
632
|
+
/* @__PURE__ */ O("span", {
|
|
633
|
+
className: "text-xs text-muted-foreground",
|
|
634
|
+
children: [
|
|
635
|
+
F + 1,
|
|
636
|
+
" / ",
|
|
637
|
+
Z
|
|
638
|
+
]
|
|
639
|
+
}),
|
|
640
|
+
/* @__PURE__ */ D("button", {
|
|
641
|
+
onClick: () => I((e) => Math.min(Z - 1, e + 1)),
|
|
642
|
+
disabled: F >= Z - 1,
|
|
643
|
+
className: "px-2.5 py-1 text-xs border border-border rounded hover:bg-muted transition-colors disabled:opacity-40 disabled:cursor-not-allowed",
|
|
644
|
+
children: v("channel.next", "Next")
|
|
645
|
+
})
|
|
613
646
|
]
|
|
614
647
|
})]
|
|
615
648
|
})]
|
|
616
649
|
}),
|
|
617
|
-
|
|
650
|
+
B.length > 0 && /* @__PURE__ */ O("div", {
|
|
618
651
|
className: "grid gap-3 sm:grid-cols-3",
|
|
619
652
|
children: [
|
|
620
|
-
/* @__PURE__ */
|
|
653
|
+
/* @__PURE__ */ O("button", {
|
|
621
654
|
onClick: () => h("/channels/?tab=all"),
|
|
622
655
|
className: "flex items-center gap-3 p-3 bg-surface border border-border rounded-lg hover:hover:bg-action-primary-bg/10 transition-colors text-left",
|
|
623
|
-
children: [/* @__PURE__ */
|
|
656
|
+
children: [/* @__PURE__ */ D(w, {
|
|
624
657
|
size: 16,
|
|
625
658
|
className: "text-accent-primary shrink-0"
|
|
626
|
-
}), /* @__PURE__ */
|
|
659
|
+
}), /* @__PURE__ */ O("div", {
|
|
627
660
|
className: "min-w-0",
|
|
628
|
-
children: [/* @__PURE__ */
|
|
661
|
+
children: [/* @__PURE__ */ D("p", {
|
|
629
662
|
className: "text-sm font-medium text-foreground",
|
|
630
|
-
children:
|
|
631
|
-
}), /* @__PURE__ */
|
|
663
|
+
children: v("channel.allChannels", "All Channels")
|
|
664
|
+
}), /* @__PURE__ */ D("p", {
|
|
632
665
|
className: "text-xs text-muted-foreground truncate",
|
|
633
|
-
children:
|
|
666
|
+
children: v("channel.browseChannels", "Browse and manage channel cards")
|
|
634
667
|
})]
|
|
635
668
|
})]
|
|
636
669
|
}),
|
|
637
|
-
/* @__PURE__ */
|
|
670
|
+
/* @__PURE__ */ O("button", {
|
|
638
671
|
onClick: () => h("/channels/?tab=connections"),
|
|
639
672
|
className: "flex items-center gap-3 p-3 bg-surface border border-border rounded-lg hover:hover:bg-action-primary-bg/10 transition-colors text-left",
|
|
640
|
-
children: [/* @__PURE__ */
|
|
673
|
+
children: [/* @__PURE__ */ D(g, {
|
|
641
674
|
size: 16,
|
|
642
675
|
className: "text-accent-blue shrink-0"
|
|
643
|
-
}), /* @__PURE__ */
|
|
676
|
+
}), /* @__PURE__ */ O("div", {
|
|
644
677
|
className: "min-w-0",
|
|
645
|
-
children: [/* @__PURE__ */
|
|
678
|
+
children: [/* @__PURE__ */ D("p", {
|
|
646
679
|
className: "text-sm font-medium text-foreground",
|
|
647
|
-
children:
|
|
648
|
-
}), /* @__PURE__ */
|
|
680
|
+
children: v("channel.connections", "Connections")
|
|
681
|
+
}), /* @__PURE__ */ D("p", {
|
|
649
682
|
className: "text-xs text-muted-foreground truncate",
|
|
650
|
-
children:
|
|
683
|
+
children: v("channel.connectionsSubtitle", "OAuth, API keys & credentials")
|
|
651
684
|
})]
|
|
652
685
|
})]
|
|
653
686
|
}),
|
|
654
|
-
/* @__PURE__ */
|
|
687
|
+
/* @__PURE__ */ O("button", {
|
|
655
688
|
onClick: () => h("/channels/?tab=send"),
|
|
656
689
|
className: "flex items-center gap-3 p-3 bg-surface border border-border rounded-lg hover:hover:bg-action-primary-bg/10 transition-colors text-left",
|
|
657
|
-
children: [/* @__PURE__ */
|
|
690
|
+
children: [/* @__PURE__ */ D(p, {
|
|
658
691
|
size: 16,
|
|
659
692
|
className: "text-accent-violet shrink-0"
|
|
660
|
-
}), /* @__PURE__ */
|
|
693
|
+
}), /* @__PURE__ */ O("div", {
|
|
661
694
|
className: "min-w-0",
|
|
662
|
-
children: [/* @__PURE__ */
|
|
695
|
+
children: [/* @__PURE__ */ D("p", {
|
|
663
696
|
className: "text-sm font-medium text-foreground",
|
|
664
|
-
children:
|
|
665
|
-
}), /* @__PURE__ */
|
|
697
|
+
children: v("channel.sendMessage", "Send Message")
|
|
698
|
+
}), /* @__PURE__ */ D("p", {
|
|
666
699
|
className: "text-xs text-muted-foreground truncate",
|
|
667
|
-
children:
|
|
700
|
+
children: v("channel.sendMessageSubtitle", "Send a test or one-off notification")
|
|
668
701
|
})]
|
|
669
702
|
})]
|
|
670
703
|
})
|
|
@@ -675,6 +708,6 @@ function I() {
|
|
|
675
708
|
});
|
|
676
709
|
}
|
|
677
710
|
//#endregion
|
|
678
|
-
export {
|
|
711
|
+
export { N as ChannelDashboardPage };
|
|
679
712
|
|
|
680
713
|
//# sourceMappingURL=ChannelDashboardPage.js.map
|