@burdenoff/microfe-channel 2026.510.112
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/README.md +147 -0
- package/dist/channel/ChannelRoot.d.ts +32 -0
- package/dist/channel/ChannelRoot.d.ts.map +1 -0
- package/dist/channel/ChannelRoot.js +81 -0
- package/dist/channel/ChannelRoot.js.map +1 -0
- package/dist/channel/ChannelRoutes.d.ts +10 -0
- package/dist/channel/ChannelRoutes.d.ts.map +1 -0
- package/dist/channel/ChannelRoutes.js +104 -0
- package/dist/channel/ChannelRoutes.js.map +1 -0
- package/dist/channel/components/AdapterCredentialsForm.d.ts +20 -0
- package/dist/channel/components/AdapterCredentialsForm.d.ts.map +1 -0
- package/dist/channel/components/AdapterCredentialsForm.js +230 -0
- package/dist/channel/components/AdapterCredentialsForm.js.map +1 -0
- package/dist/channel/components/FeatureNotEnabled.d.ts +10 -0
- package/dist/channel/components/FeatureNotEnabled.d.ts.map +1 -0
- package/dist/channel/components/FeatureNotEnabled.js +32 -0
- package/dist/channel/components/FeatureNotEnabled.js.map +1 -0
- package/dist/channel/components/PermissionGuard.d.ts +15 -0
- package/dist/channel/components/PermissionGuard.d.ts.map +1 -0
- package/dist/channel/components/PermissionGuard.js +23 -0
- package/dist/channel/components/PermissionGuard.js.map +1 -0
- package/dist/channel/config/adapterCredentials.d.ts +44 -0
- package/dist/channel/config/adapterCredentials.d.ts.map +1 -0
- package/dist/channel/config/adapterCredentials.js +946 -0
- package/dist/channel/config/adapterCredentials.js.map +1 -0
- package/dist/channel/constants/permissions.d.ts +32 -0
- package/dist/channel/constants/permissions.d.ts.map +1 -0
- package/dist/channel/constants/permissions.js +30 -0
- package/dist/channel/constants/permissions.js.map +1 -0
- package/dist/channel/graphql/global-client.d.ts +11 -0
- package/dist/channel/graphql/global-client.d.ts.map +1 -0
- package/dist/channel/graphql/global-client.js +56 -0
- package/dist/channel/graphql/global-client.js.map +1 -0
- package/dist/channel/hooks/useChannelOrgSettings.d.ts +22 -0
- package/dist/channel/hooks/useChannelOrgSettings.d.ts.map +1 -0
- package/dist/channel/hooks/useChannelOrgSettings.js +61 -0
- package/dist/channel/hooks/useChannelOrgSettings.js.map +1 -0
- package/dist/channel/hooks/useChannelSubscription.d.ts +36 -0
- package/dist/channel/hooks/useChannelSubscription.d.ts.map +1 -0
- package/dist/channel/hooks/useChannelSubscription.js +111 -0
- package/dist/channel/hooks/useChannelSubscription.js.map +1 -0
- package/dist/channel/hooks/useChannels.d.ts +214 -0
- package/dist/channel/hooks/useChannels.d.ts.map +1 -0
- package/dist/channel/hooks/useChannels.js +416 -0
- package/dist/channel/hooks/useChannels.js.map +1 -0
- package/dist/channel/index.d.ts +12 -0
- package/dist/channel/index.d.ts.map +1 -0
- package/dist/channel/index.js +2 -0
- package/dist/channel/modules/channels/hooks/useExport.d.ts +45 -0
- package/dist/channel/modules/channels/hooks/useExport.d.ts.map +1 -0
- package/dist/channel/modules/channels/hooks/useExport.js +195 -0
- package/dist/channel/modules/channels/hooks/useExport.js.map +1 -0
- package/dist/channel/modules/channels/i18n.d.ts +14 -0
- package/dist/channel/modules/channels/i18n.d.ts.map +1 -0
- package/dist/channel/modules/channels/i18n.js +110 -0
- package/dist/channel/modules/channels/i18n.js.map +1 -0
- package/dist/channel/modules/channels/pages/ChannelDashboardPage.d.ts +14 -0
- package/dist/channel/modules/channels/pages/ChannelDashboardPage.d.ts.map +1 -0
- package/dist/channel/modules/channels/pages/ChannelDashboardPage.js +680 -0
- package/dist/channel/modules/channels/pages/ChannelDashboardPage.js.map +1 -0
- package/dist/channel/modules/channels/pages/ChannelDetailsPage.d.ts +7 -0
- package/dist/channel/modules/channels/pages/ChannelDetailsPage.d.ts.map +1 -0
- package/dist/channel/modules/channels/pages/ChannelDetailsPage.js +949 -0
- package/dist/channel/modules/channels/pages/ChannelDetailsPage.js.map +1 -0
- package/dist/channel/modules/channels/pages/ChannelSettingsPage.d.ts +7 -0
- package/dist/channel/modules/channels/pages/ChannelSettingsPage.d.ts.map +1 -0
- package/dist/channel/modules/channels/pages/ChannelSettingsPage.js +404 -0
- package/dist/channel/modules/channels/pages/ChannelSettingsPage.js.map +1 -0
- package/dist/channel/modules/channels/pages/ChannelUsersPage.d.ts +7 -0
- package/dist/channel/modules/channels/pages/ChannelUsersPage.d.ts.map +1 -0
- package/dist/channel/modules/channels/pages/ChannelUsersPage.js +315 -0
- package/dist/channel/modules/channels/pages/ChannelUsersPage.js.map +1 -0
- package/dist/channel/modules/channels/pages/ChannelsListPage.d.ts +7 -0
- package/dist/channel/modules/channels/pages/ChannelsListPage.d.ts.map +1 -0
- package/dist/channel/modules/channels/pages/ChannelsListPage.js +604 -0
- package/dist/channel/modules/channels/pages/ChannelsListPage.js.map +1 -0
- package/dist/channel/modules/channels/pages/ConnectionDetailsPage.d.ts +7 -0
- package/dist/channel/modules/channels/pages/ConnectionDetailsPage.d.ts.map +1 -0
- package/dist/channel/modules/channels/pages/ConnectionDetailsPage.js +323 -0
- package/dist/channel/modules/channels/pages/ConnectionDetailsPage.js.map +1 -0
- package/dist/channel/modules/channels/pages/ConnectionsListPage.d.ts +7 -0
- package/dist/channel/modules/channels/pages/ConnectionsListPage.d.ts.map +1 -0
- package/dist/channel/modules/channels/pages/ConnectionsListPage.js +276 -0
- package/dist/channel/modules/channels/pages/ConnectionsListPage.js.map +1 -0
- package/dist/channel/modules/channels/pages/CreateChannelPage.d.ts +12 -0
- package/dist/channel/modules/channels/pages/CreateChannelPage.d.ts.map +1 -0
- package/dist/channel/modules/channels/pages/CreateChannelPage.js +456 -0
- package/dist/channel/modules/channels/pages/CreateChannelPage.js.map +1 -0
- package/dist/channel/modules/channels/pages/CreateConnectionPage.d.ts +11 -0
- package/dist/channel/modules/channels/pages/CreateConnectionPage.d.ts.map +1 -0
- package/dist/channel/modules/channels/pages/CreateConnectionPage.js +219 -0
- package/dist/channel/modules/channels/pages/CreateConnectionPage.js.map +1 -0
- package/dist/channel/modules/channels/pages/DeliveryHistoryPage.d.ts +7 -0
- package/dist/channel/modules/channels/pages/DeliveryHistoryPage.d.ts.map +1 -0
- package/dist/channel/modules/channels/pages/DeliveryHistoryPage.js +375 -0
- package/dist/channel/modules/channels/pages/DeliveryHistoryPage.js.map +1 -0
- package/dist/channel/modules/channels/pages/EditChannelPage.d.ts +8 -0
- package/dist/channel/modules/channels/pages/EditChannelPage.d.ts.map +1 -0
- package/dist/channel/modules/channels/pages/EditChannelPage.js +459 -0
- package/dist/channel/modules/channels/pages/EditChannelPage.js.map +1 -0
- package/dist/channel/modules/channels/pages/EditConnectionPage.d.ts +10 -0
- package/dist/channel/modules/channels/pages/EditConnectionPage.d.ts.map +1 -0
- package/dist/channel/modules/channels/pages/EditConnectionPage.js +199 -0
- package/dist/channel/modules/channels/pages/EditConnectionPage.js.map +1 -0
- package/dist/channel/modules/channels/pages/SendMessagePage.d.ts +8 -0
- package/dist/channel/modules/channels/pages/SendMessagePage.d.ts.map +1 -0
- package/dist/channel/modules/channels/pages/SendMessagePage.js +403 -0
- package/dist/channel/modules/channels/pages/SendMessagePage.js.map +1 -0
- package/dist/channel/modules/channels/pages/WebhookEventsPage.d.ts +7 -0
- package/dist/channel/modules/channels/pages/WebhookEventsPage.d.ts.map +1 -0
- package/dist/channel/modules/channels/pages/WebhookEventsPage.js +303 -0
- package/dist/channel/modules/channels/pages/WebhookEventsPage.js.map +1 -0
- package/dist/channel/modules/channels/pages/index.d.ts +18 -0
- package/dist/channel/modules/channels/pages/index.d.ts.map +1 -0
- package/dist/channel/modules/channels/pages/index.js +14 -0
- package/dist/channel/pages/ChannelLandingPage.d.ts +9 -0
- package/dist/channel/pages/ChannelLandingPage.d.ts.map +1 -0
- package/dist/channel/pages/ChannelLandingPage.js +72 -0
- package/dist/channel/pages/ChannelLandingPage.js.map +1 -0
- package/dist/channel/providers/ChannelProvider.d.ts +16 -0
- package/dist/channel/providers/ChannelProvider.d.ts.map +1 -0
- package/dist/channel/providers/ChannelProvider.js +35 -0
- package/dist/channel/providers/ChannelProvider.js.map +1 -0
- package/dist/channel/types/index.d.ts +89 -0
- package/dist/channel/types/index.d.ts.map +1 -0
- package/dist/channel/utils/shellBridge.d.ts +59 -0
- package/dist/channel/utils/shellBridge.d.ts.map +1 -0
- package/dist/channel/utils/shellBridge.js +36 -0
- package/dist/channel/utils/shellBridge.js.map +1 -0
- package/dist/dev/App.d.ts +6 -0
- package/dist/dev/App.d.ts.map +1 -0
- package/dist/dev/main.d.ts +2 -0
- package/dist/dev/main.d.ts.map +1 -0
- package/dist/generated/global-operations.d.ts +1547 -0
- package/dist/generated/global-operations.d.ts.map +1 -0
- package/dist/generated/global-operations.js +466 -0
- package/dist/generated/global-operations.js.map +1 -0
- package/dist/generated/global-types.d.ts +21289 -0
- package/dist/generated/global-types.d.ts.map +1 -0
- package/dist/generated/global-types.js +14 -0
- package/dist/generated/global-types.js.map +1 -0
- package/dist/generated/wspace-operations.d.ts +2 -0
- package/dist/generated/wspace-operations.d.ts.map +1 -0
- package/dist/generated/wspace-types.d.ts +55214 -0
- package/dist/generated/wspace-types.d.ts.map +1 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +4 -0
- package/dist/node_modules/@apollo/client/errors/CombinedGraphQLErrors.js +24 -0
- package/dist/node_modules/@apollo/client/errors/CombinedGraphQLErrors.js.map +1 -0
- package/dist/node_modules/@apollo/client/errors/utils.js +16 -0
- package/dist/node_modules/@apollo/client/errors/utils.js.map +1 -0
- package/dist/utils/nativeBridge.d.ts +3 -0
- package/dist/utils/nativeBridge.d.ts.map +1 -0
- package/dist/utils/nativeBridge.js +2 -0
- package/package.json +116 -0
|
@@ -0,0 +1,680 @@
|
|
|
1
|
+
import { useChannel as e } from "../../../providers/ChannelProvider.js";
|
|
2
|
+
import { nativeImpact as t, nativeNotify as n } from "../../../../utils/nativeBridge.js";
|
|
3
|
+
import { subscribeShellEvent as r } from "../../../utils/shellBridge.js";
|
|
4
|
+
import { CHANNEL_HEALTH_CHANGED_SUBSCRIPTION as i, useChannelSubscription as a } from "../../../hooks/useChannelSubscription.js";
|
|
5
|
+
import { useChannels as o } from "../../../hooks/useChannels.js";
|
|
6
|
+
import { PermissionGuard as s } from "../../../components/PermissionGuard.js";
|
|
7
|
+
import { CHANNEL_PERMISSIONS as c } from "../../../constants/permissions.js";
|
|
8
|
+
import { HEALTH_I18N as ee, PLATFORM_I18N as l, STATUS_I18N as te, translateLabel as u } from "../i18n.js";
|
|
9
|
+
import { useCallback as d, useEffect as ne, useMemo as re, useState as f } from "react";
|
|
10
|
+
import { useI18n as p } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
11
|
+
import { Activity as ie, AlertCircle as m, AlertTriangle as h, ArrowRight as ae, Cable as g, CheckCircle2 as _, Eye as v, HelpCircle as y, LayoutDashboard as oe, Loader2 as b, MessageSquare as x, Plus as S, Power as C, PowerOff as w, Radio as T, RefreshCw as E, Search as D, ShieldCheck as O, Trash2 as se, XCircle as k } from "lucide-react";
|
|
12
|
+
import { useNavigate as ce } from "react-router-dom";
|
|
13
|
+
import { jsx as A, jsxs as j } from "react/jsx-runtime";
|
|
14
|
+
//#region src/channel/modules/channels/pages/ChannelDashboardPage.tsx
|
|
15
|
+
var M = {
|
|
16
|
+
EMAIL: {
|
|
17
|
+
label: "Email",
|
|
18
|
+
color: "bg-accent-blue-subtle text-accent-blue"
|
|
19
|
+
},
|
|
20
|
+
SMS: {
|
|
21
|
+
label: "SMS",
|
|
22
|
+
color: "bg-status-success-bg-subtle text-status-success-text"
|
|
23
|
+
},
|
|
24
|
+
PUSH: {
|
|
25
|
+
label: "Push",
|
|
26
|
+
color: "bg-accent-purple-subtle text-accent-purple"
|
|
27
|
+
},
|
|
28
|
+
INAPP: {
|
|
29
|
+
label: "In-App",
|
|
30
|
+
color: "bg-accent-indigo-subtle text-accent-indigo"
|
|
31
|
+
},
|
|
32
|
+
WEBHOOK: {
|
|
33
|
+
label: "Webhook",
|
|
34
|
+
color: "bg-accent-orange-subtle text-accent-orange"
|
|
35
|
+
},
|
|
36
|
+
SLACK: {
|
|
37
|
+
label: "Slack",
|
|
38
|
+
color: "bg-accent-pink-subtle text-accent-pink"
|
|
39
|
+
},
|
|
40
|
+
TEAMS: {
|
|
41
|
+
label: "Teams",
|
|
42
|
+
color: "bg-accent-cyan-subtle text-accent-cyan"
|
|
43
|
+
},
|
|
44
|
+
DISCORD: {
|
|
45
|
+
label: "Discord",
|
|
46
|
+
color: "bg-accent-violet-subtle text-accent-violet"
|
|
47
|
+
},
|
|
48
|
+
WHATSAPP: {
|
|
49
|
+
label: "WhatsApp",
|
|
50
|
+
color: "bg-accent-emerald-subtle text-accent-emerald"
|
|
51
|
+
},
|
|
52
|
+
WEBCHAT: {
|
|
53
|
+
label: "Webchat",
|
|
54
|
+
color: "bg-accent-teal-subtle text-accent-teal"
|
|
55
|
+
}
|
|
56
|
+
}, N = {
|
|
57
|
+
ACTIVE: {
|
|
58
|
+
label: "Active",
|
|
59
|
+
dotColor: "bg-success-500",
|
|
60
|
+
textColor: "text-success-500",
|
|
61
|
+
icon: _
|
|
62
|
+
},
|
|
63
|
+
INACTIVE: {
|
|
64
|
+
label: "Inactive",
|
|
65
|
+
dotColor: "bg-text-tertiary",
|
|
66
|
+
textColor: "text-muted-foreground",
|
|
67
|
+
icon: w
|
|
68
|
+
},
|
|
69
|
+
ERROR: {
|
|
70
|
+
label: "Error",
|
|
71
|
+
dotColor: "bg-error-500",
|
|
72
|
+
textColor: "text-error-500",
|
|
73
|
+
icon: k
|
|
74
|
+
},
|
|
75
|
+
SUSPENDED: {
|
|
76
|
+
label: "Suspended",
|
|
77
|
+
dotColor: "bg-warning-500",
|
|
78
|
+
textColor: "text-warning-500",
|
|
79
|
+
icon: h
|
|
80
|
+
},
|
|
81
|
+
ARCHIVED: {
|
|
82
|
+
label: "Archived",
|
|
83
|
+
dotColor: "bg-text-tertiary",
|
|
84
|
+
textColor: "text-muted-foreground",
|
|
85
|
+
icon: w
|
|
86
|
+
}
|
|
87
|
+
}, P = {
|
|
88
|
+
HEALTHY: {
|
|
89
|
+
label: "Healthy",
|
|
90
|
+
color: "text-success-500",
|
|
91
|
+
icon: _
|
|
92
|
+
},
|
|
93
|
+
DEGRADED: {
|
|
94
|
+
label: "Degraded",
|
|
95
|
+
color: "text-warning-500",
|
|
96
|
+
icon: h
|
|
97
|
+
},
|
|
98
|
+
UNHEALTHY: {
|
|
99
|
+
label: "Unhealthy",
|
|
100
|
+
color: "text-error-500",
|
|
101
|
+
icon: k
|
|
102
|
+
},
|
|
103
|
+
UNKNOWN: {
|
|
104
|
+
label: "Unknown",
|
|
105
|
+
color: "text-muted-foreground",
|
|
106
|
+
icon: y
|
|
107
|
+
}
|
|
108
|
+
};
|
|
109
|
+
function le(e) {
|
|
110
|
+
let t = Date.now() - new Date(e).getTime();
|
|
111
|
+
if (Number.isNaN(t) || t < 0) return "just now";
|
|
112
|
+
let n = Math.floor(t / 1e3);
|
|
113
|
+
if (n < 60) return "just now";
|
|
114
|
+
let r = Math.floor(n / 60);
|
|
115
|
+
if (r < 60) return `${r}m ago`;
|
|
116
|
+
let i = Math.floor(r / 60);
|
|
117
|
+
if (i < 24) return `${i}h ago`;
|
|
118
|
+
let a = Math.floor(i / 24);
|
|
119
|
+
return a < 7 ? `${a}d ago` : a < 30 ? `${Math.floor(a / 7)}w ago` : `${Math.floor(a / 30)}mo ago`;
|
|
120
|
+
}
|
|
121
|
+
function F({ icon: e, iconClass: t, value: n, label: r, sub: i }) {
|
|
122
|
+
return /* @__PURE__ */ j("div", {
|
|
123
|
+
className: "p-4 bg-surface border border-border rounded-lg",
|
|
124
|
+
children: [/* @__PURE__ */ j("div", {
|
|
125
|
+
className: "flex items-center gap-3",
|
|
126
|
+
children: [/* @__PURE__ */ A("div", {
|
|
127
|
+
className: "p-2 rounded-lg hover:bg-action-primary-bg/10",
|
|
128
|
+
children: /* @__PURE__ */ A(e, {
|
|
129
|
+
size: 18,
|
|
130
|
+
className: t
|
|
131
|
+
})
|
|
132
|
+
}), /* @__PURE__ */ j("div", { children: [/* @__PURE__ */ A("p", {
|
|
133
|
+
className: "text-2xl font-bold text-foreground leading-tight",
|
|
134
|
+
children: n
|
|
135
|
+
}), /* @__PURE__ */ A("p", {
|
|
136
|
+
className: "text-xs text-muted-foreground",
|
|
137
|
+
children: r
|
|
138
|
+
})] })]
|
|
139
|
+
}), i && /* @__PURE__ */ A("p", {
|
|
140
|
+
className: "text-[11px] text-muted-foreground mt-2 pl-11",
|
|
141
|
+
children: i
|
|
142
|
+
})]
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
function I() {
|
|
146
|
+
let h = ce(), { t: _ } = p(), y = (e, t) => {
|
|
147
|
+
let n = _(e);
|
|
148
|
+
return n === e ? t : n;
|
|
149
|
+
}, [k, I] = f(null), [ue, L] = f(null), R = (e) => ({
|
|
150
|
+
...M[e] ?? {
|
|
151
|
+
label: e,
|
|
152
|
+
color: "bg-bg-sunken text-text-tertiary"
|
|
153
|
+
},
|
|
154
|
+
label: u(e, l, y)
|
|
155
|
+
}), z = (e) => ({
|
|
156
|
+
...N[e] ?? N.INACTIVE,
|
|
157
|
+
label: u(e, te, y)
|
|
158
|
+
}), B = (e) => ({
|
|
159
|
+
...P[e] ?? P.UNKNOWN,
|
|
160
|
+
label: u(e, ee, y)
|
|
161
|
+
}), { channels: V, isLoading: H, error: U, total: W, filter: G, updateFilter: K, deleteChannel: q, activateChannel: J, deactivateChannel: Y, runHealthCheck: X, refetch: Z } = o(), { organizationId: Q } = e();
|
|
162
|
+
a({
|
|
163
|
+
query: i,
|
|
164
|
+
variables: { organizationId: Q },
|
|
165
|
+
operationName: "ChannelHealthChanged",
|
|
166
|
+
enabled: !!Q,
|
|
167
|
+
onData: () => void Z(),
|
|
168
|
+
pollFn: Z,
|
|
169
|
+
pollIntervalMs: 6e4
|
|
170
|
+
}), ne(() => {
|
|
171
|
+
let e = [
|
|
172
|
+
"channel.created",
|
|
173
|
+
"channel.updated",
|
|
174
|
+
"channel.deleted",
|
|
175
|
+
"connection.created",
|
|
176
|
+
"connection.updated",
|
|
177
|
+
"connection.deleted",
|
|
178
|
+
"delivery.completed",
|
|
179
|
+
"webhook.received"
|
|
180
|
+
].map((e) => r(e, () => void Z()));
|
|
181
|
+
return () => e.forEach((e) => e());
|
|
182
|
+
}, [Z]);
|
|
183
|
+
let $ = re(() => {
|
|
184
|
+
let e = 0, t = 0, n = 0, r = 0, i = 0, a = 0;
|
|
185
|
+
for (let o of V) o.status === "ACTIVE" && e++, o.status === "ERROR" && i++, o.connectionHealth === "HEALTHY" && t++, o.connectionHealth === "UNHEALTHY" && a++, o.isConnected && n++, r += o.messageCount24h ?? 0;
|
|
186
|
+
return {
|
|
187
|
+
active: e,
|
|
188
|
+
healthy: t,
|
|
189
|
+
connected: n,
|
|
190
|
+
messages24h: r,
|
|
191
|
+
errored: i,
|
|
192
|
+
unhealthy: a
|
|
193
|
+
};
|
|
194
|
+
}, [V]), de = d(async (e) => {
|
|
195
|
+
t("medium"), L(e);
|
|
196
|
+
try {
|
|
197
|
+
await q(e), n("success"), I(null);
|
|
198
|
+
} catch (e) {
|
|
199
|
+
throw n("error"), e;
|
|
200
|
+
} finally {
|
|
201
|
+
L(null);
|
|
202
|
+
}
|
|
203
|
+
}, [q]), fe = d(async (e) => {
|
|
204
|
+
L(e.id);
|
|
205
|
+
try {
|
|
206
|
+
e.status === "ACTIVE" ? await Y(e.id) : await J(e.id);
|
|
207
|
+
} finally {
|
|
208
|
+
L(null);
|
|
209
|
+
}
|
|
210
|
+
}, [J, Y]), pe = d(async (e) => {
|
|
211
|
+
L(e);
|
|
212
|
+
try {
|
|
213
|
+
await X(e);
|
|
214
|
+
} finally {
|
|
215
|
+
L(null);
|
|
216
|
+
}
|
|
217
|
+
}, [X]);
|
|
218
|
+
return /* @__PURE__ */ A(s, {
|
|
219
|
+
permission: c.CHANNEL_READ,
|
|
220
|
+
children: /* @__PURE__ */ j("div", {
|
|
221
|
+
className: "space-y-5 p-3 sm:p-6",
|
|
222
|
+
children: [
|
|
223
|
+
/* @__PURE__ */ j("div", {
|
|
224
|
+
className: "flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",
|
|
225
|
+
children: [/* @__PURE__ */ j("div", {
|
|
226
|
+
className: "flex items-center gap-3",
|
|
227
|
+
children: [/* @__PURE__ */ A("div", {
|
|
228
|
+
className: "p-2 rounded-lg bg-accent-primary/10",
|
|
229
|
+
children: /* @__PURE__ */ A(oe, {
|
|
230
|
+
size: 20,
|
|
231
|
+
className: "text-accent-primary"
|
|
232
|
+
})
|
|
233
|
+
}), /* @__PURE__ */ j("div", { children: [/* @__PURE__ */ A("h1", {
|
|
234
|
+
className: "text-xl font-bold text-foreground",
|
|
235
|
+
children: y("channel.channelDashboard", "Channel Dashboard")
|
|
236
|
+
}), /* @__PURE__ */ A("p", {
|
|
237
|
+
className: "text-sm text-muted-foreground",
|
|
238
|
+
children: y("channel.dashboardSubtitle", "Manage and monitor your communication channels")
|
|
239
|
+
})] })]
|
|
240
|
+
}), /* @__PURE__ */ j("div", {
|
|
241
|
+
className: "flex items-center gap-2",
|
|
242
|
+
children: [/* @__PURE__ */ j("button", {
|
|
243
|
+
onClick: () => Z(),
|
|
244
|
+
className: "inline-flex items-center gap-1.5 px-3 py-2 text-sm text-muted-foreground hover:text-foreground border border-border rounded-lg hover:hover:bg-action-primary-bg/10 transition-colors",
|
|
245
|
+
children: [/* @__PURE__ */ A(E, { size: 14 }), y("channel.refresh", "Refresh")]
|
|
246
|
+
}), /* @__PURE__ */ j("button", {
|
|
247
|
+
onClick: () => h("/channels/create"),
|
|
248
|
+
className: "inline-flex items-center gap-1.5 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",
|
|
249
|
+
children: [/* @__PURE__ */ A(S, { size: 14 }), y("channel.createChannel", "Create Channel")]
|
|
250
|
+
})]
|
|
251
|
+
})]
|
|
252
|
+
}),
|
|
253
|
+
/* @__PURE__ */ j("div", {
|
|
254
|
+
className: "grid gap-3 grid-cols-2 lg:grid-cols-4",
|
|
255
|
+
children: [
|
|
256
|
+
/* @__PURE__ */ A(F, {
|
|
257
|
+
icon: T,
|
|
258
|
+
iconClass: "text-accent-primary",
|
|
259
|
+
value: W,
|
|
260
|
+
label: y("channel.totalChannels", "Total Channels"),
|
|
261
|
+
sub: $.active > 0 ? `${$.active} ${y("channel.status.active", "Active").toLowerCase()}, ${W - $.active} ${y("channel.status.inactive", "Inactive").toLowerCase()}` : void 0
|
|
262
|
+
}),
|
|
263
|
+
/* @__PURE__ */ A(F, {
|
|
264
|
+
icon: O,
|
|
265
|
+
iconClass: "text-success-500",
|
|
266
|
+
value: $.healthy,
|
|
267
|
+
label: y("channel.healthy", "Healthy"),
|
|
268
|
+
sub: $.unhealthy > 0 ? `${$.unhealthy} ${y("channel.health.unhealthy", "Unhealthy").toLowerCase()}` : W > 0 ? y("channel.allSystemsNominal", "All systems nominal") : void 0
|
|
269
|
+
}),
|
|
270
|
+
/* @__PURE__ */ A(F, {
|
|
271
|
+
icon: g,
|
|
272
|
+
iconClass: "text-accent-blue",
|
|
273
|
+
value: $.connected,
|
|
274
|
+
label: y("channel.connected", "Connected"),
|
|
275
|
+
sub: W > 0 ? `${W - $.connected} ${y("channel.disconnected", "Disconnected").toLowerCase()}` : void 0
|
|
276
|
+
}),
|
|
277
|
+
/* @__PURE__ */ A(F, {
|
|
278
|
+
icon: x,
|
|
279
|
+
iconClass: "text-accent-violet",
|
|
280
|
+
value: $.messages24h.toLocaleString(),
|
|
281
|
+
label: y("channel.messages24h", "Messages (24h)")
|
|
282
|
+
})
|
|
283
|
+
]
|
|
284
|
+
}),
|
|
285
|
+
$.errored > 0 && /* @__PURE__ */ j("div", {
|
|
286
|
+
className: "flex items-center gap-3 p-3 border border-error-500/30 bg-error-500/5 rounded-lg",
|
|
287
|
+
children: [
|
|
288
|
+
/* @__PURE__ */ A(m, {
|
|
289
|
+
size: 16,
|
|
290
|
+
className: "text-error-500 shrink-0"
|
|
291
|
+
}),
|
|
292
|
+
/* @__PURE__ */ j("p", {
|
|
293
|
+
className: "text-sm text-error-400",
|
|
294
|
+
children: [
|
|
295
|
+
/* @__PURE__ */ A("span", {
|
|
296
|
+
className: "font-semibold",
|
|
297
|
+
children: $.errored
|
|
298
|
+
}),
|
|
299
|
+
" ",
|
|
300
|
+
y($.errored === 1 ? "channel.errorStateSummarySingle" : "channel.errorStateSummaryMultiple", $.errored === 1 ? "channel in error state" : "channels in error state")
|
|
301
|
+
]
|
|
302
|
+
}),
|
|
303
|
+
/* @__PURE__ */ A("button", {
|
|
304
|
+
onClick: () => K({ status: "ERROR" }),
|
|
305
|
+
className: "ml-auto text-xs font-medium text-error-400 hover:text-error-300 transition-colors",
|
|
306
|
+
children: y("channel.showErrors", "Show errors")
|
|
307
|
+
})
|
|
308
|
+
]
|
|
309
|
+
}),
|
|
310
|
+
/* @__PURE__ */ j("div", {
|
|
311
|
+
className: "flex flex-col gap-3 sm:flex-row sm:items-center",
|
|
312
|
+
children: [
|
|
313
|
+
/* @__PURE__ */ j("div", {
|
|
314
|
+
className: "relative flex-1",
|
|
315
|
+
children: [/* @__PURE__ */ A(D, {
|
|
316
|
+
size: 14,
|
|
317
|
+
className: "absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground"
|
|
318
|
+
}), /* @__PURE__ */ A("input", {
|
|
319
|
+
type: "text",
|
|
320
|
+
placeholder: y("channel.searchChannels", "Search channels..."),
|
|
321
|
+
value: G.search || "",
|
|
322
|
+
onChange: (e) => K({ search: e.target.value }),
|
|
323
|
+
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-primary-500/50 placeholder:text-muted-foreground"
|
|
324
|
+
})]
|
|
325
|
+
}),
|
|
326
|
+
/* @__PURE__ */ j("select", {
|
|
327
|
+
value: G.platform || "",
|
|
328
|
+
onChange: (e) => K({ platform: e.target.value || void 0 }),
|
|
329
|
+
className: "px-3 py-2 text-sm bg-surface border border-border rounded-lg focus:outline-none focus:ring-2 focus:ring-primary-500/50 text-foreground",
|
|
330
|
+
children: [/* @__PURE__ */ A("option", {
|
|
331
|
+
value: "",
|
|
332
|
+
children: y("channel.allPlatforms", "All Platforms")
|
|
333
|
+
}), Object.entries(M).map(([e, t]) => /* @__PURE__ */ A("option", {
|
|
334
|
+
value: e,
|
|
335
|
+
children: t.label
|
|
336
|
+
}, e))]
|
|
337
|
+
}),
|
|
338
|
+
/* @__PURE__ */ j("select", {
|
|
339
|
+
value: G.status || "",
|
|
340
|
+
onChange: (e) => K({ status: e.target.value || void 0 }),
|
|
341
|
+
className: "px-3 py-2 text-sm bg-surface border border-border rounded-lg focus:outline-none focus:ring-2 focus:ring-primary-500/50 text-foreground",
|
|
342
|
+
children: [/* @__PURE__ */ A("option", {
|
|
343
|
+
value: "",
|
|
344
|
+
children: y("channel.allStatus", "All Status")
|
|
345
|
+
}), Object.entries(N).map(([e, t]) => /* @__PURE__ */ A("option", {
|
|
346
|
+
value: e,
|
|
347
|
+
children: t.label
|
|
348
|
+
}, e))]
|
|
349
|
+
})
|
|
350
|
+
]
|
|
351
|
+
}),
|
|
352
|
+
U && /* @__PURE__ */ j("div", {
|
|
353
|
+
className: "flex items-center gap-3 p-4 bg-error-500/10 border border-error-500/30 rounded-lg",
|
|
354
|
+
children: [
|
|
355
|
+
/* @__PURE__ */ A(m, {
|
|
356
|
+
size: 18,
|
|
357
|
+
className: "text-error-500 shrink-0"
|
|
358
|
+
}),
|
|
359
|
+
/* @__PURE__ */ j("div", {
|
|
360
|
+
className: "flex-1 min-w-0",
|
|
361
|
+
children: [/* @__PURE__ */ A("p", {
|
|
362
|
+
className: "text-sm font-medium text-error-400",
|
|
363
|
+
children: y("channel.loadFailed", "Failed to load channels")
|
|
364
|
+
}), /* @__PURE__ */ A("p", {
|
|
365
|
+
className: "text-xs text-error-400/70 truncate",
|
|
366
|
+
children: U
|
|
367
|
+
})]
|
|
368
|
+
}),
|
|
369
|
+
/* @__PURE__ */ A("button", {
|
|
370
|
+
onClick: () => Z(),
|
|
371
|
+
className: "shrink-0 px-3 py-1 text-sm text-error-400 hover:bg-error-500/10 rounded transition-colors",
|
|
372
|
+
children: y("channel.retry", "Retry")
|
|
373
|
+
})
|
|
374
|
+
]
|
|
375
|
+
}),
|
|
376
|
+
H && V.length === 0 && /* @__PURE__ */ A("div", {
|
|
377
|
+
className: "flex items-center justify-center py-16",
|
|
378
|
+
children: /* @__PURE__ */ A(b, {
|
|
379
|
+
size: 28,
|
|
380
|
+
className: "animate-spin text-accent-primary"
|
|
381
|
+
})
|
|
382
|
+
}),
|
|
383
|
+
!H && !U && V.length === 0 && /* @__PURE__ */ j("div", {
|
|
384
|
+
className: "flex flex-col items-center justify-center py-16 text-center",
|
|
385
|
+
children: [
|
|
386
|
+
/* @__PURE__ */ A("div", {
|
|
387
|
+
className: "p-3 rounded-full bg-accent-primary/10 mb-4",
|
|
388
|
+
children: /* @__PURE__ */ A(T, {
|
|
389
|
+
size: 36,
|
|
390
|
+
className: "text-accent-primary"
|
|
391
|
+
})
|
|
392
|
+
}),
|
|
393
|
+
/* @__PURE__ */ A("h3", {
|
|
394
|
+
className: "text-lg font-semibold text-foreground mb-1",
|
|
395
|
+
children: G.search || G.platform || G.status ? y("channel.noChannelsMatchFilter", "No channels match your filters") : y("channel.noChannels", "No channels yet")
|
|
396
|
+
}),
|
|
397
|
+
/* @__PURE__ */ A("p", {
|
|
398
|
+
className: "text-sm text-muted-foreground max-w-sm mb-5",
|
|
399
|
+
children: G.search || G.platform || G.status ? y("channel.adjustFilters", "Try adjusting your search or filters.") : y("channel.createFirstChannel", "Create your first communication channel to start sending messages across Email, SMS, Push, Slack and more.")
|
|
400
|
+
}),
|
|
401
|
+
!(G.search || G.platform || G.status) && /* @__PURE__ */ j("button", {
|
|
402
|
+
onClick: () => h("/channels/create"),
|
|
403
|
+
className: "inline-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",
|
|
404
|
+
children: [/* @__PURE__ */ A(S, { size: 14 }), y("channel.createChannel", "Create Channel")]
|
|
405
|
+
})
|
|
406
|
+
]
|
|
407
|
+
}),
|
|
408
|
+
V.length > 0 && /* @__PURE__ */ j("div", {
|
|
409
|
+
className: "border border-border rounded-lg overflow-hidden",
|
|
410
|
+
children: [/* @__PURE__ */ A("div", {
|
|
411
|
+
className: "overflow-x-auto min-w-full",
|
|
412
|
+
children: /* @__PURE__ */ j("table", {
|
|
413
|
+
className: "w-full text-sm min-w-[800px]",
|
|
414
|
+
children: [/* @__PURE__ */ A("thead", { children: /* @__PURE__ */ j("tr", {
|
|
415
|
+
className: "hover:bg-action-primary-bg/10/50 border-b border-border",
|
|
416
|
+
children: [
|
|
417
|
+
/* @__PURE__ */ A("th", {
|
|
418
|
+
className: "text-left px-4 py-3 text-xs font-medium text-muted-foreground uppercase tracking-wider",
|
|
419
|
+
children: y("channel.channel", "Channel")
|
|
420
|
+
}),
|
|
421
|
+
/* @__PURE__ */ A("th", {
|
|
422
|
+
className: "text-left px-4 py-3 text-xs font-medium text-muted-foreground uppercase tracking-wider",
|
|
423
|
+
children: y("channel.platform", "Platform")
|
|
424
|
+
}),
|
|
425
|
+
/* @__PURE__ */ A("th", {
|
|
426
|
+
className: "text-left px-4 py-3 text-xs font-medium text-muted-foreground uppercase tracking-wider",
|
|
427
|
+
children: y("channel.status", "Status")
|
|
428
|
+
}),
|
|
429
|
+
/* @__PURE__ */ A("th", {
|
|
430
|
+
className: "text-left px-4 py-3 text-xs font-medium text-muted-foreground uppercase tracking-wider",
|
|
431
|
+
children: y("channel.health", "Health")
|
|
432
|
+
}),
|
|
433
|
+
/* @__PURE__ */ A("th", {
|
|
434
|
+
className: "text-left px-4 py-3 text-xs font-medium text-muted-foreground uppercase tracking-wider",
|
|
435
|
+
children: y("channel.connection", "Connection")
|
|
436
|
+
}),
|
|
437
|
+
/* @__PURE__ */ A("th", {
|
|
438
|
+
className: "text-right px-4 py-3 text-xs font-medium text-muted-foreground uppercase tracking-wider",
|
|
439
|
+
children: y("channel.msgs24h", "Msgs 24h")
|
|
440
|
+
}),
|
|
441
|
+
/* @__PURE__ */ A("th", {
|
|
442
|
+
className: "text-right px-4 py-3 text-xs font-medium text-muted-foreground uppercase tracking-wider",
|
|
443
|
+
children: y("channel.updated", "Updated")
|
|
444
|
+
}),
|
|
445
|
+
/* @__PURE__ */ A("th", {
|
|
446
|
+
className: "text-right px-4 py-3 text-xs font-medium text-muted-foreground uppercase tracking-wider",
|
|
447
|
+
children: y("channel.actions", "Actions")
|
|
448
|
+
})
|
|
449
|
+
]
|
|
450
|
+
}) }), /* @__PURE__ */ A("tbody", {
|
|
451
|
+
className: "divide-y divide-border",
|
|
452
|
+
children: V.map((e) => {
|
|
453
|
+
let t = ue === e.id;
|
|
454
|
+
return /* @__PURE__ */ j("tr", {
|
|
455
|
+
className: "bg-surface hover:hover:bg-action-primary-bg/10/60 transition-colors group",
|
|
456
|
+
children: [
|
|
457
|
+
/* @__PURE__ */ A("td", {
|
|
458
|
+
className: "px-4 py-3",
|
|
459
|
+
children: /* @__PURE__ */ j("button", {
|
|
460
|
+
onClick: () => h(`/channels/${e.id}`),
|
|
461
|
+
className: "text-left group/name",
|
|
462
|
+
children: [/* @__PURE__ */ A("p", {
|
|
463
|
+
className: "font-medium text-foreground group-hover/name:text-accent-primary transition-colors truncate max-w-[200px]",
|
|
464
|
+
children: e.name
|
|
465
|
+
}), e.description && /* @__PURE__ */ A("p", {
|
|
466
|
+
className: "text-xs text-muted-foreground truncate max-w-[200px]",
|
|
467
|
+
children: e.description
|
|
468
|
+
})]
|
|
469
|
+
})
|
|
470
|
+
}),
|
|
471
|
+
/* @__PURE__ */ j("td", {
|
|
472
|
+
className: "px-4 py-3",
|
|
473
|
+
children: [/* @__PURE__ */ A("span", {
|
|
474
|
+
className: `inline-flex items-center px-2 py-0.5 text-[11px] font-semibold rounded-full ${R(e.platform).color}`,
|
|
475
|
+
children: R(e.platform).label
|
|
476
|
+
}), e.adapterType && /* @__PURE__ */ A("p", {
|
|
477
|
+
className: "text-[10px] text-muted-foreground mt-0.5 font-mono",
|
|
478
|
+
children: e.adapterType.replace(/_/g, " ")
|
|
479
|
+
})]
|
|
480
|
+
}),
|
|
481
|
+
/* @__PURE__ */ A("td", {
|
|
482
|
+
className: "px-4 py-3",
|
|
483
|
+
children: /* @__PURE__ */ j("span", {
|
|
484
|
+
className: "inline-flex items-center gap-1.5",
|
|
485
|
+
children: [/* @__PURE__ */ A("span", { className: `w-1.5 h-1.5 rounded-full ${z(e.status).dotColor}` }), /* @__PURE__ */ A("span", {
|
|
486
|
+
className: `text-xs ${z(e.status).textColor}`,
|
|
487
|
+
children: z(e.status).label
|
|
488
|
+
})]
|
|
489
|
+
})
|
|
490
|
+
}),
|
|
491
|
+
/* @__PURE__ */ A("td", {
|
|
492
|
+
className: "px-4 py-3",
|
|
493
|
+
children: /* @__PURE__ */ j("span", {
|
|
494
|
+
className: `inline-flex items-center gap-1 text-xs ${B(e.connectionHealth).color}`,
|
|
495
|
+
children: [(() => {
|
|
496
|
+
let t = B(e.connectionHealth).icon;
|
|
497
|
+
return /* @__PURE__ */ A(t, { size: 12 });
|
|
498
|
+
})(), B(e.connectionHealth).label]
|
|
499
|
+
})
|
|
500
|
+
}),
|
|
501
|
+
/* @__PURE__ */ A("td", {
|
|
502
|
+
className: "px-4 py-3",
|
|
503
|
+
children: /* @__PURE__ */ A("span", {
|
|
504
|
+
className: `text-xs ${e.isConnected ? "text-success-500" : "text-muted-foreground"}`,
|
|
505
|
+
children: e.isConnected ? y("channel.connected", "Connected") : y("channel.disconnected", "Disconnected")
|
|
506
|
+
})
|
|
507
|
+
}),
|
|
508
|
+
/* @__PURE__ */ A("td", {
|
|
509
|
+
className: "px-4 py-3 text-right",
|
|
510
|
+
children: /* @__PURE__ */ A("span", {
|
|
511
|
+
className: "text-xs text-foreground tabular-nums",
|
|
512
|
+
children: (e.messageCount24h ?? 0).toLocaleString()
|
|
513
|
+
})
|
|
514
|
+
}),
|
|
515
|
+
/* @__PURE__ */ A("td", {
|
|
516
|
+
className: "px-4 py-3 text-right",
|
|
517
|
+
children: /* @__PURE__ */ A("span", {
|
|
518
|
+
className: "text-xs text-muted-foreground whitespace-nowrap",
|
|
519
|
+
children: le(e.updatedAt)
|
|
520
|
+
})
|
|
521
|
+
}),
|
|
522
|
+
/* @__PURE__ */ A("td", {
|
|
523
|
+
className: "px-4 py-3",
|
|
524
|
+
children: /* @__PURE__ */ j("div", {
|
|
525
|
+
className: "flex items-center justify-end gap-0.5 opacity-0 group-hover:opacity-100 transition-opacity",
|
|
526
|
+
children: [
|
|
527
|
+
/* @__PURE__ */ A("button", {
|
|
528
|
+
onClick: () => h(`/channels/${e.id}`),
|
|
529
|
+
className: "p-1.5 text-muted-foreground hover:text-accent-primary hover:bg-accent-primary/10 rounded transition-colors",
|
|
530
|
+
title: y("channel.view", "View"),
|
|
531
|
+
children: /* @__PURE__ */ A(v, { size: 14 })
|
|
532
|
+
}),
|
|
533
|
+
/* @__PURE__ */ A(s, {
|
|
534
|
+
permission: c.CHANNEL_EXECUTE,
|
|
535
|
+
children: /* @__PURE__ */ A("button", {
|
|
536
|
+
onClick: () => pe(e.id),
|
|
537
|
+
disabled: t,
|
|
538
|
+
className: "p-1.5 text-muted-foreground hover:text-accent-blue hover:bg-accent-blue-subtle rounded transition-colors disabled:opacity-40",
|
|
539
|
+
title: y("channel.healthCheck", "Health Check"),
|
|
540
|
+
children: t ? /* @__PURE__ */ A(b, {
|
|
541
|
+
size: 14,
|
|
542
|
+
className: "animate-spin"
|
|
543
|
+
}) : /* @__PURE__ */ A(E, { size: 14 })
|
|
544
|
+
})
|
|
545
|
+
}),
|
|
546
|
+
/* @__PURE__ */ A(s, {
|
|
547
|
+
permission: c.CHANNEL_UPDATE,
|
|
548
|
+
children: /* @__PURE__ */ A("button", {
|
|
549
|
+
onClick: () => fe(e),
|
|
550
|
+
disabled: t,
|
|
551
|
+
className: `p-1.5 rounded transition-colors disabled:opacity-40 ${e.status === "ACTIVE" ? "text-muted-foreground hover:text-warning-500 hover:bg-warning-500/10" : "text-muted-foreground hover:text-success-500 hover:bg-success-500/10"}`,
|
|
552
|
+
title: e.status === "ACTIVE" ? y("channel.deactivate", "Deactivate") : y("channel.activate", "Activate"),
|
|
553
|
+
children: e.status === "ACTIVE" ? /* @__PURE__ */ A(w, { size: 14 }) : /* @__PURE__ */ A(C, { size: 14 })
|
|
554
|
+
})
|
|
555
|
+
}),
|
|
556
|
+
k === e.id ? /* @__PURE__ */ j("span", {
|
|
557
|
+
className: "inline-flex items-center gap-1 ml-1",
|
|
558
|
+
children: [/* @__PURE__ */ A("button", {
|
|
559
|
+
onClick: () => de(e.id),
|
|
560
|
+
disabled: t,
|
|
561
|
+
className: "px-1.5 py-0.5 text-[11px] font-medium text-error-400 hover:bg-error-500/10 rounded transition-colors",
|
|
562
|
+
children: t ? "..." : y("channel.yes", "Yes")
|
|
563
|
+
}), /* @__PURE__ */ A("button", {
|
|
564
|
+
onClick: () => I(null),
|
|
565
|
+
className: "px-1.5 py-0.5 text-[11px] text-muted-foreground hover:hover:bg-action-primary-bg/10 rounded transition-colors",
|
|
566
|
+
children: y("channel.no", "No")
|
|
567
|
+
})]
|
|
568
|
+
}) : /* @__PURE__ */ A(s, {
|
|
569
|
+
permission: c.CHANNEL_DELETE,
|
|
570
|
+
children: /* @__PURE__ */ A("button", {
|
|
571
|
+
onClick: () => I(e.id),
|
|
572
|
+
className: "p-1.5 text-muted-foreground hover:text-error-500 hover:bg-error-500/10 rounded transition-colors",
|
|
573
|
+
title: y("channel.delete", "Delete"),
|
|
574
|
+
children: /* @__PURE__ */ A(se, { size: 14 })
|
|
575
|
+
})
|
|
576
|
+
})
|
|
577
|
+
]
|
|
578
|
+
})
|
|
579
|
+
})
|
|
580
|
+
]
|
|
581
|
+
}, e.id);
|
|
582
|
+
})
|
|
583
|
+
})]
|
|
584
|
+
})
|
|
585
|
+
}), /* @__PURE__ */ j("div", {
|
|
586
|
+
className: "px-4 py-2.5 hover:bg-action-primary-bg/10/30 border-t border-border flex items-center justify-between",
|
|
587
|
+
children: [/* @__PURE__ */ j("p", {
|
|
588
|
+
className: "text-xs text-muted-foreground",
|
|
589
|
+
children: [
|
|
590
|
+
y("channel.showing", "Showing"),
|
|
591
|
+
" ",
|
|
592
|
+
/* @__PURE__ */ A("span", {
|
|
593
|
+
className: "font-medium text-foreground",
|
|
594
|
+
children: V.length
|
|
595
|
+
}),
|
|
596
|
+
" ",
|
|
597
|
+
y("channel.of", "of"),
|
|
598
|
+
" ",
|
|
599
|
+
/* @__PURE__ */ A("span", {
|
|
600
|
+
className: "font-medium text-foreground",
|
|
601
|
+
children: W
|
|
602
|
+
}),
|
|
603
|
+
" ",
|
|
604
|
+
y("channel.channelsLower", "channels")
|
|
605
|
+
]
|
|
606
|
+
}), V.length < W && /* @__PURE__ */ j("button", {
|
|
607
|
+
onClick: () => h("/channels/?tab=all"),
|
|
608
|
+
className: "inline-flex items-center gap-1 text-xs font-medium text-accent-primary hover:text-action-primary-bg transition-colors",
|
|
609
|
+
children: [
|
|
610
|
+
y("channel.viewAll", "View All"),
|
|
611
|
+
" ",
|
|
612
|
+
/* @__PURE__ */ A(ae, { size: 12 })
|
|
613
|
+
]
|
|
614
|
+
})]
|
|
615
|
+
})]
|
|
616
|
+
}),
|
|
617
|
+
V.length > 0 && /* @__PURE__ */ j("div", {
|
|
618
|
+
className: "grid gap-3 sm:grid-cols-3",
|
|
619
|
+
children: [
|
|
620
|
+
/* @__PURE__ */ j("button", {
|
|
621
|
+
onClick: () => h("/channels/?tab=all"),
|
|
622
|
+
className: "flex items-center gap-3 p-3 bg-surface border border-border rounded-lg hover:hover:bg-action-primary-bg/10 transition-colors text-left",
|
|
623
|
+
children: [/* @__PURE__ */ A(T, {
|
|
624
|
+
size: 16,
|
|
625
|
+
className: "text-accent-primary shrink-0"
|
|
626
|
+
}), /* @__PURE__ */ j("div", {
|
|
627
|
+
className: "min-w-0",
|
|
628
|
+
children: [/* @__PURE__ */ A("p", {
|
|
629
|
+
className: "text-sm font-medium text-foreground",
|
|
630
|
+
children: y("channel.allChannels", "All Channels")
|
|
631
|
+
}), /* @__PURE__ */ A("p", {
|
|
632
|
+
className: "text-xs text-muted-foreground truncate",
|
|
633
|
+
children: y("channel.browseChannels", "Browse and manage channel cards")
|
|
634
|
+
})]
|
|
635
|
+
})]
|
|
636
|
+
}),
|
|
637
|
+
/* @__PURE__ */ j("button", {
|
|
638
|
+
onClick: () => h("/channels/?tab=connections"),
|
|
639
|
+
className: "flex items-center gap-3 p-3 bg-surface border border-border rounded-lg hover:hover:bg-action-primary-bg/10 transition-colors text-left",
|
|
640
|
+
children: [/* @__PURE__ */ A(g, {
|
|
641
|
+
size: 16,
|
|
642
|
+
className: "text-accent-blue shrink-0"
|
|
643
|
+
}), /* @__PURE__ */ j("div", {
|
|
644
|
+
className: "min-w-0",
|
|
645
|
+
children: [/* @__PURE__ */ A("p", {
|
|
646
|
+
className: "text-sm font-medium text-foreground",
|
|
647
|
+
children: y("channel.connections", "Connections")
|
|
648
|
+
}), /* @__PURE__ */ A("p", {
|
|
649
|
+
className: "text-xs text-muted-foreground truncate",
|
|
650
|
+
children: y("channel.connectionsSubtitle", "OAuth, API keys & credentials")
|
|
651
|
+
})]
|
|
652
|
+
})]
|
|
653
|
+
}),
|
|
654
|
+
/* @__PURE__ */ j("button", {
|
|
655
|
+
onClick: () => h("/channels/?tab=send"),
|
|
656
|
+
className: "flex items-center gap-3 p-3 bg-surface border border-border rounded-lg hover:hover:bg-action-primary-bg/10 transition-colors text-left",
|
|
657
|
+
children: [/* @__PURE__ */ A(ie, {
|
|
658
|
+
size: 16,
|
|
659
|
+
className: "text-accent-violet shrink-0"
|
|
660
|
+
}), /* @__PURE__ */ j("div", {
|
|
661
|
+
className: "min-w-0",
|
|
662
|
+
children: [/* @__PURE__ */ A("p", {
|
|
663
|
+
className: "text-sm font-medium text-foreground",
|
|
664
|
+
children: y("channel.sendMessage", "Send Message")
|
|
665
|
+
}), /* @__PURE__ */ A("p", {
|
|
666
|
+
className: "text-xs text-muted-foreground truncate",
|
|
667
|
+
children: y("channel.sendMessageSubtitle", "Send a test or one-off notification")
|
|
668
|
+
})]
|
|
669
|
+
})]
|
|
670
|
+
})
|
|
671
|
+
]
|
|
672
|
+
})
|
|
673
|
+
]
|
|
674
|
+
})
|
|
675
|
+
});
|
|
676
|
+
}
|
|
677
|
+
//#endregion
|
|
678
|
+
export { I as ChannelDashboardPage };
|
|
679
|
+
|
|
680
|
+
//# sourceMappingURL=ChannelDashboardPage.js.map
|