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