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