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