@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,386 +1,405 @@
|
|
|
1
1
|
import { useSecurity as e } from "../providers/SecurityProvider.js";
|
|
2
2
|
import { cn as t } from "../utils/cn.js";
|
|
3
3
|
import { PageLayout as n } from "../components/PageLayout.js";
|
|
4
|
-
import { Badge as r, Button as i, Card as a, Input as
|
|
5
|
-
import { translateWithFallback as
|
|
6
|
-
import { ConfirmDialog as
|
|
7
|
-
import { useDeleteVault as
|
|
8
|
-
import { useSecurityEventEmitter as
|
|
9
|
-
import { getVaultRoleInfo as
|
|
10
|
-
import { nativeConfirm as
|
|
11
|
-
import { SecurityPermissionGuard as
|
|
12
|
-
import { VaultShareDialog as
|
|
13
|
-
import { useEffect as
|
|
14
|
-
import { usePermission as
|
|
15
|
-
import { useNavigate as
|
|
16
|
-
import { jsx as
|
|
17
|
-
import { AlertTriangle as
|
|
18
|
-
import {
|
|
4
|
+
import { Badge as r, Button as i, Card as a, Input as ee } from "../components/ui.js";
|
|
5
|
+
import { translateWithFallback as te } from "../utils/i18n.js";
|
|
6
|
+
import { ConfirmDialog as o } from "../components/ConfirmDialog.js";
|
|
7
|
+
import { useDeleteVault as s, useGetVault as ne, useShareVault as c, useUnshareVault as l, useUpdateVault as u, useUpdateVaultMemberRole as re } from "../hooks/useVaultQueries.js";
|
|
8
|
+
import { useSecurityEventEmitter as ie } from "../hooks/useSecurityEventEmitter.js";
|
|
9
|
+
import { getVaultRoleInfo as ae } from "../constants/permissions.js";
|
|
10
|
+
import { nativeConfirm as oe, nativeImpact as se, nativeNotify as d } from "../../utils/nativeBridge.js";
|
|
11
|
+
import { SecurityPermissionGuard as f } from "../components/SecurityPermissionGuard.js";
|
|
12
|
+
import { VaultShareDialog as ce } from "../components/VaultShareDialog.js";
|
|
13
|
+
import { useEffect as p, useState as m } from "react";
|
|
14
|
+
import { usePermission as h } from "@burdenoff/fe-libs/shared/providers/shell";
|
|
15
|
+
import { useNavigate as le, useParams as ue } from "react-router-dom";
|
|
16
|
+
import { jsx as g, jsxs as _ } from "react/jsx-runtime";
|
|
17
|
+
import { AlertTriangle as v, Loader2 as y, Save as de, Shield as b, Trash2 as fe, UserPlus as x, Users as S, X as pe } from "lucide-react";
|
|
18
|
+
import { GlassCard as me, IllustratedEmptyState as C, NextSteps as w, PagePurpose as T } from "@burdenoff/fe-libs/ui";
|
|
19
|
+
import { useI18n as E } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
19
20
|
//#region src/security/pages/VaultSettingsPage.tsx
|
|
20
|
-
function
|
|
21
|
-
let { vaultId:
|
|
22
|
-
|
|
23
|
-
let
|
|
24
|
-
|
|
25
|
-
let [
|
|
21
|
+
function D() {
|
|
22
|
+
let { vaultId: D } = ue(), { basePath: O = "/", navigate: k } = e(), { t: A } = E(), j = le(), { data: M, loading: N, refetch: P } = ne(D ?? null), F = M?.getVault, [I, { loading: L }] = u(), [R, { loading: z }] = s(), [he, { loading: ge }] = c(), [_e, { loading: ve }] = l(), [ye, { loading: be }] = re(), { emit: B } = ie(), V = h("vault:update");
|
|
23
|
+
h("vault:delete");
|
|
24
|
+
let H = h("member:add"), xe = h("member:remove");
|
|
25
|
+
h("member:update_role");
|
|
26
|
+
let [Se, U] = m({
|
|
26
27
|
name: "",
|
|
27
28
|
description: "",
|
|
28
29
|
lockAfterMinutes: 30
|
|
29
|
-
}), { name:
|
|
30
|
+
}), { name: W, description: G, lockAfterMinutes: K } = Se, Ce = (e) => U((t) => ({
|
|
30
31
|
...t,
|
|
31
32
|
name: e
|
|
32
|
-
})),
|
|
33
|
+
})), we = (e) => U((t) => ({
|
|
33
34
|
...t,
|
|
34
35
|
description: e
|
|
35
|
-
})),
|
|
36
|
+
})), Te = (e) => U((t) => ({
|
|
36
37
|
...t,
|
|
37
38
|
lockAfterMinutes: e
|
|
38
|
-
})), [
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
name:
|
|
42
|
-
description:
|
|
43
|
-
lockAfterMinutes:
|
|
39
|
+
})), [Ee, q] = m(!1), [De, J] = m(!1), [Y, X] = m(null), Z = (e, t, n) => te(A, e, t, n);
|
|
40
|
+
p(() => {
|
|
41
|
+
F && U({
|
|
42
|
+
name: F.name ?? "",
|
|
43
|
+
description: F.description ?? "",
|
|
44
|
+
lockAfterMinutes: F.lockAfterMinutes ?? 30
|
|
44
45
|
});
|
|
45
|
-
}, [
|
|
46
|
-
let
|
|
47
|
-
|
|
48
|
-
},
|
|
49
|
-
if (
|
|
50
|
-
|
|
46
|
+
}, [F]);
|
|
47
|
+
let Oe = (e) => {
|
|
48
|
+
k ? k(e) : j(e);
|
|
49
|
+
}, ke = async () => {
|
|
50
|
+
if (D) {
|
|
51
|
+
X(null);
|
|
51
52
|
try {
|
|
52
|
-
await
|
|
53
|
-
id:
|
|
53
|
+
await I({ variables: {
|
|
54
|
+
id: D,
|
|
54
55
|
input: {
|
|
55
|
-
name:
|
|
56
|
-
description:
|
|
57
|
-
lockAfterMinutes:
|
|
56
|
+
name: W,
|
|
57
|
+
description: G,
|
|
58
|
+
lockAfterMinutes: K
|
|
58
59
|
}
|
|
59
|
-
} }), B("vault.updated", { vaultId:
|
|
60
|
+
} }), B("vault.updated", { vaultId: D });
|
|
60
61
|
} catch (e) {
|
|
61
|
-
|
|
62
|
+
X(e instanceof Error ? e.message : Z("security.vaultSettings.error.updateVault", "Failed to update vault"));
|
|
62
63
|
}
|
|
63
64
|
}
|
|
64
|
-
},
|
|
65
|
-
if (
|
|
66
|
-
await
|
|
65
|
+
}, Q = async () => {
|
|
66
|
+
if (D) try {
|
|
67
|
+
await R({ variables: { id: D } }), B("vault.deleted", { vaultId: D }), d("success"), Oe(O);
|
|
67
68
|
} catch (e) {
|
|
68
|
-
|
|
69
|
+
X(e instanceof Error ? e.message : Z("security.vaultSettings.error.deleteVault", "Failed to delete vault")), d("error");
|
|
69
70
|
}
|
|
70
|
-
},
|
|
71
|
-
|
|
72
|
-
let e = await
|
|
73
|
-
title:
|
|
74
|
-
message:
|
|
75
|
-
okButtonTitle:
|
|
76
|
-
cancelButtonTitle:
|
|
71
|
+
}, Ae = async () => {
|
|
72
|
+
se("medium");
|
|
73
|
+
let e = await oe({
|
|
74
|
+
title: Z("security.vaultSettings.deleteVault.title", "Delete Vault"),
|
|
75
|
+
message: Z("security.vaultSettings.deleteVault.message", "Delete this vault? This cannot be undone."),
|
|
76
|
+
okButtonTitle: Z("security.vaultSettings.deleteVault.confirm", "Delete"),
|
|
77
|
+
cancelButtonTitle: Z("security.vaultSettings.deleteVault.cancel", "Cancel")
|
|
77
78
|
});
|
|
78
79
|
if (e === null) {
|
|
79
|
-
|
|
80
|
+
J(!0);
|
|
80
81
|
return;
|
|
81
82
|
}
|
|
82
|
-
e && await
|
|
83
|
-
},
|
|
84
|
-
if (
|
|
85
|
-
|
|
83
|
+
e && await Q();
|
|
84
|
+
}, je = async (e, t) => {
|
|
85
|
+
if (D) {
|
|
86
|
+
X(null);
|
|
86
87
|
try {
|
|
87
|
-
let n = await
|
|
88
|
-
vaultId:
|
|
88
|
+
let n = await he({ variables: { input: {
|
|
89
|
+
vaultId: D,
|
|
89
90
|
actorId: e,
|
|
90
91
|
actorType: "user",
|
|
91
92
|
role: t.toUpperCase()
|
|
92
93
|
} } });
|
|
93
94
|
n.data?.shareVault?.id && B("member.added", {
|
|
94
|
-
vaultId:
|
|
95
|
+
vaultId: D,
|
|
95
96
|
memberId: n.data.shareVault.id,
|
|
96
97
|
role: t
|
|
97
|
-
}),
|
|
98
|
+
}), q(!1), P();
|
|
98
99
|
} catch (e) {
|
|
99
|
-
|
|
100
|
+
X(e instanceof Error ? e.message : Z("security.vaultSettings.error.shareVault", "Failed to share vault"));
|
|
100
101
|
}
|
|
101
102
|
}
|
|
102
|
-
},
|
|
103
|
-
if (
|
|
104
|
-
await
|
|
105
|
-
vaultId:
|
|
103
|
+
}, Me = async (e, t) => {
|
|
104
|
+
if (D) try {
|
|
105
|
+
await _e({ variables: {
|
|
106
|
+
vaultId: D,
|
|
106
107
|
actorId: e,
|
|
107
108
|
actorType: t
|
|
108
109
|
} }), B("member.removed", {
|
|
109
|
-
vaultId:
|
|
110
|
+
vaultId: D,
|
|
110
111
|
memberId: e
|
|
111
|
-
}),
|
|
112
|
+
}), P();
|
|
112
113
|
} catch (e) {
|
|
113
|
-
|
|
114
|
+
X(e instanceof Error ? e.message : Z("security.vaultSettings.error.removeMember", "Failed to remove member"));
|
|
114
115
|
}
|
|
115
|
-
}, $ =
|
|
116
|
-
return
|
|
117
|
-
title:
|
|
116
|
+
}, $ = F?.membersList?.items ?? [];
|
|
117
|
+
return N && !F ? /* @__PURE__ */ g(n, {
|
|
118
|
+
title: Z("security.vaultSettings.title", "Vault Settings"),
|
|
118
119
|
breadcrumbs: [
|
|
119
120
|
{
|
|
120
|
-
label:
|
|
121
|
-
path:
|
|
121
|
+
label: Z("security.common.breadcrumbs.security", "Security"),
|
|
122
|
+
path: O
|
|
122
123
|
},
|
|
123
124
|
{
|
|
124
|
-
label:
|
|
125
|
-
path: `${
|
|
125
|
+
label: Z("security.common.breadcrumbs.vault", "Vault"),
|
|
126
|
+
path: `${O}/vaults/${D}`
|
|
126
127
|
},
|
|
127
|
-
{ label:
|
|
128
|
+
{ label: Z("security.common.actions.settings", "Settings") }
|
|
128
129
|
],
|
|
129
|
-
children: /* @__PURE__ */
|
|
130
|
+
children: /* @__PURE__ */ g("div", {
|
|
130
131
|
className: "flex items-center justify-center py-20",
|
|
131
|
-
children: /* @__PURE__ */
|
|
132
|
+
children: /* @__PURE__ */ g(y, { className: "size-10 animate-spin text-primary/60" })
|
|
132
133
|
})
|
|
133
|
-
}) : /* @__PURE__ */
|
|
134
|
-
title:
|
|
135
|
-
description:
|
|
134
|
+
}) : /* @__PURE__ */ _(n, {
|
|
135
|
+
title: Z("security.vaultSettings.title", "Vault Settings"),
|
|
136
|
+
description: Z("security.vaultSettings.description", "Configure {name} settings and access.", { name: F?.name ?? Z("security.common.breadcrumbs.vaultLowercase", "vault") }),
|
|
136
137
|
breadcrumbs: [
|
|
137
138
|
{
|
|
138
|
-
label:
|
|
139
|
-
path:
|
|
139
|
+
label: Z("security.common.breadcrumbs.security", "Security"),
|
|
140
|
+
path: O
|
|
140
141
|
},
|
|
141
142
|
{
|
|
142
|
-
label:
|
|
143
|
-
path: `${
|
|
143
|
+
label: F?.name ?? Z("security.common.breadcrumbs.vault", "Vault"),
|
|
144
|
+
path: `${O}/vaults/${D}`
|
|
144
145
|
},
|
|
145
|
-
{ label:
|
|
146
|
+
{ label: Z("security.common.actions.settings", "Settings") }
|
|
146
147
|
],
|
|
147
148
|
children: [
|
|
148
|
-
/* @__PURE__ */
|
|
149
|
+
/* @__PURE__ */ _("div", {
|
|
149
150
|
className: "space-y-8 max-w-4xl mx-auto",
|
|
150
151
|
children: [
|
|
151
|
-
|
|
152
|
+
/* @__PURE__ */ g(T, {
|
|
153
|
+
icon: /* @__PURE__ */ g(b, { className: "size-4" }),
|
|
154
|
+
children: Z("security.vaultSettings.purpose", "Configure how this vault behaves and who can use it. Rename it, set an auto-lock timeout so it seals itself after a period of inactivity, manage which teammates have access and at what role, and — if you ever need to — permanently delete the vault and everything inside it.")
|
|
155
|
+
}),
|
|
156
|
+
(H || V) && /* @__PURE__ */ g(w, {
|
|
157
|
+
storageKey: "security-vault-settings",
|
|
158
|
+
steps: [...V ? [{
|
|
159
|
+
id: "auto-lock",
|
|
160
|
+
label: Z("security.vaultSettings.next.autoLock", "Set an auto-lock timeout"),
|
|
161
|
+
description: Z("security.vaultSettings.next.autoLockDesc", "Seal the vault automatically after inactivity."),
|
|
162
|
+
icon: /* @__PURE__ */ g(b, { className: "size-4" }),
|
|
163
|
+
href: "#general-settings"
|
|
164
|
+
}] : [], ...H ? [{
|
|
165
|
+
id: "add-member",
|
|
166
|
+
label: Z("security.vaultSettings.next.addMember", "Invite a teammate"),
|
|
167
|
+
description: Z("security.vaultSettings.next.addMemberDesc", "Grant access at the role they need."),
|
|
168
|
+
icon: /* @__PURE__ */ g(x, { className: "size-4" }),
|
|
169
|
+
onClick: () => q(!0),
|
|
170
|
+
done: $.length > 0
|
|
171
|
+
}] : []]
|
|
172
|
+
}),
|
|
173
|
+
Y && /* @__PURE__ */ _("div", {
|
|
152
174
|
className: "p-4 rounded-lg bg-status-error-bg/10 text-status-error-text border border-status-error-border/20 flex items-start gap-3",
|
|
153
|
-
children: [/* @__PURE__ */ v
|
|
175
|
+
children: [/* @__PURE__ */ g(v, { className: "size-5 shrink-0 mt-0.5" }), /* @__PURE__ */ g("p", {
|
|
154
176
|
className: "text-sm font-medium",
|
|
155
|
-
children:
|
|
177
|
+
children: Y
|
|
156
178
|
})]
|
|
157
179
|
}),
|
|
158
|
-
/* @__PURE__ */
|
|
159
|
-
|
|
160
|
-
|
|
180
|
+
/* @__PURE__ */ _(me, {
|
|
181
|
+
id: "general-settings",
|
|
182
|
+
treatment: "glass",
|
|
183
|
+
glow: !0,
|
|
184
|
+
className: "p-6",
|
|
185
|
+
children: [/* @__PURE__ */ _("div", {
|
|
161
186
|
className: "flex items-center gap-3 mb-6",
|
|
162
|
-
children: [/* @__PURE__ */
|
|
187
|
+
children: [/* @__PURE__ */ g("div", {
|
|
163
188
|
className: "p-2 rounded-lg bg-action-primary-bg/10 text-primary",
|
|
164
|
-
children: /* @__PURE__ */
|
|
165
|
-
}), /* @__PURE__ */
|
|
189
|
+
children: /* @__PURE__ */ g(b, { className: "size-5" })
|
|
190
|
+
}), /* @__PURE__ */ g("h2", {
|
|
166
191
|
className: "text-xl font-bold text-text-primary",
|
|
167
|
-
children:
|
|
192
|
+
children: Z("security.vaultSettings.general.title", "General Settings")
|
|
168
193
|
})]
|
|
169
|
-
}), /* @__PURE__ */
|
|
194
|
+
}), /* @__PURE__ */ _("div", {
|
|
170
195
|
className: "space-y-6",
|
|
171
196
|
children: [
|
|
172
|
-
/* @__PURE__ */
|
|
197
|
+
/* @__PURE__ */ g(ee, {
|
|
173
198
|
id: "vault-name",
|
|
174
|
-
label:
|
|
175
|
-
value:
|
|
176
|
-
onChange: (e) =>
|
|
177
|
-
placeholder:
|
|
199
|
+
label: Z("security.vaultSettings.general.vaultName", "Vault Name"),
|
|
200
|
+
value: W,
|
|
201
|
+
onChange: (e) => Ce(e.target.value),
|
|
202
|
+
placeholder: Z("security.vaultSettings.general.vaultNamePlaceholder", "e.g. Production Credentials"),
|
|
178
203
|
className: "max-w-md"
|
|
179
204
|
}),
|
|
180
|
-
/* @__PURE__ */
|
|
205
|
+
/* @__PURE__ */ _("div", {
|
|
181
206
|
className: "space-y-2",
|
|
182
|
-
children: [/* @__PURE__ */
|
|
207
|
+
children: [/* @__PURE__ */ g("label", {
|
|
183
208
|
htmlFor: "vault-desc",
|
|
184
209
|
className: "text-sm font-medium text-text-primary",
|
|
185
|
-
children:
|
|
186
|
-
}), /* @__PURE__ */
|
|
210
|
+
children: Z("security.vaultSettings.general.descriptionLabel", "Description")
|
|
211
|
+
}), /* @__PURE__ */ g("textarea", {
|
|
187
212
|
id: "vault-desc",
|
|
188
|
-
"aria-label":
|
|
189
|
-
value:
|
|
190
|
-
onChange: (e) =>
|
|
191
|
-
placeholder:
|
|
213
|
+
"aria-label": Z("security.vaultSettings.general.descriptionLabel", "Description"),
|
|
214
|
+
value: G,
|
|
215
|
+
onChange: (e) => we(e.target.value),
|
|
216
|
+
placeholder: Z("security.vaultSettings.general.descriptionPlaceholder", "What is this vault for?"),
|
|
192
217
|
rows: 3,
|
|
193
218
|
className: t("flex w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm transition-all", "focus:outline-none focus:ring-2 focus:ring-primary/50 focus:border-primary", "placeholder:text-text-secondary/50 resize-y")
|
|
194
219
|
})]
|
|
195
220
|
}),
|
|
196
|
-
/* @__PURE__ */
|
|
221
|
+
/* @__PURE__ */ _("div", {
|
|
197
222
|
className: "space-y-2",
|
|
198
223
|
children: [
|
|
199
|
-
/* @__PURE__ */
|
|
224
|
+
/* @__PURE__ */ _("label", {
|
|
200
225
|
htmlFor: "auto-lock",
|
|
201
226
|
className: "text-sm font-medium text-text-primary flex items-center gap-2",
|
|
202
|
-
children: [
|
|
227
|
+
children: [Z("security.vaultSettings.general.autoLock.title", "Auto-lock Timeout"), /* @__PURE__ */ g(r, {
|
|
203
228
|
variant: "outline",
|
|
204
229
|
className: "font-normal text-[10px]",
|
|
205
|
-
children:
|
|
230
|
+
children: Z("security.common.breadcrumbs.security", "Security")
|
|
206
231
|
})]
|
|
207
232
|
}),
|
|
208
|
-
/* @__PURE__ */
|
|
233
|
+
/* @__PURE__ */ _("div", {
|
|
209
234
|
className: "flex items-center gap-3",
|
|
210
|
-
children: [/* @__PURE__ */
|
|
235
|
+
children: [/* @__PURE__ */ g("input", {
|
|
211
236
|
id: "auto-lock",
|
|
212
|
-
"aria-label":
|
|
237
|
+
"aria-label": Z("security.vaultSettings.general.autoLock.title", "Auto-lock Timeout"),
|
|
213
238
|
type: "number",
|
|
214
239
|
min: 0,
|
|
215
240
|
max: 1440,
|
|
216
|
-
value:
|
|
217
|
-
onChange: (e) =>
|
|
241
|
+
value: K,
|
|
242
|
+
onChange: (e) => Te(parseInt(e.target.value, 10) || 0),
|
|
218
243
|
className: t("flex h-9 w-24 rounded-md border border-border-subtle bg-bg-surface px-3 py-1 text-sm transition-all", "focus:outline-none focus:ring-2 focus:ring-primary/50 focus:border-primary")
|
|
219
|
-
}), /* @__PURE__ */
|
|
244
|
+
}), /* @__PURE__ */ g("span", {
|
|
220
245
|
className: "text-sm text-text-secondary",
|
|
221
|
-
children:
|
|
246
|
+
children: Z("security.vaultSettings.general.autoLock.minutes", "minutes")
|
|
222
247
|
})]
|
|
223
248
|
}),
|
|
224
|
-
/* @__PURE__ */
|
|
249
|
+
/* @__PURE__ */ g("p", {
|
|
225
250
|
className: "text-xs text-text-secondary italic mt-1",
|
|
226
|
-
children:
|
|
251
|
+
children: Z("security.vaultSettings.general.autoLock.help", "The vault will automatically lock after this many minutes of inactivity. Set to 0 to disable.")
|
|
227
252
|
})
|
|
228
253
|
]
|
|
229
254
|
}),
|
|
230
|
-
/* @__PURE__ */
|
|
255
|
+
/* @__PURE__ */ g("div", {
|
|
231
256
|
className: "flex justify-end pt-4 border-t border-border-subtle/40",
|
|
232
|
-
children: /* @__PURE__ */
|
|
257
|
+
children: /* @__PURE__ */ g(f, {
|
|
233
258
|
permission: "vault:update",
|
|
234
|
-
children: /* @__PURE__ */
|
|
235
|
-
onClick:
|
|
236
|
-
disabled:
|
|
259
|
+
children: /* @__PURE__ */ _(i, {
|
|
260
|
+
onClick: ke,
|
|
261
|
+
disabled: L || !W.trim(),
|
|
237
262
|
className: "shadow-sm",
|
|
238
|
-
children: [
|
|
263
|
+
children: [L ? /* @__PURE__ */ g(y, { className: "size-4 animate-spin" }) : /* @__PURE__ */ g(de, { className: "size-4" }), Z("security.vaultSettings.general.save", "Save General Settings")]
|
|
239
264
|
})
|
|
240
265
|
})
|
|
241
266
|
})
|
|
242
267
|
]
|
|
243
268
|
})]
|
|
244
269
|
}),
|
|
245
|
-
/* @__PURE__ */
|
|
270
|
+
/* @__PURE__ */ _(a, {
|
|
246
271
|
className: "p-6 shadow-sm border-border-subtle/60",
|
|
247
|
-
children: [/* @__PURE__ */
|
|
272
|
+
children: [/* @__PURE__ */ _("div", {
|
|
248
273
|
className: "flex items-center justify-between mb-6",
|
|
249
|
-
children: [/* @__PURE__ */
|
|
274
|
+
children: [/* @__PURE__ */ _("div", {
|
|
250
275
|
className: "flex items-center gap-3",
|
|
251
276
|
children: [
|
|
252
|
-
/* @__PURE__ */
|
|
277
|
+
/* @__PURE__ */ g("div", {
|
|
253
278
|
className: "p-2 rounded-lg bg-secondary/10 text-secondary-foreground",
|
|
254
|
-
children: /* @__PURE__ */
|
|
279
|
+
children: /* @__PURE__ */ g(S, { className: "size-5" })
|
|
255
280
|
}),
|
|
256
|
-
/* @__PURE__ */
|
|
281
|
+
/* @__PURE__ */ g("h2", {
|
|
257
282
|
className: "text-xl font-bold text-text-primary",
|
|
258
|
-
children:
|
|
283
|
+
children: Z("security.vaultSettings.members.title", "Access & Members")
|
|
259
284
|
}),
|
|
260
|
-
/* @__PURE__ */
|
|
285
|
+
/* @__PURE__ */ g(r, {
|
|
261
286
|
variant: "outline",
|
|
262
287
|
className: "bg-bg-sunken",
|
|
263
288
|
children: $.length
|
|
264
289
|
})
|
|
265
290
|
]
|
|
266
|
-
}), /* @__PURE__ */
|
|
291
|
+
}), /* @__PURE__ */ g(f, {
|
|
267
292
|
permission: "member:add",
|
|
268
|
-
children: /* @__PURE__ */
|
|
293
|
+
children: /* @__PURE__ */ _(i, {
|
|
269
294
|
variant: "outline",
|
|
270
295
|
size: "sm",
|
|
271
|
-
onClick: () =>
|
|
272
|
-
children: [/* @__PURE__ */
|
|
296
|
+
onClick: () => q(!0),
|
|
297
|
+
children: [/* @__PURE__ */ g(x, { className: "size-4" }), Z("security.vaultSettings.members.add", "Add Member")]
|
|
273
298
|
})
|
|
274
299
|
})]
|
|
275
|
-
}), $.length > 0 ? /* @__PURE__ */
|
|
300
|
+
}), $.length > 0 ? /* @__PURE__ */ g("div", {
|
|
276
301
|
className: "border border-border-subtle/60 rounded-lg overflow-hidden divide-y divide-border/40 bg-bg-surface/30",
|
|
277
302
|
children: $.map((e) => {
|
|
278
|
-
let t =
|
|
279
|
-
return /* @__PURE__ */
|
|
303
|
+
let t = ae(e.role.toLowerCase());
|
|
304
|
+
return /* @__PURE__ */ _("div", {
|
|
280
305
|
className: "flex items-center justify-between p-4 hover:bg-bg-sunken/30 transition-colors",
|
|
281
|
-
children: [/* @__PURE__ */
|
|
306
|
+
children: [/* @__PURE__ */ _("div", {
|
|
282
307
|
className: "flex items-center gap-3",
|
|
283
|
-
children: [/* @__PURE__ */
|
|
308
|
+
children: [/* @__PURE__ */ g("div", {
|
|
284
309
|
className: "size-10 rounded-full bg-action-primary-bg/5 border border-primary/10 flex items-center justify-center text-primary",
|
|
285
|
-
children: e.actorType === "user" ? /* @__PURE__ */
|
|
286
|
-
}), /* @__PURE__ */
|
|
310
|
+
children: e.actorType === "user" ? /* @__PURE__ */ g(S, { className: "size-5" }) : /* @__PURE__ */ g(b, { className: "size-5" })
|
|
311
|
+
}), /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
|
|
287
312
|
className: "text-sm font-bold text-text-primary",
|
|
288
313
|
children: e.actorId
|
|
289
|
-
}), /* @__PURE__ */
|
|
314
|
+
}), /* @__PURE__ */ g("p", {
|
|
290
315
|
className: "text-xs text-text-secondary capitalize",
|
|
291
316
|
children: e.actorType
|
|
292
317
|
})] })]
|
|
293
|
-
}), /* @__PURE__ */
|
|
318
|
+
}), /* @__PURE__ */ _("div", {
|
|
294
319
|
className: "flex items-center gap-4",
|
|
295
|
-
children: [/* @__PURE__ */
|
|
320
|
+
children: [/* @__PURE__ */ g("div", {
|
|
296
321
|
className: "hidden sm:block",
|
|
297
|
-
children: /* @__PURE__ */
|
|
322
|
+
children: /* @__PURE__ */ g(r, {
|
|
298
323
|
variant: "outline",
|
|
299
324
|
className: "font-medium text-[10px] uppercase tracking-tighter",
|
|
300
325
|
children: t.label
|
|
301
326
|
})
|
|
302
|
-
}), e.role !== "OWNER" &&
|
|
327
|
+
}), e.role !== "OWNER" && xe && /* @__PURE__ */ g("button", {
|
|
303
328
|
type: "button",
|
|
304
|
-
onClick: () =>
|
|
329
|
+
onClick: () => Me(e.actorId, e.actorType),
|
|
305
330
|
className: "p-1.5 rounded-md text-text-secondary hover:text-status-error-text hover:bg-status-error-bg/10 transition-all",
|
|
306
|
-
title:
|
|
307
|
-
"aria-label":
|
|
308
|
-
children: /* @__PURE__ */
|
|
331
|
+
title: Z("security.vaultSettings.members.revoke", "Revoke Access"),
|
|
332
|
+
"aria-label": Z("security.vaultSettings.members.revoke", "Revoke Access"),
|
|
333
|
+
children: /* @__PURE__ */ g(pe, { className: "size-4" })
|
|
309
334
|
})]
|
|
310
335
|
})]
|
|
311
336
|
}, e.id);
|
|
312
337
|
})
|
|
313
|
-
}) : /* @__PURE__ */
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
variant: "link",
|
|
323
|
-
onClick: () => K(!0),
|
|
324
|
-
className: "mt-1",
|
|
325
|
-
children: X("security.vaultSettings.members.empty.action", "Invite your first colleague")
|
|
326
|
-
})
|
|
327
|
-
]
|
|
338
|
+
}) : /* @__PURE__ */ g(C, {
|
|
339
|
+
illustration: "empty-people",
|
|
340
|
+
title: Z("security.vaultSettings.members.empty.title", "No additional members"),
|
|
341
|
+
description: Z("security.vaultSettings.members.empty.description", "No additional members have access to this vault."),
|
|
342
|
+
action: /* @__PURE__ */ g(i, {
|
|
343
|
+
variant: "link",
|
|
344
|
+
onClick: () => q(!0),
|
|
345
|
+
children: Z("security.vaultSettings.members.empty.action", "Invite your first colleague")
|
|
346
|
+
})
|
|
328
347
|
})]
|
|
329
348
|
}),
|
|
330
|
-
/* @__PURE__ */
|
|
349
|
+
/* @__PURE__ */ _(a, {
|
|
331
350
|
className: "p-6 border-status-error-border/20 bg-status-error-bg/5 shadow-sm",
|
|
332
|
-
children: [/* @__PURE__ */
|
|
351
|
+
children: [/* @__PURE__ */ _("div", {
|
|
333
352
|
className: "flex items-center gap-3 mb-4",
|
|
334
|
-
children: [/* @__PURE__ */
|
|
353
|
+
children: [/* @__PURE__ */ g("div", {
|
|
335
354
|
className: "p-2 rounded-lg bg-status-error-bg/10 text-status-error-text",
|
|
336
|
-
children: /* @__PURE__ */
|
|
337
|
-
}), /* @__PURE__ */
|
|
355
|
+
children: /* @__PURE__ */ g(fe, { className: "size-5" })
|
|
356
|
+
}), /* @__PURE__ */ g("h2", {
|
|
338
357
|
className: "text-xl font-bold text-status-error-text",
|
|
339
|
-
children:
|
|
358
|
+
children: Z("security.vaultSettings.danger.title", "Danger Zone")
|
|
340
359
|
})]
|
|
341
|
-
}), /* @__PURE__ */
|
|
360
|
+
}), /* @__PURE__ */ _("div", {
|
|
342
361
|
className: "flex flex-col sm:flex-row sm:items-center justify-between gap-4",
|
|
343
|
-
children: [/* @__PURE__ */
|
|
362
|
+
children: [/* @__PURE__ */ _("div", {
|
|
344
363
|
className: "flex-1",
|
|
345
|
-
children: [/* @__PURE__ */
|
|
364
|
+
children: [/* @__PURE__ */ g("p", {
|
|
346
365
|
className: "text-sm font-semibold text-text-primary mb-1",
|
|
347
|
-
children:
|
|
348
|
-
}), /* @__PURE__ */
|
|
366
|
+
children: Z("security.vaultSettings.danger.deleteTitle", "Delete this vault")
|
|
367
|
+
}), /* @__PURE__ */ g("p", {
|
|
349
368
|
className: "text-xs text-text-secondary max-w-lg",
|
|
350
|
-
children:
|
|
369
|
+
children: Z("security.vaultSettings.danger.deleteDescription", "Once you delete a vault, there is no going back. All secrets, version history, and access configurations will be permanently removed.")
|
|
351
370
|
})]
|
|
352
|
-
}), /* @__PURE__ */
|
|
371
|
+
}), /* @__PURE__ */ g(f, {
|
|
353
372
|
permission: "vault:delete",
|
|
354
|
-
children: /* @__PURE__ */
|
|
373
|
+
children: /* @__PURE__ */ g(i, {
|
|
355
374
|
variant: "destructive",
|
|
356
|
-
onClick: () => void
|
|
375
|
+
onClick: () => void Ae(),
|
|
357
376
|
className: "shrink-0",
|
|
358
|
-
children:
|
|
377
|
+
children: Z("security.vaultSettings.danger.deleteAction", "Delete Vault")
|
|
359
378
|
})
|
|
360
379
|
})]
|
|
361
380
|
})]
|
|
362
381
|
})
|
|
363
382
|
]
|
|
364
383
|
}),
|
|
365
|
-
/* @__PURE__ */
|
|
366
|
-
isOpen:
|
|
367
|
-
onClose: () => K(!1),
|
|
368
|
-
onInvite: Te,
|
|
369
|
-
vaultName: N?.name ?? X("security.common.breadcrumbs.vault", "Vault")
|
|
370
|
-
}),
|
|
371
|
-
/* @__PURE__ */ v(ee, {
|
|
372
|
-
isOpen: Se,
|
|
384
|
+
/* @__PURE__ */ g(ce, {
|
|
385
|
+
isOpen: Ee,
|
|
373
386
|
onClose: () => q(!1),
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
387
|
+
onInvite: je,
|
|
388
|
+
vaultName: F?.name ?? Z("security.common.breadcrumbs.vault", "Vault")
|
|
389
|
+
}),
|
|
390
|
+
/* @__PURE__ */ g(o, {
|
|
391
|
+
isOpen: De,
|
|
392
|
+
onClose: () => J(!1),
|
|
393
|
+
onConfirm: Q,
|
|
394
|
+
title: Z("security.vaultSettings.delete.title", "Delete Vault"),
|
|
395
|
+
description: Z("security.vaultSettings.delete.description", "Are you sure you want to delete \"{name}\"? This action cannot be undone and will result in permanent data loss.", { name: F?.name ?? "" }),
|
|
396
|
+
confirmLabel: z ? Z("security.vaultSettings.delete.deleting", "Deleting...") : Z("security.vaultSettings.delete.confirm", "Delete Permanently"),
|
|
378
397
|
variant: "destructive"
|
|
379
398
|
})
|
|
380
399
|
]
|
|
381
400
|
});
|
|
382
401
|
}
|
|
383
402
|
//#endregion
|
|
384
|
-
export {
|
|
403
|
+
export { D as VaultSettingsPage };
|
|
385
404
|
|
|
386
405
|
//# sourceMappingURL=VaultSettingsPage.js.map
|