@burdenoff/microfe-channel 2026.625.1 → 2026.625.3
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 +73 -76
- package/dist/channel/modules/channels/pages/ChannelDashboardPage.js.map +1 -1
- package/dist/channel/modules/channels/pages/ChannelDetailsPage.js +407 -353
- package/dist/channel/modules/channels/pages/ChannelDetailsPage.js.map +1 -1
- package/dist/channel/modules/channels/pages/ChannelSettingsPage.js +93 -87
- package/dist/channel/modules/channels/pages/ChannelSettingsPage.js.map +1 -1
- package/dist/channel/modules/channels/pages/ChannelUsersPage.js +119 -96
- package/dist/channel/modules/channels/pages/ChannelUsersPage.js.map +1 -1
- package/dist/channel/modules/channels/pages/ChannelsListPage.js +219 -196
- package/dist/channel/modules/channels/pages/ChannelsListPage.js.map +1 -1
- package/dist/channel/modules/channels/pages/ConnectionDetailsPage.js +277 -232
- package/dist/channel/modules/channels/pages/ConnectionDetailsPage.js.map +1 -1
- package/dist/channel/modules/channels/pages/ConnectionsListPage.js +112 -91
- package/dist/channel/modules/channels/pages/ConnectionsListPage.js.map +1 -1
- package/dist/channel/modules/channels/pages/CreateChannelPage.js +28 -22
- package/dist/channel/modules/channels/pages/CreateChannelPage.js.map +1 -1
- package/dist/channel/modules/channels/pages/CreateConnectionPage.js +72 -65
- package/dist/channel/modules/channels/pages/CreateConnectionPage.js.map +1 -1
- package/dist/channel/modules/channels/pages/DeliveryHistoryPage.js +101 -93
- package/dist/channel/modules/channels/pages/DeliveryHistoryPage.js.map +1 -1
- package/dist/channel/modules/channels/pages/EditChannelPage.js +154 -148
- package/dist/channel/modules/channels/pages/EditChannelPage.js.map +1 -1
- package/dist/channel/modules/channels/pages/EditConnectionPage.js +69 -62
- package/dist/channel/modules/channels/pages/EditConnectionPage.js.map +1 -1
- package/dist/channel/modules/channels/pages/SendMessagePage.js +131 -124
- package/dist/channel/modules/channels/pages/SendMessagePage.js.map +1 -1
- package/dist/channel/modules/channels/pages/WebhookEventsPage.js +152 -129
- package/dist/channel/modules/channels/pages/WebhookEventsPage.js.map +1 -1
- package/package.json +2 -2
|
@@ -1,338 +1,383 @@
|
|
|
1
1
|
import { useChannel as e } from "../../../providers/ChannelProvider.js";
|
|
2
2
|
import { nativeImpact as t, nativeNotify as n } from "../../../../utils/nativeBridge.js";
|
|
3
3
|
import { reportShellError as ee } from "../../../utils/shellBridge.js";
|
|
4
|
-
import { getGlobalChannelClient as
|
|
5
|
-
import { GetConnectionDocument as
|
|
6
|
-
import { useChannel as
|
|
7
|
-
import { PermissionGuard as
|
|
8
|
-
import { CHANNEL_PERMISSIONS as
|
|
9
|
-
import { useEffect as
|
|
10
|
-
import { useI18n as
|
|
11
|
-
import { AlertCircle as
|
|
12
|
-
import { useNavigate as
|
|
13
|
-
import { usePermissions as
|
|
14
|
-
import { jsx as
|
|
15
|
-
import { CTAOverflowMenu as
|
|
16
|
-
import { TagBadge as
|
|
4
|
+
import { getGlobalChannelClient as te } from "../../../graphql/global-client.js";
|
|
5
|
+
import { GetConnectionDocument as r } from "../../../../generated/global-operations.js";
|
|
6
|
+
import { useChannel as ne } from "../../../hooks/useChannels.js";
|
|
7
|
+
import { PermissionGuard as i } from "../../../components/PermissionGuard.js";
|
|
8
|
+
import { CHANNEL_PERMISSIONS as a } from "../../../constants/permissions.js";
|
|
9
|
+
import { useEffect as re, useState as o } from "react";
|
|
10
|
+
import { useI18n as ie } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
11
|
+
import { AlertCircle as s, ArrowLeft as c, CheckCircle2 as l, Clock as u, Edit as d, Loader2 as f, RefreshCw as p, Shield as m, Trash2 as h, XCircle as g } from "lucide-react";
|
|
12
|
+
import { useNavigate as _, useParams as v } from "react-router-dom";
|
|
13
|
+
import { usePermissions as ae } from "@burdenoff/fe-libs/shared/providers/shell";
|
|
14
|
+
import { jsx as y, jsxs as b } from "react/jsx-runtime";
|
|
15
|
+
import { CTAOverflowMenu as oe, EmphasisPanel as x, GlassCard as S, NextSteps as C, PagePurpose as w } from "@burdenoff/fe-libs/ui";
|
|
16
|
+
import { TagBadge as T } from "@burdenoff/fe-libs/tag";
|
|
17
17
|
//#region src/channel/modules/channels/pages/ConnectionDetailsPage.tsx
|
|
18
|
-
var
|
|
18
|
+
var E = {
|
|
19
19
|
true: {
|
|
20
|
-
icon:
|
|
20
|
+
icon: l,
|
|
21
21
|
color: "text-status-success-text",
|
|
22
22
|
bgColor: "bg-status-success-bg-subtle",
|
|
23
23
|
label: "Healthy"
|
|
24
24
|
},
|
|
25
25
|
false: {
|
|
26
|
-
icon:
|
|
26
|
+
icon: g,
|
|
27
27
|
color: "text-status-error-text",
|
|
28
28
|
bgColor: "bg-error-500/10",
|
|
29
29
|
label: "Unhealthy"
|
|
30
30
|
}
|
|
31
31
|
};
|
|
32
|
-
function
|
|
33
|
-
let
|
|
34
|
-
|
|
35
|
-
if (
|
|
32
|
+
function D() {
|
|
33
|
+
let l = _(), { hasPermission: g } = ae(), D = g(a.CHANNEL_UPDATE), O = g(a.CHANNEL_EXECUTE), k = v(), { connectionId: A } = k, { authToken: j, apiGatewayUrl: M, organizationId: N } = e(), [P, F] = o(k.channelId), [I, L] = o(null);
|
|
34
|
+
re(() => {
|
|
35
|
+
if (P || !A) return;
|
|
36
36
|
let e = !1;
|
|
37
37
|
return (async () => {
|
|
38
38
|
try {
|
|
39
|
-
let t = await
|
|
40
|
-
query:
|
|
41
|
-
variables: { id:
|
|
39
|
+
let t = await te(M, j, N).query({
|
|
40
|
+
query: r,
|
|
41
|
+
variables: { id: A },
|
|
42
42
|
fetchPolicy: "network-only"
|
|
43
43
|
});
|
|
44
44
|
if (e) return;
|
|
45
45
|
let n = t.data?.getConnection;
|
|
46
|
-
n?.channelId ?
|
|
46
|
+
n?.channelId ? F(n.channelId) : L("Connection not found");
|
|
47
47
|
} catch (t) {
|
|
48
|
-
e ||
|
|
48
|
+
e || L(t instanceof Error ? t.message : "Failed to resolve connection");
|
|
49
49
|
}
|
|
50
50
|
})(), () => {
|
|
51
51
|
e = !0;
|
|
52
52
|
};
|
|
53
53
|
}, [
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
N,
|
|
54
|
+
A,
|
|
55
|
+
P,
|
|
57
56
|
M,
|
|
58
|
-
|
|
57
|
+
j,
|
|
58
|
+
N
|
|
59
59
|
]);
|
|
60
|
-
let
|
|
61
|
-
let n =
|
|
60
|
+
let R = P, { channel: z, isLoading: B, error: V, runHealthCheck: H, deleteConnection: U } = ne(R), { t: W } = ie(), G = (e, t) => {
|
|
61
|
+
let n = W(e);
|
|
62
62
|
return n === e ? t : n;
|
|
63
|
-
}, [
|
|
64
|
-
|
|
63
|
+
}, [K, q] = o(!1), [J, Y] = o(!1), [se, X] = o(!1), Z = z?.connection, Q = async () => {
|
|
64
|
+
Y(!0);
|
|
65
65
|
try {
|
|
66
|
-
await
|
|
66
|
+
await H();
|
|
67
67
|
} finally {
|
|
68
|
-
|
|
68
|
+
Y(!1);
|
|
69
69
|
}
|
|
70
|
-
},
|
|
71
|
-
if (
|
|
72
|
-
t("medium"),
|
|
70
|
+
}, ce = async () => {
|
|
71
|
+
if (A) {
|
|
72
|
+
t("medium"), q(!0);
|
|
73
73
|
try {
|
|
74
|
-
await
|
|
74
|
+
await U(A), n("success"), l(`/channels/${R}`);
|
|
75
75
|
} catch (e) {
|
|
76
76
|
n("error"), ee(e, {
|
|
77
77
|
module: "channel",
|
|
78
78
|
context: { action: "Failed to delete connection" }
|
|
79
79
|
}, "[channel] Failed to delete connection");
|
|
80
80
|
} finally {
|
|
81
|
-
|
|
81
|
+
q(!1);
|
|
82
82
|
}
|
|
83
83
|
}
|
|
84
84
|
};
|
|
85
|
-
if (
|
|
85
|
+
if (B || !P && !I) return /* @__PURE__ */ y("div", {
|
|
86
86
|
className: "flex items-center justify-center min-h-screen",
|
|
87
|
-
children: /* @__PURE__ */
|
|
87
|
+
children: /* @__PURE__ */ y(f, { className: "size-8 animate-spin text-text-secondary" })
|
|
88
88
|
});
|
|
89
|
-
if (
|
|
89
|
+
if (I || V || !z) return /* @__PURE__ */ b("div", {
|
|
90
90
|
className: "flex flex-col items-center justify-center min-h-screen gap-4",
|
|
91
91
|
children: [
|
|
92
|
-
/* @__PURE__ */
|
|
93
|
-
/* @__PURE__ */
|
|
92
|
+
/* @__PURE__ */ y(s, { className: "size-12 text-status-error-text" }),
|
|
93
|
+
/* @__PURE__ */ y("h1", {
|
|
94
94
|
className: "text-xl font-semibold",
|
|
95
|
-
children:
|
|
95
|
+
children: G("channel.channelNotFound", "Channel not found")
|
|
96
96
|
}),
|
|
97
|
-
/* @__PURE__ */
|
|
97
|
+
/* @__PURE__ */ y("button", {
|
|
98
98
|
type: "button",
|
|
99
|
-
onClick: () =>
|
|
99
|
+
onClick: () => l("../../list"),
|
|
100
100
|
className: "text-primary hover:underline",
|
|
101
|
-
children:
|
|
101
|
+
children: G("channel.backToChannels", "Back to channels")
|
|
102
102
|
})
|
|
103
103
|
]
|
|
104
104
|
});
|
|
105
|
-
if (!
|
|
105
|
+
if (!Z) return /* @__PURE__ */ b("div", {
|
|
106
106
|
className: "flex flex-col items-center justify-center min-h-screen gap-4",
|
|
107
107
|
children: [
|
|
108
|
-
/* @__PURE__ */
|
|
109
|
-
/* @__PURE__ */
|
|
108
|
+
/* @__PURE__ */ y(s, { className: "size-12 text-text-secondary" }),
|
|
109
|
+
/* @__PURE__ */ y("h1", {
|
|
110
110
|
className: "text-xl font-semibold",
|
|
111
|
-
children:
|
|
111
|
+
children: G("channel.noConnectionFound", "No connection found")
|
|
112
112
|
}),
|
|
113
|
-
/* @__PURE__ */
|
|
113
|
+
/* @__PURE__ */ y("p", {
|
|
114
114
|
className: "text-sm text-text-secondary",
|
|
115
|
-
children:
|
|
115
|
+
children: G("channel.noConnectionConfigured", "This channel does not have a connection configured.")
|
|
116
116
|
}),
|
|
117
|
-
/* @__PURE__ */
|
|
117
|
+
/* @__PURE__ */ y("button", {
|
|
118
118
|
type: "button",
|
|
119
|
-
onClick: () =>
|
|
119
|
+
onClick: () => l(`/channels/${R}`),
|
|
120
120
|
className: "text-primary hover:underline",
|
|
121
|
-
children:
|
|
121
|
+
children: G("channel.backToChannel", "Back to channel")
|
|
122
122
|
})
|
|
123
123
|
]
|
|
124
124
|
});
|
|
125
|
-
let $ =
|
|
126
|
-
return /* @__PURE__ */
|
|
127
|
-
permission:
|
|
128
|
-
children: /* @__PURE__ */
|
|
125
|
+
let $ = E[String(Z.isHealthy)] || E.false, le = $.icon;
|
|
126
|
+
return /* @__PURE__ */ y(i, {
|
|
127
|
+
permission: a.CHANNEL_CONNECTION_READ,
|
|
128
|
+
children: /* @__PURE__ */ b("div", {
|
|
129
129
|
className: "min-h-screen bg-bg-surface",
|
|
130
|
-
children: [/* @__PURE__ */
|
|
130
|
+
children: [/* @__PURE__ */ y("div", {
|
|
131
131
|
className: "border-b bg-bg-surface",
|
|
132
|
-
children: /* @__PURE__ */
|
|
132
|
+
children: /* @__PURE__ */ y("div", {
|
|
133
133
|
className: "container mx-auto px-6 py-4",
|
|
134
|
-
children: /* @__PURE__ */
|
|
134
|
+
children: /* @__PURE__ */ b("div", {
|
|
135
135
|
className: "flex items-center justify-between",
|
|
136
|
-
children: [/* @__PURE__ */
|
|
136
|
+
children: [/* @__PURE__ */ b("div", {
|
|
137
137
|
className: "flex items-center gap-4",
|
|
138
|
-
children: [/* @__PURE__ */
|
|
138
|
+
children: [/* @__PURE__ */ y("button", {
|
|
139
139
|
type: "button",
|
|
140
|
-
onClick: () =>
|
|
140
|
+
onClick: () => l(`/channels/${R}`),
|
|
141
141
|
className: "p-2 hover:bg-bg-sunken rounded-lg transition-colors",
|
|
142
|
-
children: /* @__PURE__ */
|
|
143
|
-
}), /* @__PURE__ */
|
|
142
|
+
children: /* @__PURE__ */ y(c, { className: "size-5 " })
|
|
143
|
+
}), /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("h1", {
|
|
144
144
|
className: "text-2xl font-bold",
|
|
145
|
-
children:
|
|
146
|
-
}), /* @__PURE__ */
|
|
145
|
+
children: G("channel.connectionDetails", "Connection Details")
|
|
146
|
+
}), /* @__PURE__ */ b("p", {
|
|
147
147
|
className: "text-sm text-text-secondary",
|
|
148
148
|
children: [
|
|
149
|
-
|
|
149
|
+
z.name,
|
|
150
150
|
" • ",
|
|
151
|
-
|
|
151
|
+
z.platform
|
|
152
152
|
]
|
|
153
153
|
})] })]
|
|
154
|
-
}), /* @__PURE__ */
|
|
155
|
-
primary:
|
|
156
|
-
label:
|
|
157
|
-
icon: /* @__PURE__ */
|
|
154
|
+
}), /* @__PURE__ */ y(oe, {
|
|
155
|
+
primary: D ? {
|
|
156
|
+
label: G("channel.editChannel", "Edit Channel"),
|
|
157
|
+
icon: /* @__PURE__ */ y(d, {
|
|
158
158
|
className: "size-4",
|
|
159
159
|
"aria-hidden": "true"
|
|
160
160
|
}),
|
|
161
|
-
onSelect: () =>
|
|
161
|
+
onSelect: () => l(`/channels/${R}/edit`)
|
|
162
162
|
} : void 0,
|
|
163
|
-
actions:
|
|
164
|
-
label:
|
|
165
|
-
icon:
|
|
163
|
+
actions: O ? [{
|
|
164
|
+
label: G("channel.runHealthCheck", "Run Health Check"),
|
|
165
|
+
icon: J ? /* @__PURE__ */ y(f, {
|
|
166
166
|
className: "size-4 animate-spin",
|
|
167
167
|
"aria-hidden": "true"
|
|
168
|
-
}) : /* @__PURE__ */
|
|
168
|
+
}) : /* @__PURE__ */ y(p, {
|
|
169
169
|
className: "size-4",
|
|
170
170
|
"aria-hidden": "true"
|
|
171
171
|
}),
|
|
172
|
-
disabled:
|
|
173
|
-
onSelect: () => void
|
|
172
|
+
disabled: J,
|
|
173
|
+
onSelect: () => void Q()
|
|
174
174
|
}] : []
|
|
175
175
|
})]
|
|
176
176
|
})
|
|
177
177
|
})
|
|
178
|
-
}), /* @__PURE__ */
|
|
178
|
+
}), /* @__PURE__ */ b("div", {
|
|
179
179
|
className: "container mx-auto px-6 py-8 max-w-5xl space-y-6",
|
|
180
|
-
children: [
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
180
|
+
children: [
|
|
181
|
+
/* @__PURE__ */ y(w, {
|
|
182
|
+
icon: /* @__PURE__ */ y(m, {
|
|
183
|
+
size: 15,
|
|
184
|
+
"aria-hidden": "true"
|
|
185
|
+
}),
|
|
186
|
+
children: G("channel.connectionDetailsPurpose", "The authenticated link between this channel and its provider — its auth type, whether it is active, when it was last tested, and how soon its token expires. Use it to verify the channel can actually send, to spot a token that needs refreshing before it lapses, or to remove a connection you no longer need.")
|
|
187
|
+
}),
|
|
188
|
+
/* @__PURE__ */ y(C, {
|
|
189
|
+
storageKey: "channel-connection-detail",
|
|
190
|
+
steps: [
|
|
191
|
+
...O ? [{
|
|
192
|
+
id: "health",
|
|
193
|
+
label: G("channel.nextRunHealthCheck", "Run a health check"),
|
|
194
|
+
description: G("channel.nextConnectionHealthDesc", "Confirm the credentials still authenticate against the provider."),
|
|
195
|
+
icon: /* @__PURE__ */ y(p, {
|
|
196
|
+
size: 16,
|
|
197
|
+
"aria-hidden": "true"
|
|
198
|
+
}),
|
|
199
|
+
onClick: () => void Q()
|
|
200
|
+
}] : [],
|
|
201
|
+
...D ? [{
|
|
202
|
+
id: "edit",
|
|
203
|
+
label: G("channel.nextEditChannel", "Edit the channel"),
|
|
204
|
+
description: G("channel.nextEditChannelDesc", "Update credentials, status or platform metadata for this channel."),
|
|
205
|
+
icon: /* @__PURE__ */ y(d, {
|
|
206
|
+
size: 16,
|
|
207
|
+
"aria-hidden": "true"
|
|
208
|
+
}),
|
|
209
|
+
onClick: () => l(`/channels/${R}/edit`)
|
|
210
|
+
}] : [],
|
|
211
|
+
{
|
|
212
|
+
id: "back",
|
|
213
|
+
label: G("channel.nextBackToChannel", "Back to the channel"),
|
|
214
|
+
description: G("channel.nextBackToChannelDesc", "Return to the channel overview to send a test or review deliveries."),
|
|
215
|
+
icon: /* @__PURE__ */ y(c, {
|
|
216
|
+
size: 16,
|
|
217
|
+
"aria-hidden": "true"
|
|
218
|
+
}),
|
|
219
|
+
onClick: () => l(`/channels/${R}`)
|
|
220
|
+
}
|
|
221
|
+
]
|
|
222
|
+
}),
|
|
223
|
+
/* @__PURE__ */ y(x, {
|
|
224
|
+
className: "p-6",
|
|
225
|
+
children: /* @__PURE__ */ y("div", {
|
|
226
|
+
className: "flex items-center justify-between",
|
|
227
|
+
children: /* @__PURE__ */ b("div", {
|
|
228
|
+
className: "flex items-center gap-4",
|
|
229
|
+
children: [/* @__PURE__ */ y("div", {
|
|
230
|
+
className: $.color,
|
|
231
|
+
children: /* @__PURE__ */ y(le, { className: "size-10 " })
|
|
232
|
+
}), /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("h2", {
|
|
233
|
+
className: "text-xl font-semibold",
|
|
234
|
+
children: $.label
|
|
235
|
+
}), /* @__PURE__ */ y("p", {
|
|
236
|
+
className: "text-sm text-text-secondary",
|
|
237
|
+
children: Z.isHealthy ? G("channel.connectionWorking", "Connection is working properly") : G("channel.connectionNotWorking", "Connection is not working properly")
|
|
238
|
+
})] })]
|
|
239
|
+
})
|
|
196
240
|
})
|
|
197
|
-
})
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
241
|
+
}),
|
|
242
|
+
/* @__PURE__ */ b("div", {
|
|
243
|
+
className: "grid gap-6 lg:grid-cols-3",
|
|
244
|
+
children: [/* @__PURE__ */ b(S, {
|
|
245
|
+
treatment: "plain",
|
|
246
|
+
className: "border-border-seam p-6 space-y-4 lg:col-span-2",
|
|
247
|
+
children: [
|
|
248
|
+
/* @__PURE__ */ y("h3", {
|
|
249
|
+
className: "font-semibold",
|
|
250
|
+
children: G("channel.connectionInformation", "Connection Information")
|
|
251
|
+
}),
|
|
252
|
+
/* @__PURE__ */ b("div", {
|
|
253
|
+
className: "grid grid-cols-2 gap-4",
|
|
254
|
+
children: [
|
|
255
|
+
/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("p", {
|
|
256
|
+
className: "text-sm text-text-secondary",
|
|
257
|
+
children: "Connection ID"
|
|
258
|
+
}), /* @__PURE__ */ y("p", {
|
|
259
|
+
className: "font-mono text-sm",
|
|
260
|
+
children: Z.id
|
|
261
|
+
})] }),
|
|
262
|
+
/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("p", {
|
|
263
|
+
className: "text-sm text-text-secondary",
|
|
264
|
+
children: "Auth Type"
|
|
265
|
+
}), /* @__PURE__ */ b("p", {
|
|
266
|
+
className: "flex items-center gap-2",
|
|
267
|
+
children: [/* @__PURE__ */ y(m, { className: "size-4 text-text-secondary" }), Z.authType]
|
|
268
|
+
})] }),
|
|
269
|
+
/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("p", {
|
|
270
|
+
className: "text-sm text-text-secondary",
|
|
271
|
+
children: "Status"
|
|
272
|
+
}), /* @__PURE__ */ y("p", {
|
|
273
|
+
className: Z.isActive ? "text-status-success-text" : "text-text-secondary",
|
|
274
|
+
children: Z.isActive ? G("channel.activeStatus", "Active") : G("channel.inactiveStatus", "Inactive")
|
|
275
|
+
})] }),
|
|
276
|
+
/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("p", {
|
|
277
|
+
className: "text-sm text-text-secondary",
|
|
278
|
+
children: "Token Refresh"
|
|
279
|
+
}), /* @__PURE__ */ y("p", {
|
|
280
|
+
className: Z.needsTokenRefresh ? "text-status-warning-text" : "text-text-secondary",
|
|
281
|
+
children: Z.needsTokenRefresh ? G("channel.tokenRefreshRequired", "Required soon") : G("channel.tokenRefreshNotNeeded", "Not needed")
|
|
282
|
+
})] }),
|
|
283
|
+
Z.lastTestedAt && /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("p", {
|
|
284
|
+
className: "text-sm text-text-secondary",
|
|
285
|
+
children: "Last Tested"
|
|
286
|
+
}), /* @__PURE__ */ b("p", {
|
|
287
|
+
className: "flex items-center gap-2",
|
|
288
|
+
children: [/* @__PURE__ */ y(u, { className: "size-4 text-text-secondary" }), new Date(Z.lastTestedAt).toLocaleString()]
|
|
289
|
+
})] }),
|
|
290
|
+
Z.daysUntilExpiry !== null && Z.daysUntilExpiry !== void 0 && /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("p", {
|
|
291
|
+
className: "text-sm text-text-secondary",
|
|
292
|
+
children: "Days Until Token Expiry"
|
|
293
|
+
}), /* @__PURE__ */ b("p", {
|
|
294
|
+
className: Z.daysUntilExpiry < 30 ? "text-status-warning-text" : "text-text-secondary",
|
|
295
|
+
children: [Z.daysUntilExpiry, " days"]
|
|
296
|
+
})] })
|
|
297
|
+
]
|
|
298
|
+
}),
|
|
299
|
+
Z.testStatus && /* @__PURE__ */ b("div", {
|
|
300
|
+
className: "pt-4 border-t",
|
|
301
|
+
children: [/* @__PURE__ */ y("p", {
|
|
302
|
+
className: "text-sm text-text-secondary mb-2",
|
|
303
|
+
children: "Last Test Status"
|
|
304
|
+
}), /* @__PURE__ */ y("div", {
|
|
305
|
+
className: "p-3 rounded-lg bg-bg-sunken",
|
|
306
|
+
children: /* @__PURE__ */ y("p", {
|
|
307
|
+
className: "font-mono text-sm",
|
|
308
|
+
children: Z.testStatus
|
|
309
|
+
})
|
|
310
|
+
})]
|
|
311
|
+
}),
|
|
312
|
+
Z.tagAssignments && Z.tagAssignments.length > 0 && /* @__PURE__ */ b("div", {
|
|
313
|
+
className: "pt-4 border-t",
|
|
314
|
+
children: [/* @__PURE__ */ y("p", {
|
|
315
|
+
className: "text-sm text-text-secondary mb-2",
|
|
316
|
+
children: G("channel.tags", "Tags")
|
|
317
|
+
}), /* @__PURE__ */ y("div", {
|
|
318
|
+
className: "flex flex-wrap gap-1.5",
|
|
319
|
+
"aria-label": "Connection tags",
|
|
320
|
+
children: Z.tagAssignments.map((e) => /* @__PURE__ */ y(T, {
|
|
321
|
+
id: e.tagId,
|
|
322
|
+
label: e.tagId,
|
|
323
|
+
size: "md"
|
|
324
|
+
}, e.id))
|
|
325
|
+
})]
|
|
326
|
+
})
|
|
327
|
+
]
|
|
328
|
+
}), /* @__PURE__ */ b(S, {
|
|
329
|
+
treatment: "plain",
|
|
330
|
+
className: "border-border-seam p-6 space-y-4 lg:col-span-1",
|
|
331
|
+
children: [/* @__PURE__ */ y("h3", {
|
|
205
332
|
className: "font-semibold",
|
|
206
|
-
children:
|
|
207
|
-
}),
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
Q.lastTestedAt && /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("p", {
|
|
240
|
-
className: "text-sm text-text-secondary",
|
|
241
|
-
children: "Last Tested"
|
|
242
|
-
}), /* @__PURE__ */ C("p", {
|
|
243
|
-
className: "flex items-center gap-2",
|
|
244
|
-
children: [/* @__PURE__ */ S(te, { className: "size-4 text-text-secondary" }), new Date(Q.lastTestedAt).toLocaleString()]
|
|
245
|
-
})] }),
|
|
246
|
-
Q.daysUntilExpiry !== null && Q.daysUntilExpiry !== void 0 && /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("p", {
|
|
247
|
-
className: "text-sm text-text-secondary",
|
|
248
|
-
children: "Days Until Token Expiry"
|
|
249
|
-
}), /* @__PURE__ */ C("p", {
|
|
250
|
-
className: Q.daysUntilExpiry < 30 ? "text-status-warning-text" : "text-text-secondary",
|
|
251
|
-
children: [Q.daysUntilExpiry, " days"]
|
|
252
|
-
})] })
|
|
253
|
-
]
|
|
254
|
-
}),
|
|
255
|
-
Q.testStatus && /* @__PURE__ */ C("div", {
|
|
256
|
-
className: "pt-4 border-t",
|
|
257
|
-
children: [/* @__PURE__ */ S("p", {
|
|
258
|
-
className: "text-sm text-text-secondary mb-2",
|
|
259
|
-
children: "Last Test Status"
|
|
260
|
-
}), /* @__PURE__ */ S("div", {
|
|
261
|
-
className: "p-3 rounded-lg bg-bg-sunken",
|
|
262
|
-
children: /* @__PURE__ */ S("p", {
|
|
263
|
-
className: "font-mono text-sm",
|
|
264
|
-
children: Q.testStatus
|
|
265
|
-
})
|
|
266
|
-
})]
|
|
267
|
-
}),
|
|
268
|
-
Q.tagAssignments && Q.tagAssignments.length > 0 && /* @__PURE__ */ C("div", {
|
|
269
|
-
className: "pt-4 border-t",
|
|
270
|
-
children: [/* @__PURE__ */ S("p", {
|
|
271
|
-
className: "text-sm text-text-secondary mb-2",
|
|
272
|
-
children: K("channel.tags", "Tags")
|
|
273
|
-
}), /* @__PURE__ */ S("div", {
|
|
274
|
-
className: "flex flex-wrap gap-1.5",
|
|
275
|
-
"aria-label": "Connection tags",
|
|
276
|
-
children: Q.tagAssignments.map((e) => /* @__PURE__ */ S(D, {
|
|
277
|
-
id: e.tagId,
|
|
278
|
-
label: e.tagId,
|
|
279
|
-
size: "md"
|
|
280
|
-
}, e.id))
|
|
281
|
-
})]
|
|
282
|
-
})
|
|
283
|
-
]
|
|
284
|
-
}), /* @__PURE__ */ C(E, {
|
|
285
|
-
treatment: "plain",
|
|
286
|
-
className: "border-border-seam p-6 space-y-4 lg:col-span-1",
|
|
287
|
-
children: [/* @__PURE__ */ S("h3", {
|
|
288
|
-
className: "font-semibold",
|
|
289
|
-
children: K("channel.actions", "Actions")
|
|
290
|
-
}), /* @__PURE__ */ C("div", {
|
|
291
|
-
className: "flex flex-col gap-3",
|
|
292
|
-
children: [/* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("p", {
|
|
293
|
-
className: "font-medium",
|
|
294
|
-
children: K("channel.deleteConnection", "Delete Connection")
|
|
295
|
-
}), /* @__PURE__ */ S("p", {
|
|
296
|
-
className: "text-sm text-text-secondary",
|
|
297
|
-
children: K("channel.deleteConnectionWarning", "Permanently remove this connection. The channel will become inactive.")
|
|
298
|
-
})] }), ie ? /* @__PURE__ */ C("div", {
|
|
299
|
-
className: "flex items-center gap-2",
|
|
300
|
-
children: [
|
|
301
|
-
/* @__PURE__ */ S("span", {
|
|
302
|
-
className: "text-sm text-text-secondary",
|
|
303
|
-
children: K("channel.confirmDelete", "Confirm delete?")
|
|
304
|
-
}),
|
|
305
|
-
/* @__PURE__ */ C("button", {
|
|
306
|
-
type: "button",
|
|
307
|
-
onClick: oe,
|
|
308
|
-
disabled: q,
|
|
309
|
-
className: "px-4 py-2 rounded-lg bg-status-error-bg text-status-error-text hover:bg-status-error-bg/90 transition-colors flex items-center gap-2",
|
|
310
|
-
children: [q ? /* @__PURE__ */ S(m, { className: "size-4 animate-spin" }) : /* @__PURE__ */ S(_, { className: "size-4 " }), K("channel.delete", "Delete")]
|
|
311
|
-
}),
|
|
312
|
-
/* @__PURE__ */ S("button", {
|
|
333
|
+
children: G("channel.actions", "Actions")
|
|
334
|
+
}), /* @__PURE__ */ b("div", {
|
|
335
|
+
className: "flex flex-col gap-3",
|
|
336
|
+
children: [/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("p", {
|
|
337
|
+
className: "font-medium",
|
|
338
|
+
children: G("channel.deleteConnection", "Delete Connection")
|
|
339
|
+
}), /* @__PURE__ */ y("p", {
|
|
340
|
+
className: "text-sm text-text-secondary",
|
|
341
|
+
children: G("channel.deleteConnectionWarning", "Permanently remove this connection. The channel will become inactive.")
|
|
342
|
+
})] }), se ? /* @__PURE__ */ b("div", {
|
|
343
|
+
className: "flex items-center gap-2",
|
|
344
|
+
children: [
|
|
345
|
+
/* @__PURE__ */ y("span", {
|
|
346
|
+
className: "text-sm text-text-secondary",
|
|
347
|
+
children: G("channel.confirmDelete", "Confirm delete?")
|
|
348
|
+
}),
|
|
349
|
+
/* @__PURE__ */ b("button", {
|
|
350
|
+
type: "button",
|
|
351
|
+
onClick: ce,
|
|
352
|
+
disabled: K,
|
|
353
|
+
className: "px-4 py-2 rounded-lg bg-status-error-bg text-status-error-text hover:bg-status-error-bg/90 transition-colors flex items-center gap-2",
|
|
354
|
+
children: [K ? /* @__PURE__ */ y(f, { className: "size-4 animate-spin" }) : /* @__PURE__ */ y(h, { className: "size-4 " }), G("channel.delete", "Delete")]
|
|
355
|
+
}),
|
|
356
|
+
/* @__PURE__ */ y("button", {
|
|
357
|
+
type: "button",
|
|
358
|
+
onClick: () => X(!1),
|
|
359
|
+
className: "px-4 py-2 rounded-lg border hover:bg-bg-sunken transition-colors",
|
|
360
|
+
children: G("channel.cancel", "Cancel")
|
|
361
|
+
})
|
|
362
|
+
]
|
|
363
|
+
}) : /* @__PURE__ */ y(i, {
|
|
364
|
+
permission: a.CHANNEL_CONNECTION_DELETE,
|
|
365
|
+
children: /* @__PURE__ */ b("button", {
|
|
313
366
|
type: "button",
|
|
314
|
-
onClick: () =>
|
|
315
|
-
className: "px-4 py-2 rounded-lg border hover:bg-bg
|
|
316
|
-
children:
|
|
367
|
+
onClick: () => X(!0),
|
|
368
|
+
className: "px-4 py-2 rounded-lg text-status-error-text border border-status-error-border hover:bg-status-error-bg/10 transition-colors flex items-center gap-2",
|
|
369
|
+
children: [/* @__PURE__ */ y(h, { className: "size-4 " }), G("channel.delete", "Delete")]
|
|
317
370
|
})
|
|
318
|
-
]
|
|
319
|
-
}) : /* @__PURE__ */ S(o, {
|
|
320
|
-
permission: s.CHANNEL_CONNECTION_DELETE,
|
|
321
|
-
children: /* @__PURE__ */ C("button", {
|
|
322
|
-
type: "button",
|
|
323
|
-
onClick: () => Z(!0),
|
|
324
|
-
className: "px-4 py-2 rounded-lg text-status-error-text border border-status-error-border hover:bg-status-error-bg/10 transition-colors flex items-center gap-2",
|
|
325
|
-
children: [/* @__PURE__ */ S(_, { className: "size-4 " }), K("channel.delete", "Delete")]
|
|
326
|
-
})
|
|
371
|
+
})]
|
|
327
372
|
})]
|
|
328
373
|
})]
|
|
329
|
-
})
|
|
330
|
-
|
|
374
|
+
})
|
|
375
|
+
]
|
|
331
376
|
})]
|
|
332
377
|
})
|
|
333
378
|
});
|
|
334
379
|
}
|
|
335
380
|
//#endregion
|
|
336
|
-
export {
|
|
381
|
+
export { D as ConnectionDetailsPage };
|
|
337
382
|
|
|
338
383
|
//# sourceMappingURL=ConnectionDetailsPage.js.map
|