@burdenoff/microfe-security 2026.625.1 → 2026.626.1
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/PageLayout.js +35 -18
- package/dist/security/components/PageLayout.js.map +1 -1
- package/dist/security/components/SecurityScoreCard.js +11 -10
- package/dist/security/components/SecurityScoreCard.js.map +1 -1
- package/dist/security/components/VaultCard.js +8 -1
- package/dist/security/components/VaultCard.js.map +1 -1
- package/dist/security/components/ui.js +7 -15
- package/dist/security/components/ui.js.map +1 -1
- package/dist/security/pages/AccessReviewPage.js +129 -98
- package/dist/security/pages/AccessReviewPage.js.map +1 -1
- package/dist/security/pages/AuditLogPage.js +69 -62
- package/dist/security/pages/AuditLogPage.js.map +1 -1
- package/dist/security/pages/ImportExportPage.js +23 -17
- package/dist/security/pages/ImportExportPage.js.map +1 -1
- package/dist/security/pages/ProviderDetailPage.js +193 -173
- package/dist/security/pages/ProviderDetailPage.js.map +1 -1
- package/dist/security/pages/ProvidersPage.js +59 -56
- package/dist/security/pages/ProvidersPage.js.map +1 -1
- package/dist/security/pages/SecretCreatePage.js +76 -70
- package/dist/security/pages/SecretCreatePage.js.map +1 -1
- package/dist/security/pages/SecretDetailPage.js +325 -290
- package/dist/security/pages/SecretDetailPage.js.map +1 -1
- package/dist/security/pages/SecurityDashboardPage.js +107 -68
- package/dist/security/pages/SecurityDashboardPage.js.map +1 -1
- package/dist/security/pages/SharedWithMePage.js +48 -44
- package/dist/security/pages/SharedWithMePage.js.map +1 -1
- package/dist/security/pages/VaultCreatePage.js +65 -58
- package/dist/security/pages/VaultCreatePage.js.map +1 -1
- package/dist/security/pages/VaultDetailPage.js +225 -196
- package/dist/security/pages/VaultDetailPage.js.map +1 -1
- package/dist/security/pages/VaultSettingsPage.js +224 -205
- package/dist/security/pages/VaultSettingsPage.js.map +1 -1
- package/dist/security/pages/VaultsDashboardPage.js +100 -93
- package/dist/security/pages/VaultsDashboardPage.js.map +1 -1
- package/package.json +2 -2
|
@@ -1,265 +1,294 @@
|
|
|
1
1
|
import { useSecurity as e } from "../providers/SecurityProvider.js";
|
|
2
2
|
import { SECURITY_FEATURE_FLAGS as t } from "../constants/featureFlags.js";
|
|
3
3
|
import { PageLayout as n } from "../components/PageLayout.js";
|
|
4
|
-
import { Badge as r, Button as i, Card as a
|
|
5
|
-
import { translateWithFallback as
|
|
6
|
-
import { ConfirmDialog as
|
|
7
|
-
import { useDeleteVault as
|
|
8
|
-
import { useSecurityEventEmitter as
|
|
9
|
-
import { useSecurityStore as
|
|
10
|
-
import { nativeConfirm as
|
|
11
|
-
import { SecretShareDialog as
|
|
12
|
-
import { SecretRow as
|
|
13
|
-
import { BulkActionBar as
|
|
14
|
-
import { useEffect as
|
|
15
|
-
import { useFeatureFlag as
|
|
16
|
-
import { useNavigate as
|
|
17
|
-
import { Fragment as
|
|
18
|
-
import { AlertTriangle as
|
|
19
|
-
import { CTAOverflowMenu as
|
|
20
|
-
import { useI18n as
|
|
4
|
+
import { Badge as r, Button as i, Card as a } from "../components/ui.js";
|
|
5
|
+
import { translateWithFallback as ee } from "../utils/i18n.js";
|
|
6
|
+
import { ConfirmDialog as te } from "../components/ConfirmDialog.js";
|
|
7
|
+
import { useDeleteVault as o, useGetVaultWithSecrets as s, useLockVault as c, useUnlockVault as ne } from "../hooks/useVaultQueries.js";
|
|
8
|
+
import { useSecurityEventEmitter as re } from "../hooks/useSecurityEventEmitter.js";
|
|
9
|
+
import { useSecurityStore as l } from "../store/securityStore.js";
|
|
10
|
+
import { nativeConfirm as ie, nativeImpact as ae, nativeNotify as u } from "../../utils/nativeBridge.js";
|
|
11
|
+
import { SecretShareDialog as oe } from "../components/SecretShareDialog.js";
|
|
12
|
+
import { SecretRow as se } from "../components/SecretRow.js";
|
|
13
|
+
import { BulkActionBar as ce } from "../components/BulkActionBar.js";
|
|
14
|
+
import { useEffect as le, useMemo as d, useState as f } from "react";
|
|
15
|
+
import { useFeatureFlag as p, usePermission as m } from "@burdenoff/fe-libs/shared/providers/shell";
|
|
16
|
+
import { useNavigate as ue, useParams as de } from "react-router-dom";
|
|
17
|
+
import { Fragment as h, jsx as g, jsxs as _ } from "react/jsx-runtime";
|
|
18
|
+
import { AlertTriangle as fe, ChevronLeft as pe, Loader2 as v, Lock as y, Plus as b, RefreshCw as me, Settings as x, Share2 as S, Trash2 as he, Unlock as C } from "lucide-react";
|
|
19
|
+
import { CTAOverflowMenu as ge, EmphasisPanel as _e, IllustratedEmptyState as ve, NextSteps as ye, PagePurpose as be } from "@burdenoff/fe-libs/ui";
|
|
20
|
+
import { useI18n as xe } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
21
21
|
//#region src/security/pages/VaultDetailPage.tsx
|
|
22
|
-
var
|
|
23
|
-
function
|
|
24
|
-
let { vaultId:
|
|
25
|
-
|
|
26
|
-
let [
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
}, [
|
|
30
|
-
let { data:
|
|
31
|
-
|
|
32
|
-
},
|
|
33
|
-
|
|
34
|
-
},
|
|
35
|
-
if (
|
|
36
|
-
|
|
22
|
+
var w = 100;
|
|
23
|
+
function T() {
|
|
24
|
+
let { vaultId: T } = de(), { basePath: E = "/", navigate: D } = e(), { t: O } = xe(), k = ue(), A = l((e) => e.selectedSecretIds), j = l((e) => e.toggleSecretSelection);
|
|
25
|
+
l((e) => e.secretFilter), l((e) => e.updateSecretFilter);
|
|
26
|
+
let [M, N] = f(w), P = d(() => ({}), []);
|
|
27
|
+
le(() => {
|
|
28
|
+
N(w);
|
|
29
|
+
}, [T, P]);
|
|
30
|
+
let { data: F, loading: I, error: L, refetch: R } = s(T ?? null, P, { limit: M }), z = F?.getVault, B = F?.getSecrets?.items ?? [], V = F?.getSecrets?.total ?? 0, Se = F?.getSecrets?.hasMore ?? !1, [Ce, { loading: we }] = c(), [Te, { loading: Ee }] = ne(), [De, { loading: Oe }] = o(), { emit: H } = re(), ke = m("vault:lock"), Ae = m("vault:delete"), U = m("secret:create"), W = m("vault:update"), je = p(t.VAULT_DELETE, !1), Me = p(t.VAULT_LOCK, !0), [Ne, G] = f(!1), [Pe, K] = f(!1), q = (e, t, n) => ee(O, e, t, n), J = (e) => {
|
|
31
|
+
D ? D(e) : k(e);
|
|
32
|
+
}, Y = () => {
|
|
33
|
+
J(E);
|
|
34
|
+
}, Fe = async () => {
|
|
35
|
+
if (T) try {
|
|
36
|
+
z?.status === "LOCKED" ? (await Te({ variables: { id: T } }), H("vault.unlocked", { vaultId: T })) : (await Ce({ variables: { id: T } }), H("vault.locked", { vaultId: T })), R();
|
|
37
37
|
} catch (e) {
|
|
38
38
|
console.error("Failed to toggle lock:", e);
|
|
39
39
|
}
|
|
40
|
+
}, X = () => {
|
|
41
|
+
J(`${E}/vaults/${T}/secrets/new`);
|
|
42
|
+
}, Ie = (e) => {
|
|
43
|
+
J(`${E}/vaults/${T}/secrets/${e}`);
|
|
40
44
|
}, Z = () => {
|
|
41
|
-
|
|
42
|
-
}, Ne = (e) => {
|
|
43
|
-
X(`${A}/vaults/${k}/secrets/${e}`);
|
|
44
|
-
}, Pe = () => {
|
|
45
|
-
X(`${A}/vaults/${k}/settings`);
|
|
45
|
+
J(`${E}/vaults/${T}/settings`);
|
|
46
46
|
}, Q = async () => {
|
|
47
|
-
if (
|
|
48
|
-
await
|
|
47
|
+
if (T) try {
|
|
48
|
+
await De({ variables: { id: T } }), H("vault.deleted", { vaultId: T }), G(!1), u("success"), J(E);
|
|
49
49
|
} catch (e) {
|
|
50
|
-
console.error("Failed to delete vault:", e),
|
|
50
|
+
console.error("Failed to delete vault:", e), u("error");
|
|
51
51
|
}
|
|
52
|
-
},
|
|
53
|
-
|
|
54
|
-
let e = await
|
|
52
|
+
}, Le = async () => {
|
|
53
|
+
ae("medium");
|
|
54
|
+
let e = await ie({
|
|
55
55
|
title: "Delete Vault",
|
|
56
56
|
message: "Delete this vault? This cannot be undone.",
|
|
57
57
|
okButtonTitle: "Delete",
|
|
58
58
|
cancelButtonTitle: "Cancel"
|
|
59
59
|
});
|
|
60
60
|
if (e === null) {
|
|
61
|
-
|
|
61
|
+
G(!0);
|
|
62
62
|
return;
|
|
63
63
|
}
|
|
64
64
|
e && await Q();
|
|
65
65
|
};
|
|
66
|
-
if (
|
|
67
|
-
title:
|
|
66
|
+
if (I && !F) return /* @__PURE__ */ g(n, {
|
|
67
|
+
title: q("security.vaultDetail.loading.title", "Loading Vault..."),
|
|
68
68
|
breadcrumbs: [{
|
|
69
|
-
label:
|
|
70
|
-
path:
|
|
71
|
-
}, { label:
|
|
72
|
-
children: /* @__PURE__ */
|
|
69
|
+
label: q("security.common.breadcrumbs.security", "Security"),
|
|
70
|
+
path: E
|
|
71
|
+
}, { label: q("security.common.breadcrumbs.vault", "Vault") }],
|
|
72
|
+
children: /* @__PURE__ */ g("div", {
|
|
73
73
|
className: "flex items-center justify-center py-20",
|
|
74
|
-
children: /* @__PURE__ */
|
|
74
|
+
children: /* @__PURE__ */ g(v, { className: "size-10 animate-spin text-primary/60" })
|
|
75
75
|
})
|
|
76
76
|
});
|
|
77
|
-
if (
|
|
78
|
-
title:
|
|
77
|
+
if (L && !F) return /* @__PURE__ */ g(n, {
|
|
78
|
+
title: q("security.common.errorPage.title", "Error"),
|
|
79
79
|
breadcrumbs: [{
|
|
80
|
-
label:
|
|
81
|
-
path:
|
|
82
|
-
}, { label:
|
|
83
|
-
children: /* @__PURE__ */
|
|
80
|
+
label: q("security.common.breadcrumbs.security", "Security"),
|
|
81
|
+
path: E
|
|
82
|
+
}, { label: q("security.common.breadcrumbs.vault", "Vault") }],
|
|
83
|
+
children: /* @__PURE__ */ g(a, {
|
|
84
84
|
className: "p-8 text-center max-w-lg mx-auto mt-10",
|
|
85
|
-
children: /* @__PURE__ */
|
|
85
|
+
children: /* @__PURE__ */ _("div", {
|
|
86
86
|
className: "flex flex-col items-center gap-4",
|
|
87
87
|
children: [
|
|
88
|
-
/* @__PURE__ */
|
|
88
|
+
/* @__PURE__ */ g("div", {
|
|
89
89
|
className: "p-3 rounded-full bg-status-error-bg/10",
|
|
90
|
-
children: /* @__PURE__ */
|
|
90
|
+
children: /* @__PURE__ */ g(fe, { className: "size-8 text-status-error-text" })
|
|
91
91
|
}),
|
|
92
|
-
/* @__PURE__ */
|
|
92
|
+
/* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("h3", {
|
|
93
93
|
className: "text-lg font-bold text-text-primary",
|
|
94
|
-
children:
|
|
95
|
-
}), /* @__PURE__ */
|
|
94
|
+
children: q("security.vaultDetail.error.title", "Failed to load vault")
|
|
95
|
+
}), /* @__PURE__ */ g("p", {
|
|
96
96
|
className: "text-sm text-text-secondary mt-2",
|
|
97
|
-
children:
|
|
97
|
+
children: L.message
|
|
98
98
|
})] }),
|
|
99
|
-
/* @__PURE__ */
|
|
99
|
+
/* @__PURE__ */ _("div", {
|
|
100
100
|
className: "flex gap-3 mt-4",
|
|
101
|
-
children: [/* @__PURE__ */
|
|
101
|
+
children: [/* @__PURE__ */ _(i, {
|
|
102
102
|
variant: "outline",
|
|
103
|
-
onClick:
|
|
104
|
-
children: [/* @__PURE__ */
|
|
105
|
-
}), /* @__PURE__ */
|
|
106
|
-
onClick: () =>
|
|
107
|
-
children: [/* @__PURE__ */
|
|
103
|
+
onClick: Y,
|
|
104
|
+
children: [/* @__PURE__ */ g(pe, { className: "size-4" }), q("security.common.actions.goBack", "Go Back")]
|
|
105
|
+
}), /* @__PURE__ */ _(i, {
|
|
106
|
+
onClick: () => R(),
|
|
107
|
+
children: [/* @__PURE__ */ g(me, { className: "size-4" }), q("security.common.actions.tryAgain", "Try Again")]
|
|
108
108
|
})]
|
|
109
109
|
})
|
|
110
110
|
]
|
|
111
111
|
})
|
|
112
112
|
})
|
|
113
113
|
});
|
|
114
|
-
let $ =
|
|
115
|
-
return /* @__PURE__ */
|
|
116
|
-
title:
|
|
117
|
-
description:
|
|
114
|
+
let $ = z?.status === "LOCKED";
|
|
115
|
+
return /* @__PURE__ */ _(n, {
|
|
116
|
+
title: z?.name ?? q("security.common.breadcrumbs.vault", "Vault"),
|
|
117
|
+
description: z?.description ?? q("security.vaultDetail.description", "Manage credentials in this vault."),
|
|
118
118
|
breadcrumbs: [{
|
|
119
|
-
label:
|
|
120
|
-
path:
|
|
121
|
-
}, { label:
|
|
119
|
+
label: q("security.common.breadcrumbs.security", "Security"),
|
|
120
|
+
path: E
|
|
121
|
+
}, { label: z?.name ?? q("security.common.breadcrumbs.vault", "Vault") }],
|
|
122
122
|
actions: (() => {
|
|
123
123
|
let e = [];
|
|
124
|
-
return
|
|
125
|
-
label: $ ?
|
|
126
|
-
icon:
|
|
127
|
-
disabled:
|
|
128
|
-
onSelect: () => void
|
|
129
|
-
}),
|
|
130
|
-
label:
|
|
131
|
-
icon: /* @__PURE__ */
|
|
132
|
-
onSelect: () =>
|
|
124
|
+
return ke && Me && e.push({
|
|
125
|
+
label: $ ? q("security.vaultDetail.actions.unlockVault", "Unlock Vault") : q("security.vaultDetail.actions.lockVault", "Lock Vault"),
|
|
126
|
+
icon: g($ ? C : y, { className: "size-4" }),
|
|
127
|
+
disabled: we || Ee,
|
|
128
|
+
onSelect: () => void Fe()
|
|
129
|
+
}), W && (e.push({
|
|
130
|
+
label: q("security.common.actions.share", "Share"),
|
|
131
|
+
icon: /* @__PURE__ */ g(S, { className: "size-4" }),
|
|
132
|
+
onSelect: () => K(!0)
|
|
133
133
|
}), e.push({
|
|
134
|
-
label:
|
|
135
|
-
icon: /* @__PURE__ */
|
|
136
|
-
onSelect:
|
|
137
|
-
})),
|
|
138
|
-
label:
|
|
139
|
-
icon: /* @__PURE__ */
|
|
134
|
+
label: q("security.common.actions.settings", "Settings"),
|
|
135
|
+
icon: /* @__PURE__ */ g(x, { className: "size-4" }),
|
|
136
|
+
onSelect: Z
|
|
137
|
+
})), Ae && je && e.push({
|
|
138
|
+
label: q("security.common.actions.delete", "Delete"),
|
|
139
|
+
icon: /* @__PURE__ */ g(he, { className: "size-4" }),
|
|
140
140
|
intent: "destructive",
|
|
141
|
-
disabled:
|
|
142
|
-
onSelect: () => void
|
|
143
|
-
}), /* @__PURE__ */
|
|
144
|
-
primary:
|
|
145
|
-
label:
|
|
146
|
-
icon: /* @__PURE__ */ b
|
|
141
|
+
disabled: Oe,
|
|
142
|
+
onSelect: () => void Le()
|
|
143
|
+
}), /* @__PURE__ */ g(ge, {
|
|
144
|
+
primary: U ? {
|
|
145
|
+
label: q("security.vaultDetail.actions.addSecret", "Add Secret"),
|
|
146
|
+
icon: /* @__PURE__ */ g(b, { className: "size-4" }),
|
|
147
147
|
disabled: $,
|
|
148
|
-
onSelect:
|
|
148
|
+
onSelect: X
|
|
149
149
|
} : void 0,
|
|
150
150
|
actions: e
|
|
151
151
|
});
|
|
152
152
|
})(),
|
|
153
153
|
children: [
|
|
154
|
-
/* @__PURE__ */
|
|
154
|
+
/* @__PURE__ */ _("div", {
|
|
155
155
|
className: "space-y-6",
|
|
156
|
-
children: [
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
/* @__PURE__ */
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
156
|
+
children: [
|
|
157
|
+
/* @__PURE__ */ g(be, {
|
|
158
|
+
icon: /* @__PURE__ */ g(C, { className: "size-4" }),
|
|
159
|
+
children: q("security.vaultDetail.purpose", "This is one vault — a secure home for a related set of secrets. From here you can add new credentials, reveal and copy values on demand, share the vault with teammates, and lock it to instantly cut off access. Locking a vault hides every secret inside until it is unlocked again.")
|
|
160
|
+
}),
|
|
161
|
+
/* @__PURE__ */ g(_e, { children: /* @__PURE__ */ _("div", {
|
|
162
|
+
className: "flex flex-wrap items-center gap-3",
|
|
163
|
+
children: [
|
|
164
|
+
/* @__PURE__ */ g(r, {
|
|
165
|
+
variant: $ ? "warning" : "success",
|
|
166
|
+
className: "px-3 py-1 text-sm font-semibold",
|
|
167
|
+
children: $ ? /* @__PURE__ */ _(h, { children: [
|
|
168
|
+
/* @__PURE__ */ g(y, { className: "size-3.5 mr-1.5" }),
|
|
169
|
+
" ",
|
|
170
|
+
q("security.common.status.locked", "Locked")
|
|
171
|
+
] }) : /* @__PURE__ */ _(h, { children: [
|
|
172
|
+
/* @__PURE__ */ g(C, { className: "size-3.5 mr-1.5" }),
|
|
173
|
+
" ",
|
|
174
|
+
q("security.common.status.active", "Active")
|
|
175
|
+
] })
|
|
176
|
+
}),
|
|
177
|
+
/* @__PURE__ */ g(r, {
|
|
178
|
+
variant: "outline",
|
|
179
|
+
className: "px-3 py-1 text-sm bg-bg-surface/50",
|
|
180
|
+
children: q("security.vaultDetail.stats.secrets", "{count} secret{suffix}", {
|
|
181
|
+
count: V,
|
|
182
|
+
suffix: V === 1 ? "" : "s"
|
|
183
|
+
})
|
|
184
|
+
}),
|
|
185
|
+
z?.lastRotatedAt && /* @__PURE__ */ g(r, {
|
|
186
|
+
variant: "outline",
|
|
187
|
+
className: "px-3 py-1 text-sm bg-bg-surface/50 text-text-secondary",
|
|
188
|
+
children: q("security.vaultDetail.stats.lastRotated", "Last rotated: {date}", { date: new Date(z.lastRotatedAt).toLocaleDateString() })
|
|
178
189
|
})
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
190
|
+
]
|
|
191
|
+
}) }),
|
|
192
|
+
(U || W) && /* @__PURE__ */ g(ye, {
|
|
193
|
+
storageKey: "security-vault-detail",
|
|
194
|
+
steps: [...U ? [{
|
|
195
|
+
id: "add-secret",
|
|
196
|
+
label: q("security.vaultDetail.next.addSecret", "Add a secret"),
|
|
197
|
+
description: q("security.vaultDetail.next.addSecretDesc", "Store an API key, password or token in this vault."),
|
|
198
|
+
icon: /* @__PURE__ */ g(b, { className: "size-4" }),
|
|
199
|
+
onClick: $ ? void 0 : X,
|
|
200
|
+
done: V > 0
|
|
201
|
+
}] : [], ...W ? [{
|
|
202
|
+
id: "share-vault",
|
|
203
|
+
label: q("security.vaultDetail.next.share", "Share this vault"),
|
|
204
|
+
description: q("security.vaultDetail.next.shareDesc", "Give teammates access at the right role."),
|
|
205
|
+
icon: /* @__PURE__ */ g(S, { className: "size-4" }),
|
|
206
|
+
onClick: () => K(!0)
|
|
207
|
+
}, {
|
|
208
|
+
id: "settings",
|
|
209
|
+
label: q("security.vaultDetail.next.settings", "Configure settings"),
|
|
210
|
+
description: q("security.vaultDetail.next.settingsDesc", "Set the auto-lock timeout and manage members."),
|
|
211
|
+
icon: /* @__PURE__ */ g(x, { className: "size-4" }),
|
|
212
|
+
onClick: Z
|
|
213
|
+
}] : []]
|
|
214
|
+
}),
|
|
215
|
+
/* @__PURE__ */ _("div", {
|
|
192
216
|
className: "space-y-4",
|
|
193
|
-
children: [/* @__PURE__ */
|
|
194
|
-
className: "
|
|
195
|
-
children: /* @__PURE__ */
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
217
|
+
children: [A.length > 0 && /* @__PURE__ */ g("div", {
|
|
218
|
+
className: "animate-in fade-in slide-in-from-top-2 duration-200",
|
|
219
|
+
children: /* @__PURE__ */ g(ce, { vaultId: T ?? "" })
|
|
220
|
+
}), B.length > 0 ? /* @__PURE__ */ _("div", {
|
|
221
|
+
className: "space-y-4",
|
|
222
|
+
children: [/* @__PURE__ */ g(a, {
|
|
223
|
+
className: "overflow-hidden border-border-subtle/60",
|
|
224
|
+
children: /* @__PURE__ */ g("div", {
|
|
225
|
+
className: "divide-y divide-border/40",
|
|
226
|
+
children: B.map((e) => /* @__PURE__ */ g(se, {
|
|
227
|
+
secret: {
|
|
228
|
+
id: e.id,
|
|
229
|
+
vaultId: e.vaultId,
|
|
230
|
+
name: e.name,
|
|
231
|
+
key: e.key,
|
|
232
|
+
description: e.description || void 0,
|
|
233
|
+
type: e.type ?? "TEXT",
|
|
234
|
+
tags: e.tags ?? [],
|
|
235
|
+
labels: e.labels ?? [],
|
|
236
|
+
metadata: e.metadata ?? {},
|
|
237
|
+
version: e.version ?? 1,
|
|
238
|
+
versionCount: e.versionCount ?? 1,
|
|
239
|
+
status: e.status ?? "ACTIVE",
|
|
240
|
+
createdBy: e.createdBy ?? "",
|
|
241
|
+
createdAt: e.createdAt ?? "",
|
|
242
|
+
updatedAt: e.updatedAt ?? ""
|
|
243
|
+
},
|
|
244
|
+
isSelected: A.includes(e.id),
|
|
245
|
+
onSelect: j,
|
|
246
|
+
onClick: () => Ie(e.id)
|
|
247
|
+
}, e.id))
|
|
248
|
+
})
|
|
249
|
+
}), Se && B.length < V && /* @__PURE__ */ g("div", {
|
|
250
|
+
className: "flex justify-center",
|
|
251
|
+
children: /* @__PURE__ */ _(i, {
|
|
252
|
+
variant: "outline",
|
|
253
|
+
onClick: () => N((e) => e + w),
|
|
254
|
+
disabled: I,
|
|
255
|
+
children: [I && /* @__PURE__ */ g(v, { className: "size-4 animate-spin" }), q("security.vaultDetail.actions.loadMoreSecrets", "Load more secrets")]
|
|
256
|
+
})
|
|
257
|
+
})]
|
|
258
|
+
}) : /* @__PURE__ */ g(ve, {
|
|
259
|
+
illustration: "empty-files",
|
|
260
|
+
title: q("security.vaultDetail.empty.title", "This vault is empty"),
|
|
261
|
+
description: q("security.vaultDetail.empty.description", "Get started by adding your first secret to keep it secure."),
|
|
262
|
+
action: /* @__PURE__ */ _(i, {
|
|
263
|
+
onClick: X,
|
|
264
|
+
disabled: $,
|
|
265
|
+
size: "lg",
|
|
266
|
+
className: "mt-2",
|
|
267
|
+
children: [/* @__PURE__ */ g(b, { className: "size-4" }), q("security.vaultDetail.empty.action", "Add First Secret")]
|
|
227
268
|
})
|
|
228
269
|
})]
|
|
229
|
-
})
|
|
230
|
-
|
|
231
|
-
title: Y("security.vaultDetail.empty.title", "This vault is empty"),
|
|
232
|
-
description: Y("security.vaultDetail.empty.description", "Get started by adding your first secret to keep it secure."),
|
|
233
|
-
action: /* @__PURE__ */ x(i, {
|
|
234
|
-
onClick: Z,
|
|
235
|
-
disabled: $,
|
|
236
|
-
size: "lg",
|
|
237
|
-
className: "mt-2",
|
|
238
|
-
children: [/* @__PURE__ */ b(w, { className: "size-4" }), Y("security.vaultDetail.empty.action", "Add First Secret")]
|
|
239
|
-
}),
|
|
240
|
-
className: "py-20"
|
|
241
|
-
})]
|
|
242
|
-
})]
|
|
270
|
+
})
|
|
271
|
+
]
|
|
243
272
|
}),
|
|
244
|
-
/* @__PURE__ */
|
|
245
|
-
isOpen:
|
|
246
|
-
onClose: () =>
|
|
273
|
+
/* @__PURE__ */ g(te, {
|
|
274
|
+
isOpen: Ne,
|
|
275
|
+
onClose: () => G(!1),
|
|
247
276
|
onConfirm: Q,
|
|
248
|
-
title:
|
|
249
|
-
description:
|
|
250
|
-
confirmLabel:
|
|
277
|
+
title: q("security.vaultDetail.delete.title", "Delete Vault"),
|
|
278
|
+
description: q("security.vaultDetail.delete.description", "Are you sure you want to delete \"{name}\"? All secrets within this vault will also be deleted. This action cannot be undone.", { name: z?.name ?? q("security.vaultDetail.delete.thisVault", "this vault") }),
|
|
279
|
+
confirmLabel: q("security.vaultDetail.delete.confirm", "Delete Vault"),
|
|
251
280
|
variant: "destructive"
|
|
252
281
|
}),
|
|
253
|
-
|
|
254
|
-
isOpen:
|
|
255
|
-
onClose: () =>
|
|
256
|
-
vaultId:
|
|
257
|
-
name:
|
|
282
|
+
T && /* @__PURE__ */ g(oe, {
|
|
283
|
+
isOpen: Pe,
|
|
284
|
+
onClose: () => K(!1),
|
|
285
|
+
vaultId: T,
|
|
286
|
+
name: z?.name ?? q("security.common.breadcrumbs.vault", "Vault")
|
|
258
287
|
})
|
|
259
288
|
]
|
|
260
289
|
});
|
|
261
290
|
}
|
|
262
291
|
//#endregion
|
|
263
|
-
export {
|
|
292
|
+
export { T as VaultDetailPage };
|
|
264
293
|
|
|
265
294
|
//# sourceMappingURL=VaultDetailPage.js.map
|