@burdenoff/microfe-security 2026.1113.1 → 2026.1113.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/generated/wspace-operations.js +40 -33
- package/dist/generated/wspace-operations.js.map +1 -1
- package/dist/security/components/ActivityTimeline.js +42 -41
- package/dist/security/components/ActivityTimeline.js.map +1 -1
- package/dist/security/components/BulkActionBar.d.ts +2 -0
- package/dist/security/components/BulkActionBar.js +93 -81
- package/dist/security/components/BulkActionBar.js.map +1 -1
- package/dist/security/components/BulkPickerDialogs.d.ts +30 -0
- package/dist/security/components/BulkPickerDialogs.js +136 -0
- package/dist/security/components/BulkPickerDialogs.js.map +1 -0
- package/dist/security/components/SavedValuesMoreMenu.d.ts +12 -0
- package/dist/security/components/SavedValuesMoreMenu.js +63 -0
- package/dist/security/components/SavedValuesMoreMenu.js.map +1 -0
- package/dist/security/components/SecretFormFields.js +162 -114
- package/dist/security/components/SecretFormFields.js.map +1 -1
- package/dist/security/components/SecretRow.d.ts +2 -0
- package/dist/security/components/SecretRow.js +41 -40
- package/dist/security/components/SecretRow.js.map +1 -1
- package/dist/security/components/SecretShareDialog.js +1 -1
- package/dist/security/components/SecretShareDialog.js.map +1 -1
- package/dist/security/components/VaultFormFields.js +100 -55
- package/dist/security/components/VaultFormFields.js.map +1 -1
- package/dist/security/components/ui.d.ts +1 -0
- package/dist/security/components/ui.js +2 -1
- package/dist/security/components/ui.js.map +1 -1
- package/dist/security/hooks/useActorLabel.d.ts +9 -0
- package/dist/security/hooks/useActorLabel.js +18 -0
- package/dist/security/hooks/useActorLabel.js.map +1 -0
- package/dist/security/hooks/useDebouncedValue.d.ts +2 -0
- package/dist/security/hooks/useDebouncedValue.js +12 -0
- package/dist/security/hooks/useDebouncedValue.js.map +1 -0
- package/dist/security/hooks/useSecretQueries.d.ts +1 -0
- package/dist/security/hooks/useSecretQueries.js +12 -9
- package/dist/security/hooks/useSecretQueries.js.map +1 -1
- package/dist/security/hooks/useSecurityVariant.d.ts +7 -0
- package/dist/security/hooks/useSecurityVariant.js +9 -0
- package/dist/security/hooks/useSecurityVariant.js.map +1 -0
- package/dist/security/index.d.ts +1 -1
- package/dist/security/pages/AccessReviewPage.js +77 -76
- package/dist/security/pages/AccessReviewPage.js.map +1 -1
- package/dist/security/pages/AuditLogPage.js +58 -44
- package/dist/security/pages/AuditLogPage.js.map +1 -1
- package/dist/security/pages/ImportExportPage.js +1 -1
- package/dist/security/pages/ImportExportPage.js.map +1 -1
- package/dist/security/pages/SecretCreatePage.js +85 -85
- package/dist/security/pages/SecretCreatePage.js.map +1 -1
- package/dist/security/pages/SecretDetailPage.js +391 -305
- package/dist/security/pages/SecretDetailPage.js.map +1 -1
- package/dist/security/pages/VaultCreatePage.js +59 -56
- package/dist/security/pages/VaultCreatePage.js.map +1 -1
- package/dist/security/pages/VaultDetailPage.js +218 -162
- package/dist/security/pages/VaultDetailPage.js.map +1 -1
- package/dist/security/pages/VaultLandingPage.js +48 -35
- package/dist/security/pages/VaultLandingPage.js.map +1 -1
- package/dist/security/pages/VaultSettingsPage.js +331 -266
- package/dist/security/pages/VaultSettingsPage.js.map +1 -1
- package/dist/security/pages/VaultsDashboardPage.js +231 -161
- package/dist/security/pages/VaultsDashboardPage.js.map +1 -1
- package/dist/security/providers/SecurityProvider.js +24 -20
- package/dist/security/providers/SecurityProvider.js.map +1 -1
- package/dist/security/providers/securityContext.d.ts +3 -0
- package/dist/security/providers/securityContext.js +6 -0
- package/dist/security/providers/securityContext.js.map +1 -0
- package/dist/security/routes/SecurityAdminRoutes.js +3 -3
- package/dist/security/routes/SecurityAdminRoutes.js.map +1 -1
- package/dist/security/routes/SecurityRoutes.js +3 -3
- package/dist/security/routes/SecurityRoutes.js.map +1 -1
- package/dist/security/routes/SecurityUserRoutes.js +1 -1
- package/dist/security/routes/SecurityUserRoutes.js.map +1 -1
- package/dist/security/translations/en.d.ts +58 -0
- package/dist/security/translations/en.js +70 -10
- package/dist/security/translations/en.js.map +1 -1
- package/dist/security/types/index.d.ts +13 -0
- package/dist/security/utils/formInputs.d.ts +49 -0
- package/dist/security/utils/formInputs.js +27 -0
- package/dist/security/utils/formInputs.js.map +1 -0
- package/dist/security/utils/landingTabs.d.ts +9 -0
- package/dist/security/utils/landingTabs.js +16 -0
- package/dist/security/utils/landingTabs.js.map +1 -0
- package/dist/security/utils/rotationStatus.d.ts +12 -0
- package/dist/security/utils/rotationStatus.js +8 -0
- package/dist/security/utils/rotationStatus.js.map +1 -0
- package/package.json +2 -2
|
@@ -1,427 +1,502 @@
|
|
|
1
1
|
import { PageLayout as e } from "../components/PageLayout.js";
|
|
2
2
|
import { SecretValueDisplay as ee } from "../components/SecretValueDisplay.js";
|
|
3
|
-
import { SecretTypeBadge as
|
|
4
|
-
import { RotationStatusBadge as
|
|
5
|
-
import { ConfirmDialog as
|
|
6
|
-
import { SecretShareDialog as
|
|
7
|
-
import { Badge as
|
|
8
|
-
import { useDeleteSecret as
|
|
9
|
-
import { useSecurityEventEmitter as
|
|
10
|
-
import { useGetSecretVersionsQuery as
|
|
11
|
-
import { useSecretValue as
|
|
12
|
-
import { useSecurity as
|
|
13
|
-
import { SecurityPermissionGuard as
|
|
3
|
+
import { SecretTypeBadge as t } from "../components/SecretTypeBadge.js";
|
|
4
|
+
import { RotationStatusBadge as n } from "../components/RotationStatusBadge.js";
|
|
5
|
+
import { ConfirmDialog as te } from "../components/ConfirmDialog.js";
|
|
6
|
+
import { SecretShareDialog as ne } from "../components/SecretShareDialog.js";
|
|
7
|
+
import { Badge as r, Button as i, Card as a } from "../components/ui.js";
|
|
8
|
+
import { useDeleteSecret as re, useGetSecret as ie, useRollbackSecret as ae, useRotateSecret as oe, useUpdateSecret as se } from "../hooks/useSecretQueries.js";
|
|
9
|
+
import { useSecurityEventEmitter as ce } from "../hooks/useSecurityEventEmitter.js";
|
|
10
|
+
import { useGetSecretVersionsQuery as le } from "../../generated/wspace-operations.js";
|
|
11
|
+
import { useSecretValue as ue } from "../hooks/useSecretValue.js";
|
|
12
|
+
import { useSecurity as de } from "../providers/SecurityProvider.js";
|
|
13
|
+
import { SecurityPermissionGuard as fe } from "../components/SecurityPermissionGuard.js";
|
|
14
14
|
import { cn as o } from "../utils/cn.js";
|
|
15
|
-
import { useTr as
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
15
|
+
import { useTr as pe } from "../hooks/useTr.js";
|
|
16
|
+
import { useIsFluidgridsVariant as me } from "../hooks/useSecurityVariant.js";
|
|
17
|
+
import { useActorLabel as he } from "../hooks/useActorLabel.js";
|
|
18
|
+
import { getRotationStatus as ge } from "../utils/rotationStatus.js";
|
|
19
|
+
import { nativeConfirm as _e, nativeImpact as ve, nativeNotify as s } from "../../utils/nativeBridge.js";
|
|
20
|
+
import { SECURITY_FEATURE_FLAGS as c } from "../constants/featureFlags.js";
|
|
21
|
+
import { useRef as ye, useState as l } from "react";
|
|
22
|
+
import { useFeatureFlag as be, usePermission as u } from "@burdenoff/fe-libs/shared/providers/shell";
|
|
23
|
+
import { useNavigate as xe, useParams as Se } from "react-router";
|
|
24
|
+
import { jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
25
|
+
import { AlertTriangle as Ce, ArrowLeft as p, Calendar as we, Clock as Te, History as m, KeyRound as h, Loader2 as g, RefreshCw as _, Share2 as v, Shield as Ee, Trash2 as De } from "lucide-react";
|
|
26
|
+
import { CTAOverflowMenu as Oe, Dialog as y, DialogContent as b, DialogHeader as x, DialogTitle as S, GlassCard as C, NextSteps as ke, OptionalFields as Ae, PagePurpose as je, ShowTechnicalDetails as w } from "@burdenoff/fe-libs/ui";
|
|
24
27
|
// src/security/pages/SecretDetailPage.tsx
|
|
25
|
-
function
|
|
26
|
-
let { vaultId:
|
|
28
|
+
function T() {
|
|
29
|
+
let { vaultId: T, secretId: E } = Se(), { basePath: D = "/", navigate: O } = de(), Me = he(), Ne = xe(), k = pe(), A = me(), { data: Pe, loading: Fe, error: j, refetch: M } = ie(E ?? null), N = Pe?.getSecret, { data: Ie, loading: Le } = le({
|
|
27
30
|
variables: {
|
|
28
|
-
secretId:
|
|
31
|
+
secretId: E ?? "",
|
|
29
32
|
pagination: { limit: 50 }
|
|
30
33
|
},
|
|
31
|
-
skip: !
|
|
34
|
+
skip: !E,
|
|
32
35
|
fetchPolicy: "network-only"
|
|
33
|
-
}),
|
|
34
|
-
|
|
35
|
-
}, [
|
|
36
|
-
|
|
36
|
+
}), Re = Ie?.getSecretVersionsPaginated?.items ?? [], { value: ze, reveal: P, hide: Be, loading: Ve, isRevealed: F } = ue(E ?? ""), [He, { loading: Ue }] = re(), [We, { loading: Ge }] = oe(), [Ke, { loading: qe }] = se(), I = Ge || qe, [L, R] = l(null), [Je, { loading: Ye }] = ae(), { emit: z } = ce(), Xe = u("secret:delete"), B = u("secret:update"), V = u("secret:decrypt"), Ze = be(c.SECRET_ROTATE, !1), H = B && (A || Ze), [Qe, U] = l(!1), [$e, W] = l(!1), [et, G] = l(!1), K = ye(null), q = () => {
|
|
37
|
+
R(null), G(!0), requestAnimationFrame(() => K.current?.focus());
|
|
38
|
+
}, [tt, J] = l(!1), [Y, nt] = l(""), rt = (e) => {
|
|
39
|
+
O ? O(e) : Ne(e);
|
|
37
40
|
}, X = () => {
|
|
38
|
-
|
|
41
|
+
rt(`${D}/vaults/${T}`);
|
|
39
42
|
}, Z = async () => {
|
|
40
|
-
if (
|
|
41
|
-
await
|
|
42
|
-
secretId:
|
|
43
|
-
vaultId:
|
|
44
|
-
}),
|
|
43
|
+
if (E) try {
|
|
44
|
+
await He({ variables: { id: E } }), z("secret.deleted", {
|
|
45
|
+
secretId: E,
|
|
46
|
+
vaultId: T
|
|
47
|
+
}), U(!1), s("success"), X();
|
|
45
48
|
} catch (e) {
|
|
46
|
-
console.error("Failed to delete secret:", e),
|
|
49
|
+
console.error("Failed to delete secret:", e), s("error");
|
|
47
50
|
}
|
|
48
|
-
},
|
|
49
|
-
|
|
50
|
-
let e = await
|
|
51
|
+
}, it = async () => {
|
|
52
|
+
ve("medium");
|
|
53
|
+
let e = await _e({
|
|
51
54
|
title: "Delete Secret",
|
|
52
55
|
message: "Delete this secret? This cannot be undone.",
|
|
53
56
|
okButtonTitle: "Delete",
|
|
54
57
|
cancelButtonTitle: "Cancel"
|
|
55
58
|
});
|
|
56
|
-
e === null ?
|
|
57
|
-
},
|
|
58
|
-
if (
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
59
|
+
e === null ? U(!0) : e && await Z();
|
|
60
|
+
}, at = async () => {
|
|
61
|
+
if (E && Y.trim()) {
|
|
62
|
+
R(null);
|
|
63
|
+
try {
|
|
64
|
+
A ? (await Ke({ variables: {
|
|
65
|
+
id: E,
|
|
66
|
+
input: { value: Y.trim() }
|
|
67
|
+
} }), z("secret.updated", {
|
|
68
|
+
secretId: E,
|
|
69
|
+
vaultId: T
|
|
70
|
+
})) : (await We({ variables: {
|
|
71
|
+
id: E,
|
|
72
|
+
newValue: Y.trim()
|
|
73
|
+
} }), z("secret.rotated", {
|
|
74
|
+
secretId: E,
|
|
75
|
+
vaultId: T
|
|
76
|
+
})), G(!1), nt(""), M();
|
|
77
|
+
} catch (e) {
|
|
78
|
+
console.error("Failed to rotate secret:", e), R(e instanceof Error && e.message ? e.message : "");
|
|
79
|
+
}
|
|
68
80
|
}
|
|
69
|
-
},
|
|
70
|
-
if (
|
|
71
|
-
await
|
|
72
|
-
id:
|
|
81
|
+
}, ot = async (e) => {
|
|
82
|
+
if (E) try {
|
|
83
|
+
await Je({ variables: {
|
|
84
|
+
id: E,
|
|
73
85
|
version: e
|
|
74
|
-
} }),
|
|
75
|
-
secretId:
|
|
76
|
-
vaultId:
|
|
77
|
-
}), M(),
|
|
86
|
+
} }), z("secret.rollback", {
|
|
87
|
+
secretId: E,
|
|
88
|
+
vaultId: T
|
|
89
|
+
}), M(), J(!1);
|
|
78
90
|
} catch (e) {
|
|
79
91
|
console.error("Failed to rollback secret:", e);
|
|
80
92
|
}
|
|
81
93
|
};
|
|
82
|
-
if (
|
|
83
|
-
title:
|
|
94
|
+
if (Fe && !N) return /* @__PURE__ */ d(e, {
|
|
95
|
+
title: k("security.secretDetail.loading.title", "Loading Secret..."),
|
|
84
96
|
breadcrumbs: [{
|
|
85
|
-
label:
|
|
86
|
-
path:
|
|
87
|
-
}, { label:
|
|
88
|
-
children: /* @__PURE__ */
|
|
97
|
+
label: k("security.common.breadcrumbs.security", "Security"),
|
|
98
|
+
path: D
|
|
99
|
+
}, { label: k("security.common.breadcrumbs.secret", "Secret") }],
|
|
100
|
+
children: /* @__PURE__ */ d("div", {
|
|
89
101
|
className: "flex items-center justify-center py-20",
|
|
90
|
-
children: /* @__PURE__ */
|
|
102
|
+
children: /* @__PURE__ */ d(g, { className: "size-10 animate-spin text-primary/60" })
|
|
91
103
|
})
|
|
92
104
|
});
|
|
93
|
-
if (j || !N) return /* @__PURE__ */
|
|
94
|
-
title:
|
|
105
|
+
if (j || !N) return /* @__PURE__ */ d(e, {
|
|
106
|
+
title: k("security.common.errorPage.title", "Error"),
|
|
95
107
|
breadcrumbs: [{
|
|
96
|
-
label:
|
|
97
|
-
path:
|
|
98
|
-
}, { label:
|
|
99
|
-
children: /* @__PURE__ */
|
|
108
|
+
label: k("security.common.breadcrumbs.security", "Security"),
|
|
109
|
+
path: D
|
|
110
|
+
}, { label: k("security.common.breadcrumbs.secret", "Secret") }],
|
|
111
|
+
children: /* @__PURE__ */ d(a, {
|
|
100
112
|
className: "p-8 text-center max-w-lg mx-auto mt-10",
|
|
101
|
-
children: /* @__PURE__ */
|
|
113
|
+
children: /* @__PURE__ */ f("div", {
|
|
102
114
|
className: "flex flex-col items-center gap-4",
|
|
103
115
|
children: [
|
|
104
|
-
/* @__PURE__ */
|
|
116
|
+
/* @__PURE__ */ d("div", {
|
|
105
117
|
className: "p-3 rounded-full bg-status-error-bg/10",
|
|
106
|
-
children: /* @__PURE__ */
|
|
118
|
+
children: /* @__PURE__ */ d(Ce, { className: "size-8 text-status-error-text" })
|
|
107
119
|
}),
|
|
108
|
-
/* @__PURE__ */
|
|
120
|
+
/* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("h3", {
|
|
109
121
|
className: "text-lg font-bold text-text-primary",
|
|
110
|
-
children:
|
|
111
|
-
}), /* @__PURE__ */
|
|
122
|
+
children: k("security.secretDetail.error.title", "Failed to load secret")
|
|
123
|
+
}), /* @__PURE__ */ d("p", {
|
|
112
124
|
className: "text-sm text-text-secondary mt-2",
|
|
113
|
-
children: j?.message ??
|
|
125
|
+
children: j?.message ?? k("security.secretDetail.error.description", "Secret not found or access denied.")
|
|
114
126
|
})] }),
|
|
115
|
-
/* @__PURE__ */
|
|
127
|
+
/* @__PURE__ */ f(i, {
|
|
116
128
|
variant: "outline",
|
|
117
129
|
onClick: X,
|
|
118
130
|
className: "mt-4",
|
|
119
|
-
children: [/* @__PURE__ */
|
|
131
|
+
children: [/* @__PURE__ */ d(p, { className: "size-4" }), k("security.secretDetail.actions.backToVault", "Go Back to Vault")]
|
|
120
132
|
})
|
|
121
133
|
]
|
|
122
134
|
})
|
|
123
135
|
})
|
|
124
136
|
});
|
|
125
|
-
let Q = N.versionCount ?? 0, $ = N.
|
|
126
|
-
return /* @__PURE__ */
|
|
137
|
+
let Q = N.versionCount ?? 0, $ = ge(N.expiresAt), st = Me(N.createdBy);
|
|
138
|
+
return /* @__PURE__ */ f(e, {
|
|
127
139
|
title: N.name,
|
|
128
|
-
description: N.description ??
|
|
140
|
+
description: N.description ?? k("security.secretDetail.description", "View and manage this secret."),
|
|
129
141
|
breadcrumbs: [
|
|
130
142
|
{
|
|
131
|
-
label:
|
|
132
|
-
path:
|
|
143
|
+
label: k("security.common.breadcrumbs.security", "Security"),
|
|
144
|
+
path: D
|
|
133
145
|
},
|
|
134
146
|
{
|
|
135
|
-
label:
|
|
136
|
-
path: `${
|
|
147
|
+
label: k("security.common.breadcrumbs.vault", "Vault"),
|
|
148
|
+
path: `${D}/vaults/${T}`
|
|
137
149
|
},
|
|
138
150
|
{ label: N.name }
|
|
139
151
|
],
|
|
140
152
|
actions: (() => {
|
|
141
153
|
let e = [];
|
|
142
|
-
return
|
|
143
|
-
label:
|
|
144
|
-
icon: /* @__PURE__ */
|
|
145
|
-
onSelect: () =>
|
|
146
|
-
}),
|
|
147
|
-
label:
|
|
148
|
-
icon: /* @__PURE__ */
|
|
149
|
-
onSelect:
|
|
150
|
-
}),
|
|
151
|
-
label:
|
|
152
|
-
icon: /* @__PURE__ */
|
|
154
|
+
return B && e.push({
|
|
155
|
+
label: k("security.common.actions.share", "Share"),
|
|
156
|
+
icon: /* @__PURE__ */ d(v, { className: "size-4" }),
|
|
157
|
+
onSelect: () => W(!0)
|
|
158
|
+
}), H && e.push({
|
|
159
|
+
label: k("security.secretDetail.actions.rotate", "Rotate"),
|
|
160
|
+
icon: /* @__PURE__ */ d(_, { className: "size-4" }),
|
|
161
|
+
onSelect: q
|
|
162
|
+
}), Xe && e.push({
|
|
163
|
+
label: k("security.common.actions.delete", "Delete"),
|
|
164
|
+
icon: /* @__PURE__ */ d(De, { className: "size-4" }),
|
|
153
165
|
intent: "destructive",
|
|
154
|
-
onSelect: () => void
|
|
155
|
-
}), /* @__PURE__ */
|
|
166
|
+
onSelect: () => void it()
|
|
167
|
+
}), /* @__PURE__ */ f("div", {
|
|
156
168
|
className: "flex flex-wrap items-center gap-2",
|
|
157
|
-
children: [/* @__PURE__ */
|
|
169
|
+
children: [/* @__PURE__ */ f(i, {
|
|
158
170
|
variant: "outline",
|
|
159
171
|
size: "sm",
|
|
160
172
|
onClick: X,
|
|
161
173
|
children: [
|
|
162
|
-
/* @__PURE__ */
|
|
163
|
-
/* @__PURE__ */
|
|
174
|
+
/* @__PURE__ */ d(p, { className: "size-4" }),
|
|
175
|
+
/* @__PURE__ */ d("span", {
|
|
164
176
|
className: "hidden sm:inline",
|
|
165
|
-
children:
|
|
177
|
+
children: k("security.secretDetail.actions.backToVault", "Back to Vault")
|
|
166
178
|
}),
|
|
167
|
-
/* @__PURE__ */
|
|
179
|
+
/* @__PURE__ */ d("span", {
|
|
168
180
|
className: "sm:hidden",
|
|
169
|
-
children:
|
|
181
|
+
children: k("security.common.actions.back", "Back")
|
|
170
182
|
})
|
|
171
183
|
]
|
|
172
|
-
}), /* @__PURE__ */
|
|
184
|
+
}), /* @__PURE__ */ d(Oe, { actions: e })]
|
|
173
185
|
});
|
|
174
186
|
})(),
|
|
175
187
|
children: [
|
|
176
|
-
/* @__PURE__ */
|
|
188
|
+
/* @__PURE__ */ f("div", {
|
|
177
189
|
className: "space-y-6",
|
|
178
190
|
children: [
|
|
179
|
-
/* @__PURE__ */
|
|
180
|
-
icon: /* @__PURE__ */
|
|
181
|
-
children:
|
|
191
|
+
/* @__PURE__ */ d(je, {
|
|
192
|
+
icon: /* @__PURE__ */ d(h, { className: "size-4" }),
|
|
193
|
+
children: k("security.secretDetail.purpose", "This is a single secret — an encrypted credential such as an API key, password or connection string. Reveal and copy its value when you need it (every reveal is logged), rotate it to a new value while keeping the old one in version history, roll back to a previous version, or share it securely with someone outside this vault.")
|
|
182
194
|
}),
|
|
183
|
-
(
|
|
195
|
+
(V || B) && /* @__PURE__ */ d(ke, {
|
|
184
196
|
storageKey: "security-secret-detail",
|
|
185
197
|
steps: [
|
|
186
|
-
...
|
|
198
|
+
...V ? [{
|
|
187
199
|
id: "reveal",
|
|
188
|
-
label:
|
|
189
|
-
description:
|
|
190
|
-
icon: /* @__PURE__ */
|
|
191
|
-
onClick:
|
|
192
|
-
done:
|
|
200
|
+
label: k("security.secretDetail.next.reveal", "Reveal the value"),
|
|
201
|
+
description: k("security.secretDetail.next.revealDesc", "Decrypt and copy this secret when you need it."),
|
|
202
|
+
icon: /* @__PURE__ */ d(h, { className: "size-4" }),
|
|
203
|
+
onClick: F ? void 0 : () => void P(),
|
|
204
|
+
done: F
|
|
193
205
|
}] : [],
|
|
194
|
-
...
|
|
206
|
+
...B && !A ? [{
|
|
195
207
|
id: "share",
|
|
196
|
-
label:
|
|
197
|
-
description:
|
|
198
|
-
icon: /* @__PURE__ */
|
|
199
|
-
onClick: () =>
|
|
208
|
+
label: k("security.secretDetail.next.share", "Share this secret"),
|
|
209
|
+
description: k("security.secretDetail.next.shareDesc", "Send a confidential, expiring link to someone."),
|
|
210
|
+
icon: /* @__PURE__ */ d(v, { className: "size-4" }),
|
|
211
|
+
onClick: () => W(!0)
|
|
200
212
|
}] : [],
|
|
201
|
-
...
|
|
213
|
+
...H && !A ? [{
|
|
202
214
|
id: "rotate",
|
|
203
|
-
label:
|
|
204
|
-
description:
|
|
205
|
-
icon: /* @__PURE__ */
|
|
206
|
-
onClick:
|
|
215
|
+
label: k("security.secretDetail.next.rotate", "Rotate the value"),
|
|
216
|
+
description: k("security.secretDetail.next.rotateDesc", "Replace the value and keep the old one in history."),
|
|
217
|
+
icon: /* @__PURE__ */ d(_, { className: "size-4" }),
|
|
218
|
+
onClick: q
|
|
207
219
|
}] : []
|
|
208
220
|
]
|
|
209
221
|
}),
|
|
210
|
-
/* @__PURE__ */
|
|
222
|
+
!A && /* @__PURE__ */ f("div", {
|
|
211
223
|
className: "flex flex-wrap items-center gap-3",
|
|
212
224
|
children: [
|
|
213
|
-
/* @__PURE__ */
|
|
214
|
-
$ && /* @__PURE__ */
|
|
215
|
-
/* @__PURE__ */
|
|
225
|
+
/* @__PURE__ */ d(t, { type: N.type }),
|
|
226
|
+
$ && /* @__PURE__ */ d(n, { status: $ }),
|
|
227
|
+
/* @__PURE__ */ d(r, {
|
|
216
228
|
variant: "outline",
|
|
217
229
|
className: "bg-bg-surface/50",
|
|
218
|
-
children:
|
|
230
|
+
children: k("security.secretDetail.status.label", "Status: {{status}}", { status: N.status })
|
|
219
231
|
}),
|
|
220
|
-
N.labels?.map((e) => /* @__PURE__ */
|
|
232
|
+
N.labels?.map((e) => /* @__PURE__ */ d(r, {
|
|
221
233
|
variant: "outline",
|
|
222
234
|
className: "border-primary/20 text-primary",
|
|
223
235
|
children: e.label
|
|
224
236
|
}, e.id))
|
|
225
237
|
]
|
|
226
238
|
}),
|
|
227
|
-
/* @__PURE__ */
|
|
239
|
+
/* @__PURE__ */ f("div", {
|
|
228
240
|
className: "grid grid-cols-1 md:grid-cols-3 gap-6",
|
|
229
|
-
children: [/* @__PURE__ */
|
|
241
|
+
children: [/* @__PURE__ */ f("div", {
|
|
230
242
|
className: "md:col-span-2 space-y-6",
|
|
231
|
-
children: [
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
243
|
+
children: [
|
|
244
|
+
/* @__PURE__ */ f(C, {
|
|
245
|
+
treatment: "glass",
|
|
246
|
+
glow: !0,
|
|
247
|
+
className: "p-6",
|
|
248
|
+
children: [
|
|
249
|
+
/* @__PURE__ */ f("div", {
|
|
250
|
+
className: "flex items-center justify-between mb-4",
|
|
251
|
+
children: [/* @__PURE__ */ f("h2", {
|
|
252
|
+
className: "text-lg font-bold text-text-primary flex items-center gap-2",
|
|
253
|
+
children: [/* @__PURE__ */ d(h, { className: "size-5 text-primary" }), k("security.secretDetail.value.title", "Secret Value")]
|
|
254
|
+
}), N.expiresAt && /* @__PURE__ */ f("div", {
|
|
255
|
+
className: "flex items-center gap-1.5 text-xs text-warning",
|
|
256
|
+
children: [/* @__PURE__ */ d(we, { className: "size-3.5" }), k("security.secretDetail.value.expires", "Expires: {{date}}", { date: new Date(N.expiresAt).toLocaleDateString() })]
|
|
257
|
+
})]
|
|
258
|
+
}),
|
|
259
|
+
/* @__PURE__ */ d(ee, {
|
|
260
|
+
value: ze ?? "",
|
|
261
|
+
isRevealed: F,
|
|
262
|
+
onToggleReveal: V ? () => {
|
|
263
|
+
F ? Be() : P();
|
|
264
|
+
} : void 0,
|
|
265
|
+
isLoading: Ve
|
|
266
|
+
}),
|
|
267
|
+
/* @__PURE__ */ d("p", {
|
|
268
|
+
className: "text-xs text-text-secondary mt-4 italic",
|
|
269
|
+
children: k("security.secretDetail.value.note", "Secret values are decrypted on-demand and never stored in plain text.")
|
|
270
|
+
})
|
|
271
|
+
]
|
|
272
|
+
}),
|
|
273
|
+
!A && /* @__PURE__ */ f(a, {
|
|
274
|
+
className: "p-6 shadow-sm border-border-subtle/60",
|
|
275
|
+
children: [/* @__PURE__ */ f("div", {
|
|
276
|
+
className: "flex items-center justify-between mb-6",
|
|
277
|
+
children: [/* @__PURE__ */ f("h2", {
|
|
239
278
|
className: "text-lg font-bold text-text-primary flex items-center gap-2",
|
|
240
|
-
children: [/* @__PURE__ */
|
|
241
|
-
}),
|
|
242
|
-
className: "flex items-center gap-1.5 text-xs text-warning",
|
|
243
|
-
children: [/* @__PURE__ */ f(h, { className: "size-3.5" }), A("security.secretDetail.value.expires", "Expires: {{date}}", { date: new Date(N.expiresAt).toLocaleDateString() })]
|
|
244
|
-
})]
|
|
245
|
-
}),
|
|
246
|
-
/* @__PURE__ */ f(ee, {
|
|
247
|
-
value: Ae ?? "",
|
|
248
|
-
isRevealed: I,
|
|
249
|
-
onToggleReveal: B ? () => {
|
|
250
|
-
I ? je() : F();
|
|
251
|
-
} : void 0,
|
|
252
|
-
isLoading: Me
|
|
253
|
-
}),
|
|
254
|
-
/* @__PURE__ */ f("p", {
|
|
255
|
-
className: "text-xs text-text-secondary mt-4 italic",
|
|
256
|
-
children: A("security.secretDetail.value.note", "Secret values are decrypted on-demand and never stored in plain text.")
|
|
257
|
-
})
|
|
258
|
-
]
|
|
259
|
-
}), /* @__PURE__ */ p(r, {
|
|
260
|
-
className: "p-6 shadow-sm border-border-subtle/60",
|
|
261
|
-
children: [/* @__PURE__ */ p("div", {
|
|
262
|
-
className: "flex items-center justify-between mb-6",
|
|
263
|
-
children: [/* @__PURE__ */ p("h2", {
|
|
264
|
-
className: "text-lg font-bold text-text-primary flex items-center gap-2",
|
|
265
|
-
children: [/* @__PURE__ */ f(g, { className: "size-5 text-primary" }), A("security.secretDetail.history.title", "Version History")]
|
|
266
|
-
}), /* @__PURE__ */ f(t, {
|
|
267
|
-
variant: "outline",
|
|
268
|
-
className: "bg-bg-sunken font-mono",
|
|
269
|
-
children: A("security.secretDetail.history.totalVersions", "{{count}} total versions", { count: Q })
|
|
270
|
-
})]
|
|
271
|
-
}), /* @__PURE__ */ p("div", {
|
|
272
|
-
className: "space-y-4",
|
|
273
|
-
children: [/* @__PURE__ */ p("div", {
|
|
274
|
-
className: "flex items-center justify-between p-4 rounded-lg bg-action-primary-bg/5 border border-primary/10",
|
|
275
|
-
children: [/* @__PURE__ */ p("div", {
|
|
276
|
-
className: "flex items-center gap-3",
|
|
277
|
-
children: [/* @__PURE__ */ p("div", {
|
|
278
|
-
className: "size-8 rounded-full bg-action-primary-bg/10 flex items-center justify-center text-primary text-xs font-bold tabular-nums",
|
|
279
|
-
children: ["v", N.version ?? Q]
|
|
280
|
-
}), /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("p", {
|
|
281
|
-
className: "text-sm font-semibold",
|
|
282
|
-
children: A("security.secretDetail.history.currentVersion", "Current Active Version")
|
|
283
|
-
}), /* @__PURE__ */ f("p", {
|
|
284
|
-
className: "text-xs text-text-secondary",
|
|
285
|
-
children: A("security.secretDetail.history.lastUpdated", "Last updated {{date}}", { date: new Date(N.updatedAt).toLocaleString() })
|
|
286
|
-
})] })]
|
|
287
|
-
}), /* @__PURE__ */ f(t, {
|
|
288
|
-
variant: "success",
|
|
289
|
-
className: "text-[10px] uppercase",
|
|
290
|
-
children: A("security.common.status.active", "Active")
|
|
291
|
-
})]
|
|
292
|
-
}), Q > 1 && /* @__PURE__ */ p("div", {
|
|
293
|
-
className: "text-center py-4 border-2 border-dashed border-border-subtle/40 rounded-lg bg-bg-sunken/20",
|
|
294
|
-
children: [/* @__PURE__ */ f("p", {
|
|
295
|
-
className: "text-sm text-text-secondary",
|
|
296
|
-
children: A("security.secretDetail.history.available", "Historical versions are available. You can rollback to a previous state if needed.")
|
|
297
|
-
}), /* @__PURE__ */ f(n, {
|
|
279
|
+
children: [/* @__PURE__ */ d(m, { className: "size-5 text-primary" }), k("security.secretDetail.history.title", "Version History")]
|
|
280
|
+
}), /* @__PURE__ */ d(r, {
|
|
298
281
|
variant: "outline",
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
282
|
+
className: "bg-bg-sunken font-mono",
|
|
283
|
+
children: k("security.secretDetail.history.totalVersions", "{{count}} total versions", { count: Q })
|
|
284
|
+
})]
|
|
285
|
+
}), /* @__PURE__ */ f("div", {
|
|
286
|
+
className: "space-y-4",
|
|
287
|
+
children: [/* @__PURE__ */ f("div", {
|
|
288
|
+
className: "flex items-center justify-between p-4 rounded-lg bg-action-primary-bg/5 border border-primary/10",
|
|
289
|
+
children: [/* @__PURE__ */ f("div", {
|
|
290
|
+
className: "flex items-center gap-3",
|
|
291
|
+
children: [/* @__PURE__ */ f("div", {
|
|
292
|
+
className: "size-8 rounded-full bg-action-primary-bg/10 flex items-center justify-center text-primary text-xs font-bold tabular-nums",
|
|
293
|
+
children: ["v", N.version ?? Q]
|
|
294
|
+
}), /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("p", {
|
|
295
|
+
className: "text-sm font-semibold",
|
|
296
|
+
children: k("security.secretDetail.history.currentVersion", "Current Active Version")
|
|
297
|
+
}), /* @__PURE__ */ d("p", {
|
|
298
|
+
className: "text-xs text-text-secondary",
|
|
299
|
+
children: k("security.secretDetail.history.lastUpdated", "Last updated {{date}}", { date: new Date(N.updatedAt).toLocaleString() })
|
|
300
|
+
})] })]
|
|
301
|
+
}), /* @__PURE__ */ d(r, {
|
|
302
|
+
variant: "success",
|
|
303
|
+
className: "text-[10px] uppercase",
|
|
304
|
+
children: k("security.common.status.active", "Active")
|
|
305
|
+
})]
|
|
306
|
+
}), Q > 1 && /* @__PURE__ */ f("div", {
|
|
307
|
+
className: "text-center py-4 border-2 border-dashed border-border-subtle/40 rounded-lg bg-bg-sunken/20",
|
|
308
|
+
children: [/* @__PURE__ */ d("p", {
|
|
309
|
+
className: "text-sm text-text-secondary",
|
|
310
|
+
children: k("security.secretDetail.history.available", "Historical versions are available. You can rollback to a previous state if needed.")
|
|
311
|
+
}), /* @__PURE__ */ d(i, {
|
|
312
|
+
variant: "outline",
|
|
313
|
+
size: "sm",
|
|
314
|
+
className: "mt-3",
|
|
315
|
+
onClick: () => J(!0),
|
|
316
|
+
children: k("security.secretDetail.history.viewFull", "View Full History")
|
|
317
|
+
})]
|
|
303
318
|
})]
|
|
304
319
|
})]
|
|
305
|
-
})
|
|
306
|
-
|
|
307
|
-
|
|
320
|
+
}),
|
|
321
|
+
A && /* @__PURE__ */ d(Ae, {
|
|
322
|
+
storageKey: "security.secretDetail.moreDetails",
|
|
323
|
+
label: k("security.secretDetail.moreDetails", "More details"),
|
|
324
|
+
children: /* @__PURE__ */ f("div", {
|
|
325
|
+
className: "space-y-4",
|
|
326
|
+
children: [
|
|
327
|
+
/* @__PURE__ */ f("div", {
|
|
328
|
+
className: "flex flex-wrap items-center gap-2",
|
|
329
|
+
children: [
|
|
330
|
+
/* @__PURE__ */ d(t, { type: N.type }),
|
|
331
|
+
$ && /* @__PURE__ */ d(n, { status: $ }),
|
|
332
|
+
N.labels?.map((e) => /* @__PURE__ */ d(r, {
|
|
333
|
+
variant: "outline",
|
|
334
|
+
className: "border-primary/20 text-primary",
|
|
335
|
+
children: e.label
|
|
336
|
+
}, e.id))
|
|
337
|
+
]
|
|
338
|
+
}),
|
|
339
|
+
/* @__PURE__ */ f("div", {
|
|
340
|
+
className: "flex flex-wrap items-center justify-between gap-3 rounded-lg border border-border-subtle p-4",
|
|
341
|
+
children: [/* @__PURE__ */ f("div", { children: [/* @__PURE__ */ f("p", {
|
|
342
|
+
className: "text-sm font-semibold text-text-primary flex items-center gap-2",
|
|
343
|
+
children: [/* @__PURE__ */ d(m, { className: "size-4 text-primary" }), k("security.secretDetail.history.title", "Version History")]
|
|
344
|
+
}), /* @__PURE__ */ d("p", {
|
|
345
|
+
className: "text-xs text-text-secondary mt-1",
|
|
346
|
+
children: k("security.secretDetail.history.totalVersions", "{{count}} total versions", { count: Q })
|
|
347
|
+
})] }), /* @__PURE__ */ d(i, {
|
|
348
|
+
variant: "outline",
|
|
349
|
+
size: "sm",
|
|
350
|
+
onClick: () => J(!0),
|
|
351
|
+
children: k("security.secretDetail.history.viewFull", "View Full History")
|
|
352
|
+
})]
|
|
353
|
+
}),
|
|
354
|
+
/* @__PURE__ */ f("p", {
|
|
355
|
+
className: "text-sm text-text-secondary",
|
|
356
|
+
children: [
|
|
357
|
+
/* @__PURE__ */ f("span", {
|
|
358
|
+
className: "font-medium text-text-primary",
|
|
359
|
+
children: [k("security.secretDetail.details.createdBy", "Created By"), ":"]
|
|
360
|
+
}),
|
|
361
|
+
" ",
|
|
362
|
+
/* @__PURE__ */ d("span", {
|
|
363
|
+
className: "break-all",
|
|
364
|
+
children: st
|
|
365
|
+
})
|
|
366
|
+
]
|
|
367
|
+
}),
|
|
368
|
+
/* @__PURE__ */ d(w, {
|
|
369
|
+
copyable: !0,
|
|
370
|
+
children: [
|
|
371
|
+
`${k("security.secretDetail.details.keyIdentifier", "Key Identifier")}: ${N.key}`,
|
|
372
|
+
`${k("security.secretDetail.details.createdBy", "Created By")}: ${N.createdBy}`,
|
|
373
|
+
`${k("security.secretDetail.status.name", "Status")}: ${N.status}`,
|
|
374
|
+
`${k("security.secretDetail.history.versionName", "Version")}: ${N.version ?? Q}`,
|
|
375
|
+
...N.lastRotatedAt ? [`${k("security.secretDetail.details.lastRotation", "Last Rotation")}: ${new Date(N.lastRotatedAt).toLocaleString()}`] : []
|
|
376
|
+
].join("\n")
|
|
377
|
+
})
|
|
378
|
+
]
|
|
379
|
+
})
|
|
380
|
+
})
|
|
381
|
+
]
|
|
382
|
+
}), /* @__PURE__ */ f("div", {
|
|
308
383
|
className: "space-y-6",
|
|
309
|
-
children: [/* @__PURE__ */
|
|
384
|
+
children: [/* @__PURE__ */ f(a, {
|
|
310
385
|
className: "p-6 shadow-sm border-border-subtle/60 space-y-4",
|
|
311
|
-
children: [/* @__PURE__ */
|
|
386
|
+
children: [/* @__PURE__ */ d("h3", {
|
|
312
387
|
className: "font-bold text-sm uppercase tracking-wider text-text-secondary",
|
|
313
|
-
children:
|
|
314
|
-
}), /* @__PURE__ */
|
|
388
|
+
children: k("security.secretDetail.details.title", "Details")
|
|
389
|
+
}), /* @__PURE__ */ f("div", {
|
|
315
390
|
className: "space-y-3",
|
|
316
391
|
children: [
|
|
317
|
-
/* @__PURE__ */
|
|
392
|
+
!A && /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("p", {
|
|
318
393
|
className: "text-xs text-text-secondary",
|
|
319
|
-
children:
|
|
320
|
-
}), /* @__PURE__ */
|
|
394
|
+
children: k("security.secretDetail.details.keyIdentifier", "Key Identifier")
|
|
395
|
+
}), /* @__PURE__ */ d("code", {
|
|
321
396
|
className: "text-xs font-mono bg-bg-sunken px-1.5 py-0.5 rounded block mt-1 overflow-hidden text-ellipsis whitespace-nowrap",
|
|
322
397
|
children: N.key
|
|
323
398
|
})] }),
|
|
324
|
-
/* @__PURE__ */
|
|
399
|
+
!A && /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("p", {
|
|
325
400
|
className: "text-xs text-text-secondary",
|
|
326
|
-
children:
|
|
327
|
-
}), /* @__PURE__ */
|
|
401
|
+
children: k("security.secretDetail.details.createdBy", "Created By")
|
|
402
|
+
}), /* @__PURE__ */ d("p", {
|
|
328
403
|
className: "text-sm font-medium mt-1",
|
|
329
404
|
children: N.createdBy
|
|
330
405
|
})] }),
|
|
331
|
-
/* @__PURE__ */
|
|
406
|
+
/* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("p", {
|
|
332
407
|
className: "text-xs text-text-secondary",
|
|
333
|
-
children:
|
|
334
|
-
}), /* @__PURE__ */
|
|
408
|
+
children: k("security.secretDetail.details.createdAt", "Created At")
|
|
409
|
+
}), /* @__PURE__ */ f("div", {
|
|
335
410
|
className: "flex items-center gap-1.5 text-sm mt-1",
|
|
336
|
-
children: [/* @__PURE__ */
|
|
411
|
+
children: [/* @__PURE__ */ d(Te, { className: "size-3.5" }), new Date(N.createdAt).toLocaleDateString()]
|
|
337
412
|
})] }),
|
|
338
|
-
N.lastRotatedAt && /* @__PURE__ */
|
|
413
|
+
N.lastRotatedAt && !A && /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("p", {
|
|
339
414
|
className: "text-xs text-text-secondary",
|
|
340
|
-
children:
|
|
341
|
-
}), /* @__PURE__ */
|
|
415
|
+
children: k("security.secretDetail.details.lastRotation", "Last Rotation")
|
|
416
|
+
}), /* @__PURE__ */ d("p", {
|
|
342
417
|
className: "text-sm mt-1",
|
|
343
418
|
children: new Date(N.lastRotatedAt).toLocaleString()
|
|
344
419
|
})] })
|
|
345
420
|
]
|
|
346
421
|
})]
|
|
347
|
-
}), /* @__PURE__ */
|
|
422
|
+
}), /* @__PURE__ */ f(C, {
|
|
348
423
|
treatment: "insight",
|
|
349
424
|
className: "p-6 space-y-4",
|
|
350
|
-
children: [/* @__PURE__ */
|
|
425
|
+
children: [/* @__PURE__ */ f("h3", {
|
|
351
426
|
className: "font-bold text-sm text-primary flex items-center gap-2",
|
|
352
|
-
children: [/* @__PURE__ */
|
|
353
|
-
}), /* @__PURE__ */
|
|
427
|
+
children: [/* @__PURE__ */ d(Ee, { className: "size-4" }), k("security.secretDetail.security.title", "Security")]
|
|
428
|
+
}), /* @__PURE__ */ d("p", {
|
|
354
429
|
className: "text-xs text-text-secondary leading-relaxed",
|
|
355
|
-
children:
|
|
430
|
+
children: k("security.secretDetail.security.description", "This secret is protected by 256-bit encryption. All access is logged and monitored for suspicious activity.")
|
|
356
431
|
})]
|
|
357
432
|
})]
|
|
358
433
|
})]
|
|
359
434
|
})
|
|
360
435
|
]
|
|
361
436
|
}),
|
|
362
|
-
/* @__PURE__ */
|
|
363
|
-
open:
|
|
437
|
+
/* @__PURE__ */ d(y, {
|
|
438
|
+
open: tt,
|
|
364
439
|
onOpenChange: (e) => {
|
|
365
|
-
e ||
|
|
440
|
+
e || J(!1);
|
|
366
441
|
},
|
|
367
|
-
children: /* @__PURE__ */
|
|
442
|
+
children: /* @__PURE__ */ f(b, {
|
|
368
443
|
className: "max-w-2xl border-primary/20 max-h-[80vh] flex flex-col gap-0 p-0",
|
|
369
|
-
children: [/* @__PURE__ */
|
|
444
|
+
children: [/* @__PURE__ */ d(x, {
|
|
370
445
|
className: "p-6 border-b border-border-subtle text-left",
|
|
371
|
-
children: /* @__PURE__ */
|
|
446
|
+
children: /* @__PURE__ */ f("div", {
|
|
372
447
|
className: "flex items-center gap-3",
|
|
373
|
-
children: [/* @__PURE__ */
|
|
448
|
+
children: [/* @__PURE__ */ d("div", {
|
|
374
449
|
className: "p-2 rounded-full bg-action-primary-bg/10 text-primary",
|
|
375
|
-
children: /* @__PURE__ */
|
|
376
|
-
}), /* @__PURE__ */
|
|
450
|
+
children: /* @__PURE__ */ d(m, { className: "size-5" })
|
|
451
|
+
}), /* @__PURE__ */ d(S, {
|
|
377
452
|
className: "text-xl font-bold",
|
|
378
|
-
children:
|
|
453
|
+
children: k("security.secretDetail.history.modalTitle", "Version History")
|
|
379
454
|
})]
|
|
380
455
|
})
|
|
381
|
-
}), /* @__PURE__ */
|
|
456
|
+
}), /* @__PURE__ */ d("div", {
|
|
382
457
|
className: "p-6 overflow-y-auto flex-1",
|
|
383
|
-
children:
|
|
458
|
+
children: Le ? /* @__PURE__ */ d("div", {
|
|
384
459
|
className: "flex justify-center py-8",
|
|
385
|
-
children: /* @__PURE__ */
|
|
386
|
-
}) : /* @__PURE__ */
|
|
460
|
+
children: /* @__PURE__ */ d(g, { className: "size-8 animate-spin text-primary/60" })
|
|
461
|
+
}) : /* @__PURE__ */ d("div", {
|
|
387
462
|
className: "space-y-4",
|
|
388
|
-
children:
|
|
463
|
+
children: Re.map((e) => /* @__PURE__ */ d("div", {
|
|
389
464
|
className: o("p-4 rounded-lg border", e.version === N.version ? "bg-action-primary-bg/5 border-primary/20" : "bg-bg-surface border-border-subtle"),
|
|
390
|
-
children: /* @__PURE__ */
|
|
465
|
+
children: /* @__PURE__ */ f("div", {
|
|
391
466
|
className: "flex items-center justify-between",
|
|
392
|
-
children: [/* @__PURE__ */
|
|
393
|
-
/* @__PURE__ */
|
|
467
|
+
children: [/* @__PURE__ */ f("div", { children: [
|
|
468
|
+
/* @__PURE__ */ f("div", {
|
|
394
469
|
className: "flex items-center gap-2",
|
|
395
|
-
children: [/* @__PURE__ */
|
|
470
|
+
children: [/* @__PURE__ */ d("span", {
|
|
396
471
|
className: "font-semibold",
|
|
397
|
-
children:
|
|
398
|
-
}), e.version === N.version && /* @__PURE__ */
|
|
472
|
+
children: k("security.secretDetail.history.versionLabel", "Version {{version}}", { version: e.version })
|
|
473
|
+
}), e.version === N.version && /* @__PURE__ */ d(r, {
|
|
399
474
|
variant: "success",
|
|
400
475
|
className: "text-[10px] uppercase",
|
|
401
|
-
children:
|
|
476
|
+
children: k("security.common.status.active", "Active")
|
|
402
477
|
})]
|
|
403
478
|
}),
|
|
404
|
-
/* @__PURE__ */
|
|
479
|
+
/* @__PURE__ */ d("p", {
|
|
405
480
|
className: "text-xs text-text-secondary mt-1",
|
|
406
|
-
children:
|
|
481
|
+
children: k("security.secretDetail.history.versionMeta", "{{date}} by {{createdBy}}", {
|
|
407
482
|
date: new Date(e.createdAt).toLocaleString(),
|
|
408
483
|
createdBy: e.createdBy
|
|
409
484
|
})
|
|
410
485
|
}),
|
|
411
|
-
e.changeReason && /* @__PURE__ */
|
|
486
|
+
e.changeReason && /* @__PURE__ */ d("p", {
|
|
412
487
|
className: "text-sm mt-2",
|
|
413
488
|
children: e.changeReason
|
|
414
489
|
})
|
|
415
|
-
] }), e.version !== N.version && /* @__PURE__ */
|
|
490
|
+
] }), e.version !== N.version && /* @__PURE__ */ d(fe, {
|
|
416
491
|
permission: "secret:update",
|
|
417
|
-
featureFlagKey:
|
|
492
|
+
featureFlagKey: c.SECRET_ROLLBACK,
|
|
418
493
|
featureFlagDefault: !1,
|
|
419
|
-
children: /* @__PURE__ */
|
|
494
|
+
children: /* @__PURE__ */ d(i, {
|
|
420
495
|
variant: "outline",
|
|
421
496
|
size: "sm",
|
|
422
|
-
onClick: () =>
|
|
423
|
-
disabled:
|
|
424
|
-
children:
|
|
497
|
+
onClick: () => ot(e.version),
|
|
498
|
+
disabled: Ye,
|
|
499
|
+
children: k("security.secretDetail.actions.rollback", "Rollback")
|
|
425
500
|
})
|
|
426
501
|
})]
|
|
427
502
|
})
|
|
@@ -430,86 +505,97 @@ function E() {
|
|
|
430
505
|
})]
|
|
431
506
|
})
|
|
432
507
|
}),
|
|
433
|
-
/* @__PURE__ */
|
|
434
|
-
isOpen:
|
|
435
|
-
onClose: () =>
|
|
508
|
+
/* @__PURE__ */ d(te, {
|
|
509
|
+
isOpen: Qe,
|
|
510
|
+
onClose: () => U(!1),
|
|
436
511
|
onConfirm: Z,
|
|
437
|
-
title:
|
|
438
|
-
description:
|
|
439
|
-
confirmLabel:
|
|
512
|
+
title: k("security.secretDetail.delete.title", "Delete Secret"),
|
|
513
|
+
description: k("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: N.name }),
|
|
514
|
+
confirmLabel: Ue ? k("security.secretDetail.delete.deleting", "Deleting...") : k("security.secretDetail.delete.confirm", "Delete Secret"),
|
|
440
515
|
variant: "destructive"
|
|
441
516
|
}),
|
|
442
|
-
/* @__PURE__ */
|
|
443
|
-
open:
|
|
517
|
+
/* @__PURE__ */ d(y, {
|
|
518
|
+
open: et,
|
|
444
519
|
onOpenChange: (e) => {
|
|
445
|
-
e ||
|
|
520
|
+
e || G(!1);
|
|
446
521
|
},
|
|
447
|
-
children: /* @__PURE__ */
|
|
522
|
+
children: /* @__PURE__ */ d(b, {
|
|
448
523
|
className: "max-w-md border-primary/20",
|
|
449
|
-
children: /* @__PURE__ */
|
|
524
|
+
children: /* @__PURE__ */ f("div", {
|
|
450
525
|
className: "space-y-4",
|
|
451
526
|
children: [
|
|
452
|
-
/* @__PURE__ */
|
|
527
|
+
/* @__PURE__ */ d(x, {
|
|
453
528
|
className: "text-left",
|
|
454
|
-
children: /* @__PURE__ */
|
|
529
|
+
children: /* @__PURE__ */ f("div", {
|
|
455
530
|
className: "flex items-center gap-3",
|
|
456
|
-
children: [/* @__PURE__ */
|
|
531
|
+
children: [/* @__PURE__ */ d("div", {
|
|
457
532
|
className: "p-2 rounded-full bg-action-primary-bg/10 text-primary",
|
|
458
|
-
children: /* @__PURE__ */
|
|
459
|
-
}), /* @__PURE__ */
|
|
533
|
+
children: /* @__PURE__ */ d(_, { className: "size-5" })
|
|
534
|
+
}), /* @__PURE__ */ d(S, {
|
|
460
535
|
className: "text-xl font-bold",
|
|
461
|
-
children:
|
|
536
|
+
children: k("security.secretDetail.rotate.title", "Rotate Secret")
|
|
462
537
|
})]
|
|
463
538
|
})
|
|
464
539
|
}),
|
|
465
|
-
/* @__PURE__ */
|
|
540
|
+
/* @__PURE__ */ d("p", {
|
|
466
541
|
className: "text-sm text-text-secondary",
|
|
467
|
-
children:
|
|
542
|
+
children: k("security.secretDetail.rotate.description", "Enter a new value for {{name}}. The current value will be moved to version history.", { name: N.name })
|
|
468
543
|
}),
|
|
469
|
-
/* @__PURE__ */
|
|
544
|
+
/* @__PURE__ */ f("div", {
|
|
470
545
|
className: "space-y-2",
|
|
471
|
-
children: [/* @__PURE__ */
|
|
546
|
+
children: [/* @__PURE__ */ d("label", {
|
|
472
547
|
htmlFor: "new-secret-value",
|
|
473
548
|
className: "text-sm font-medium",
|
|
474
|
-
children:
|
|
475
|
-
}), /* @__PURE__ */
|
|
549
|
+
children: k("security.secretDetail.rotate.newValue", "New Secret Value")
|
|
550
|
+
}), /* @__PURE__ */ d("textarea", {
|
|
476
551
|
id: "new-secret-value",
|
|
477
|
-
"aria-label":
|
|
478
|
-
ref:
|
|
479
|
-
value:
|
|
480
|
-
onChange: (e) =>
|
|
481
|
-
placeholder:
|
|
552
|
+
"aria-label": k("security.secretDetail.rotate.newValue", "New Secret Value"),
|
|
553
|
+
ref: K,
|
|
554
|
+
value: Y,
|
|
555
|
+
onChange: (e) => nt(e.target.value),
|
|
556
|
+
placeholder: k("security.secretDetail.rotate.placeholder", "Enter new secret value..."),
|
|
482
557
|
rows: 4,
|
|
483
558
|
className: o("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")
|
|
484
559
|
})]
|
|
485
560
|
}),
|
|
486
|
-
/* @__PURE__ */
|
|
561
|
+
L !== null && /* @__PURE__ */ f("div", {
|
|
562
|
+
role: "alert",
|
|
563
|
+
className: "space-y-2",
|
|
564
|
+
children: [/* @__PURE__ */ d("p", {
|
|
565
|
+
className: "text-sm text-status-error-text",
|
|
566
|
+
children: k("security.secretDetail.rotate.failed", "The value could not be updated. Try again.")
|
|
567
|
+
}), L && /* @__PURE__ */ d(w, {
|
|
568
|
+
copyable: !0,
|
|
569
|
+
children: L
|
|
570
|
+
})]
|
|
571
|
+
}),
|
|
572
|
+
/* @__PURE__ */ f("div", {
|
|
487
573
|
className: "flex justify-end gap-3 pt-2",
|
|
488
|
-
children: [/* @__PURE__ */
|
|
574
|
+
children: [/* @__PURE__ */ d(i, {
|
|
489
575
|
variant: "outline",
|
|
490
|
-
onClick: () =>
|
|
491
|
-
disabled:
|
|
492
|
-
children:
|
|
493
|
-
}), /* @__PURE__ */
|
|
494
|
-
onClick:
|
|
495
|
-
disabled:
|
|
496
|
-
children: [
|
|
576
|
+
onClick: () => G(!1),
|
|
577
|
+
disabled: I,
|
|
578
|
+
children: k("security.common.actions.cancel", "Cancel")
|
|
579
|
+
}), /* @__PURE__ */ f(i, {
|
|
580
|
+
onClick: at,
|
|
581
|
+
disabled: I || !Y.trim(),
|
|
582
|
+
children: [I ? /* @__PURE__ */ d(g, { className: "size-4 animate-spin" }) : /* @__PURE__ */ d(_, { className: "size-4" }), I ? k("security.secretDetail.rotate.loading", "Rotating...") : k("security.secretDetail.rotate.confirm", "Rotate Secret")]
|
|
497
583
|
})]
|
|
498
584
|
})
|
|
499
585
|
]
|
|
500
586
|
})
|
|
501
587
|
})
|
|
502
588
|
}),
|
|
503
|
-
|
|
504
|
-
isOpen:
|
|
505
|
-
onClose: () =>
|
|
506
|
-
vaultId:
|
|
507
|
-
secretId:
|
|
589
|
+
T && E && /* @__PURE__ */ d(ne, {
|
|
590
|
+
isOpen: $e,
|
|
591
|
+
onClose: () => W(!1),
|
|
592
|
+
vaultId: T,
|
|
593
|
+
secretId: E,
|
|
508
594
|
name: N.name
|
|
509
595
|
})
|
|
510
596
|
]
|
|
511
597
|
});
|
|
512
598
|
}
|
|
513
|
-
export {
|
|
599
|
+
export { T as SecretDetailPage };
|
|
514
600
|
|
|
515
601
|
//# sourceMappingURL=SecretDetailPage.js.map
|