@burdenoff/microfe-channel 2026.625.2 → 2026.626.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/channel/modules/channels/pages/ChannelDashboardPage.js +19 -12
- package/dist/channel/modules/channels/pages/ChannelDashboardPage.js.map +1 -1
- package/dist/channel/modules/channels/pages/ChannelDetailsPage.js +407 -353
- package/dist/channel/modules/channels/pages/ChannelDetailsPage.js.map +1 -1
- package/dist/channel/modules/channels/pages/ChannelSettingsPage.js +93 -87
- package/dist/channel/modules/channels/pages/ChannelSettingsPage.js.map +1 -1
- package/dist/channel/modules/channels/pages/ChannelUsersPage.js +154 -134
- package/dist/channel/modules/channels/pages/ChannelUsersPage.js.map +1 -1
- package/dist/channel/modules/channels/pages/ChannelsListPage.js +279 -244
- package/dist/channel/modules/channels/pages/ChannelsListPage.js.map +1 -1
- package/dist/channel/modules/channels/pages/ConnectionDetailsPage.js +277 -232
- package/dist/channel/modules/channels/pages/ConnectionDetailsPage.js.map +1 -1
- package/dist/channel/modules/channels/pages/ConnectionsListPage.js +159 -129
- package/dist/channel/modules/channels/pages/ConnectionsListPage.js.map +1 -1
- package/dist/channel/modules/channels/pages/CreateChannelPage.js +28 -22
- package/dist/channel/modules/channels/pages/CreateChannelPage.js.map +1 -1
- package/dist/channel/modules/channels/pages/CreateConnectionPage.js +72 -65
- package/dist/channel/modules/channels/pages/CreateConnectionPage.js.map +1 -1
- package/dist/channel/modules/channels/pages/DeliveryHistoryPage.js +99 -79
- package/dist/channel/modules/channels/pages/DeliveryHistoryPage.js.map +1 -1
- package/dist/channel/modules/channels/pages/EditChannelPage.js +154 -148
- package/dist/channel/modules/channels/pages/EditChannelPage.js.map +1 -1
- package/dist/channel/modules/channels/pages/EditConnectionPage.js +69 -62
- package/dist/channel/modules/channels/pages/EditConnectionPage.js.map +1 -1
- package/dist/channel/modules/channels/pages/SendMessagePage.js +131 -124
- package/dist/channel/modules/channels/pages/SendMessagePage.js.map +1 -1
- package/dist/channel/modules/channels/pages/WebhookEventsPage.js +174 -154
- package/dist/channel/modules/channels/pages/WebhookEventsPage.js.map +1 -1
- package/package.json +2 -2
|
@@ -8,14 +8,14 @@ import { HEALTH_I18N as ee, PLATFORM_I18N as te, STATUS_I18N as ne, translateLab
|
|
|
8
8
|
import { useExportChannels as re } from "../hooks/useExport.js";
|
|
9
9
|
import { useEffect as u, useMemo as d, useRef as ie, useState as f } from "react";
|
|
10
10
|
import { useI18n as ae } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
11
|
-
import { AlertCircle as p, AlertTriangle as m, CheckCircle2 as h, Download as oe, Eye as se, HelpCircle as g, Loader2 as _, Pencil as ce, Plus as
|
|
12
|
-
import { useNavigate as
|
|
13
|
-
import { usePermissions as
|
|
14
|
-
import { jsx as
|
|
15
|
-
import { CTAOverflowMenu as _e, GlassCard as
|
|
11
|
+
import { AlertCircle as p, AlertTriangle as m, CheckCircle2 as h, Download as oe, Eye as se, HelpCircle as g, Loader2 as _, Pencil as ce, Plus as v, Power as le, PowerOff as y, Radio as ue, RefreshCw as de, Search as fe, Trash2 as pe, XCircle as b } from "lucide-react";
|
|
12
|
+
import { useNavigate as me } from "react-router-dom";
|
|
13
|
+
import { usePermissions as he } from "@burdenoff/fe-libs/shared/providers/shell";
|
|
14
|
+
import { jsx as x, jsxs as S } from "react/jsx-runtime";
|
|
15
|
+
import { CTAOverflowMenu as ge, EmphasisPanel as _e, GlassCard as C, IllustratedEmptyState as ve, PagePurpose as ye } from "@burdenoff/fe-libs/ui";
|
|
16
16
|
import { TagBadge as be } from "@burdenoff/fe-libs/tag";
|
|
17
17
|
//#region src/channel/modules/channels/pages/ChannelsListPage.tsx
|
|
18
|
-
var
|
|
18
|
+
var w = {
|
|
19
19
|
EMAIL: {
|
|
20
20
|
label: "Email",
|
|
21
21
|
color: "bg-accent-blue-subtle text-accent-blue"
|
|
@@ -56,7 +56,7 @@ var S = {
|
|
|
56
56
|
label: "Webchat",
|
|
57
57
|
color: "bg-accent-teal-subtle text-accent-teal"
|
|
58
58
|
}
|
|
59
|
-
},
|
|
59
|
+
}, T = {
|
|
60
60
|
ACTIVE: {
|
|
61
61
|
label: "Active",
|
|
62
62
|
color: "text-status-success-text bg-status-success-bg-subtle",
|
|
@@ -65,12 +65,12 @@ var S = {
|
|
|
65
65
|
INACTIVE: {
|
|
66
66
|
label: "Inactive",
|
|
67
67
|
color: "text-text-secondary bg-bg-sunken",
|
|
68
|
-
icon:
|
|
68
|
+
icon: y
|
|
69
69
|
},
|
|
70
70
|
ERROR: {
|
|
71
71
|
label: "Error",
|
|
72
72
|
color: "text-status-error-text bg-status-error-bg-subtle",
|
|
73
|
-
icon:
|
|
73
|
+
icon: b
|
|
74
74
|
},
|
|
75
75
|
SUSPENDED: {
|
|
76
76
|
label: "Suspended",
|
|
@@ -80,9 +80,9 @@ var S = {
|
|
|
80
80
|
ARCHIVED: {
|
|
81
81
|
label: "Archived",
|
|
82
82
|
color: "text-text-secondary bg-bg-sunken",
|
|
83
|
-
icon:
|
|
83
|
+
icon: y
|
|
84
84
|
}
|
|
85
|
-
},
|
|
85
|
+
}, E = {
|
|
86
86
|
HEALTHY: {
|
|
87
87
|
label: "Healthy",
|
|
88
88
|
color: "text-status-success-text",
|
|
@@ -96,7 +96,7 @@ var S = {
|
|
|
96
96
|
UNHEALTHY: {
|
|
97
97
|
label: "Unhealthy",
|
|
98
98
|
color: "text-status-error-text",
|
|
99
|
-
icon:
|
|
99
|
+
icon: b
|
|
100
100
|
},
|
|
101
101
|
UNKNOWN: {
|
|
102
102
|
label: "Unknown",
|
|
@@ -104,24 +104,24 @@ var S = {
|
|
|
104
104
|
icon: g
|
|
105
105
|
}
|
|
106
106
|
};
|
|
107
|
-
function
|
|
108
|
-
let m =
|
|
107
|
+
function D() {
|
|
108
|
+
let m = me(), { hasPermission: h } = he(), g = h(c.CHANNEL_CREATE), b = h(c.CHANNEL_UPDATE), D = h(c.CHANNEL_EXPORT), { t: xe } = ae(), O = (e, t) => {
|
|
109
109
|
let n = xe(e);
|
|
110
110
|
return n === e ? t : n;
|
|
111
|
-
}, [Se,
|
|
111
|
+
}, [Se, k] = f(null), [Ce, A] = f(null), [j, M] = f(/* @__PURE__ */ new Set()), [N, P] = f(null), { organizationId: we } = e(), { triggerExport: Te, isExporting: F, exportError: I } = re(we ?? void 0), [L] = f(12), [R, z] = f(0), { channels: B, isLoading: V, error: H, total: U, filter: W, updateFilter: G, deleteChannel: K, activateChannel: q, deactivateChannel: Ee, runHealthCheck: De, refetch: J } = o(), Y = Math.max(1, Math.ceil(U / L)), Oe = ie(J);
|
|
112
112
|
u(() => {
|
|
113
|
-
|
|
113
|
+
Oe.current = J;
|
|
114
114
|
}), u(() => {
|
|
115
|
-
|
|
116
|
-
offset:
|
|
117
|
-
limit:
|
|
115
|
+
Oe.current({
|
|
116
|
+
offset: R * L,
|
|
117
|
+
limit: L
|
|
118
118
|
});
|
|
119
|
-
}, [
|
|
120
|
-
Promise.resolve().then(() =>
|
|
119
|
+
}, [R, L]), u(() => {
|
|
120
|
+
Promise.resolve().then(() => z(0));
|
|
121
121
|
}, [
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
122
|
+
W.search,
|
|
123
|
+
W.platform,
|
|
124
|
+
W.status
|
|
125
125
|
]), u(() => {
|
|
126
126
|
let e = [
|
|
127
127
|
"channel.created",
|
|
@@ -133,368 +133,403 @@ function T() {
|
|
|
133
133
|
].map((e) => a(e, () => void J()));
|
|
134
134
|
return () => e.forEach((e) => e());
|
|
135
135
|
}, [J]);
|
|
136
|
-
let
|
|
137
|
-
n("medium"),
|
|
136
|
+
let ke = async (e) => {
|
|
137
|
+
n("medium"), A(e);
|
|
138
138
|
try {
|
|
139
|
-
await
|
|
139
|
+
await K(e), r("success"), k(null);
|
|
140
140
|
} catch (e) {
|
|
141
141
|
r("error"), i(e, {
|
|
142
142
|
module: "channel",
|
|
143
143
|
context: { action: "Failed to delete channel" }
|
|
144
144
|
}, "[channel] Failed to delete channel");
|
|
145
145
|
} finally {
|
|
146
|
-
|
|
146
|
+
A(null);
|
|
147
147
|
}
|
|
148
|
-
},
|
|
149
|
-
|
|
148
|
+
}, Ae = async (e) => {
|
|
149
|
+
A(e.id);
|
|
150
150
|
try {
|
|
151
|
-
e.status === "ACTIVE" ? await
|
|
151
|
+
e.status === "ACTIVE" ? await Ee(e.id) : await q(e.id);
|
|
152
152
|
} catch (e) {
|
|
153
153
|
i(e, {
|
|
154
154
|
module: "channel",
|
|
155
155
|
context: { action: "Failed to toggle channel status" }
|
|
156
156
|
}, "[channel] Failed to toggle channel status");
|
|
157
157
|
} finally {
|
|
158
|
-
|
|
158
|
+
A(null);
|
|
159
159
|
}
|
|
160
|
-
},
|
|
161
|
-
|
|
160
|
+
}, je = async (e) => {
|
|
161
|
+
A(e);
|
|
162
162
|
try {
|
|
163
|
-
await
|
|
163
|
+
await De(e);
|
|
164
164
|
} catch (e) {
|
|
165
165
|
i(e, {
|
|
166
166
|
module: "channel",
|
|
167
167
|
context: { action: "Failed to run health check" }
|
|
168
168
|
}, "[channel] Failed to run health check");
|
|
169
169
|
} finally {
|
|
170
|
-
|
|
170
|
+
A(null);
|
|
171
171
|
}
|
|
172
|
-
}, X = d(() =>
|
|
173
|
-
|
|
172
|
+
}, X = d(() => B.filter((e) => j.has(e.id)), [B, j]), Z = d(() => X.filter((e) => e.status === "ACTIVE"), [X]), Q = d(() => X.filter((e) => e.status !== "ACTIVE"), [X]), $ = B.length > 0 && B.every((e) => j.has(e.id)), Me = B.some((e) => j.has(e.id)) && !$, Ne = (e, t) => {
|
|
173
|
+
M((n) => {
|
|
174
174
|
let r = new Set(n);
|
|
175
175
|
return t ? r.add(e) : r.delete(e), r;
|
|
176
176
|
});
|
|
177
|
-
},
|
|
178
|
-
|
|
177
|
+
}, Pe = (e) => {
|
|
178
|
+
M((t) => {
|
|
179
179
|
let n = new Set(t);
|
|
180
|
-
return
|
|
180
|
+
return B.forEach((t) => {
|
|
181
181
|
e ? n.add(t.id) : n.delete(t.id);
|
|
182
182
|
}), n;
|
|
183
183
|
});
|
|
184
|
-
},
|
|
184
|
+
}, Fe = async () => {
|
|
185
185
|
if (X.length === 0) return;
|
|
186
186
|
n("medium");
|
|
187
|
-
let e =
|
|
187
|
+
let e = O(X.length === 1 ? "channel.bulkDeleteConfirmSingle" : "channel.bulkDeleteConfirmMultiple", X.length === 1 ? "Delete 1 selected channel?" : `Delete ${X.length} selected channels?`), r = await t({
|
|
188
188
|
title: "Delete channels",
|
|
189
189
|
message: e,
|
|
190
190
|
okButtonTitle: "Delete",
|
|
191
191
|
cancelButtonTitle: "Cancel"
|
|
192
192
|
});
|
|
193
193
|
if (r === null ? window.confirm(e) : r) {
|
|
194
|
-
|
|
194
|
+
P("delete");
|
|
195
195
|
try {
|
|
196
|
-
await Promise.allSettled(X.map((e) =>
|
|
196
|
+
await Promise.allSettled(X.map((e) => K(e.id))), M(/* @__PURE__ */ new Set());
|
|
197
197
|
} finally {
|
|
198
|
-
|
|
198
|
+
P(null);
|
|
199
199
|
}
|
|
200
200
|
}
|
|
201
|
-
},
|
|
201
|
+
}, Ie = async () => {
|
|
202
202
|
if (Q.length !== 0) {
|
|
203
|
-
|
|
203
|
+
P("activate");
|
|
204
204
|
try {
|
|
205
|
-
await Promise.allSettled(Q.map((e) =>
|
|
205
|
+
await Promise.allSettled(Q.map((e) => q(e.id))), M(/* @__PURE__ */ new Set());
|
|
206
206
|
} finally {
|
|
207
|
-
|
|
207
|
+
P(null);
|
|
208
208
|
}
|
|
209
209
|
}
|
|
210
|
-
},
|
|
210
|
+
}, Le = async () => {
|
|
211
211
|
if (Z.length !== 0) {
|
|
212
|
-
|
|
212
|
+
P("deactivate");
|
|
213
213
|
try {
|
|
214
|
-
await Promise.allSettled(Z.map((e) =>
|
|
214
|
+
await Promise.allSettled(Z.map((e) => Ee(e.id))), M(/* @__PURE__ */ new Set());
|
|
215
215
|
} finally {
|
|
216
|
-
|
|
216
|
+
P(null);
|
|
217
217
|
}
|
|
218
218
|
}
|
|
219
|
-
},
|
|
219
|
+
}, Re = async () => {
|
|
220
220
|
if (X.length !== 0) {
|
|
221
|
-
|
|
221
|
+
P("health");
|
|
222
222
|
try {
|
|
223
|
-
await Promise.allSettled(X.map((e) =>
|
|
223
|
+
await Promise.allSettled(X.map((e) => De(e.id)));
|
|
224
224
|
} finally {
|
|
225
|
-
|
|
225
|
+
P(null);
|
|
226
226
|
}
|
|
227
227
|
}
|
|
228
|
-
},
|
|
229
|
-
...
|
|
228
|
+
}, ze = (e) => ({
|
|
229
|
+
...w[e] || {
|
|
230
230
|
label: e,
|
|
231
231
|
color: "bg-bg-sunken text-text-secondary"
|
|
232
232
|
},
|
|
233
|
-
label: l(e, te,
|
|
234
|
-
}),
|
|
235
|
-
...
|
|
236
|
-
label: l(e, ne,
|
|
237
|
-
}),
|
|
238
|
-
...
|
|
239
|
-
label: l(e, ee,
|
|
233
|
+
label: l(e, te, O)
|
|
234
|
+
}), Be = (e) => ({
|
|
235
|
+
...T[e] || T.INACTIVE,
|
|
236
|
+
label: l(e, ne, O)
|
|
237
|
+
}), Ve = (e) => ({
|
|
238
|
+
...E[e] || E.UNKNOWN,
|
|
239
|
+
label: l(e, ee, O)
|
|
240
240
|
});
|
|
241
|
-
return /* @__PURE__ */
|
|
241
|
+
return /* @__PURE__ */ x(s, {
|
|
242
242
|
permission: c.CHANNEL_READ,
|
|
243
|
-
children: /* @__PURE__ */
|
|
243
|
+
children: /* @__PURE__ */ S("div", {
|
|
244
244
|
className: "space-y-4 sm:space-y-6 p-3 sm:p-6",
|
|
245
245
|
children: [
|
|
246
|
-
/* @__PURE__ */
|
|
246
|
+
/* @__PURE__ */ S("div", {
|
|
247
247
|
className: "flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",
|
|
248
|
-
children: [/* @__PURE__ */
|
|
248
|
+
children: [/* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("h1", {
|
|
249
249
|
className: "text-xl sm:text-2xl font-bold text-text-primary",
|
|
250
|
-
children:
|
|
251
|
-
}), /* @__PURE__ */
|
|
250
|
+
children: O("channel.channels", "Channels")
|
|
251
|
+
}), /* @__PURE__ */ S("p", {
|
|
252
252
|
className: "text-sm text-text-secondary mt-1",
|
|
253
253
|
children: [
|
|
254
|
-
|
|
254
|
+
O("channel.manageChannels", "Manage your communication channels"),
|
|
255
255
|
" (",
|
|
256
|
-
|
|
256
|
+
U,
|
|
257
257
|
" total)"
|
|
258
258
|
]
|
|
259
|
-
})] }), /* @__PURE__ */
|
|
259
|
+
})] }), /* @__PURE__ */ x("div", {
|
|
260
260
|
className: "flex items-center gap-2",
|
|
261
261
|
"data-tour": "channels-list-export-button",
|
|
262
|
-
children: /* @__PURE__ */
|
|
262
|
+
children: /* @__PURE__ */ x(ge, {
|
|
263
263
|
primary: g ? {
|
|
264
|
-
label:
|
|
265
|
-
icon: /* @__PURE__ */
|
|
264
|
+
label: O("channel.createChannel", "Create Channel"),
|
|
265
|
+
icon: /* @__PURE__ */ x(v, {
|
|
266
266
|
size: 16,
|
|
267
267
|
"aria-hidden": "true"
|
|
268
268
|
}),
|
|
269
269
|
onSelect: () => m("/channels/create")
|
|
270
270
|
} : void 0,
|
|
271
|
-
actions:
|
|
272
|
-
label:
|
|
273
|
-
icon:
|
|
271
|
+
actions: D ? [{
|
|
272
|
+
label: O("channel.export", "Export"),
|
|
273
|
+
icon: F ? /* @__PURE__ */ x(_, {
|
|
274
274
|
size: 16,
|
|
275
275
|
className: "animate-spin",
|
|
276
276
|
"aria-hidden": "true"
|
|
277
|
-
}) : /* @__PURE__ */
|
|
277
|
+
}) : /* @__PURE__ */ x(oe, {
|
|
278
278
|
size: 16,
|
|
279
279
|
"aria-hidden": "true"
|
|
280
280
|
}),
|
|
281
|
-
disabled:
|
|
281
|
+
disabled: F,
|
|
282
282
|
onSelect: () => void Te()
|
|
283
283
|
}] : []
|
|
284
284
|
})
|
|
285
285
|
})]
|
|
286
286
|
}),
|
|
287
|
-
/* @__PURE__ */ x(
|
|
287
|
+
/* @__PURE__ */ x(ye, {
|
|
288
|
+
icon: /* @__PURE__ */ x(ue, {
|
|
289
|
+
size: 15,
|
|
290
|
+
"aria-hidden": "true"
|
|
291
|
+
}),
|
|
292
|
+
children: O("channel.listPurpose", "Every communication channel in your organization, in one browseable grid. Filter by platform or status, select several at once to activate, deactivate, health-check or delete them in bulk, and open any card to manage its connection and delivery history. Start here when you need to find a specific channel or tidy up the ones you no longer use.")
|
|
293
|
+
}),
|
|
294
|
+
g && /* @__PURE__ */ S(_e, {
|
|
295
|
+
className: "flex flex-col gap-3 p-5 sm:flex-row sm:items-center sm:justify-between",
|
|
296
|
+
children: [/* @__PURE__ */ S("div", {
|
|
297
|
+
className: "flex items-center gap-3",
|
|
298
|
+
children: [/* @__PURE__ */ x("span", {
|
|
299
|
+
className: "rounded-lg bg-accent-primary/10 p-2",
|
|
300
|
+
children: /* @__PURE__ */ x(v, {
|
|
301
|
+
size: 18,
|
|
302
|
+
className: "text-accent-primary",
|
|
303
|
+
"aria-hidden": "true"
|
|
304
|
+
})
|
|
305
|
+
}), /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
|
|
306
|
+
className: "text-sm font-semibold text-text-primary",
|
|
307
|
+
children: O("channel.addAnotherChannel", "Add another channel")
|
|
308
|
+
}), /* @__PURE__ */ x("p", {
|
|
309
|
+
className: "text-sm text-text-secondary",
|
|
310
|
+
children: O("channel.addAnotherChannelHint", "Connect a new platform — Email, SMS, Push, Slack and more — to start delivering messages through it.")
|
|
311
|
+
})] })]
|
|
312
|
+
}), /* @__PURE__ */ S("button", {
|
|
313
|
+
type: "button",
|
|
314
|
+
onClick: () => m("/channels/create"),
|
|
315
|
+
className: "inline-flex shrink-0 items-center gap-2 rounded-lg bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text transition-colors hover:bg-action-primary-bg-hover",
|
|
316
|
+
children: [/* @__PURE__ */ x(v, {
|
|
317
|
+
size: 16,
|
|
318
|
+
"aria-hidden": "true"
|
|
319
|
+
}), O("channel.createChannel", "Create Channel")]
|
|
320
|
+
})]
|
|
321
|
+
}),
|
|
322
|
+
/* @__PURE__ */ S("div", {
|
|
288
323
|
className: "flex flex-col gap-3 sm:flex-row sm:items-center",
|
|
289
324
|
children: [
|
|
290
|
-
/* @__PURE__ */
|
|
325
|
+
/* @__PURE__ */ S("div", {
|
|
291
326
|
className: "relative flex-1",
|
|
292
|
-
children: [/* @__PURE__ */
|
|
327
|
+
children: [/* @__PURE__ */ x(fe, {
|
|
293
328
|
size: 16,
|
|
294
329
|
className: "absolute left-3 top-1/2 -translate-y-1/2 text-text-secondary"
|
|
295
|
-
}), /* @__PURE__ */
|
|
296
|
-
"aria-label":
|
|
330
|
+
}), /* @__PURE__ */ x("input", {
|
|
331
|
+
"aria-label": O("channel.searchChannels", "Search channels..."),
|
|
297
332
|
type: "text",
|
|
298
|
-
placeholder:
|
|
299
|
-
value:
|
|
300
|
-
onChange: (e) =>
|
|
333
|
+
placeholder: O("channel.searchChannels", "Search channels..."),
|
|
334
|
+
value: W.search || "",
|
|
335
|
+
onChange: (e) => G({ search: e.target.value }),
|
|
301
336
|
className: "w-full pl-9 pr-4 py-2 text-sm bg-surface border border-border-subtle rounded-lg focus:outline-none focus:ring-2 focus:ring-action-primary-bg"
|
|
302
337
|
})]
|
|
303
338
|
}),
|
|
304
|
-
/* @__PURE__ */
|
|
305
|
-
value:
|
|
306
|
-
onChange: (e) =>
|
|
339
|
+
/* @__PURE__ */ S("select", {
|
|
340
|
+
value: W.platform || "",
|
|
341
|
+
onChange: (e) => G({ platform: e.target.value || void 0 }),
|
|
307
342
|
className: "px-3 py-2 text-sm bg-bg-surface text-text-primary border border-border-subtle rounded-lg focus:outline-none focus:ring-2 focus:ring-action-primary-bg",
|
|
308
|
-
children: [/* @__PURE__ */
|
|
343
|
+
children: [/* @__PURE__ */ x("option", {
|
|
309
344
|
value: "",
|
|
310
|
-
children:
|
|
311
|
-
}), Object.entries(
|
|
345
|
+
children: O("channel.allPlatforms", "All Platforms")
|
|
346
|
+
}), Object.entries(w).map(([e, t]) => /* @__PURE__ */ x("option", {
|
|
312
347
|
value: e,
|
|
313
348
|
children: t.label
|
|
314
349
|
}, e))]
|
|
315
350
|
}),
|
|
316
|
-
/* @__PURE__ */
|
|
317
|
-
value:
|
|
318
|
-
onChange: (e) =>
|
|
351
|
+
/* @__PURE__ */ S("select", {
|
|
352
|
+
value: W.status || "",
|
|
353
|
+
onChange: (e) => G({ status: e.target.value || void 0 }),
|
|
319
354
|
className: "px-3 py-2 text-sm bg-bg-surface text-text-primary border border-border-subtle rounded-lg focus:outline-none focus:ring-2 focus:ring-action-primary-bg",
|
|
320
|
-
children: [/* @__PURE__ */
|
|
355
|
+
children: [/* @__PURE__ */ x("option", {
|
|
321
356
|
value: "",
|
|
322
|
-
children:
|
|
323
|
-
}), Object.entries(
|
|
357
|
+
children: O("channel.allStatus", "All Status")
|
|
358
|
+
}), Object.entries(T).map(([e, t]) => /* @__PURE__ */ x("option", {
|
|
324
359
|
value: e,
|
|
325
360
|
children: t.label
|
|
326
361
|
}, e))]
|
|
327
362
|
})
|
|
328
363
|
]
|
|
329
364
|
}),
|
|
330
|
-
|
|
365
|
+
I && /* @__PURE__ */ S("div", {
|
|
331
366
|
className: "flex items-center gap-3 p-4 bg-status-error-bg-subtle border border-status-error-border rounded-lg",
|
|
332
|
-
children: [/* @__PURE__ */
|
|
367
|
+
children: [/* @__PURE__ */ x(p, {
|
|
333
368
|
size: 20,
|
|
334
369
|
className: "text-status-error-text"
|
|
335
|
-
}), /* @__PURE__ */
|
|
370
|
+
}), /* @__PURE__ */ x("p", {
|
|
336
371
|
className: "text-sm text-status-error-text flex-1",
|
|
337
|
-
children:
|
|
372
|
+
children: I
|
|
338
373
|
})]
|
|
339
374
|
}),
|
|
340
|
-
|
|
375
|
+
B.length > 0 && /* @__PURE__ */ S(C, {
|
|
341
376
|
treatment: "plain",
|
|
342
377
|
className: "flex flex-col gap-3 border-border-seam p-4 sm:flex-row sm:items-center sm:justify-between",
|
|
343
378
|
"data-tour": "channels-list-bulk-actions",
|
|
344
|
-
children: [/* @__PURE__ */
|
|
379
|
+
children: [/* @__PURE__ */ S("label", {
|
|
345
380
|
className: "flex items-center gap-2 text-sm text-text-primary",
|
|
346
|
-
children: [/* @__PURE__ */
|
|
381
|
+
children: [/* @__PURE__ */ x("input", {
|
|
347
382
|
type: "checkbox",
|
|
348
383
|
checked: $,
|
|
349
384
|
ref: (e) => {
|
|
350
|
-
e && (e.indeterminate =
|
|
385
|
+
e && (e.indeterminate = Me && !$);
|
|
351
386
|
},
|
|
352
|
-
onChange: (e) =>
|
|
387
|
+
onChange: (e) => Pe(e.target.checked),
|
|
353
388
|
"aria-label": "Select all channels",
|
|
354
389
|
className: "size-4 rounded border-border-subtle text-primary"
|
|
355
|
-
}), /* @__PURE__ */
|
|
356
|
-
}), /* @__PURE__ */
|
|
390
|
+
}), /* @__PURE__ */ x("span", { children: O("channel.selectAllVisible", "Select all visible") })]
|
|
391
|
+
}), /* @__PURE__ */ S("div", {
|
|
357
392
|
className: "flex flex-wrap items-center gap-2",
|
|
358
393
|
children: [
|
|
359
|
-
/* @__PURE__ */
|
|
394
|
+
/* @__PURE__ */ S("span", {
|
|
360
395
|
className: "text-sm text-text-secondary",
|
|
361
396
|
children: [
|
|
362
|
-
|
|
397
|
+
j.size,
|
|
363
398
|
" ",
|
|
364
|
-
|
|
399
|
+
O("channel.selectedCountLabel", "selected")
|
|
365
400
|
]
|
|
366
401
|
}),
|
|
367
|
-
|
|
402
|
+
j.size > 0 && /* @__PURE__ */ x("button", {
|
|
368
403
|
type: "button",
|
|
369
|
-
onClick: () =>
|
|
404
|
+
onClick: () => M(/* @__PURE__ */ new Set()),
|
|
370
405
|
className: "text-sm text-text-secondary hover:text-text-primary",
|
|
371
|
-
children:
|
|
406
|
+
children: O("channel.clearSelection", "Clear selection")
|
|
372
407
|
}),
|
|
373
|
-
/* @__PURE__ */
|
|
408
|
+
/* @__PURE__ */ x(s, {
|
|
374
409
|
permission: c.CHANNEL_EXECUTE,
|
|
375
|
-
children: /* @__PURE__ */
|
|
410
|
+
children: /* @__PURE__ */ S("button", {
|
|
376
411
|
type: "button",
|
|
377
|
-
onClick:
|
|
378
|
-
disabled: X.length === 0 ||
|
|
412
|
+
onClick: Re,
|
|
413
|
+
disabled: X.length === 0 || N !== null,
|
|
379
414
|
className: "px-3 py-2 text-sm font-medium border border-border-subtle rounded-md hover:bg-bg-sunken transition-colors disabled:opacity-50",
|
|
380
|
-
children: [
|
|
415
|
+
children: [O("channel.healthCheck", "Health Check"), X.length > 0 ? ` (${X.length})` : ""]
|
|
381
416
|
})
|
|
382
417
|
}),
|
|
383
|
-
/* @__PURE__ */
|
|
418
|
+
/* @__PURE__ */ x(s, {
|
|
384
419
|
permission: c.CHANNEL_UPDATE,
|
|
385
|
-
children: /* @__PURE__ */
|
|
420
|
+
children: /* @__PURE__ */ S("button", {
|
|
386
421
|
type: "button",
|
|
387
|
-
onClick:
|
|
388
|
-
disabled: Q.length === 0 ||
|
|
422
|
+
onClick: Ie,
|
|
423
|
+
disabled: Q.length === 0 || N !== null,
|
|
389
424
|
className: "px-3 py-2 text-sm font-medium border border-status-success-border/30 text-status-success-text rounded-md hover:bg-status-success-bg-subtle transition-colors disabled:opacity-50",
|
|
390
|
-
children: [
|
|
425
|
+
children: [O("channel.activateSelected", "Activate Selected"), Q.length > 0 ? ` (${Q.length})` : ""]
|
|
391
426
|
})
|
|
392
427
|
}),
|
|
393
|
-
/* @__PURE__ */
|
|
428
|
+
/* @__PURE__ */ x(s, {
|
|
394
429
|
permission: c.CHANNEL_UPDATE,
|
|
395
|
-
children: /* @__PURE__ */
|
|
430
|
+
children: /* @__PURE__ */ S("button", {
|
|
396
431
|
type: "button",
|
|
397
|
-
onClick:
|
|
398
|
-
disabled: Z.length === 0 ||
|
|
432
|
+
onClick: Le,
|
|
433
|
+
disabled: Z.length === 0 || N !== null,
|
|
399
434
|
className: "px-3 py-2 text-sm font-medium border border-status-warning-border text-status-warning-text rounded-md hover:bg-status-warning-bg-subtle transition-colors disabled:opacity-50",
|
|
400
|
-
children: [
|
|
435
|
+
children: [O("channel.deactivateSelected", "Deactivate Selected"), Z.length > 0 ? ` (${Z.length})` : ""]
|
|
401
436
|
})
|
|
402
437
|
}),
|
|
403
|
-
/* @__PURE__ */
|
|
438
|
+
/* @__PURE__ */ x(s, {
|
|
404
439
|
permission: c.CHANNEL_DELETE,
|
|
405
|
-
children: /* @__PURE__ */
|
|
440
|
+
children: /* @__PURE__ */ S("button", {
|
|
406
441
|
type: "button",
|
|
407
|
-
onClick:
|
|
408
|
-
disabled: X.length === 0 ||
|
|
442
|
+
onClick: Fe,
|
|
443
|
+
disabled: X.length === 0 || N !== null,
|
|
409
444
|
className: "px-3 py-2 text-sm font-medium border border-status-error-border/30 text-status-error-text rounded-md hover:bg-status-error-bg-subtle transition-colors disabled:opacity-50",
|
|
410
|
-
children: [
|
|
445
|
+
children: [O("channel.deleteSelected", "Delete Selected"), X.length > 0 ? ` (${X.length})` : ""]
|
|
411
446
|
})
|
|
412
447
|
})
|
|
413
448
|
]
|
|
414
449
|
})]
|
|
415
450
|
}),
|
|
416
|
-
|
|
451
|
+
H && /* @__PURE__ */ S("div", {
|
|
417
452
|
className: "flex items-center gap-3 p-4 bg-status-error-bg-subtle border border-status-error-border rounded-lg",
|
|
418
453
|
children: [
|
|
419
|
-
/* @__PURE__ */
|
|
454
|
+
/* @__PURE__ */ x(p, {
|
|
420
455
|
size: 20,
|
|
421
456
|
className: "text-status-error-text"
|
|
422
457
|
}),
|
|
423
|
-
/* @__PURE__ */
|
|
458
|
+
/* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
|
|
424
459
|
className: "text-sm font-medium text-status-error-text",
|
|
425
|
-
children:
|
|
426
|
-
}), /* @__PURE__ */
|
|
460
|
+
children: O("channel.loadFailed", "Failed to load channels")
|
|
461
|
+
}), /* @__PURE__ */ x("p", {
|
|
427
462
|
className: "text-xs text-status-error-text",
|
|
428
|
-
children:
|
|
463
|
+
children: H
|
|
429
464
|
})] }),
|
|
430
|
-
/* @__PURE__ */
|
|
465
|
+
/* @__PURE__ */ x("button", {
|
|
431
466
|
type: "button",
|
|
432
467
|
onClick: () => J(),
|
|
433
468
|
className: "ml-auto px-3 py-1 text-sm text-status-error-text hover:bg-status-error-bg-subtle rounded transition-colors",
|
|
434
|
-
children:
|
|
469
|
+
children: O("channel.retry", "Retry")
|
|
435
470
|
})
|
|
436
471
|
]
|
|
437
472
|
}),
|
|
438
|
-
|
|
473
|
+
V && B.length === 0 && /* @__PURE__ */ x("div", {
|
|
439
474
|
className: "flex items-center justify-center py-12",
|
|
440
|
-
children: /* @__PURE__ */
|
|
475
|
+
children: /* @__PURE__ */ x(_, {
|
|
441
476
|
size: 32,
|
|
442
477
|
className: "animate-spin text-accent-primary"
|
|
443
478
|
})
|
|
444
479
|
}),
|
|
445
|
-
!
|
|
446
|
-
illustration:
|
|
447
|
-
title:
|
|
448
|
-
description:
|
|
449
|
-
action: g && !
|
|
480
|
+
!V && !H && B.length === 0 && /* @__PURE__ */ x(ve, {
|
|
481
|
+
illustration: W.search || W.platform || W.status ? "empty-search" : "empty-data",
|
|
482
|
+
title: O("channel.noChannelsFound", "No channels found"),
|
|
483
|
+
description: W.search || W.platform || W.status ? O("channel.adjustFilters", "Try adjusting your filters to see more channels.") : O("channel.createFirstChannelPrompt", "Create your first communication channel to get started."),
|
|
484
|
+
action: g && !W.search && !W.platform && !W.status ? /* @__PURE__ */ S("button", {
|
|
450
485
|
type: "button",
|
|
451
486
|
onClick: () => m("/channels/create"),
|
|
452
487
|
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",
|
|
453
|
-
children: [/* @__PURE__ */
|
|
488
|
+
children: [/* @__PURE__ */ x(v, { size: 16 }), O("channel.createChannel", "Create Channel")]
|
|
454
489
|
}) : void 0
|
|
455
490
|
}),
|
|
456
|
-
|
|
491
|
+
B.length > 0 && /* @__PURE__ */ x("div", {
|
|
457
492
|
className: "grid gap-4 sm:grid-cols-2 lg:grid-cols-3",
|
|
458
493
|
"data-tour": "channels-list-grid",
|
|
459
|
-
children:
|
|
460
|
-
let t =
|
|
461
|
-
return /* @__PURE__ */
|
|
494
|
+
children: B.map((e) => {
|
|
495
|
+
let t = ze(e.platform), n = Be(e.status), r = Ve(e.connectionHealth), i = n.icon, a = r.icon, o = Ce === e.id;
|
|
496
|
+
return /* @__PURE__ */ S(C, {
|
|
462
497
|
treatment: "insight",
|
|
463
|
-
className: `p-4 transition-colors group ${
|
|
498
|
+
className: `p-4 transition-colors group ${j.has(e.id) ? "ring-2 ring-action-primary-bg border-action-primary-bg/40" : "border-border-seam"}`,
|
|
464
499
|
children: [
|
|
465
|
-
/* @__PURE__ */
|
|
500
|
+
/* @__PURE__ */ S("div", {
|
|
466
501
|
className: "flex items-start justify-between mb-3",
|
|
467
|
-
children: [/* @__PURE__ */
|
|
502
|
+
children: [/* @__PURE__ */ S("div", {
|
|
468
503
|
className: "flex items-center gap-2",
|
|
469
504
|
children: [
|
|
470
|
-
/* @__PURE__ */
|
|
505
|
+
/* @__PURE__ */ x("input", {
|
|
471
506
|
type: "checkbox",
|
|
472
|
-
checked:
|
|
473
|
-
onChange: (t) =>
|
|
507
|
+
checked: j.has(e.id),
|
|
508
|
+
onChange: (t) => Ne(e.id, t.target.checked),
|
|
474
509
|
"aria-label": `Select channel ${e.name}`,
|
|
475
510
|
className: "size-4 rounded border-border-subtle text-primary"
|
|
476
511
|
}),
|
|
477
|
-
/* @__PURE__ */
|
|
512
|
+
/* @__PURE__ */ x(ue, {
|
|
478
513
|
size: 20,
|
|
479
514
|
className: "text-accent-primary"
|
|
480
515
|
}),
|
|
481
|
-
/* @__PURE__ */
|
|
516
|
+
/* @__PURE__ */ x("span", {
|
|
482
517
|
className: `px-2 py-0.5 text-xs font-semibold rounded-full ${t.color}`,
|
|
483
518
|
children: t.label
|
|
484
519
|
})
|
|
485
520
|
]
|
|
486
|
-
}), /* @__PURE__ */
|
|
521
|
+
}), /* @__PURE__ */ S("div", {
|
|
487
522
|
className: "flex items-center gap-1",
|
|
488
|
-
children: [/* @__PURE__ */
|
|
523
|
+
children: [/* @__PURE__ */ x(i, {
|
|
489
524
|
size: 14,
|
|
490
525
|
className: n.color.split(" ")[0]
|
|
491
|
-
}), /* @__PURE__ */
|
|
526
|
+
}), /* @__PURE__ */ x("span", {
|
|
492
527
|
className: `px-2 py-0.5 text-xs font-medium rounded-full ${n.color} ${e.status === "ACTIVE" ? "motion-safe:animate-vc-glow-pulse" : ""}`,
|
|
493
528
|
children: n.label
|
|
494
529
|
})]
|
|
495
530
|
})]
|
|
496
531
|
}),
|
|
497
|
-
/* @__PURE__ */
|
|
532
|
+
/* @__PURE__ */ S("div", {
|
|
498
533
|
role: "button",
|
|
499
534
|
tabIndex: 0,
|
|
500
535
|
onClick: () => m(`/channels/${e.id}`),
|
|
@@ -503,134 +538,134 @@ function T() {
|
|
|
503
538
|
},
|
|
504
539
|
className: "cursor-pointer",
|
|
505
540
|
children: [
|
|
506
|
-
/* @__PURE__ */
|
|
541
|
+
/* @__PURE__ */ x("h3", {
|
|
507
542
|
className: "text-sm font-semibold text-text-primary mb-1 truncate",
|
|
508
543
|
children: e.name
|
|
509
544
|
}),
|
|
510
|
-
e.description && /* @__PURE__ */
|
|
545
|
+
e.description && /* @__PURE__ */ x("p", {
|
|
511
546
|
className: "text-xs text-text-secondary mb-2 line-clamp-2",
|
|
512
547
|
children: e.description
|
|
513
548
|
}),
|
|
514
|
-
e.adapterType && /* @__PURE__ */
|
|
549
|
+
e.adapterType && /* @__PURE__ */ x("p", {
|
|
515
550
|
className: "text-xs text-text-secondary mb-2 font-mono",
|
|
516
551
|
children: e.adapterType.replace(/_/g, " ")
|
|
517
552
|
}),
|
|
518
|
-
/* @__PURE__ */
|
|
553
|
+
/* @__PURE__ */ x("div", {
|
|
519
554
|
className: "flex items-center gap-3 text-xs text-text-secondary mb-2",
|
|
520
|
-
children: /* @__PURE__ */
|
|
521
|
-
|
|
555
|
+
children: /* @__PURE__ */ S("span", { children: [
|
|
556
|
+
O("channel.priority", "Priority"),
|
|
522
557
|
": ",
|
|
523
558
|
e.priority
|
|
524
559
|
] })
|
|
525
560
|
}),
|
|
526
|
-
/* @__PURE__ */
|
|
561
|
+
/* @__PURE__ */ S("div", {
|
|
527
562
|
className: "flex items-center gap-3 text-xs",
|
|
528
563
|
children: [
|
|
529
|
-
/* @__PURE__ */
|
|
564
|
+
/* @__PURE__ */ S("div", {
|
|
530
565
|
className: "flex items-center gap-1",
|
|
531
|
-
children: [/* @__PURE__ */
|
|
566
|
+
children: [/* @__PURE__ */ x(a, {
|
|
532
567
|
size: 12,
|
|
533
568
|
className: r.color
|
|
534
|
-
}), /* @__PURE__ */
|
|
569
|
+
}), /* @__PURE__ */ x("span", {
|
|
535
570
|
className: r.color,
|
|
536
571
|
children: r.label
|
|
537
572
|
})]
|
|
538
573
|
}),
|
|
539
|
-
/* @__PURE__ */
|
|
540
|
-
/* @__PURE__ */
|
|
574
|
+
/* @__PURE__ */ x("span", { children: "•" }),
|
|
575
|
+
/* @__PURE__ */ x("span", {
|
|
541
576
|
className: e.isConnected ? "text-status-success-text" : "text-text-secondary",
|
|
542
|
-
children: e.isConnected ?
|
|
577
|
+
children: e.isConnected ? O("channel.connected", "Connected") : O("channel.notConnected", "Not Connected")
|
|
543
578
|
})
|
|
544
579
|
]
|
|
545
580
|
})
|
|
546
581
|
]
|
|
547
582
|
}),
|
|
548
|
-
e.tagAssignments && e.tagAssignments.length > 0 && /* @__PURE__ */
|
|
583
|
+
e.tagAssignments && e.tagAssignments.length > 0 && /* @__PURE__ */ S("div", {
|
|
549
584
|
className: "flex flex-wrap gap-1 mt-2",
|
|
550
585
|
"aria-label": "Channel tags",
|
|
551
|
-
children: [e.tagAssignments.slice(0, 4).map((e) => /* @__PURE__ */
|
|
586
|
+
children: [e.tagAssignments.slice(0, 4).map((e) => /* @__PURE__ */ x(be, {
|
|
552
587
|
id: e.tagId,
|
|
553
588
|
label: e.tagId,
|
|
554
589
|
size: "sm"
|
|
555
|
-
}, e.id)), e.tagAssignments.length > 4 && /* @__PURE__ */
|
|
590
|
+
}, e.id)), e.tagAssignments.length > 4 && /* @__PURE__ */ S("span", {
|
|
556
591
|
className: "text-xs text-text-secondary",
|
|
557
592
|
children: ["+", e.tagAssignments.length - 4]
|
|
558
593
|
})]
|
|
559
594
|
}),
|
|
560
|
-
/* @__PURE__ */
|
|
595
|
+
/* @__PURE__ */ S("div", {
|
|
561
596
|
className: "mt-3 pt-3 border-t border-border-subtle flex items-center justify-between opacity-0 group-hover:opacity-100 transition-opacity",
|
|
562
|
-
children: [/* @__PURE__ */
|
|
597
|
+
children: [/* @__PURE__ */ S("div", {
|
|
563
598
|
className: "flex items-center gap-1",
|
|
564
599
|
children: [
|
|
565
|
-
/* @__PURE__ */
|
|
600
|
+
/* @__PURE__ */ x("button", {
|
|
566
601
|
type: "button",
|
|
567
602
|
onClick: () => m(`/channels/${e.id}`),
|
|
568
603
|
className: "p-1.5 text-text-secondary hover:text-accent-primary hover:bg-accent-primary/10 rounded transition-colors cursor-pointer",
|
|
569
|
-
title:
|
|
570
|
-
children: /* @__PURE__ */
|
|
604
|
+
title: O("channel.viewDetails", "View Details"),
|
|
605
|
+
children: /* @__PURE__ */ x(se, { size: 14 })
|
|
571
606
|
}),
|
|
572
|
-
|
|
607
|
+
b && /* @__PURE__ */ x("button", {
|
|
573
608
|
type: "button",
|
|
574
609
|
onClick: () => m(`/channels/${e.id}/edit`),
|
|
575
610
|
className: "p-1.5 text-text-secondary hover:text-accent-primary hover:bg-accent-primary/10 rounded transition-colors cursor-pointer",
|
|
576
|
-
title:
|
|
577
|
-
children: /* @__PURE__ */
|
|
611
|
+
title: O("channel.editChannel", "Edit Channel"),
|
|
612
|
+
children: /* @__PURE__ */ x(ce, { size: 14 })
|
|
578
613
|
}),
|
|
579
|
-
/* @__PURE__ */
|
|
614
|
+
/* @__PURE__ */ x(s, {
|
|
580
615
|
permission: c.CHANNEL_EXECUTE,
|
|
581
|
-
children: /* @__PURE__ */
|
|
616
|
+
children: /* @__PURE__ */ x("button", {
|
|
582
617
|
type: "button",
|
|
583
|
-
onClick: () =>
|
|
618
|
+
onClick: () => je(e.id),
|
|
584
619
|
disabled: o,
|
|
585
620
|
className: "p-1.5 text-text-secondary hover:text-status-info-text hover:bg-status-info-bg-subtle rounded transition-colors disabled:opacity-50 cursor-pointer disabled:cursor-not-allowed",
|
|
586
|
-
title:
|
|
587
|
-
children: o ? /* @__PURE__ */
|
|
621
|
+
title: O("channel.runHealthCheck", "Run Health Check"),
|
|
622
|
+
children: o ? /* @__PURE__ */ x(_, {
|
|
588
623
|
size: 14,
|
|
589
624
|
className: "animate-spin"
|
|
590
|
-
}) : /* @__PURE__ */
|
|
625
|
+
}) : /* @__PURE__ */ x(de, { size: 14 })
|
|
591
626
|
})
|
|
592
627
|
}),
|
|
593
|
-
/* @__PURE__ */
|
|
628
|
+
/* @__PURE__ */ x(s, {
|
|
594
629
|
permission: c.CHANNEL_UPDATE,
|
|
595
|
-
children: /* @__PURE__ */
|
|
630
|
+
children: /* @__PURE__ */ x("button", {
|
|
596
631
|
type: "button",
|
|
597
|
-
onClick: () =>
|
|
632
|
+
onClick: () => Ae(e),
|
|
598
633
|
disabled: o,
|
|
599
634
|
className: `p-1.5 rounded transition-colors disabled:opacity-50 cursor-pointer disabled:cursor-not-allowed ${e.status === "ACTIVE" ? "text-text-secondary hover:text-status-warning-text hover:bg-status-warning-bg-subtle" : "text-text-secondary hover:text-status-success-text hover:bg-status-success-bg-subtle"}`,
|
|
600
|
-
title: e.status === "ACTIVE" ?
|
|
601
|
-
children: e.status === "ACTIVE" ? /* @__PURE__ */
|
|
635
|
+
title: e.status === "ACTIVE" ? O("channel.deactivate", "Deactivate") : O("channel.activate", "Activate"),
|
|
636
|
+
children: e.status === "ACTIVE" ? /* @__PURE__ */ x(y, { size: 14 }) : /* @__PURE__ */ x(le, { size: 14 })
|
|
602
637
|
})
|
|
603
638
|
})
|
|
604
639
|
]
|
|
605
|
-
}), Se === e.id ? /* @__PURE__ */
|
|
640
|
+
}), Se === e.id ? /* @__PURE__ */ S("div", {
|
|
606
641
|
className: "flex items-center gap-2",
|
|
607
642
|
children: [
|
|
608
|
-
/* @__PURE__ */
|
|
643
|
+
/* @__PURE__ */ x("span", {
|
|
609
644
|
className: "text-xs text-text-secondary",
|
|
610
|
-
children:
|
|
645
|
+
children: O("channel.deleteQuestion", "Delete?")
|
|
611
646
|
}),
|
|
612
|
-
/* @__PURE__ */
|
|
647
|
+
/* @__PURE__ */ x("button", {
|
|
613
648
|
type: "button",
|
|
614
|
-
onClick: () =>
|
|
649
|
+
onClick: () => ke(e.id),
|
|
615
650
|
disabled: o,
|
|
616
651
|
className: "px-2 py-1 text-xs text-status-error-text hover:bg-status-error-bg-subtle rounded transition-colors cursor-pointer disabled:cursor-not-allowed",
|
|
617
|
-
children: o ? "..." :
|
|
652
|
+
children: o ? "..." : O("channel.yes", "Yes")
|
|
618
653
|
}),
|
|
619
|
-
/* @__PURE__ */
|
|
654
|
+
/* @__PURE__ */ x("button", {
|
|
620
655
|
type: "button",
|
|
621
|
-
onClick: () =>
|
|
656
|
+
onClick: () => k(null),
|
|
622
657
|
className: "px-2 py-1 text-xs text-text-secondary hover:bg-bg-sunken rounded transition-colors cursor-pointer",
|
|
623
|
-
children:
|
|
658
|
+
children: O("channel.no", "No")
|
|
624
659
|
})
|
|
625
660
|
]
|
|
626
|
-
}) : /* @__PURE__ */
|
|
661
|
+
}) : /* @__PURE__ */ x(s, {
|
|
627
662
|
permission: c.CHANNEL_DELETE,
|
|
628
|
-
children: /* @__PURE__ */
|
|
663
|
+
children: /* @__PURE__ */ x("button", {
|
|
629
664
|
type: "button",
|
|
630
|
-
onClick: () =>
|
|
665
|
+
onClick: () => k(e.id),
|
|
631
666
|
className: "p-1.5 text-text-secondary hover:text-status-error-text hover:bg-status-error-bg-subtle rounded transition-colors cursor-pointer",
|
|
632
|
-
title:
|
|
633
|
-
children: /* @__PURE__ */
|
|
667
|
+
title: O("channel.deleteChannel", "Delete Channel"),
|
|
668
|
+
children: /* @__PURE__ */ x(pe, { size: 14 })
|
|
634
669
|
})
|
|
635
670
|
})]
|
|
636
671
|
})
|
|
@@ -638,55 +673,55 @@ function T() {
|
|
|
638
673
|
}, e.id);
|
|
639
674
|
})
|
|
640
675
|
}),
|
|
641
|
-
|
|
676
|
+
U > L && /* @__PURE__ */ S("div", {
|
|
642
677
|
className: "flex items-center justify-between px-1 py-2",
|
|
643
|
-
children: [/* @__PURE__ */
|
|
678
|
+
children: [/* @__PURE__ */ S("p", {
|
|
644
679
|
className: "text-sm text-text-secondary",
|
|
645
680
|
children: [
|
|
646
|
-
|
|
681
|
+
O("channel.showing", "Showing"),
|
|
647
682
|
" ",
|
|
648
|
-
/* @__PURE__ */
|
|
683
|
+
/* @__PURE__ */ S("span", {
|
|
649
684
|
className: "font-medium text-text-primary",
|
|
650
685
|
children: [
|
|
651
|
-
|
|
686
|
+
R * L + 1,
|
|
652
687
|
"–",
|
|
653
|
-
Math.min((
|
|
688
|
+
Math.min((R + 1) * L, U)
|
|
654
689
|
]
|
|
655
690
|
}),
|
|
656
691
|
" ",
|
|
657
|
-
|
|
692
|
+
O("channel.of", "of"),
|
|
658
693
|
" ",
|
|
659
|
-
/* @__PURE__ */
|
|
694
|
+
/* @__PURE__ */ x("span", {
|
|
660
695
|
className: "font-medium text-text-primary",
|
|
661
|
-
children:
|
|
696
|
+
children: U
|
|
662
697
|
}),
|
|
663
698
|
" ",
|
|
664
|
-
|
|
699
|
+
O("channel.channelsLower", "channels")
|
|
665
700
|
]
|
|
666
|
-
}), /* @__PURE__ */
|
|
701
|
+
}), /* @__PURE__ */ S("div", {
|
|
667
702
|
className: "flex items-center gap-2",
|
|
668
703
|
children: [
|
|
669
|
-
/* @__PURE__ */
|
|
704
|
+
/* @__PURE__ */ x("button", {
|
|
670
705
|
type: "button",
|
|
671
|
-
onClick: () =>
|
|
672
|
-
disabled:
|
|
706
|
+
onClick: () => z((e) => Math.max(0, e - 1)),
|
|
707
|
+
disabled: R === 0,
|
|
673
708
|
className: "px-3 py-1.5 text-sm border border-border-subtle rounded-lg hover:bg-bg-sunken transition-colors disabled:opacity-40 disabled:cursor-not-allowed",
|
|
674
|
-
children:
|
|
709
|
+
children: O("channel.previous", "Previous")
|
|
675
710
|
}),
|
|
676
|
-
/* @__PURE__ */
|
|
711
|
+
/* @__PURE__ */ S("span", {
|
|
677
712
|
className: "text-sm text-text-secondary",
|
|
678
713
|
children: [
|
|
679
|
-
|
|
714
|
+
R + 1,
|
|
680
715
|
" / ",
|
|
681
716
|
Y
|
|
682
717
|
]
|
|
683
718
|
}),
|
|
684
|
-
/* @__PURE__ */
|
|
719
|
+
/* @__PURE__ */ x("button", {
|
|
685
720
|
type: "button",
|
|
686
|
-
onClick: () =>
|
|
687
|
-
disabled:
|
|
721
|
+
onClick: () => z((e) => Math.min(Y - 1, e + 1)),
|
|
722
|
+
disabled: R >= Y - 1,
|
|
688
723
|
className: "px-3 py-1.5 text-sm border border-border-subtle rounded-lg hover:bg-bg-sunken transition-colors disabled:opacity-40 disabled:cursor-not-allowed",
|
|
689
|
-
children:
|
|
724
|
+
children: O("channel.next", "Next")
|
|
690
725
|
})
|
|
691
726
|
]
|
|
692
727
|
})]
|
|
@@ -696,6 +731,6 @@ function T() {
|
|
|
696
731
|
});
|
|
697
732
|
}
|
|
698
733
|
//#endregion
|
|
699
|
-
export {
|
|
734
|
+
export { D as ChannelsListPage };
|
|
700
735
|
|
|
701
736
|
//# sourceMappingURL=ChannelsListPage.js.map
|