@burdenoff/microfe-channel 2026.625.1 → 2026.625.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/channel/modules/channels/pages/ChannelDashboardPage.js +73 -76
- 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 +119 -96
- package/dist/channel/modules/channels/pages/ChannelUsersPage.js.map +1 -1
- package/dist/channel/modules/channels/pages/ChannelsListPage.js +219 -196
- 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 +112 -91
- 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 +101 -93
- 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 +152 -129
- 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
|
|
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
12
|
import { useNavigate as me } from "react-router-dom";
|
|
13
13
|
import { usePermissions as he } from "@burdenoff/fe-libs/shared/providers/shell";
|
|
14
14
|
import { jsx as x, jsxs as S } from "react/jsx-runtime";
|
|
15
|
-
import { CTAOverflowMenu as ge,
|
|
16
|
-
import { TagBadge as
|
|
15
|
+
import { CTAOverflowMenu as ge, EmphasisPanel as _e, GlassCard as C, IllustratedEmptyState as ve, PagePurpose as ye } from "@burdenoff/fe-libs/ui";
|
|
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,16 +56,16 @@ var ye = {
|
|
|
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",
|
|
63
|
-
icon:
|
|
63
|
+
icon: h
|
|
64
64
|
},
|
|
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",
|
|
@@ -75,23 +75,23 @@ var ye = {
|
|
|
75
75
|
SUSPENDED: {
|
|
76
76
|
label: "Suspended",
|
|
77
77
|
color: "text-status-warning-text bg-status-warning-bg-subtle",
|
|
78
|
-
icon:
|
|
78
|
+
icon: m
|
|
79
79
|
},
|
|
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",
|
|
89
|
-
icon:
|
|
89
|
+
icon: h
|
|
90
90
|
},
|
|
91
91
|
DEGRADED: {
|
|
92
92
|
label: "Degraded",
|
|
93
93
|
color: "text-status-warning-text",
|
|
94
|
-
icon:
|
|
94
|
+
icon: m
|
|
95
95
|
},
|
|
96
96
|
UNHEALTHY: {
|
|
97
97
|
label: "Unhealthy",
|
|
@@ -101,27 +101,27 @@ var ye = {
|
|
|
101
101
|
UNKNOWN: {
|
|
102
102
|
label: "Unknown",
|
|
103
103
|
color: "text-text-secondary",
|
|
104
|
-
icon:
|
|
104
|
+
icon: g
|
|
105
105
|
}
|
|
106
106
|
};
|
|
107
|
-
function
|
|
108
|
-
let
|
|
109
|
-
let n =
|
|
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
|
+
let n = xe(e);
|
|
110
110
|
return n === e ? t : n;
|
|
111
|
-
}, [
|
|
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,110 +133,110 @@ 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
241
|
return /* @__PURE__ */ x(s, {
|
|
242
242
|
permission: c.CHANNEL_READ,
|
|
@@ -247,43 +247,78 @@ function T() {
|
|
|
247
247
|
className: "flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",
|
|
248
248
|
children: [/* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("h1", {
|
|
249
249
|
className: "text-xl sm:text-2xl font-bold text-text-primary",
|
|
250
|
-
children:
|
|
250
|
+
children: O("channel.channels", "Channels")
|
|
251
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
259
|
})] }), /* @__PURE__ */ x("div", {
|
|
260
260
|
className: "flex items-center gap-2",
|
|
261
261
|
"data-tour": "channels-list-export-button",
|
|
262
262
|
children: /* @__PURE__ */ x(ge, {
|
|
263
|
-
primary:
|
|
264
|
-
label:
|
|
265
|
-
icon: /* @__PURE__ */ x(
|
|
263
|
+
primary: g ? {
|
|
264
|
+
label: O("channel.createChannel", "Create Channel"),
|
|
265
|
+
icon: /* @__PURE__ */ x(v, {
|
|
266
266
|
size: 16,
|
|
267
267
|
"aria-hidden": "true"
|
|
268
268
|
}),
|
|
269
|
-
onSelect: () =>
|
|
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__ */ x(
|
|
277
|
+
}) : /* @__PURE__ */ x(oe, {
|
|
278
278
|
size: 16,
|
|
279
279
|
"aria-hidden": "true"
|
|
280
280
|
}),
|
|
281
|
-
disabled:
|
|
282
|
-
onSelect: () => void
|
|
281
|
+
disabled: F,
|
|
282
|
+
onSelect: () => void Te()
|
|
283
283
|
}] : []
|
|
284
284
|
})
|
|
285
285
|
})]
|
|
286
286
|
}),
|
|
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
|
+
}),
|
|
287
322
|
/* @__PURE__ */ S("div", {
|
|
288
323
|
className: "flex flex-col gap-3 sm:flex-row sm:items-center",
|
|
289
324
|
children: [
|
|
@@ -293,51 +328,51 @@ function T() {
|
|
|
293
328
|
size: 16,
|
|
294
329
|
className: "absolute left-3 top-1/2 -translate-y-1/2 text-text-secondary"
|
|
295
330
|
}), /* @__PURE__ */ x("input", {
|
|
296
|
-
"aria-label":
|
|
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
339
|
/* @__PURE__ */ S("select", {
|
|
305
|
-
value:
|
|
306
|
-
onChange: (e) =>
|
|
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
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
351
|
/* @__PURE__ */ S("select", {
|
|
317
|
-
value:
|
|
318
|
-
onChange: (e) =>
|
|
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
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__ */ x(
|
|
367
|
+
children: [/* @__PURE__ */ x(p, {
|
|
333
368
|
size: 20,
|
|
334
369
|
className: "text-status-error-text"
|
|
335
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",
|
|
@@ -347,132 +382,120 @@ function T() {
|
|
|
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__ */ x("span", { children:
|
|
390
|
+
}), /* @__PURE__ */ x("span", { children: O("channel.selectAllVisible", "Select all visible") })]
|
|
356
391
|
}), /* @__PURE__ */ S("div", {
|
|
357
392
|
className: "flex flex-wrap items-center gap-2",
|
|
358
393
|
children: [
|
|
359
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
408
|
/* @__PURE__ */ x(s, {
|
|
374
409
|
permission: c.CHANNEL_EXECUTE,
|
|
375
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
418
|
/* @__PURE__ */ x(s, {
|
|
384
419
|
permission: c.CHANNEL_UPDATE,
|
|
385
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
428
|
/* @__PURE__ */ x(s, {
|
|
394
429
|
permission: c.CHANNEL_UPDATE,
|
|
395
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
438
|
/* @__PURE__ */ x(s, {
|
|
404
439
|
permission: c.CHANNEL_DELETE,
|
|
405
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__ */ x(
|
|
454
|
+
/* @__PURE__ */ x(p, {
|
|
420
455
|
size: 20,
|
|
421
456
|
className: "text-status-error-text"
|
|
422
457
|
}),
|
|
423
458
|
/* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
|
|
424
459
|
className: "text-sm font-medium text-status-error-text",
|
|
425
|
-
children:
|
|
460
|
+
children: O("channel.loadFailed", "Failed to load channels")
|
|
426
461
|
}), /* @__PURE__ */ x("p", {
|
|
427
462
|
className: "text-xs text-status-error-text",
|
|
428
|
-
children:
|
|
463
|
+
children: H
|
|
429
464
|
})] }),
|
|
430
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__ */ x(
|
|
475
|
+
children: /* @__PURE__ */ x(_, {
|
|
441
476
|
size: 32,
|
|
442
477
|
className: "animate-spin text-accent-primary"
|
|
443
478
|
})
|
|
444
479
|
}),
|
|
445
|
-
!
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
}),
|
|
456
|
-
/* @__PURE__ */ x("p", {
|
|
457
|
-
className: "text-sm text-text-secondary max-w-md mb-4",
|
|
458
|
-
children: H.search || H.platform || H.status ? E("channel.adjustFilters", "Try adjusting your filters to see more channels.") : E("channel.createFirstChannelPrompt", "Create your first communication channel to get started.")
|
|
459
|
-
}),
|
|
460
|
-
h && !H.search && !H.platform && !H.status && /* @__PURE__ */ S("button", {
|
|
461
|
-
type: "button",
|
|
462
|
-
onClick: () => p("/channels/create"),
|
|
463
|
-
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",
|
|
464
|
-
children: [/* @__PURE__ */ x(_, { size: 16 }), E("channel.createChannel", "Create Channel")]
|
|
465
|
-
})
|
|
466
|
-
]
|
|
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", {
|
|
485
|
+
type: "button",
|
|
486
|
+
onClick: () => m("/channels/create"),
|
|
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",
|
|
488
|
+
children: [/* @__PURE__ */ x(v, { size: 16 }), O("channel.createChannel", "Create Channel")]
|
|
489
|
+
}) : void 0
|
|
467
490
|
}),
|
|
468
|
-
|
|
491
|
+
B.length > 0 && /* @__PURE__ */ x("div", {
|
|
469
492
|
className: "grid gap-4 sm:grid-cols-2 lg:grid-cols-3",
|
|
470
493
|
"data-tour": "channels-list-grid",
|
|
471
|
-
children:
|
|
472
|
-
let t =
|
|
473
|
-
return /* @__PURE__ */ S(
|
|
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, {
|
|
474
497
|
treatment: "insight",
|
|
475
|
-
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"}`,
|
|
476
499
|
children: [
|
|
477
500
|
/* @__PURE__ */ S("div", {
|
|
478
501
|
className: "flex items-start justify-between mb-3",
|
|
@@ -481,12 +504,12 @@ function T() {
|
|
|
481
504
|
children: [
|
|
482
505
|
/* @__PURE__ */ x("input", {
|
|
483
506
|
type: "checkbox",
|
|
484
|
-
checked:
|
|
485
|
-
onChange: (t) =>
|
|
507
|
+
checked: j.has(e.id),
|
|
508
|
+
onChange: (t) => Ne(e.id, t.target.checked),
|
|
486
509
|
"aria-label": `Select channel ${e.name}`,
|
|
487
510
|
className: "size-4 rounded border-border-subtle text-primary"
|
|
488
511
|
}),
|
|
489
|
-
/* @__PURE__ */ x(
|
|
512
|
+
/* @__PURE__ */ x(ue, {
|
|
490
513
|
size: 20,
|
|
491
514
|
className: "text-accent-primary"
|
|
492
515
|
}),
|
|
@@ -501,7 +524,7 @@ function T() {
|
|
|
501
524
|
size: 14,
|
|
502
525
|
className: n.color.split(" ")[0]
|
|
503
526
|
}), /* @__PURE__ */ x("span", {
|
|
504
|
-
className: `px-2 py-0.5 text-xs font-medium rounded-full ${n.color}`,
|
|
527
|
+
className: `px-2 py-0.5 text-xs font-medium rounded-full ${n.color} ${e.status === "ACTIVE" ? "motion-safe:animate-vc-glow-pulse" : ""}`,
|
|
505
528
|
children: n.label
|
|
506
529
|
})]
|
|
507
530
|
})]
|
|
@@ -509,9 +532,9 @@ function T() {
|
|
|
509
532
|
/* @__PURE__ */ S("div", {
|
|
510
533
|
role: "button",
|
|
511
534
|
tabIndex: 0,
|
|
512
|
-
onClick: () =>
|
|
535
|
+
onClick: () => m(`/channels/${e.id}`),
|
|
513
536
|
onKeyDown: (t) => {
|
|
514
|
-
(t.key === "Enter" || t.key === " ") && (t.preventDefault(),
|
|
537
|
+
(t.key === "Enter" || t.key === " ") && (t.preventDefault(), m(`/channels/${e.id}`));
|
|
515
538
|
},
|
|
516
539
|
className: "cursor-pointer",
|
|
517
540
|
children: [
|
|
@@ -530,7 +553,7 @@ function T() {
|
|
|
530
553
|
/* @__PURE__ */ x("div", {
|
|
531
554
|
className: "flex items-center gap-3 text-xs text-text-secondary mb-2",
|
|
532
555
|
children: /* @__PURE__ */ S("span", { children: [
|
|
533
|
-
|
|
556
|
+
O("channel.priority", "Priority"),
|
|
534
557
|
": ",
|
|
535
558
|
e.priority
|
|
536
559
|
] })
|
|
@@ -551,7 +574,7 @@ function T() {
|
|
|
551
574
|
/* @__PURE__ */ x("span", { children: "•" }),
|
|
552
575
|
/* @__PURE__ */ x("span", {
|
|
553
576
|
className: e.isConnected ? "text-status-success-text" : "text-text-secondary",
|
|
554
|
-
children: e.isConnected ?
|
|
577
|
+
children: e.isConnected ? O("channel.connected", "Connected") : O("channel.notConnected", "Not Connected")
|
|
555
578
|
})
|
|
556
579
|
]
|
|
557
580
|
})
|
|
@@ -560,7 +583,7 @@ function T() {
|
|
|
560
583
|
e.tagAssignments && e.tagAssignments.length > 0 && /* @__PURE__ */ S("div", {
|
|
561
584
|
className: "flex flex-wrap gap-1 mt-2",
|
|
562
585
|
"aria-label": "Channel tags",
|
|
563
|
-
children: [e.tagAssignments.slice(0, 4).map((e) => /* @__PURE__ */ x(
|
|
586
|
+
children: [e.tagAssignments.slice(0, 4).map((e) => /* @__PURE__ */ x(be, {
|
|
564
587
|
id: e.tagId,
|
|
565
588
|
label: e.tagId,
|
|
566
589
|
size: "sm"
|
|
@@ -576,27 +599,27 @@ function T() {
|
|
|
576
599
|
children: [
|
|
577
600
|
/* @__PURE__ */ x("button", {
|
|
578
601
|
type: "button",
|
|
579
|
-
onClick: () =>
|
|
602
|
+
onClick: () => m(`/channels/${e.id}`),
|
|
580
603
|
className: "p-1.5 text-text-secondary hover:text-accent-primary hover:bg-accent-primary/10 rounded transition-colors cursor-pointer",
|
|
581
|
-
title:
|
|
582
|
-
children: /* @__PURE__ */ x(
|
|
604
|
+
title: O("channel.viewDetails", "View Details"),
|
|
605
|
+
children: /* @__PURE__ */ x(se, { size: 14 })
|
|
583
606
|
}),
|
|
584
607
|
b && /* @__PURE__ */ x("button", {
|
|
585
608
|
type: "button",
|
|
586
|
-
onClick: () =>
|
|
609
|
+
onClick: () => m(`/channels/${e.id}/edit`),
|
|
587
610
|
className: "p-1.5 text-text-secondary hover:text-accent-primary hover:bg-accent-primary/10 rounded transition-colors cursor-pointer",
|
|
588
|
-
title:
|
|
589
|
-
children: /* @__PURE__ */ x(
|
|
611
|
+
title: O("channel.editChannel", "Edit Channel"),
|
|
612
|
+
children: /* @__PURE__ */ x(ce, { size: 14 })
|
|
590
613
|
}),
|
|
591
614
|
/* @__PURE__ */ x(s, {
|
|
592
615
|
permission: c.CHANNEL_EXECUTE,
|
|
593
616
|
children: /* @__PURE__ */ x("button", {
|
|
594
617
|
type: "button",
|
|
595
|
-
onClick: () =>
|
|
618
|
+
onClick: () => je(e.id),
|
|
596
619
|
disabled: o,
|
|
597
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",
|
|
598
|
-
title:
|
|
599
|
-
children: o ? /* @__PURE__ */ x(
|
|
621
|
+
title: O("channel.runHealthCheck", "Run Health Check"),
|
|
622
|
+
children: o ? /* @__PURE__ */ x(_, {
|
|
600
623
|
size: 14,
|
|
601
624
|
className: "animate-spin"
|
|
602
625
|
}) : /* @__PURE__ */ x(de, { size: 14 })
|
|
@@ -606,42 +629,42 @@ function T() {
|
|
|
606
629
|
permission: c.CHANNEL_UPDATE,
|
|
607
630
|
children: /* @__PURE__ */ x("button", {
|
|
608
631
|
type: "button",
|
|
609
|
-
onClick: () =>
|
|
632
|
+
onClick: () => Ae(e),
|
|
610
633
|
disabled: o,
|
|
611
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"}`,
|
|
612
|
-
title: e.status === "ACTIVE" ?
|
|
613
|
-
children: e.status === "ACTIVE" ? /* @__PURE__ */ x(
|
|
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 })
|
|
614
637
|
})
|
|
615
638
|
})
|
|
616
639
|
]
|
|
617
|
-
}),
|
|
640
|
+
}), Se === e.id ? /* @__PURE__ */ S("div", {
|
|
618
641
|
className: "flex items-center gap-2",
|
|
619
642
|
children: [
|
|
620
643
|
/* @__PURE__ */ x("span", {
|
|
621
644
|
className: "text-xs text-text-secondary",
|
|
622
|
-
children:
|
|
645
|
+
children: O("channel.deleteQuestion", "Delete?")
|
|
623
646
|
}),
|
|
624
647
|
/* @__PURE__ */ x("button", {
|
|
625
648
|
type: "button",
|
|
626
|
-
onClick: () =>
|
|
649
|
+
onClick: () => ke(e.id),
|
|
627
650
|
disabled: o,
|
|
628
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",
|
|
629
|
-
children: o ? "..." :
|
|
652
|
+
children: o ? "..." : O("channel.yes", "Yes")
|
|
630
653
|
}),
|
|
631
654
|
/* @__PURE__ */ x("button", {
|
|
632
655
|
type: "button",
|
|
633
|
-
onClick: () =>
|
|
656
|
+
onClick: () => k(null),
|
|
634
657
|
className: "px-2 py-1 text-xs text-text-secondary hover:bg-bg-sunken rounded transition-colors cursor-pointer",
|
|
635
|
-
children:
|
|
658
|
+
children: O("channel.no", "No")
|
|
636
659
|
})
|
|
637
660
|
]
|
|
638
661
|
}) : /* @__PURE__ */ x(s, {
|
|
639
662
|
permission: c.CHANNEL_DELETE,
|
|
640
663
|
children: /* @__PURE__ */ x("button", {
|
|
641
664
|
type: "button",
|
|
642
|
-
onClick: () =>
|
|
665
|
+
onClick: () => k(e.id),
|
|
643
666
|
className: "p-1.5 text-text-secondary hover:text-status-error-text hover:bg-status-error-bg-subtle rounded transition-colors cursor-pointer",
|
|
644
|
-
title:
|
|
667
|
+
title: O("channel.deleteChannel", "Delete Channel"),
|
|
645
668
|
children: /* @__PURE__ */ x(pe, { size: 14 })
|
|
646
669
|
})
|
|
647
670
|
})]
|
|
@@ -650,55 +673,55 @@ function T() {
|
|
|
650
673
|
}, e.id);
|
|
651
674
|
})
|
|
652
675
|
}),
|
|
653
|
-
|
|
676
|
+
U > L && /* @__PURE__ */ S("div", {
|
|
654
677
|
className: "flex items-center justify-between px-1 py-2",
|
|
655
678
|
children: [/* @__PURE__ */ S("p", {
|
|
656
679
|
className: "text-sm text-text-secondary",
|
|
657
680
|
children: [
|
|
658
|
-
|
|
681
|
+
O("channel.showing", "Showing"),
|
|
659
682
|
" ",
|
|
660
683
|
/* @__PURE__ */ S("span", {
|
|
661
684
|
className: "font-medium text-text-primary",
|
|
662
685
|
children: [
|
|
663
|
-
|
|
686
|
+
R * L + 1,
|
|
664
687
|
"–",
|
|
665
|
-
Math.min((
|
|
688
|
+
Math.min((R + 1) * L, U)
|
|
666
689
|
]
|
|
667
690
|
}),
|
|
668
691
|
" ",
|
|
669
|
-
|
|
692
|
+
O("channel.of", "of"),
|
|
670
693
|
" ",
|
|
671
694
|
/* @__PURE__ */ x("span", {
|
|
672
695
|
className: "font-medium text-text-primary",
|
|
673
|
-
children:
|
|
696
|
+
children: U
|
|
674
697
|
}),
|
|
675
698
|
" ",
|
|
676
|
-
|
|
699
|
+
O("channel.channelsLower", "channels")
|
|
677
700
|
]
|
|
678
701
|
}), /* @__PURE__ */ S("div", {
|
|
679
702
|
className: "flex items-center gap-2",
|
|
680
703
|
children: [
|
|
681
704
|
/* @__PURE__ */ x("button", {
|
|
682
705
|
type: "button",
|
|
683
|
-
onClick: () =>
|
|
684
|
-
disabled:
|
|
706
|
+
onClick: () => z((e) => Math.max(0, e - 1)),
|
|
707
|
+
disabled: R === 0,
|
|
685
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",
|
|
686
|
-
children:
|
|
709
|
+
children: O("channel.previous", "Previous")
|
|
687
710
|
}),
|
|
688
711
|
/* @__PURE__ */ S("span", {
|
|
689
712
|
className: "text-sm text-text-secondary",
|
|
690
713
|
children: [
|
|
691
|
-
|
|
714
|
+
R + 1,
|
|
692
715
|
" / ",
|
|
693
716
|
Y
|
|
694
717
|
]
|
|
695
718
|
}),
|
|
696
719
|
/* @__PURE__ */ x("button", {
|
|
697
720
|
type: "button",
|
|
698
|
-
onClick: () =>
|
|
699
|
-
disabled:
|
|
721
|
+
onClick: () => z((e) => Math.min(Y - 1, e + 1)),
|
|
722
|
+
disabled: R >= Y - 1,
|
|
700
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",
|
|
701
|
-
children:
|
|
724
|
+
children: O("channel.next", "Next")
|
|
702
725
|
})
|
|
703
726
|
]
|
|
704
727
|
})]
|
|
@@ -708,6 +731,6 @@ function T() {
|
|
|
708
731
|
});
|
|
709
732
|
}
|
|
710
733
|
//#endregion
|
|
711
|
-
export {
|
|
734
|
+
export { D as ChannelsListPage };
|
|
712
735
|
|
|
713
736
|
//# sourceMappingURL=ChannelsListPage.js.map
|