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