@burdenoff/microfe-channel 2026.624.1 → 2026.624.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/modules/channels/pages/ChannelDashboardPage.js +8 -8
- package/dist/channel/modules/channels/pages/ChannelDashboardPage.js.map +1 -1
- package/dist/channel/modules/channels/pages/ChannelDetailsPage.js +383 -389
- package/dist/channel/modules/channels/pages/ChannelDetailsPage.js.map +1 -1
- package/dist/channel/modules/channels/pages/ChannelUsersPage.js +212 -238
- package/dist/channel/modules/channels/pages/ChannelUsersPage.js.map +1 -1
- package/dist/channel/modules/channels/pages/DeliveryHistoryPage.js +196 -221
- package/dist/channel/modules/channels/pages/DeliveryHistoryPage.js.map +1 -1
- package/package.json +1 -1
|
@@ -5,11 +5,12 @@ import { CHANNEL_PERMISSIONS as r } from "../../../constants/permissions.js";
|
|
|
5
5
|
import { useExportChannelUsers as i } from "../hooks/useExport.js";
|
|
6
6
|
import { useCallback as a, useEffect as o, useRef as s, useState as c } from "react";
|
|
7
7
|
import { useI18n as l } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
8
|
-
import { AlertCircle as u, ArrowLeft as d, Bell as f, BellOff as p, CheckCircle2 as m, ChevronLeft as
|
|
9
|
-
import { useNavigate as
|
|
10
|
-
import { Fragment as
|
|
8
|
+
import { AlertCircle as u, ArrowLeft as d, Bell as f, BellOff as p, CheckCircle2 as m, ChevronLeft as h, ChevronRight as g, Clock as _, Download as v, Loader2 as y, RefreshCw as ee, User as te, UserCheck as ne, XCircle as b } from "lucide-react";
|
|
9
|
+
import { useNavigate as x, useParams as S } from "react-router-dom";
|
|
10
|
+
import { Fragment as C, jsx as w, jsxs as T } from "react/jsx-runtime";
|
|
11
|
+
import { ResponsiveTable as E } from "@burdenoff/fe-libs/ui";
|
|
11
12
|
//#region src/channel/modules/channels/pages/ChannelUsersPage.tsx
|
|
12
|
-
var
|
|
13
|
+
var D = {
|
|
13
14
|
ONLINE: {
|
|
14
15
|
label: "Online",
|
|
15
16
|
color: "text-status-success-text"
|
|
@@ -26,11 +27,11 @@ var O = {
|
|
|
26
27
|
label: "Do Not Disturb",
|
|
27
28
|
color: "text-status-error-text"
|
|
28
29
|
}
|
|
29
|
-
},
|
|
30
|
+
}, O = {
|
|
30
31
|
PENDING: {
|
|
31
32
|
label: "Pending",
|
|
32
33
|
color: "text-status-warning-text bg-status-warning-bg-subtle",
|
|
33
|
-
icon:
|
|
34
|
+
icon: _
|
|
34
35
|
},
|
|
35
36
|
APPROVED: {
|
|
36
37
|
label: "Approved",
|
|
@@ -40,355 +41,328 @@ var O = {
|
|
|
40
41
|
EXPIRED: {
|
|
41
42
|
label: "Expired",
|
|
42
43
|
color: "text-text-secondary bg-bg-sunken",
|
|
43
|
-
icon:
|
|
44
|
+
icon: b
|
|
44
45
|
}
|
|
45
46
|
};
|
|
46
|
-
function
|
|
47
|
-
let { channelId: m } =
|
|
48
|
-
let n =
|
|
47
|
+
function k() {
|
|
48
|
+
let { channelId: m } = S(), _ = x(), { t: k } = l(), A = (e, t) => {
|
|
49
|
+
let n = k(e);
|
|
49
50
|
return n === e ? t : n;
|
|
50
|
-
}, { organizationId:
|
|
51
|
+
}, { organizationId: j } = e(), { triggerExport: re, isExporting: M, exportError: N } = i(j ?? void 0, m), [P, F] = c(!0), [I, L] = c([]), [R, z] = c(25), [B, V] = c(0), [H, U] = c(0), { channel: W, isLoading: G, error: K, fetchUserPlatformConnections: q } = t(m), J = a(async (e = 0) => {
|
|
51
52
|
if (m) {
|
|
52
|
-
|
|
53
|
+
F(!0);
|
|
53
54
|
try {
|
|
54
|
-
let t = await
|
|
55
|
-
|
|
55
|
+
let t = await q(R, e * R);
|
|
56
|
+
L(t.items), V(t.total);
|
|
56
57
|
} finally {
|
|
57
|
-
|
|
58
|
+
F(!1);
|
|
58
59
|
}
|
|
59
60
|
}
|
|
60
61
|
}, [
|
|
61
62
|
m,
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
]),
|
|
63
|
+
q,
|
|
64
|
+
R
|
|
65
|
+
]), Y = s(J);
|
|
65
66
|
o(() => {
|
|
66
|
-
|
|
67
|
+
Y.current = J;
|
|
67
68
|
});
|
|
68
|
-
let
|
|
69
|
+
let X = s(!0), Z = s(!1);
|
|
69
70
|
o(() => {
|
|
70
71
|
Promise.resolve().then(() => {
|
|
71
|
-
|
|
72
|
-
|
|
72
|
+
Z.current = !0, U(0), Y.current(0).finally(() => {
|
|
73
|
+
Z.current = !1;
|
|
73
74
|
});
|
|
74
75
|
});
|
|
75
|
-
}, [
|
|
76
|
-
if (
|
|
77
|
-
|
|
76
|
+
}, [R]), o(() => {
|
|
77
|
+
if (X.current) {
|
|
78
|
+
X.current = !1;
|
|
78
79
|
return;
|
|
79
80
|
}
|
|
80
|
-
|
|
81
|
-
}, [
|
|
82
|
-
let
|
|
83
|
-
|
|
81
|
+
Z.current || Promise.resolve().then(() => Y.current(H));
|
|
82
|
+
}, [H]);
|
|
83
|
+
let Q = Math.max(1, Math.ceil(B / R)), $ = H > 0, ie = H < Q - 1, ae = (e) => D[e] || D.OFFLINE, oe = (e) => O[e] || O.EXPIRED, se = [
|
|
84
|
+
{
|
|
85
|
+
key: "user",
|
|
86
|
+
header: A("channel.user", "User"),
|
|
87
|
+
priority: "primary",
|
|
88
|
+
cell: (e) => /* @__PURE__ */ T("div", {
|
|
89
|
+
className: "flex items-center gap-3",
|
|
90
|
+
children: [/* @__PURE__ */ w("div", {
|
|
91
|
+
className: "size-8 bg-accent-primary/10 rounded-full flex items-center justify-center",
|
|
92
|
+
children: /* @__PURE__ */ w(te, {
|
|
93
|
+
size: 16,
|
|
94
|
+
className: "text-accent-primary"
|
|
95
|
+
})
|
|
96
|
+
}), /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
|
|
97
|
+
className: "text-sm font-medium text-text-primary",
|
|
98
|
+
children: e.externalDisplayName || "Unknown"
|
|
99
|
+
}), e.externalUsername && /* @__PURE__ */ w("p", {
|
|
100
|
+
className: "text-xs text-text-secondary",
|
|
101
|
+
children: e.externalUsername
|
|
102
|
+
})] })]
|
|
103
|
+
})
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
key: "platformId",
|
|
107
|
+
header: A("channel.platformId", "Platform ID"),
|
|
108
|
+
priority: "secondary",
|
|
109
|
+
cellClassName: "text-sm font-mono text-text-secondary",
|
|
110
|
+
cell: (e) => e.externalUserId
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
key: "source",
|
|
114
|
+
header: A("channel.source", "Source"),
|
|
115
|
+
priority: "secondary",
|
|
116
|
+
cell: (e) => /* @__PURE__ */ w("span", {
|
|
117
|
+
className: "text-xs text-text-secondary bg-bg-sunken px-2 py-1 rounded",
|
|
118
|
+
children: e.source
|
|
119
|
+
})
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
key: "status",
|
|
123
|
+
header: A("channel.status", "Status"),
|
|
124
|
+
priority: "primary",
|
|
125
|
+
cell: (e) => {
|
|
126
|
+
let t = ae(e.presenceStatus);
|
|
127
|
+
return /* @__PURE__ */ T("div", {
|
|
128
|
+
className: "flex items-center gap-2",
|
|
129
|
+
children: [/* @__PURE__ */ w("span", { className: `w-2 h-2 rounded-full ${t.color.replace("text-", "bg-")}` }), /* @__PURE__ */ w("span", {
|
|
130
|
+
className: `text-sm ${t.color}`,
|
|
131
|
+
children: t.label
|
|
132
|
+
})]
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
key: "pairing",
|
|
138
|
+
header: A("channel.pairing", "Pairing"),
|
|
139
|
+
priority: "secondary",
|
|
140
|
+
cell: (e) => {
|
|
141
|
+
let t = e.pairingStatus ? oe(e.pairingStatus) : null, n = t?.icon ?? b;
|
|
142
|
+
return e.pairingStatus && t ? /* @__PURE__ */ T("span", {
|
|
143
|
+
className: `inline-flex items-center gap-1 text-xs px-2 py-1 rounded ${t.color}`,
|
|
144
|
+
children: [/* @__PURE__ */ w(n, { size: 12 }), t.label]
|
|
145
|
+
}) : /* @__PURE__ */ w("span", {
|
|
146
|
+
className: "text-xs text-text-secondary",
|
|
147
|
+
children: "-"
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
key: "notifications",
|
|
153
|
+
header: A("channel.notifications", "Notifications"),
|
|
154
|
+
priority: "secondary",
|
|
155
|
+
cell: (e) => e.notificationsEnabled ? /* @__PURE__ */ T("span", {
|
|
156
|
+
className: "inline-flex items-center gap-1",
|
|
157
|
+
children: [/* @__PURE__ */ w(f, {
|
|
158
|
+
size: 16,
|
|
159
|
+
className: "text-status-success-text",
|
|
160
|
+
"aria-hidden": "true"
|
|
161
|
+
}), /* @__PURE__ */ w("span", {
|
|
162
|
+
className: "sr-only",
|
|
163
|
+
children: A("channel.enabled", "Enabled")
|
|
164
|
+
})]
|
|
165
|
+
}) : /* @__PURE__ */ T("span", {
|
|
166
|
+
className: "inline-flex items-center gap-1",
|
|
167
|
+
children: [/* @__PURE__ */ w(p, {
|
|
168
|
+
size: 16,
|
|
169
|
+
className: "text-text-secondary",
|
|
170
|
+
"aria-hidden": "true"
|
|
171
|
+
}), /* @__PURE__ */ w("span", {
|
|
172
|
+
className: "sr-only",
|
|
173
|
+
children: A("channel.disabled", "Disabled")
|
|
174
|
+
})]
|
|
175
|
+
})
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
key: "dmAllowed",
|
|
179
|
+
header: A("channel.dmAllowed", "DM Allowed"),
|
|
180
|
+
priority: "secondary",
|
|
181
|
+
cell: (e) => e.dmAllowed ? /* @__PURE__ */ T("span", {
|
|
182
|
+
className: "inline-flex items-center gap-1 text-sm text-status-success-text",
|
|
183
|
+
children: [/* @__PURE__ */ w(ne, { size: 16 }), A("channel.allowed", "Allowed")]
|
|
184
|
+
}) : /* @__PURE__ */ T("span", {
|
|
185
|
+
className: "inline-flex items-center gap-1 text-sm text-text-secondary",
|
|
186
|
+
children: [/* @__PURE__ */ w(b, { size: 16 }), A("channel.blocked", "Blocked")]
|
|
187
|
+
})
|
|
188
|
+
}
|
|
189
|
+
];
|
|
190
|
+
return G ? /* @__PURE__ */ w("div", {
|
|
84
191
|
className: "flex items-center justify-center min-h-screen",
|
|
85
|
-
children: /* @__PURE__ */
|
|
192
|
+
children: /* @__PURE__ */ w(y, {
|
|
86
193
|
size: 32,
|
|
87
194
|
className: "animate-spin text-accent-primary"
|
|
88
195
|
})
|
|
89
|
-
}) :
|
|
196
|
+
}) : K || !W ? /* @__PURE__ */ w("div", {
|
|
90
197
|
className: "p-6",
|
|
91
|
-
children: /* @__PURE__ */
|
|
198
|
+
children: /* @__PURE__ */ T("div", {
|
|
92
199
|
className: "flex items-center gap-3 p-4 bg-status-error-bg-subtle border border-status-error-border rounded-lg",
|
|
93
200
|
children: [
|
|
94
|
-
/* @__PURE__ */
|
|
201
|
+
/* @__PURE__ */ w(u, {
|
|
95
202
|
size: 20,
|
|
96
203
|
className: "text-status-error-text"
|
|
97
204
|
}),
|
|
98
|
-
/* @__PURE__ */
|
|
205
|
+
/* @__PURE__ */ w("div", { children: /* @__PURE__ */ w("p", {
|
|
99
206
|
className: "text-sm font-medium text-status-error-text",
|
|
100
|
-
children:
|
|
207
|
+
children: K || "Channel not found"
|
|
101
208
|
}) }),
|
|
102
|
-
/* @__PURE__ */
|
|
209
|
+
/* @__PURE__ */ w("button", {
|
|
103
210
|
type: "button",
|
|
104
|
-
onClick: () =>
|
|
211
|
+
onClick: () => _(`/channels/${m}`),
|
|
105
212
|
className: "ml-auto px-3 py-1 text-sm text-status-error-text hover:bg-status-error-bg-subtle rounded transition-colors",
|
|
106
213
|
children: "Go Back"
|
|
107
214
|
})
|
|
108
215
|
]
|
|
109
216
|
})
|
|
110
|
-
}) : /* @__PURE__ */
|
|
217
|
+
}) : /* @__PURE__ */ w(n, {
|
|
111
218
|
permission: r.USER_PLATFORM_CONNECTION_READ,
|
|
112
|
-
children: /* @__PURE__ */
|
|
219
|
+
children: /* @__PURE__ */ T("div", {
|
|
113
220
|
className: "space-y-6 p-3 sm:p-6",
|
|
114
221
|
children: [
|
|
115
|
-
/* @__PURE__ */
|
|
222
|
+
/* @__PURE__ */ T("div", {
|
|
116
223
|
className: "flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",
|
|
117
|
-
children: [/* @__PURE__ */
|
|
224
|
+
children: [/* @__PURE__ */ T("div", {
|
|
118
225
|
className: "flex items-center gap-3",
|
|
119
|
-
children: [/* @__PURE__ */
|
|
226
|
+
children: [/* @__PURE__ */ w("button", {
|
|
120
227
|
type: "button",
|
|
121
|
-
onClick: () =>
|
|
122
|
-
"aria-label":
|
|
228
|
+
onClick: () => _(`/channels/${m}`),
|
|
229
|
+
"aria-label": A("channel.backToChannel", "Back to channel"),
|
|
123
230
|
className: "p-2 text-text-secondary hover:text-text-primary hover:bg-bg-sunken rounded-lg transition-colors",
|
|
124
|
-
children: /* @__PURE__ */
|
|
231
|
+
children: /* @__PURE__ */ w(d, {
|
|
125
232
|
size: 20,
|
|
126
233
|
"aria-hidden": "true"
|
|
127
234
|
})
|
|
128
|
-
}), /* @__PURE__ */
|
|
235
|
+
}), /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("h1", {
|
|
129
236
|
className: "text-xl sm:text-2xl font-bold text-text-primary",
|
|
130
|
-
children:
|
|
131
|
-
}), /* @__PURE__ */
|
|
237
|
+
children: A("channel.channelUsers", "Channel Users")
|
|
238
|
+
}), /* @__PURE__ */ T("p", {
|
|
132
239
|
className: "text-sm text-text-secondary mt-1",
|
|
133
|
-
children: [
|
|
240
|
+
children: [W.name, " - User connections"]
|
|
134
241
|
})] })]
|
|
135
|
-
}), /* @__PURE__ */
|
|
242
|
+
}), /* @__PURE__ */ T("div", {
|
|
136
243
|
className: "flex items-center gap-3",
|
|
137
244
|
children: [
|
|
138
|
-
/* @__PURE__ */
|
|
139
|
-
value:
|
|
140
|
-
onChange: (e) =>
|
|
245
|
+
/* @__PURE__ */ T("select", {
|
|
246
|
+
value: R,
|
|
247
|
+
onChange: (e) => z(Number(e.target.value)),
|
|
141
248
|
className: "px-3 py-2 text-sm bg-surface border border-border-subtle rounded-lg focus:outline-none focus:ring-2 focus:ring-accent-primary/50 text-text-primary",
|
|
142
249
|
children: [
|
|
143
|
-
/* @__PURE__ */
|
|
250
|
+
/* @__PURE__ */ w("option", {
|
|
144
251
|
value: 10,
|
|
145
252
|
children: "10 results"
|
|
146
253
|
}),
|
|
147
|
-
/* @__PURE__ */
|
|
254
|
+
/* @__PURE__ */ w("option", {
|
|
148
255
|
value: 25,
|
|
149
256
|
children: "25 results"
|
|
150
257
|
}),
|
|
151
|
-
/* @__PURE__ */
|
|
258
|
+
/* @__PURE__ */ w("option", {
|
|
152
259
|
value: 50,
|
|
153
260
|
children: "50 results"
|
|
154
261
|
}),
|
|
155
|
-
/* @__PURE__ */
|
|
262
|
+
/* @__PURE__ */ w("option", {
|
|
156
263
|
value: 100,
|
|
157
264
|
children: "100 results"
|
|
158
265
|
})
|
|
159
266
|
]
|
|
160
267
|
}),
|
|
161
|
-
/* @__PURE__ */
|
|
268
|
+
/* @__PURE__ */ T("button", {
|
|
162
269
|
type: "button",
|
|
163
|
-
onClick: () => void
|
|
164
|
-
disabled:
|
|
270
|
+
onClick: () => void J(H),
|
|
271
|
+
disabled: P,
|
|
165
272
|
className: "flex items-center gap-2 px-4 py-2 text-sm font-medium text-text-secondary hover:text-text-primary hover:bg-bg-sunken rounded-lg transition-colors disabled:opacity-50",
|
|
166
|
-
children: [/* @__PURE__ */
|
|
273
|
+
children: [/* @__PURE__ */ w(ee, {
|
|
167
274
|
size: 16,
|
|
168
|
-
className:
|
|
169
|
-
}),
|
|
275
|
+
className: P ? "animate-spin" : ""
|
|
276
|
+
}), A("channel.refresh", "Refresh")]
|
|
170
277
|
}),
|
|
171
|
-
/* @__PURE__ */
|
|
278
|
+
/* @__PURE__ */ w(n, {
|
|
172
279
|
permission: r.CHANNEL_USER_EXPORT,
|
|
173
|
-
children: /* @__PURE__ */
|
|
280
|
+
children: /* @__PURE__ */ T("button", {
|
|
174
281
|
type: "button",
|
|
175
|
-
onClick: () => void
|
|
176
|
-
disabled:
|
|
282
|
+
onClick: () => void re(),
|
|
283
|
+
disabled: M,
|
|
177
284
|
className: "flex items-center gap-2 px-4 py-2 text-sm font-medium text-fg border border-border-subtle hover:bg-bg-elevated rounded-lg transition-colors disabled:opacity-50 disabled:cursor-not-allowed",
|
|
178
|
-
title:
|
|
179
|
-
children: [
|
|
285
|
+
title: A("channel.exportCSV", "Export to CSV"),
|
|
286
|
+
children: [M ? /* @__PURE__ */ w(y, {
|
|
180
287
|
size: 16,
|
|
181
288
|
className: "animate-spin"
|
|
182
|
-
}) : /* @__PURE__ */
|
|
289
|
+
}) : /* @__PURE__ */ w(v, { size: 16 }), A("channel.export", "Export")]
|
|
183
290
|
})
|
|
184
291
|
})
|
|
185
292
|
]
|
|
186
293
|
})]
|
|
187
294
|
}),
|
|
188
|
-
|
|
295
|
+
N && /* @__PURE__ */ T("div", {
|
|
189
296
|
className: "p-4 bg-status-error-bg-subtle border border-status-error-border rounded-lg flex items-center gap-3",
|
|
190
|
-
children: [/* @__PURE__ */
|
|
297
|
+
children: [/* @__PURE__ */ w(u, {
|
|
191
298
|
size: 20,
|
|
192
299
|
className: "text-status-error-text"
|
|
193
|
-
}), /* @__PURE__ */
|
|
300
|
+
}), /* @__PURE__ */ w("p", {
|
|
194
301
|
className: "text-sm text-status-error-text flex-1",
|
|
195
|
-
children:
|
|
302
|
+
children: N
|
|
196
303
|
})]
|
|
197
304
|
}),
|
|
198
|
-
/* @__PURE__ */
|
|
305
|
+
/* @__PURE__ */ w("div", {
|
|
199
306
|
className: "p-4 bg-surface border border-border-subtle rounded-lg",
|
|
200
|
-
children: /* @__PURE__ */
|
|
307
|
+
children: /* @__PURE__ */ w("p", {
|
|
201
308
|
className: "text-sm text-text-secondary",
|
|
202
309
|
children: "Users connected to this channel through OAuth or pairing. Manage notification preferences and DM authorization here."
|
|
203
310
|
})
|
|
204
311
|
}),
|
|
205
|
-
/* @__PURE__ */ E
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
children: [/* @__PURE__ */ E("thead", {
|
|
212
|
-
className: "bg-bg-sunken/50 border-b border-border-subtle",
|
|
213
|
-
children: /* @__PURE__ */ D("tr", { children: [
|
|
214
|
-
/* @__PURE__ */ E("th", {
|
|
215
|
-
className: "px-4 py-3 text-left text-xs font-medium text-text-secondary uppercase tracking-wider",
|
|
216
|
-
children: j("channel.user", "User")
|
|
217
|
-
}),
|
|
218
|
-
/* @__PURE__ */ E("th", {
|
|
219
|
-
className: "px-4 py-3 text-left text-xs font-medium text-text-secondary uppercase tracking-wider",
|
|
220
|
-
children: j("channel.platformId", "Platform ID")
|
|
221
|
-
}),
|
|
222
|
-
/* @__PURE__ */ E("th", {
|
|
223
|
-
className: "px-4 py-3 text-left text-xs font-medium text-text-secondary uppercase tracking-wider",
|
|
224
|
-
children: j("channel.source", "Source")
|
|
225
|
-
}),
|
|
226
|
-
/* @__PURE__ */ E("th", {
|
|
227
|
-
className: "px-4 py-3 text-left text-xs font-medium text-text-secondary uppercase tracking-wider",
|
|
228
|
-
children: j("channel.status", "Status")
|
|
229
|
-
}),
|
|
230
|
-
/* @__PURE__ */ E("th", {
|
|
231
|
-
className: "px-4 py-3 text-left text-xs font-medium text-text-secondary uppercase tracking-wider",
|
|
232
|
-
children: j("channel.pairing", "Pairing")
|
|
233
|
-
}),
|
|
234
|
-
/* @__PURE__ */ E("th", {
|
|
235
|
-
className: "px-4 py-3 text-left text-xs font-medium text-text-secondary uppercase tracking-wider",
|
|
236
|
-
children: j("channel.notifications", "Notifications")
|
|
237
|
-
}),
|
|
238
|
-
/* @__PURE__ */ E("th", {
|
|
239
|
-
className: "px-4 py-3 text-left text-xs font-medium text-text-secondary uppercase tracking-wider",
|
|
240
|
-
children: j("channel.dmAllowed", "DM Allowed")
|
|
241
|
-
})
|
|
242
|
-
] })
|
|
243
|
-
}), /* @__PURE__ */ E("tbody", {
|
|
244
|
-
className: "divide-y divide-border",
|
|
245
|
-
children: L.length === 0 ? /* @__PURE__ */ E("tr", { children: /* @__PURE__ */ E("td", {
|
|
246
|
-
colSpan: 7,
|
|
247
|
-
className: "px-4 py-8 text-center text-text-secondary",
|
|
248
|
-
children: j("channel.noUsersConnected", "No users connected to this channel")
|
|
249
|
-
}) }) : L.map((e) => {
|
|
250
|
-
let t = ie(e.presenceStatus), n = e.pairingStatus ? ae(e.pairingStatus) : null, r = n?.icon ?? S;
|
|
251
|
-
return /* @__PURE__ */ D("tr", {
|
|
252
|
-
className: "hover:bg-bg-sunken/30 transition-colors",
|
|
253
|
-
children: [
|
|
254
|
-
/* @__PURE__ */ E("td", {
|
|
255
|
-
className: "px-4 py-3",
|
|
256
|
-
children: /* @__PURE__ */ D("div", {
|
|
257
|
-
className: "flex items-center gap-3",
|
|
258
|
-
children: [/* @__PURE__ */ E("div", {
|
|
259
|
-
className: "size-8 bg-accent-primary/10 rounded-full flex items-center justify-center",
|
|
260
|
-
children: /* @__PURE__ */ E(b, {
|
|
261
|
-
size: 16,
|
|
262
|
-
className: "text-accent-primary"
|
|
263
|
-
})
|
|
264
|
-
}), /* @__PURE__ */ D("div", { children: [/* @__PURE__ */ E("p", {
|
|
265
|
-
className: "text-sm font-medium text-text-primary",
|
|
266
|
-
children: e.externalDisplayName || "Unknown"
|
|
267
|
-
}), e.externalUsername && /* @__PURE__ */ E("p", {
|
|
268
|
-
className: "text-xs text-text-secondary",
|
|
269
|
-
children: e.externalUsername
|
|
270
|
-
})] })]
|
|
271
|
-
})
|
|
272
|
-
}),
|
|
273
|
-
/* @__PURE__ */ E("td", {
|
|
274
|
-
className: "px-4 py-3 text-sm font-mono text-text-secondary",
|
|
275
|
-
children: e.externalUserId
|
|
276
|
-
}),
|
|
277
|
-
/* @__PURE__ */ E("td", {
|
|
278
|
-
className: "px-4 py-3",
|
|
279
|
-
children: /* @__PURE__ */ E("span", {
|
|
280
|
-
className: "text-xs text-text-secondary bg-bg-sunken px-2 py-1 rounded",
|
|
281
|
-
children: e.source
|
|
282
|
-
})
|
|
283
|
-
}),
|
|
284
|
-
/* @__PURE__ */ E("td", {
|
|
285
|
-
className: "px-4 py-3",
|
|
286
|
-
children: /* @__PURE__ */ D("div", {
|
|
287
|
-
className: "flex items-center gap-2",
|
|
288
|
-
children: [/* @__PURE__ */ E("span", { className: `w-2 h-2 rounded-full ${t.color.replace("text-", "bg-")}` }), /* @__PURE__ */ E("span", {
|
|
289
|
-
className: `text-sm ${t.color}`,
|
|
290
|
-
children: t.label
|
|
291
|
-
})]
|
|
292
|
-
})
|
|
293
|
-
}),
|
|
294
|
-
/* @__PURE__ */ E("td", {
|
|
295
|
-
className: "px-4 py-3",
|
|
296
|
-
children: e.pairingStatus && n ? /* @__PURE__ */ D("span", {
|
|
297
|
-
className: `inline-flex items-center gap-1 text-xs px-2 py-1 rounded ${n.color}`,
|
|
298
|
-
children: [/* @__PURE__ */ E(r, { size: 12 }), n.label]
|
|
299
|
-
}) : /* @__PURE__ */ E("span", {
|
|
300
|
-
className: "text-xs text-text-secondary",
|
|
301
|
-
children: "-"
|
|
302
|
-
})
|
|
303
|
-
}),
|
|
304
|
-
/* @__PURE__ */ E("td", {
|
|
305
|
-
className: "px-4 py-3",
|
|
306
|
-
children: e.notificationsEnabled ? /* @__PURE__ */ D("span", {
|
|
307
|
-
className: "inline-flex items-center gap-1",
|
|
308
|
-
children: [/* @__PURE__ */ E(f, {
|
|
309
|
-
size: 16,
|
|
310
|
-
className: "text-status-success-text",
|
|
311
|
-
"aria-hidden": "true"
|
|
312
|
-
}), /* @__PURE__ */ E("span", {
|
|
313
|
-
className: "sr-only",
|
|
314
|
-
children: j("channel.enabled", "Enabled")
|
|
315
|
-
})]
|
|
316
|
-
}) : /* @__PURE__ */ D("span", {
|
|
317
|
-
className: "inline-flex items-center gap-1",
|
|
318
|
-
children: [/* @__PURE__ */ E(p, {
|
|
319
|
-
size: 16,
|
|
320
|
-
className: "text-text-secondary",
|
|
321
|
-
"aria-hidden": "true"
|
|
322
|
-
}), /* @__PURE__ */ E("span", {
|
|
323
|
-
className: "sr-only",
|
|
324
|
-
children: j("channel.disabled", "Disabled")
|
|
325
|
-
})]
|
|
326
|
-
})
|
|
327
|
-
}),
|
|
328
|
-
/* @__PURE__ */ E("td", {
|
|
329
|
-
className: "px-4 py-3",
|
|
330
|
-
children: e.dmAllowed ? /* @__PURE__ */ D("span", {
|
|
331
|
-
className: "inline-flex items-center gap-1 text-sm text-status-success-text",
|
|
332
|
-
children: [/* @__PURE__ */ E(x, { size: 16 }), j("channel.allowed", "Allowed")]
|
|
333
|
-
}) : /* @__PURE__ */ D("span", {
|
|
334
|
-
className: "inline-flex items-center gap-1 text-sm text-text-secondary",
|
|
335
|
-
children: [/* @__PURE__ */ E(S, { size: 16 }), j("channel.blocked", "Blocked")]
|
|
336
|
-
})
|
|
337
|
-
})
|
|
338
|
-
]
|
|
339
|
-
}, e.id);
|
|
340
|
-
})
|
|
341
|
-
})]
|
|
342
|
-
})
|
|
343
|
-
})
|
|
312
|
+
/* @__PURE__ */ w(E, {
|
|
313
|
+
columns: se,
|
|
314
|
+
data: I,
|
|
315
|
+
rowKey: (e) => e.id,
|
|
316
|
+
emptyState: A("channel.noUsersConnected", "No users connected to this channel"),
|
|
317
|
+
className: "bg-surface border border-border-subtle rounded-lg"
|
|
344
318
|
}),
|
|
345
|
-
/* @__PURE__ */
|
|
319
|
+
/* @__PURE__ */ T("div", {
|
|
346
320
|
className: "flex items-center justify-between",
|
|
347
|
-
children: [/* @__PURE__ */
|
|
321
|
+
children: [/* @__PURE__ */ w("p", {
|
|
348
322
|
className: "text-sm text-text-secondary",
|
|
349
|
-
children:
|
|
350
|
-
|
|
323
|
+
children: B > 0 && /* @__PURE__ */ T(C, { children: [
|
|
324
|
+
A("channel.showing", "Showing"),
|
|
351
325
|
" ",
|
|
352
|
-
/* @__PURE__ */
|
|
326
|
+
/* @__PURE__ */ T("span", {
|
|
353
327
|
className: "font-medium",
|
|
354
328
|
children: [
|
|
355
|
-
|
|
329
|
+
H * R + 1,
|
|
356
330
|
"–",
|
|
357
|
-
Math.min((
|
|
331
|
+
Math.min((H + 1) * R, B)
|
|
358
332
|
]
|
|
359
333
|
}),
|
|
360
334
|
" ",
|
|
361
|
-
|
|
335
|
+
A("channel.of", "of"),
|
|
362
336
|
" ",
|
|
363
|
-
/* @__PURE__ */
|
|
337
|
+
/* @__PURE__ */ w("span", {
|
|
364
338
|
className: "font-medium",
|
|
365
|
-
children:
|
|
339
|
+
children: B
|
|
366
340
|
})
|
|
367
341
|
] })
|
|
368
|
-
}), /* @__PURE__ */
|
|
342
|
+
}), /* @__PURE__ */ T("div", {
|
|
369
343
|
className: "flex items-center gap-2",
|
|
370
344
|
children: [
|
|
371
|
-
/* @__PURE__ */
|
|
345
|
+
/* @__PURE__ */ T("button", {
|
|
372
346
|
type: "button",
|
|
373
|
-
onClick: () =>
|
|
374
|
-
disabled:
|
|
347
|
+
onClick: () => U((e) => Math.max(0, e - 1)),
|
|
348
|
+
disabled: !$ || P,
|
|
375
349
|
className: "flex items-center gap-1 px-3 py-1.5 text-sm border border-border-subtle rounded-lg hover:bg-bg-sunken transition-colors disabled:opacity-40 disabled:cursor-not-allowed",
|
|
376
|
-
children: [/* @__PURE__ */
|
|
350
|
+
children: [/* @__PURE__ */ w(h, { size: 16 }), A("channel.previous", "Previous")]
|
|
377
351
|
}),
|
|
378
|
-
/* @__PURE__ */
|
|
352
|
+
/* @__PURE__ */ T("span", {
|
|
379
353
|
className: "text-sm text-text-secondary",
|
|
380
354
|
children: [
|
|
381
|
-
|
|
355
|
+
H + 1,
|
|
382
356
|
" / ",
|
|
383
|
-
|
|
357
|
+
Q
|
|
384
358
|
]
|
|
385
359
|
}),
|
|
386
|
-
/* @__PURE__ */
|
|
360
|
+
/* @__PURE__ */ T("button", {
|
|
387
361
|
type: "button",
|
|
388
|
-
onClick: () =>
|
|
389
|
-
disabled: !
|
|
362
|
+
onClick: () => U((e) => Math.min(Q - 1, e + 1)),
|
|
363
|
+
disabled: !ie || P,
|
|
390
364
|
className: "flex items-center gap-1 px-3 py-1.5 text-sm border border-border-subtle rounded-lg hover:bg-bg-sunken transition-colors disabled:opacity-40 disabled:cursor-not-allowed",
|
|
391
|
-
children: [
|
|
365
|
+
children: [A("channel.next", "Next"), /* @__PURE__ */ w(g, { size: 16 })]
|
|
392
366
|
})
|
|
393
367
|
]
|
|
394
368
|
})]
|
|
@@ -398,6 +372,6 @@ function A() {
|
|
|
398
372
|
});
|
|
399
373
|
}
|
|
400
374
|
//#endregion
|
|
401
|
-
export {
|
|
375
|
+
export { k as ChannelUsersPage };
|
|
402
376
|
|
|
403
377
|
//# sourceMappingURL=ChannelUsersPage.js.map
|