@burdenoff/microfe-security 2026.608.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/security/components/ActivityTimeline.js +4 -4
- package/dist/security/components/ActivityTimeline.js.map +1 -1
- package/dist/security/components/BulkActionBar.js +3 -3
- package/dist/security/components/BulkActionBar.js.map +1 -1
- package/dist/security/components/ConfirmDialog.js +29 -38
- package/dist/security/components/ConfirmDialog.js.map +1 -1
- package/dist/security/components/CopyButton.js +2 -2
- package/dist/security/components/CopyButton.js.map +1 -1
- package/dist/security/components/ExportDialog.js +13 -13
- package/dist/security/components/ExportDialog.js.map +1 -1
- package/dist/security/components/ImportWizard.js +98 -105
- package/dist/security/components/ImportWizard.js.map +1 -1
- package/dist/security/components/PageLayout.js +2 -2
- package/dist/security/components/PageLayout.js.map +1 -1
- package/dist/security/components/PasswordGenerator.js +6 -6
- package/dist/security/components/PasswordGenerator.js.map +1 -1
- package/dist/security/components/SecretFormFields.js +12 -12
- package/dist/security/components/SecretFormFields.js.map +1 -1
- package/dist/security/components/SecretRow.js +4 -4
- package/dist/security/components/SecretRow.js.map +1 -1
- package/dist/security/components/SecretShareDialog.js +94 -105
- package/dist/security/components/SecretShareDialog.js.map +1 -1
- package/dist/security/components/SecretTypeBadge.js +1 -1
- package/dist/security/components/SecretTypeBadge.js.map +1 -1
- package/dist/security/components/SecretValueDisplay.js +5 -5
- package/dist/security/components/SecretValueDisplay.js.map +1 -1
- package/dist/security/components/SecurityScoreCard.js +2 -2
- package/dist/security/components/SecurityScoreCard.js.map +1 -1
- package/dist/security/components/VaultCard.js +5 -5
- package/dist/security/components/VaultCard.js.map +1 -1
- package/dist/security/components/VaultFormFields.js +6 -6
- package/dist/security/components/VaultFormFields.js.map +1 -1
- package/dist/security/components/VaultShareDialog.js +27 -41
- package/dist/security/components/VaultShareDialog.js.map +1 -1
- package/dist/security/components/ui.js +13 -13
- package/dist/security/components/ui.js.map +1 -1
- package/dist/security/pages/AccessReviewPage.js +59 -74
- package/dist/security/pages/AccessReviewPage.js.map +1 -1
- package/dist/security/pages/AuditLogPage.js +13 -13
- package/dist/security/pages/AuditLogPage.js.map +1 -1
- package/dist/security/pages/ImportExportPage.js +3 -3
- package/dist/security/pages/ImportExportPage.js.map +1 -1
- package/dist/security/pages/ProviderDetailPage.js +141 -156
- package/dist/security/pages/ProviderDetailPage.js.map +1 -1
- package/dist/security/pages/ProvidersPage.js +12 -12
- package/dist/security/pages/ProvidersPage.js.map +1 -1
- package/dist/security/pages/SecretCreatePage.js +9 -9
- package/dist/security/pages/SecretCreatePage.js.map +1 -1
- package/dist/security/pages/SecretDetailPage.js +222 -227
- package/dist/security/pages/SecretDetailPage.js.map +1 -1
- package/dist/security/pages/SecurityDashboardPage.js +14 -14
- package/dist/security/pages/SecurityDashboardPage.js.map +1 -1
- package/dist/security/pages/SharedWithMePage.js +10 -10
- package/dist/security/pages/SharedWithMePage.js.map +1 -1
- package/dist/security/pages/VaultCreatePage.js +2 -2
- package/dist/security/pages/VaultCreatePage.js.map +1 -1
- package/dist/security/pages/VaultDetailPage.js +9 -9
- package/dist/security/pages/VaultDetailPage.js.map +1 -1
- package/dist/security/pages/VaultSettingsPage.js +28 -28
- package/dist/security/pages/VaultSettingsPage.js.map +1 -1
- package/dist/security/pages/VaultShareViewer.js +21 -21
- package/dist/security/pages/VaultShareViewer.js.map +1 -1
- package/dist/security/pages/VaultsDashboardPage.js +17 -17
- package/dist/security/pages/VaultsDashboardPage.js.map +1 -1
- package/dist/security/routes/routeUtils.js +5 -5
- package/dist/security/routes/routeUtils.js.map +1 -1
- package/package.json +1 -1
|
@@ -3,79 +3,80 @@ import { SECURITY_FEATURE_FLAGS as t } from "../constants/featureFlags.js";
|
|
|
3
3
|
import { cn as n } from "../utils/cn.js";
|
|
4
4
|
import { PageLayout as r } from "../components/PageLayout.js";
|
|
5
5
|
import { Badge as i, Button as a, Card as o } from "../components/ui.js";
|
|
6
|
-
import { translateWithFallback as
|
|
7
|
-
import { ConfirmDialog as
|
|
8
|
-
import { useGetSecretVersionsQuery as
|
|
9
|
-
import { useSecurityEventEmitter as
|
|
10
|
-
import { useDeleteSecret as
|
|
11
|
-
import { nativeConfirm as
|
|
12
|
-
import { SecurityPermissionGuard as
|
|
13
|
-
import { SecretValueDisplay as
|
|
14
|
-
import { SecretTypeBadge as
|
|
15
|
-
import { RotationStatusBadge as
|
|
16
|
-
import { SecretShareDialog as
|
|
17
|
-
import { useSecretValue as
|
|
18
|
-
import { useRef as
|
|
19
|
-
import { usePermission as
|
|
20
|
-
import { useNavigate as
|
|
21
|
-
import { jsx as
|
|
22
|
-
import { AlertTriangle as
|
|
6
|
+
import { translateWithFallback as ee } from "../utils/i18n.js";
|
|
7
|
+
import { ConfirmDialog as te } from "../components/ConfirmDialog.js";
|
|
8
|
+
import { useGetSecretVersionsQuery as ne } from "../../generated/wspace-operations.js";
|
|
9
|
+
import { useSecurityEventEmitter as s } from "../hooks/useSecurityEventEmitter.js";
|
|
10
|
+
import { useDeleteSecret as re, useGetSecret as ie, useRollbackSecret as c, useRotateSecret as l } from "../hooks/useSecretQueries.js";
|
|
11
|
+
import { nativeConfirm as u, nativeImpact as ae, nativeNotify as d } from "../../utils/nativeBridge.js";
|
|
12
|
+
import { SecurityPermissionGuard as f } from "../components/SecurityPermissionGuard.js";
|
|
13
|
+
import { SecretValueDisplay as oe } from "../components/SecretValueDisplay.js";
|
|
14
|
+
import { SecretTypeBadge as se } from "../components/SecretTypeBadge.js";
|
|
15
|
+
import { RotationStatusBadge as ce } from "../components/RotationStatusBadge.js";
|
|
16
|
+
import { SecretShareDialog as le } from "../components/SecretShareDialog.js";
|
|
17
|
+
import { useSecretValue as ue } from "../hooks/useSecretValue.js";
|
|
18
|
+
import { useRef as de, useState as p } from "react";
|
|
19
|
+
import { usePermission as m } from "@burdenoff/fe-libs/shared/providers/shell";
|
|
20
|
+
import { useNavigate as fe, useParams as pe } from "react-router-dom";
|
|
21
|
+
import { jsx as h, jsxs as g } from "react/jsx-runtime";
|
|
22
|
+
import { AlertTriangle as me, ArrowLeft as _, Calendar as he, Clock as v, History as y, KeyRound as ge, Loader2 as b, RefreshCw as x, Share2 as _e, Shield as ve, Trash2 as ye } from "lucide-react";
|
|
23
|
+
import { Dialog as S, DialogContent as C, DialogHeader as w, DialogTitle as T } from "@burdenoff/fe-libs/ui";
|
|
23
24
|
import { useI18n as E } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
24
25
|
//#region src/security/pages/SecretDetailPage.tsx
|
|
25
26
|
function D() {
|
|
26
|
-
let { vaultId: D, secretId: O } =
|
|
27
|
+
let { vaultId: D, secretId: O } = pe(), { basePath: k = "/", navigate: A } = e(), { t: j } = E(), M = fe(), { data: N, loading: P, error: F, refetch: I } = ie(O ?? null), L = N?.getSecret, { data: be, loading: xe } = ne({
|
|
27
28
|
variables: {
|
|
28
29
|
secretId: O ?? "",
|
|
29
30
|
pagination: { limit: 50 }
|
|
30
31
|
},
|
|
31
32
|
skip: !O,
|
|
32
33
|
fetchPolicy: "network-only"
|
|
33
|
-
}),
|
|
34
|
-
|
|
35
|
-
}, [
|
|
34
|
+
}), Se = be?.getSecretVersionsPaginated?.items ?? [], { value: Ce, reveal: we, hide: R, loading: Te, isRevealed: z } = ue(O ?? ""), [Ee, { loading: De }] = re(), [Oe, { loading: B }] = l(), [ke, { loading: Ae }] = c(), { emit: V } = s(), je = m("secret:delete"), Me = m("secret:update"), Ne = m("secret:decrypt"), [Pe, H] = p(!1), [Fe, U] = p(!1), [Ie, W] = p(!1), G = de(null), Le = () => {
|
|
35
|
+
W(!0), requestAnimationFrame(() => G.current?.focus());
|
|
36
|
+
}, [Re, K] = p(!1), [q, J] = p(""), Y = (e, t, n) => ee(j, e, t, n), ze = (e) => {
|
|
36
37
|
A ? A(e) : M(e);
|
|
37
38
|
}, X = () => {
|
|
38
|
-
|
|
39
|
+
ze(`${k}/vaults/${D}`);
|
|
39
40
|
}, Z = async () => {
|
|
40
41
|
if (O) try {
|
|
41
|
-
await
|
|
42
|
+
await Ee({ variables: { id: O } }), V("secret.deleted", {
|
|
42
43
|
secretId: O,
|
|
43
44
|
vaultId: D
|
|
44
|
-
}),
|
|
45
|
+
}), H(!1), d("success"), X();
|
|
45
46
|
} catch (e) {
|
|
46
|
-
console.error("Failed to delete secret:", e),
|
|
47
|
+
console.error("Failed to delete secret:", e), d("error");
|
|
47
48
|
}
|
|
48
|
-
},
|
|
49
|
-
|
|
50
|
-
let e = await
|
|
49
|
+
}, Be = async () => {
|
|
50
|
+
ae("medium");
|
|
51
|
+
let e = await u({
|
|
51
52
|
title: "Delete Secret",
|
|
52
53
|
message: "Delete this secret? This cannot be undone.",
|
|
53
54
|
okButtonTitle: "Delete",
|
|
54
55
|
cancelButtonTitle: "Cancel"
|
|
55
56
|
});
|
|
56
57
|
if (e === null) {
|
|
57
|
-
|
|
58
|
+
H(!0);
|
|
58
59
|
return;
|
|
59
60
|
}
|
|
60
61
|
e && await Z();
|
|
61
|
-
},
|
|
62
|
+
}, Ve = async () => {
|
|
62
63
|
if (!(!O || !q.trim())) try {
|
|
63
|
-
await
|
|
64
|
+
await Oe({ variables: {
|
|
64
65
|
id: O,
|
|
65
66
|
newValue: q.trim()
|
|
66
|
-
} }),
|
|
67
|
+
} }), V("secret.rotated", {
|
|
67
68
|
secretId: O,
|
|
68
69
|
vaultId: D
|
|
69
|
-
}),
|
|
70
|
+
}), W(!1), J(""), I();
|
|
70
71
|
} catch (e) {
|
|
71
72
|
console.error("Failed to rotate secret:", e);
|
|
72
73
|
}
|
|
73
|
-
},
|
|
74
|
+
}, He = async (e) => {
|
|
74
75
|
if (O) try {
|
|
75
|
-
await
|
|
76
|
+
await ke({ variables: {
|
|
76
77
|
id: O,
|
|
77
78
|
version: e
|
|
78
|
-
} }),
|
|
79
|
+
} }), V("secret.rollback", {
|
|
79
80
|
secretId: O,
|
|
80
81
|
vaultId: D
|
|
81
82
|
}), I(), K(!1);
|
|
@@ -83,51 +84,51 @@ function D() {
|
|
|
83
84
|
console.error("Failed to rollback secret:", e);
|
|
84
85
|
}
|
|
85
86
|
};
|
|
86
|
-
if (P && !L) return /* @__PURE__ */
|
|
87
|
+
if (P && !L) return /* @__PURE__ */ h(r, {
|
|
87
88
|
title: Y("security.secretDetail.loading.title", "Loading Secret..."),
|
|
88
89
|
breadcrumbs: [{
|
|
89
90
|
label: Y("security.common.breadcrumbs.security", "Security"),
|
|
90
91
|
path: k
|
|
91
92
|
}, { label: Y("security.common.breadcrumbs.secret", "Secret") }],
|
|
92
|
-
children: /* @__PURE__ */
|
|
93
|
+
children: /* @__PURE__ */ h("div", {
|
|
93
94
|
className: "flex items-center justify-center py-20",
|
|
94
|
-
children: /* @__PURE__ */
|
|
95
|
+
children: /* @__PURE__ */ h(b, { className: "size-10 animate-spin text-primary/60" })
|
|
95
96
|
})
|
|
96
97
|
});
|
|
97
|
-
if (F || !L) return /* @__PURE__ */
|
|
98
|
+
if (F || !L) return /* @__PURE__ */ h(r, {
|
|
98
99
|
title: Y("security.common.errorPage.title", "Error"),
|
|
99
100
|
breadcrumbs: [{
|
|
100
101
|
label: Y("security.common.breadcrumbs.security", "Security"),
|
|
101
102
|
path: k
|
|
102
103
|
}, { label: Y("security.common.breadcrumbs.secret", "Secret") }],
|
|
103
|
-
children: /* @__PURE__ */
|
|
104
|
+
children: /* @__PURE__ */ h(o, {
|
|
104
105
|
className: "p-8 text-center max-w-lg mx-auto mt-10",
|
|
105
|
-
children: /* @__PURE__ */
|
|
106
|
+
children: /* @__PURE__ */ g("div", {
|
|
106
107
|
className: "flex flex-col items-center gap-4",
|
|
107
108
|
children: [
|
|
108
|
-
/* @__PURE__ */
|
|
109
|
-
className: "p-3 rounded-full bg-
|
|
110
|
-
children: /* @__PURE__ */
|
|
109
|
+
/* @__PURE__ */ h("div", {
|
|
110
|
+
className: "p-3 rounded-full bg-status-error-bg/10",
|
|
111
|
+
children: /* @__PURE__ */ h(me, { className: "size-8 text-status-error-text" })
|
|
111
112
|
}),
|
|
112
|
-
/* @__PURE__ */
|
|
113
|
-
className: "text-lg font-bold text-
|
|
113
|
+
/* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("h3", {
|
|
114
|
+
className: "text-lg font-bold text-text-primary",
|
|
114
115
|
children: Y("security.secretDetail.error.title", "Failed to load secret")
|
|
115
|
-
}), /* @__PURE__ */
|
|
116
|
-
className: "text-sm text-
|
|
116
|
+
}), /* @__PURE__ */ h("p", {
|
|
117
|
+
className: "text-sm text-text-secondary mt-2",
|
|
117
118
|
children: F?.message ?? Y("security.secretDetail.error.description", "Secret not found or access denied.")
|
|
118
119
|
})] }),
|
|
119
|
-
/* @__PURE__ */
|
|
120
|
+
/* @__PURE__ */ g(a, {
|
|
120
121
|
variant: "outline",
|
|
121
122
|
onClick: X,
|
|
122
123
|
className: "mt-4",
|
|
123
|
-
children: [/* @__PURE__ */
|
|
124
|
+
children: [/* @__PURE__ */ h(_, { className: "size-4" }), Y("security.secretDetail.actions.backToVault", "Go Back to Vault")]
|
|
124
125
|
})
|
|
125
126
|
]
|
|
126
127
|
})
|
|
127
128
|
})
|
|
128
129
|
});
|
|
129
130
|
let Q = L.versionCount ?? 0, $ = L.lastRotatedAt ? "healthy" : void 0;
|
|
130
|
-
return /* @__PURE__ */
|
|
131
|
+
return /* @__PURE__ */ g(r, {
|
|
131
132
|
title: L.name,
|
|
132
133
|
description: L.description ?? Y("security.secretDetail.description", "View and manage this secret."),
|
|
133
134
|
breadcrumbs: [
|
|
@@ -141,139 +142,139 @@ function D() {
|
|
|
141
142
|
},
|
|
142
143
|
{ label: L.name }
|
|
143
144
|
],
|
|
144
|
-
actions: /* @__PURE__ */
|
|
145
|
+
actions: /* @__PURE__ */ g("div", {
|
|
145
146
|
className: "flex flex-wrap items-center gap-2",
|
|
146
147
|
children: [
|
|
147
|
-
/* @__PURE__ */
|
|
148
|
+
/* @__PURE__ */ g(a, {
|
|
148
149
|
variant: "outline",
|
|
149
150
|
size: "sm",
|
|
150
151
|
onClick: X,
|
|
151
152
|
children: [
|
|
152
|
-
/* @__PURE__ */
|
|
153
|
-
/* @__PURE__ */
|
|
153
|
+
/* @__PURE__ */ h(_, { className: "size-4" }),
|
|
154
|
+
/* @__PURE__ */ h("span", {
|
|
154
155
|
className: "hidden sm:inline",
|
|
155
156
|
children: Y("security.secretDetail.actions.backToVault", "Back to Vault")
|
|
156
157
|
}),
|
|
157
|
-
/* @__PURE__ */
|
|
158
|
+
/* @__PURE__ */ h("span", {
|
|
158
159
|
className: "sm:hidden",
|
|
159
160
|
children: Y("security.common.actions.back", "Back")
|
|
160
161
|
})
|
|
161
162
|
]
|
|
162
163
|
}),
|
|
163
|
-
|
|
164
|
+
Me && /* @__PURE__ */ g(a, {
|
|
164
165
|
variant: "outline",
|
|
165
166
|
size: "sm",
|
|
166
|
-
onClick: () =>
|
|
167
|
-
children: [/* @__PURE__ */
|
|
167
|
+
onClick: () => U(!0),
|
|
168
|
+
children: [/* @__PURE__ */ h(_e, { className: "size-4" }), Y("security.common.actions.share", "Share")]
|
|
168
169
|
}),
|
|
169
|
-
/* @__PURE__ */
|
|
170
|
+
/* @__PURE__ */ h(f, {
|
|
170
171
|
permission: "secret:update",
|
|
171
172
|
featureFlagKey: t.SECRET_ROTATE,
|
|
172
173
|
featureFlagDefault: !1,
|
|
173
|
-
children: /* @__PURE__ */
|
|
174
|
+
children: /* @__PURE__ */ g(a, {
|
|
174
175
|
variant: "outline",
|
|
175
176
|
size: "sm",
|
|
176
|
-
onClick:
|
|
177
|
-
children: [/* @__PURE__ */
|
|
177
|
+
onClick: Le,
|
|
178
|
+
children: [/* @__PURE__ */ h(x, { className: "size-4" }), Y("security.secretDetail.actions.rotate", "Rotate")]
|
|
178
179
|
})
|
|
179
180
|
}),
|
|
180
|
-
|
|
181
|
+
je && /* @__PURE__ */ g(a, {
|
|
181
182
|
variant: "outline",
|
|
182
183
|
size: "sm",
|
|
183
|
-
className: "text-
|
|
184
|
-
onClick: () => void
|
|
185
|
-
children: [/* @__PURE__ */
|
|
184
|
+
className: "text-status-error-text hover:bg-status-error-bg/10 border-status-error-border/20",
|
|
185
|
+
onClick: () => void Be(),
|
|
186
|
+
children: [/* @__PURE__ */ h(ye, { className: "size-4" }), Y("security.common.actions.delete", "Delete")]
|
|
186
187
|
})
|
|
187
188
|
]
|
|
188
189
|
}),
|
|
189
190
|
children: [
|
|
190
|
-
/* @__PURE__ */
|
|
191
|
+
/* @__PURE__ */ g("div", {
|
|
191
192
|
className: "space-y-6",
|
|
192
|
-
children: [/* @__PURE__ */
|
|
193
|
+
children: [/* @__PURE__ */ g("div", {
|
|
193
194
|
className: "flex flex-wrap items-center gap-3",
|
|
194
195
|
children: [
|
|
195
|
-
/* @__PURE__ */
|
|
196
|
-
$ && /* @__PURE__ */
|
|
197
|
-
/* @__PURE__ */
|
|
196
|
+
/* @__PURE__ */ h(se, { type: L.type }),
|
|
197
|
+
$ && /* @__PURE__ */ h(ce, { status: $ }),
|
|
198
|
+
/* @__PURE__ */ h(i, {
|
|
198
199
|
variant: "outline",
|
|
199
|
-
className: "bg-
|
|
200
|
+
className: "bg-bg-surface/50",
|
|
200
201
|
children: Y("security.secretDetail.status.label", "Status: {status}", { status: L.status })
|
|
201
202
|
}),
|
|
202
|
-
L.labels?.map((e) => /* @__PURE__ */
|
|
203
|
+
L.labels?.map((e) => /* @__PURE__ */ h(i, {
|
|
203
204
|
variant: "outline",
|
|
204
205
|
className: "border-primary/20 text-primary",
|
|
205
206
|
children: e.label
|
|
206
207
|
}, e.id))
|
|
207
208
|
]
|
|
208
|
-
}), /* @__PURE__ */
|
|
209
|
+
}), /* @__PURE__ */ g("div", {
|
|
209
210
|
className: "grid grid-cols-1 md:grid-cols-3 gap-6",
|
|
210
|
-
children: [/* @__PURE__ */
|
|
211
|
+
children: [/* @__PURE__ */ g("div", {
|
|
211
212
|
className: "md:col-span-2 space-y-6",
|
|
212
|
-
children: [/* @__PURE__ */
|
|
213
|
-
className: "p-6 shadow-sm border-border/60",
|
|
213
|
+
children: [/* @__PURE__ */ g(o, {
|
|
214
|
+
className: "p-6 shadow-sm border-border-subtle/60",
|
|
214
215
|
children: [
|
|
215
|
-
/* @__PURE__ */
|
|
216
|
+
/* @__PURE__ */ g("div", {
|
|
216
217
|
className: "flex items-center justify-between mb-4",
|
|
217
|
-
children: [/* @__PURE__ */
|
|
218
|
-
className: "text-lg font-bold text-
|
|
219
|
-
children: [/* @__PURE__ */
|
|
220
|
-
}), L.expiresAt && /* @__PURE__ */
|
|
218
|
+
children: [/* @__PURE__ */ g("h2", {
|
|
219
|
+
className: "text-lg font-bold text-text-primary flex items-center gap-2",
|
|
220
|
+
children: [/* @__PURE__ */ h(ge, { className: "size-5 text-primary" }), Y("security.secretDetail.value.title", "Secret Value")]
|
|
221
|
+
}), L.expiresAt && /* @__PURE__ */ g("div", {
|
|
221
222
|
className: "flex items-center gap-1.5 text-xs text-warning",
|
|
222
|
-
children: [/* @__PURE__ */
|
|
223
|
+
children: [/* @__PURE__ */ h(he, { className: "size-3.5" }), Y("security.secretDetail.value.expires", "Expires: {date}", { date: new Date(L.expiresAt).toLocaleDateString() })]
|
|
223
224
|
})]
|
|
224
225
|
}),
|
|
225
|
-
/* @__PURE__ */
|
|
226
|
-
value:
|
|
227
|
-
isRevealed:
|
|
228
|
-
onToggleReveal:
|
|
229
|
-
|
|
226
|
+
/* @__PURE__ */ h(oe, {
|
|
227
|
+
value: Ce ?? "",
|
|
228
|
+
isRevealed: z,
|
|
229
|
+
onToggleReveal: Ne ? () => {
|
|
230
|
+
z ? R() : we();
|
|
230
231
|
} : void 0,
|
|
231
|
-
isLoading:
|
|
232
|
+
isLoading: Te
|
|
232
233
|
}),
|
|
233
|
-
/* @__PURE__ */
|
|
234
|
-
className: "text-xs text-
|
|
234
|
+
/* @__PURE__ */ h("p", {
|
|
235
|
+
className: "text-xs text-text-secondary mt-4 italic",
|
|
235
236
|
children: Y("security.secretDetail.value.note", "Secret values are decrypted on-demand and never stored in plain text.")
|
|
236
237
|
})
|
|
237
238
|
]
|
|
238
|
-
}), /* @__PURE__ */
|
|
239
|
-
className: "p-6 shadow-sm border-border/60",
|
|
240
|
-
children: [/* @__PURE__ */
|
|
239
|
+
}), /* @__PURE__ */ g(o, {
|
|
240
|
+
className: "p-6 shadow-sm border-border-subtle/60",
|
|
241
|
+
children: [/* @__PURE__ */ g("div", {
|
|
241
242
|
className: "flex items-center justify-between mb-6",
|
|
242
|
-
children: [/* @__PURE__ */
|
|
243
|
-
className: "text-lg font-bold text-
|
|
244
|
-
children: [/* @__PURE__ */
|
|
245
|
-
}), /* @__PURE__ */
|
|
243
|
+
children: [/* @__PURE__ */ g("h2", {
|
|
244
|
+
className: "text-lg font-bold text-text-primary flex items-center gap-2",
|
|
245
|
+
children: [/* @__PURE__ */ h(y, { className: "size-5 text-primary" }), Y("security.secretDetail.history.title", "Version History")]
|
|
246
|
+
}), /* @__PURE__ */ h(i, {
|
|
246
247
|
variant: "outline",
|
|
247
|
-
className: "bg-
|
|
248
|
+
className: "bg-bg-sunken font-mono",
|
|
248
249
|
children: Y("security.secretDetail.history.totalVersions", "{count} total versions", { count: Q })
|
|
249
250
|
})]
|
|
250
|
-
}), /* @__PURE__ */
|
|
251
|
+
}), /* @__PURE__ */ g("div", {
|
|
251
252
|
className: "space-y-4",
|
|
252
|
-
children: [/* @__PURE__ */
|
|
253
|
-
className: "flex items-center justify-between p-4 rounded-lg bg-primary/5 border border-primary/10",
|
|
254
|
-
children: [/* @__PURE__ */
|
|
253
|
+
children: [/* @__PURE__ */ g("div", {
|
|
254
|
+
className: "flex items-center justify-between p-4 rounded-lg bg-action-primary-bg/5 border border-primary/10",
|
|
255
|
+
children: [/* @__PURE__ */ g("div", {
|
|
255
256
|
className: "flex items-center gap-3",
|
|
256
|
-
children: [/* @__PURE__ */
|
|
257
|
-
className: "size-8 rounded-full bg-primary/10 flex items-center justify-center text-primary text-xs font-bold",
|
|
257
|
+
children: [/* @__PURE__ */ g("div", {
|
|
258
|
+
className: "size-8 rounded-full bg-action-primary-bg/10 flex items-center justify-center text-primary text-xs font-bold",
|
|
258
259
|
children: ["v", L.version ?? Q]
|
|
259
|
-
}), /* @__PURE__ */
|
|
260
|
+
}), /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("p", {
|
|
260
261
|
className: "text-sm font-semibold",
|
|
261
262
|
children: Y("security.secretDetail.history.currentVersion", "Current Active Version")
|
|
262
|
-
}), /* @__PURE__ */
|
|
263
|
-
className: "text-xs text-
|
|
263
|
+
}), /* @__PURE__ */ h("p", {
|
|
264
|
+
className: "text-xs text-text-secondary",
|
|
264
265
|
children: Y("security.secretDetail.history.lastUpdated", "Last updated {date}", { date: new Date(L.updatedAt).toLocaleString() })
|
|
265
266
|
})] })]
|
|
266
|
-
}), /* @__PURE__ */
|
|
267
|
+
}), /* @__PURE__ */ h(i, {
|
|
267
268
|
variant: "success",
|
|
268
269
|
className: "text-[10px] uppercase",
|
|
269
270
|
children: Y("security.common.status.active", "Active")
|
|
270
271
|
})]
|
|
271
|
-
}), Q > 1 && /* @__PURE__ */
|
|
272
|
-
className: "text-center py-4 border-2 border-dashed border-border/40 rounded-lg bg-
|
|
273
|
-
children: [/* @__PURE__ */
|
|
274
|
-
className: "text-sm text-
|
|
272
|
+
}), Q > 1 && /* @__PURE__ */ g("div", {
|
|
273
|
+
className: "text-center py-4 border-2 border-dashed border-border-subtle/40 rounded-lg bg-bg-sunken/20",
|
|
274
|
+
children: [/* @__PURE__ */ h("p", {
|
|
275
|
+
className: "text-sm text-text-secondary",
|
|
275
276
|
children: Y("security.secretDetail.history.available", "Historical versions are available. You can rollback to a previous state if needed.")
|
|
276
|
-
}), /* @__PURE__ */
|
|
277
|
+
}), /* @__PURE__ */ h(a, {
|
|
277
278
|
variant: "outline",
|
|
278
279
|
size: "sm",
|
|
279
280
|
className: "mt-3",
|
|
@@ -283,128 +284,121 @@ function D() {
|
|
|
283
284
|
})]
|
|
284
285
|
})]
|
|
285
286
|
})]
|
|
286
|
-
}), /* @__PURE__ */
|
|
287
|
+
}), /* @__PURE__ */ g("div", {
|
|
287
288
|
className: "space-y-6",
|
|
288
|
-
children: [/* @__PURE__ */
|
|
289
|
-
className: "p-6 shadow-sm border-border/60 space-y-4",
|
|
290
|
-
children: [/* @__PURE__ */
|
|
291
|
-
className: "font-bold text-sm uppercase tracking-wider text-
|
|
289
|
+
children: [/* @__PURE__ */ g(o, {
|
|
290
|
+
className: "p-6 shadow-sm border-border-subtle/60 space-y-4",
|
|
291
|
+
children: [/* @__PURE__ */ h("h3", {
|
|
292
|
+
className: "font-bold text-sm uppercase tracking-wider text-text-secondary",
|
|
292
293
|
children: Y("security.secretDetail.details.title", "Details")
|
|
293
|
-
}), /* @__PURE__ */
|
|
294
|
+
}), /* @__PURE__ */ g("div", {
|
|
294
295
|
className: "space-y-3",
|
|
295
296
|
children: [
|
|
296
|
-
/* @__PURE__ */
|
|
297
|
-
className: "text-xs text-
|
|
297
|
+
/* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("p", {
|
|
298
|
+
className: "text-xs text-text-secondary",
|
|
298
299
|
children: Y("security.secretDetail.details.keyIdentifier", "Key Identifier")
|
|
299
|
-
}), /* @__PURE__ */
|
|
300
|
-
className: "text-xs font-mono bg-
|
|
300
|
+
}), /* @__PURE__ */ h("code", {
|
|
301
|
+
className: "text-xs font-mono bg-bg-sunken px-1.5 py-0.5 rounded block mt-1 overflow-hidden text-ellipsis whitespace-nowrap",
|
|
301
302
|
children: L.key
|
|
302
303
|
})] }),
|
|
303
|
-
/* @__PURE__ */
|
|
304
|
-
className: "text-xs text-
|
|
304
|
+
/* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("p", {
|
|
305
|
+
className: "text-xs text-text-secondary",
|
|
305
306
|
children: Y("security.secretDetail.details.createdBy", "Created By")
|
|
306
|
-
}), /* @__PURE__ */
|
|
307
|
+
}), /* @__PURE__ */ h("p", {
|
|
307
308
|
className: "text-sm font-medium mt-1",
|
|
308
309
|
children: L.createdBy
|
|
309
310
|
})] }),
|
|
310
|
-
/* @__PURE__ */
|
|
311
|
-
className: "text-xs text-
|
|
311
|
+
/* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("p", {
|
|
312
|
+
className: "text-xs text-text-secondary",
|
|
312
313
|
children: Y("security.secretDetail.details.createdAt", "Created At")
|
|
313
|
-
}), /* @__PURE__ */
|
|
314
|
+
}), /* @__PURE__ */ g("div", {
|
|
314
315
|
className: "flex items-center gap-1.5 text-sm mt-1",
|
|
315
|
-
children: [/* @__PURE__ */ v
|
|
316
|
+
children: [/* @__PURE__ */ h(v, { className: "size-3.5" }), new Date(L.createdAt).toLocaleDateString()]
|
|
316
317
|
})] }),
|
|
317
|
-
L.lastRotatedAt && /* @__PURE__ */
|
|
318
|
-
className: "text-xs text-
|
|
318
|
+
L.lastRotatedAt && /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("p", {
|
|
319
|
+
className: "text-xs text-text-secondary",
|
|
319
320
|
children: Y("security.secretDetail.details.lastRotation", "Last Rotation")
|
|
320
|
-
}), /* @__PURE__ */
|
|
321
|
+
}), /* @__PURE__ */ h("p", {
|
|
321
322
|
className: "text-sm mt-1",
|
|
322
323
|
children: new Date(L.lastRotatedAt).toLocaleString()
|
|
323
324
|
})] })
|
|
324
325
|
]
|
|
325
326
|
})]
|
|
326
|
-
}), /* @__PURE__ */
|
|
327
|
-
className: "p-6 shadow-sm border-border/60 space-y-4 bg-primary/5 border-primary/10",
|
|
328
|
-
children: [/* @__PURE__ */
|
|
327
|
+
}), /* @__PURE__ */ g(o, {
|
|
328
|
+
className: "p-6 shadow-sm border-border-subtle/60 space-y-4 bg-action-primary-bg/5 border-primary/10",
|
|
329
|
+
children: [/* @__PURE__ */ g("h3", {
|
|
329
330
|
className: "font-bold text-sm text-primary flex items-center gap-2",
|
|
330
|
-
children: [/* @__PURE__ */
|
|
331
|
-
}), /* @__PURE__ */
|
|
332
|
-
className: "text-xs text-
|
|
331
|
+
children: [/* @__PURE__ */ h(ve, { className: "size-4" }), Y("security.secretDetail.security.title", "Security")]
|
|
332
|
+
}), /* @__PURE__ */ h("p", {
|
|
333
|
+
className: "text-xs text-text-secondary leading-relaxed",
|
|
333
334
|
children: Y("security.secretDetail.security.description", "This secret is protected by 256-bit encryption. All access is logged and monitored for suspicious activity.")
|
|
334
335
|
})]
|
|
335
336
|
})]
|
|
336
337
|
})]
|
|
337
338
|
})]
|
|
338
339
|
}),
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
className: "flex items-center justify-between p-6 border-b border-border",
|
|
350
|
-
children: [/* @__PURE__ */ y("div", {
|
|
340
|
+
/* @__PURE__ */ h(S, {
|
|
341
|
+
open: Re,
|
|
342
|
+
onOpenChange: (e) => {
|
|
343
|
+
e || K(!1);
|
|
344
|
+
},
|
|
345
|
+
children: /* @__PURE__ */ g(C, {
|
|
346
|
+
className: "max-w-2xl border-primary/20 max-h-[80vh] flex flex-col gap-0 p-0",
|
|
347
|
+
children: [/* @__PURE__ */ h(w, {
|
|
348
|
+
className: "p-6 border-b border-border-subtle text-left",
|
|
349
|
+
children: /* @__PURE__ */ g("div", {
|
|
351
350
|
className: "flex items-center gap-3",
|
|
352
|
-
children: [/* @__PURE__ */
|
|
353
|
-
className: "p-2 rounded-full bg-primary/10 text-primary",
|
|
354
|
-
children: /* @__PURE__ */
|
|
355
|
-
}), /* @__PURE__ */
|
|
356
|
-
className: "text-xl font-bold
|
|
351
|
+
children: [/* @__PURE__ */ h("div", {
|
|
352
|
+
className: "p-2 rounded-full bg-action-primary-bg/10 text-primary",
|
|
353
|
+
children: /* @__PURE__ */ h(y, { className: "size-5" })
|
|
354
|
+
}), /* @__PURE__ */ h(T, {
|
|
355
|
+
className: "text-xl font-bold",
|
|
357
356
|
children: Y("security.secretDetail.history.modalTitle", "Version History")
|
|
358
357
|
})]
|
|
359
|
-
})
|
|
360
|
-
|
|
361
|
-
onClick: () => K(!1),
|
|
362
|
-
className: "p-2 rounded-md hover:bg-muted text-muted-foreground transition-colors",
|
|
363
|
-
children: /* @__PURE__ */ v(T, { className: "size-5" })
|
|
364
|
-
})]
|
|
365
|
-
}), /* @__PURE__ */ v("div", {
|
|
358
|
+
})
|
|
359
|
+
}), /* @__PURE__ */ h("div", {
|
|
366
360
|
className: "p-6 overflow-y-auto flex-1",
|
|
367
|
-
children:
|
|
361
|
+
children: xe ? /* @__PURE__ */ h("div", {
|
|
368
362
|
className: "flex justify-center py-8",
|
|
369
|
-
children: /* @__PURE__ */
|
|
370
|
-
}) : /* @__PURE__ */
|
|
363
|
+
children: /* @__PURE__ */ h(b, { className: "size-8 animate-spin text-primary/60" })
|
|
364
|
+
}) : /* @__PURE__ */ h("div", {
|
|
371
365
|
className: "space-y-4",
|
|
372
|
-
children:
|
|
373
|
-
className: n("p-4 rounded-lg border", e.version === L.version ? "bg-primary/5 border-primary/20" : "bg-
|
|
374
|
-
children: /* @__PURE__ */
|
|
366
|
+
children: Se.map((e) => /* @__PURE__ */ h("div", {
|
|
367
|
+
className: n("p-4 rounded-lg border", e.version === L.version ? "bg-action-primary-bg/5 border-primary/20" : "bg-bg-surface border-border-subtle"),
|
|
368
|
+
children: /* @__PURE__ */ g("div", {
|
|
375
369
|
className: "flex items-center justify-between",
|
|
376
|
-
children: [/* @__PURE__ */
|
|
377
|
-
/* @__PURE__ */
|
|
370
|
+
children: [/* @__PURE__ */ g("div", { children: [
|
|
371
|
+
/* @__PURE__ */ g("div", {
|
|
378
372
|
className: "flex items-center gap-2",
|
|
379
|
-
children: [/* @__PURE__ */
|
|
373
|
+
children: [/* @__PURE__ */ h("span", {
|
|
380
374
|
className: "font-semibold",
|
|
381
375
|
children: Y("security.secretDetail.history.versionLabel", "Version {version}", { version: e.version })
|
|
382
|
-
}), e.version === L.version && /* @__PURE__ */
|
|
376
|
+
}), e.version === L.version && /* @__PURE__ */ h(i, {
|
|
383
377
|
variant: "success",
|
|
384
378
|
className: "text-[10px] uppercase",
|
|
385
379
|
children: Y("security.common.status.active", "Active")
|
|
386
380
|
})]
|
|
387
381
|
}),
|
|
388
|
-
/* @__PURE__ */
|
|
389
|
-
className: "text-xs text-
|
|
382
|
+
/* @__PURE__ */ h("p", {
|
|
383
|
+
className: "text-xs text-text-secondary mt-1",
|
|
390
384
|
children: Y("security.secretDetail.history.versionMeta", "{date} by {createdBy}", {
|
|
391
385
|
date: new Date(e.createdAt).toLocaleString(),
|
|
392
386
|
createdBy: e.createdBy
|
|
393
387
|
})
|
|
394
388
|
}),
|
|
395
|
-
e.changeReason && /* @__PURE__ */
|
|
389
|
+
e.changeReason && /* @__PURE__ */ h("p", {
|
|
396
390
|
className: "text-sm mt-2",
|
|
397
391
|
children: e.changeReason
|
|
398
392
|
})
|
|
399
|
-
] }), e.version !== L.version && /* @__PURE__ */
|
|
393
|
+
] }), e.version !== L.version && /* @__PURE__ */ h(f, {
|
|
400
394
|
permission: "secret:update",
|
|
401
395
|
featureFlagKey: t.SECRET_ROLLBACK,
|
|
402
396
|
featureFlagDefault: !1,
|
|
403
|
-
children: /* @__PURE__ */
|
|
397
|
+
children: /* @__PURE__ */ h(a, {
|
|
404
398
|
variant: "outline",
|
|
405
399
|
size: "sm",
|
|
406
|
-
onClick: () =>
|
|
407
|
-
disabled:
|
|
400
|
+
onClick: () => He(e.version),
|
|
401
|
+
disabled: Ae,
|
|
408
402
|
children: Y("security.secretDetail.actions.rollback", "Rollback")
|
|
409
403
|
})
|
|
410
404
|
})]
|
|
@@ -412,80 +406,81 @@ function D() {
|
|
|
412
406
|
}, e.id))
|
|
413
407
|
})
|
|
414
408
|
})]
|
|
415
|
-
})
|
|
409
|
+
})
|
|
416
410
|
}),
|
|
417
|
-
/* @__PURE__ */
|
|
418
|
-
isOpen:
|
|
419
|
-
onClose: () =>
|
|
411
|
+
/* @__PURE__ */ h(te, {
|
|
412
|
+
isOpen: Pe,
|
|
413
|
+
onClose: () => H(!1),
|
|
420
414
|
onConfirm: Z,
|
|
421
415
|
title: Y("security.secretDetail.delete.title", "Delete Secret"),
|
|
422
416
|
description: Y("security.secretDetail.delete.description", "Are you sure you want to delete \"{name}\"? This action cannot be undone and will permanently remove this secret from the vault.", { name: L.name }),
|
|
423
|
-
confirmLabel:
|
|
417
|
+
confirmLabel: De ? Y("security.secretDetail.delete.deleting", "Deleting...") : Y("security.secretDetail.delete.confirm", "Delete Secret"),
|
|
424
418
|
variant: "destructive"
|
|
425
419
|
}),
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
children: /* @__PURE__ */ y("div", {
|
|
436
|
-
className: "p-6 space-y-4",
|
|
420
|
+
/* @__PURE__ */ h(S, {
|
|
421
|
+
open: Ie,
|
|
422
|
+
onOpenChange: (e) => {
|
|
423
|
+
e || W(!1);
|
|
424
|
+
},
|
|
425
|
+
children: /* @__PURE__ */ h(C, {
|
|
426
|
+
className: "max-w-md border-primary/20",
|
|
427
|
+
children: /* @__PURE__ */ g("div", {
|
|
428
|
+
className: "space-y-4",
|
|
437
429
|
children: [
|
|
438
|
-
/* @__PURE__ */
|
|
439
|
-
className: "
|
|
440
|
-
children:
|
|
441
|
-
className: "
|
|
442
|
-
children: /* @__PURE__ */
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
430
|
+
/* @__PURE__ */ h(w, {
|
|
431
|
+
className: "text-left",
|
|
432
|
+
children: /* @__PURE__ */ g("div", {
|
|
433
|
+
className: "flex items-center gap-3",
|
|
434
|
+
children: [/* @__PURE__ */ h("div", {
|
|
435
|
+
className: "p-2 rounded-full bg-action-primary-bg/10 text-primary",
|
|
436
|
+
children: /* @__PURE__ */ h(x, { className: "size-5" })
|
|
437
|
+
}), /* @__PURE__ */ h(T, {
|
|
438
|
+
className: "text-xl font-bold",
|
|
439
|
+
children: Y("security.secretDetail.rotate.title", "Rotate Secret")
|
|
440
|
+
})]
|
|
441
|
+
})
|
|
447
442
|
}),
|
|
448
|
-
/* @__PURE__ */
|
|
449
|
-
className: "text-sm text-
|
|
443
|
+
/* @__PURE__ */ h("p", {
|
|
444
|
+
className: "text-sm text-text-secondary",
|
|
450
445
|
children: Y("security.secretDetail.rotate.description", "Enter a new value for {name}. The current value will be moved to version history.", { name: L.name })
|
|
451
446
|
}),
|
|
452
|
-
/* @__PURE__ */
|
|
447
|
+
/* @__PURE__ */ g("div", {
|
|
453
448
|
className: "space-y-2",
|
|
454
|
-
children: [/* @__PURE__ */
|
|
449
|
+
children: [/* @__PURE__ */ h("label", {
|
|
455
450
|
htmlFor: "new-secret-value",
|
|
456
451
|
className: "text-sm font-medium",
|
|
457
452
|
children: Y("security.secretDetail.rotate.newValue", "New Secret Value")
|
|
458
|
-
}), /* @__PURE__ */
|
|
453
|
+
}), /* @__PURE__ */ h("textarea", {
|
|
459
454
|
id: "new-secret-value",
|
|
460
455
|
"aria-label": Y("security.secretDetail.rotate.newValue", "New Secret Value"),
|
|
461
|
-
ref:
|
|
456
|
+
ref: G,
|
|
462
457
|
value: q,
|
|
463
458
|
onChange: (e) => J(e.target.value),
|
|
464
459
|
placeholder: Y("security.secretDetail.rotate.placeholder", "Enter new secret value..."),
|
|
465
460
|
rows: 4,
|
|
466
|
-
className: n("w-full rounded-md border border-border bg-
|
|
461
|
+
className: n("w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm font-mono transition-all", "focus:outline-none focus:ring-2 focus:ring-primary/50 focus:border-primary", "placeholder:text-text-secondary/50")
|
|
467
462
|
})]
|
|
468
463
|
}),
|
|
469
|
-
/* @__PURE__ */
|
|
464
|
+
/* @__PURE__ */ g("div", {
|
|
470
465
|
className: "flex justify-end gap-3 pt-2",
|
|
471
|
-
children: [/* @__PURE__ */
|
|
466
|
+
children: [/* @__PURE__ */ h(a, {
|
|
472
467
|
variant: "outline",
|
|
473
|
-
onClick: () =>
|
|
474
|
-
disabled:
|
|
468
|
+
onClick: () => W(!1),
|
|
469
|
+
disabled: B,
|
|
475
470
|
children: Y("security.common.actions.cancel", "Cancel")
|
|
476
|
-
}), /* @__PURE__ */
|
|
477
|
-
onClick:
|
|
478
|
-
disabled:
|
|
479
|
-
children: [
|
|
471
|
+
}), /* @__PURE__ */ g(a, {
|
|
472
|
+
onClick: Ve,
|
|
473
|
+
disabled: B || !q.trim(),
|
|
474
|
+
children: [B ? /* @__PURE__ */ h(b, { className: "size-4 animate-spin" }) : /* @__PURE__ */ h(x, { className: "size-4" }), B ? Y("security.secretDetail.rotate.loading", "Rotating...") : Y("security.secretDetail.rotate.confirm", "Rotate Secret")]
|
|
480
475
|
})]
|
|
481
476
|
})
|
|
482
477
|
]
|
|
483
478
|
})
|
|
484
|
-
})
|
|
479
|
+
})
|
|
485
480
|
}),
|
|
486
|
-
D && O && /* @__PURE__ */
|
|
487
|
-
isOpen:
|
|
488
|
-
onClose: () =>
|
|
481
|
+
D && O && /* @__PURE__ */ h(le, {
|
|
482
|
+
isOpen: Fe,
|
|
483
|
+
onClose: () => U(!1),
|
|
489
484
|
vaultId: D,
|
|
490
485
|
secretId: O,
|
|
491
486
|
name: L.name
|