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