@burdenoff/microfe-security 2026.625.2 → 2026.731.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/pages/AccessReviewPage.js +116 -85
- package/dist/security/pages/AccessReviewPage.js.map +1 -1
- package/dist/security/pages/AuditLogPage.js +32 -26
- 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 +194 -177
- package/dist/security/pages/ProviderDetailPage.js.map +1 -1
- package/dist/security/pages/ProvidersPage.js +17 -14
- 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 +103 -67
- package/dist/security/pages/SecurityDashboardPage.js.map +1 -1
- package/dist/security/pages/SharedWithMePage.js +16 -12
- 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 +213 -183
- package/dist/security/pages/VaultDetailPage.js.map +1 -1
- package/dist/security/pages/VaultSettingsPage.js +137 -113
- package/dist/security/pages/VaultSettingsPage.js.map +1 -1
- package/dist/security/pages/VaultsDashboardPage.js +83 -79
- package/dist/security/pages/VaultsDashboardPage.js.map +1 -1
- package/package.json +5 -5
|
@@ -2,51 +2,51 @@ 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
4
|
import { Badge as r, Button as i, Card as a, Input as ee } from "../components/ui.js";
|
|
5
|
-
import { translateWithFallback as
|
|
6
|
-
import { ConfirmDialog as
|
|
7
|
-
import { useDeleteVault as
|
|
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
8
|
import { useSecurityEventEmitter as ie } from "../hooks/useSecurityEventEmitter.js";
|
|
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 { IllustratedEmptyState as T } from "@burdenoff/fe-libs/ui";
|
|
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
19
|
import { useI18n as E } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
20
20
|
//#region src/security/pages/VaultSettingsPage.tsx
|
|
21
21
|
function D() {
|
|
22
|
-
let { vaultId: D } =
|
|
23
|
-
|
|
24
|
-
let
|
|
25
|
-
|
|
26
|
-
let [
|
|
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({
|
|
27
27
|
name: "",
|
|
28
28
|
description: "",
|
|
29
29
|
lockAfterMinutes: 30
|
|
30
|
-
}), { name: W, description: G, lockAfterMinutes: K } =
|
|
30
|
+
}), { name: W, description: G, lockAfterMinutes: K } = Se, Ce = (e) => U((t) => ({
|
|
31
31
|
...t,
|
|
32
32
|
name: e
|
|
33
|
-
})),
|
|
33
|
+
})), we = (e) => U((t) => ({
|
|
34
34
|
...t,
|
|
35
35
|
description: e
|
|
36
|
-
})),
|
|
36
|
+
})), Te = (e) => U((t) => ({
|
|
37
37
|
...t,
|
|
38
38
|
lockAfterMinutes: e
|
|
39
|
-
})), [
|
|
40
|
-
|
|
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
41
|
F && U({
|
|
42
42
|
name: F.name ?? "",
|
|
43
43
|
description: F.description ?? "",
|
|
44
44
|
lockAfterMinutes: F.lockAfterMinutes ?? 30
|
|
45
45
|
});
|
|
46
46
|
}, [F]);
|
|
47
|
-
let
|
|
47
|
+
let Oe = (e) => {
|
|
48
48
|
k ? k(e) : j(e);
|
|
49
|
-
},
|
|
49
|
+
}, ke = async () => {
|
|
50
50
|
if (D) {
|
|
51
51
|
X(null);
|
|
52
52
|
try {
|
|
@@ -57,20 +57,20 @@ function D() {
|
|
|
57
57
|
description: G,
|
|
58
58
|
lockAfterMinutes: K
|
|
59
59
|
}
|
|
60
|
-
} }),
|
|
60
|
+
} }), B("vault.updated", { vaultId: D });
|
|
61
61
|
} catch (e) {
|
|
62
62
|
X(e instanceof Error ? e.message : Z("security.vaultSettings.error.updateVault", "Failed to update vault"));
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
65
|
}, Q = async () => {
|
|
66
66
|
if (D) try {
|
|
67
|
-
await R({ variables: { id: D } }),
|
|
67
|
+
await R({ variables: { id: D } }), B("vault.deleted", { vaultId: D }), d("success"), Oe(O);
|
|
68
68
|
} catch (e) {
|
|
69
|
-
X(e instanceof Error ? e.message : Z("security.vaultSettings.error.deleteVault", "Failed to delete vault")),
|
|
69
|
+
X(e instanceof Error ? e.message : Z("security.vaultSettings.error.deleteVault", "Failed to delete vault")), d("error");
|
|
70
70
|
}
|
|
71
|
-
},
|
|
72
|
-
|
|
73
|
-
let e = await
|
|
71
|
+
}, Ae = async () => {
|
|
72
|
+
se("medium");
|
|
73
|
+
let e = await oe({
|
|
74
74
|
title: Z("security.vaultSettings.deleteVault.title", "Delete Vault"),
|
|
75
75
|
message: Z("security.vaultSettings.deleteVault.message", "Delete this vault? This cannot be undone."),
|
|
76
76
|
okButtonTitle: Z("security.vaultSettings.deleteVault.confirm", "Delete"),
|
|
@@ -81,17 +81,17 @@ function D() {
|
|
|
81
81
|
return;
|
|
82
82
|
}
|
|
83
83
|
e && await Q();
|
|
84
|
-
},
|
|
84
|
+
}, je = async (e, t) => {
|
|
85
85
|
if (D) {
|
|
86
86
|
X(null);
|
|
87
87
|
try {
|
|
88
|
-
let n = await
|
|
88
|
+
let n = await he({ variables: { input: {
|
|
89
89
|
vaultId: D,
|
|
90
90
|
actorId: e,
|
|
91
91
|
actorType: "user",
|
|
92
92
|
role: t.toUpperCase()
|
|
93
93
|
} } });
|
|
94
|
-
n.data?.shareVault?.id &&
|
|
94
|
+
n.data?.shareVault?.id && B("member.added", {
|
|
95
95
|
vaultId: D,
|
|
96
96
|
memberId: n.data.shareVault.id,
|
|
97
97
|
role: t
|
|
@@ -100,13 +100,13 @@ function D() {
|
|
|
100
100
|
X(e instanceof Error ? e.message : Z("security.vaultSettings.error.shareVault", "Failed to share vault"));
|
|
101
101
|
}
|
|
102
102
|
}
|
|
103
|
-
},
|
|
103
|
+
}, Me = async (e, t) => {
|
|
104
104
|
if (D) try {
|
|
105
|
-
await
|
|
105
|
+
await _e({ variables: {
|
|
106
106
|
vaultId: D,
|
|
107
107
|
actorId: e,
|
|
108
108
|
actorType: t
|
|
109
|
-
} }),
|
|
109
|
+
} }), B("member.removed", {
|
|
110
110
|
vaultId: D,
|
|
111
111
|
memberId: e
|
|
112
112
|
}), P();
|
|
@@ -114,7 +114,7 @@ function D() {
|
|
|
114
114
|
X(e instanceof Error ? e.message : Z("security.vaultSettings.error.removeMember", "Failed to remove member"));
|
|
115
115
|
}
|
|
116
116
|
}, $ = F?.membersList?.items ?? [];
|
|
117
|
-
return N && !F ? /* @__PURE__ */
|
|
117
|
+
return N && !F ? /* @__PURE__ */ g(n, {
|
|
118
118
|
title: Z("security.vaultSettings.title", "Vault Settings"),
|
|
119
119
|
breadcrumbs: [
|
|
120
120
|
{
|
|
@@ -127,11 +127,11 @@ function D() {
|
|
|
127
127
|
},
|
|
128
128
|
{ label: Z("security.common.actions.settings", "Settings") }
|
|
129
129
|
],
|
|
130
|
-
children: /* @__PURE__ */
|
|
130
|
+
children: /* @__PURE__ */ g("div", {
|
|
131
131
|
className: "flex items-center justify-center py-20",
|
|
132
|
-
children: /* @__PURE__ */ y
|
|
132
|
+
children: /* @__PURE__ */ g(y, { className: "size-10 animate-spin text-primary/60" })
|
|
133
133
|
})
|
|
134
|
-
}) : /* @__PURE__ */
|
|
134
|
+
}) : /* @__PURE__ */ _(n, {
|
|
135
135
|
title: Z("security.vaultSettings.title", "Vault Settings"),
|
|
136
136
|
description: Z("security.vaultSettings.description", "Configure {name} settings and access.", { name: F?.name ?? Z("security.common.breadcrumbs.vaultLowercase", "vault") }),
|
|
137
137
|
breadcrumbs: [
|
|
@@ -146,209 +146,233 @@ function D() {
|
|
|
146
146
|
{ label: Z("security.common.actions.settings", "Settings") }
|
|
147
147
|
],
|
|
148
148
|
children: [
|
|
149
|
-
/* @__PURE__ */
|
|
149
|
+
/* @__PURE__ */ _("div", {
|
|
150
150
|
className: "space-y-8 max-w-4xl mx-auto",
|
|
151
151
|
children: [
|
|
152
|
-
|
|
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", {
|
|
153
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",
|
|
154
|
-
children: [/* @__PURE__ */
|
|
175
|
+
children: [/* @__PURE__ */ g(v, { className: "size-5 shrink-0 mt-0.5" }), /* @__PURE__ */ g("p", {
|
|
155
176
|
className: "text-sm font-medium",
|
|
156
177
|
children: Y
|
|
157
178
|
})]
|
|
158
179
|
}),
|
|
159
|
-
/* @__PURE__ */
|
|
160
|
-
|
|
161
|
-
|
|
180
|
+
/* @__PURE__ */ _(me, {
|
|
181
|
+
id: "general-settings",
|
|
182
|
+
treatment: "glass",
|
|
183
|
+
glow: !0,
|
|
184
|
+
className: "p-6",
|
|
185
|
+
children: [/* @__PURE__ */ _("div", {
|
|
162
186
|
className: "flex items-center gap-3 mb-6",
|
|
163
|
-
children: [/* @__PURE__ */
|
|
187
|
+
children: [/* @__PURE__ */ g("div", {
|
|
164
188
|
className: "p-2 rounded-lg bg-action-primary-bg/10 text-primary",
|
|
165
|
-
children: /* @__PURE__ */
|
|
166
|
-
}), /* @__PURE__ */
|
|
189
|
+
children: /* @__PURE__ */ g(b, { className: "size-5" })
|
|
190
|
+
}), /* @__PURE__ */ g("h2", {
|
|
167
191
|
className: "text-xl font-bold text-text-primary",
|
|
168
192
|
children: Z("security.vaultSettings.general.title", "General Settings")
|
|
169
193
|
})]
|
|
170
|
-
}), /* @__PURE__ */
|
|
194
|
+
}), /* @__PURE__ */ _("div", {
|
|
171
195
|
className: "space-y-6",
|
|
172
196
|
children: [
|
|
173
|
-
/* @__PURE__ */
|
|
197
|
+
/* @__PURE__ */ g(ee, {
|
|
174
198
|
id: "vault-name",
|
|
175
199
|
label: Z("security.vaultSettings.general.vaultName", "Vault Name"),
|
|
176
200
|
value: W,
|
|
177
|
-
onChange: (e) =>
|
|
201
|
+
onChange: (e) => Ce(e.target.value),
|
|
178
202
|
placeholder: Z("security.vaultSettings.general.vaultNamePlaceholder", "e.g. Production Credentials"),
|
|
179
203
|
className: "max-w-md"
|
|
180
204
|
}),
|
|
181
|
-
/* @__PURE__ */
|
|
205
|
+
/* @__PURE__ */ _("div", {
|
|
182
206
|
className: "space-y-2",
|
|
183
|
-
children: [/* @__PURE__ */
|
|
207
|
+
children: [/* @__PURE__ */ g("label", {
|
|
184
208
|
htmlFor: "vault-desc",
|
|
185
209
|
className: "text-sm font-medium text-text-primary",
|
|
186
210
|
children: Z("security.vaultSettings.general.descriptionLabel", "Description")
|
|
187
|
-
}), /* @__PURE__ */
|
|
211
|
+
}), /* @__PURE__ */ g("textarea", {
|
|
188
212
|
id: "vault-desc",
|
|
189
213
|
"aria-label": Z("security.vaultSettings.general.descriptionLabel", "Description"),
|
|
190
214
|
value: G,
|
|
191
|
-
onChange: (e) =>
|
|
215
|
+
onChange: (e) => we(e.target.value),
|
|
192
216
|
placeholder: Z("security.vaultSettings.general.descriptionPlaceholder", "What is this vault for?"),
|
|
193
217
|
rows: 3,
|
|
194
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")
|
|
195
219
|
})]
|
|
196
220
|
}),
|
|
197
|
-
/* @__PURE__ */
|
|
221
|
+
/* @__PURE__ */ _("div", {
|
|
198
222
|
className: "space-y-2",
|
|
199
223
|
children: [
|
|
200
|
-
/* @__PURE__ */
|
|
224
|
+
/* @__PURE__ */ _("label", {
|
|
201
225
|
htmlFor: "auto-lock",
|
|
202
226
|
className: "text-sm font-medium text-text-primary flex items-center gap-2",
|
|
203
|
-
children: [Z("security.vaultSettings.general.autoLock.title", "Auto-lock Timeout"), /* @__PURE__ */
|
|
227
|
+
children: [Z("security.vaultSettings.general.autoLock.title", "Auto-lock Timeout"), /* @__PURE__ */ g(r, {
|
|
204
228
|
variant: "outline",
|
|
205
229
|
className: "font-normal text-[10px]",
|
|
206
230
|
children: Z("security.common.breadcrumbs.security", "Security")
|
|
207
231
|
})]
|
|
208
232
|
}),
|
|
209
|
-
/* @__PURE__ */
|
|
233
|
+
/* @__PURE__ */ _("div", {
|
|
210
234
|
className: "flex items-center gap-3",
|
|
211
|
-
children: [/* @__PURE__ */
|
|
235
|
+
children: [/* @__PURE__ */ g("input", {
|
|
212
236
|
id: "auto-lock",
|
|
213
237
|
"aria-label": Z("security.vaultSettings.general.autoLock.title", "Auto-lock Timeout"),
|
|
214
238
|
type: "number",
|
|
215
239
|
min: 0,
|
|
216
240
|
max: 1440,
|
|
217
241
|
value: K,
|
|
218
|
-
onChange: (e) =>
|
|
242
|
+
onChange: (e) => Te(parseInt(e.target.value, 10) || 0),
|
|
219
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")
|
|
220
|
-
}), /* @__PURE__ */
|
|
244
|
+
}), /* @__PURE__ */ g("span", {
|
|
221
245
|
className: "text-sm text-text-secondary",
|
|
222
246
|
children: Z("security.vaultSettings.general.autoLock.minutes", "minutes")
|
|
223
247
|
})]
|
|
224
248
|
}),
|
|
225
|
-
/* @__PURE__ */
|
|
249
|
+
/* @__PURE__ */ g("p", {
|
|
226
250
|
className: "text-xs text-text-secondary italic mt-1",
|
|
227
251
|
children: Z("security.vaultSettings.general.autoLock.help", "The vault will automatically lock after this many minutes of inactivity. Set to 0 to disable.")
|
|
228
252
|
})
|
|
229
253
|
]
|
|
230
254
|
}),
|
|
231
|
-
/* @__PURE__ */
|
|
255
|
+
/* @__PURE__ */ g("div", {
|
|
232
256
|
className: "flex justify-end pt-4 border-t border-border-subtle/40",
|
|
233
|
-
children: /* @__PURE__ */
|
|
257
|
+
children: /* @__PURE__ */ g(f, {
|
|
234
258
|
permission: "vault:update",
|
|
235
|
-
children: /* @__PURE__ */
|
|
236
|
-
onClick:
|
|
259
|
+
children: /* @__PURE__ */ _(i, {
|
|
260
|
+
onClick: ke,
|
|
237
261
|
disabled: L || !W.trim(),
|
|
238
262
|
className: "shadow-sm",
|
|
239
|
-
children: [L ? /* @__PURE__ */ y
|
|
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")]
|
|
240
264
|
})
|
|
241
265
|
})
|
|
242
266
|
})
|
|
243
267
|
]
|
|
244
268
|
})]
|
|
245
269
|
}),
|
|
246
|
-
/* @__PURE__ */
|
|
270
|
+
/* @__PURE__ */ _(a, {
|
|
247
271
|
className: "p-6 shadow-sm border-border-subtle/60",
|
|
248
|
-
children: [/* @__PURE__ */
|
|
272
|
+
children: [/* @__PURE__ */ _("div", {
|
|
249
273
|
className: "flex items-center justify-between mb-6",
|
|
250
|
-
children: [/* @__PURE__ */
|
|
274
|
+
children: [/* @__PURE__ */ _("div", {
|
|
251
275
|
className: "flex items-center gap-3",
|
|
252
276
|
children: [
|
|
253
|
-
/* @__PURE__ */
|
|
277
|
+
/* @__PURE__ */ g("div", {
|
|
254
278
|
className: "p-2 rounded-lg bg-secondary/10 text-secondary-foreground",
|
|
255
|
-
children: /* @__PURE__ */
|
|
279
|
+
children: /* @__PURE__ */ g(S, { className: "size-5" })
|
|
256
280
|
}),
|
|
257
|
-
/* @__PURE__ */
|
|
281
|
+
/* @__PURE__ */ g("h2", {
|
|
258
282
|
className: "text-xl font-bold text-text-primary",
|
|
259
283
|
children: Z("security.vaultSettings.members.title", "Access & Members")
|
|
260
284
|
}),
|
|
261
|
-
/* @__PURE__ */
|
|
285
|
+
/* @__PURE__ */ g(r, {
|
|
262
286
|
variant: "outline",
|
|
263
287
|
className: "bg-bg-sunken",
|
|
264
288
|
children: $.length
|
|
265
289
|
})
|
|
266
290
|
]
|
|
267
|
-
}), /* @__PURE__ */
|
|
291
|
+
}), /* @__PURE__ */ g(f, {
|
|
268
292
|
permission: "member:add",
|
|
269
|
-
children: /* @__PURE__ */
|
|
293
|
+
children: /* @__PURE__ */ _(i, {
|
|
270
294
|
variant: "outline",
|
|
271
295
|
size: "sm",
|
|
272
296
|
onClick: () => q(!0),
|
|
273
|
-
children: [/* @__PURE__ */
|
|
297
|
+
children: [/* @__PURE__ */ g(x, { className: "size-4" }), Z("security.vaultSettings.members.add", "Add Member")]
|
|
274
298
|
})
|
|
275
299
|
})]
|
|
276
|
-
}), $.length > 0 ? /* @__PURE__ */
|
|
300
|
+
}), $.length > 0 ? /* @__PURE__ */ g("div", {
|
|
277
301
|
className: "border border-border-subtle/60 rounded-lg overflow-hidden divide-y divide-border/40 bg-bg-surface/30",
|
|
278
302
|
children: $.map((e) => {
|
|
279
|
-
let t =
|
|
280
|
-
return /* @__PURE__ */
|
|
303
|
+
let t = ae(e.role.toLowerCase());
|
|
304
|
+
return /* @__PURE__ */ _("div", {
|
|
281
305
|
className: "flex items-center justify-between p-4 hover:bg-bg-sunken/30 transition-colors",
|
|
282
|
-
children: [/* @__PURE__ */
|
|
306
|
+
children: [/* @__PURE__ */ _("div", {
|
|
283
307
|
className: "flex items-center gap-3",
|
|
284
|
-
children: [/* @__PURE__ */
|
|
308
|
+
children: [/* @__PURE__ */ g("div", {
|
|
285
309
|
className: "size-10 rounded-full bg-action-primary-bg/5 border border-primary/10 flex items-center justify-center text-primary",
|
|
286
|
-
children: e.actorType === "user" ? /* @__PURE__ */
|
|
287
|
-
}), /* @__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", {
|
|
288
312
|
className: "text-sm font-bold text-text-primary",
|
|
289
313
|
children: e.actorId
|
|
290
|
-
}), /* @__PURE__ */
|
|
314
|
+
}), /* @__PURE__ */ g("p", {
|
|
291
315
|
className: "text-xs text-text-secondary capitalize",
|
|
292
316
|
children: e.actorType
|
|
293
317
|
})] })]
|
|
294
|
-
}), /* @__PURE__ */
|
|
318
|
+
}), /* @__PURE__ */ _("div", {
|
|
295
319
|
className: "flex items-center gap-4",
|
|
296
|
-
children: [/* @__PURE__ */
|
|
320
|
+
children: [/* @__PURE__ */ g("div", {
|
|
297
321
|
className: "hidden sm:block",
|
|
298
|
-
children: /* @__PURE__ */
|
|
322
|
+
children: /* @__PURE__ */ g(r, {
|
|
299
323
|
variant: "outline",
|
|
300
324
|
className: "font-medium text-[10px] uppercase tracking-tighter",
|
|
301
325
|
children: t.label
|
|
302
326
|
})
|
|
303
|
-
}), e.role !== "OWNER" &&
|
|
327
|
+
}), e.role !== "OWNER" && xe && /* @__PURE__ */ g("button", {
|
|
304
328
|
type: "button",
|
|
305
|
-
onClick: () =>
|
|
329
|
+
onClick: () => Me(e.actorId, e.actorType),
|
|
306
330
|
className: "p-1.5 rounded-md text-text-secondary hover:text-status-error-text hover:bg-status-error-bg/10 transition-all",
|
|
307
331
|
title: Z("security.vaultSettings.members.revoke", "Revoke Access"),
|
|
308
332
|
"aria-label": Z("security.vaultSettings.members.revoke", "Revoke Access"),
|
|
309
|
-
children: /* @__PURE__ */
|
|
333
|
+
children: /* @__PURE__ */ g(pe, { className: "size-4" })
|
|
310
334
|
})]
|
|
311
335
|
})]
|
|
312
336
|
}, e.id);
|
|
313
337
|
})
|
|
314
|
-
}) : /* @__PURE__ */
|
|
338
|
+
}) : /* @__PURE__ */ g(C, {
|
|
315
339
|
illustration: "empty-people",
|
|
316
340
|
title: Z("security.vaultSettings.members.empty.title", "No additional members"),
|
|
317
341
|
description: Z("security.vaultSettings.members.empty.description", "No additional members have access to this vault."),
|
|
318
|
-
action: /* @__PURE__ */
|
|
342
|
+
action: /* @__PURE__ */ g(i, {
|
|
319
343
|
variant: "link",
|
|
320
344
|
onClick: () => q(!0),
|
|
321
345
|
children: Z("security.vaultSettings.members.empty.action", "Invite your first colleague")
|
|
322
346
|
})
|
|
323
347
|
})]
|
|
324
348
|
}),
|
|
325
|
-
/* @__PURE__ */
|
|
349
|
+
/* @__PURE__ */ _(a, {
|
|
326
350
|
className: "p-6 border-status-error-border/20 bg-status-error-bg/5 shadow-sm",
|
|
327
|
-
children: [/* @__PURE__ */
|
|
351
|
+
children: [/* @__PURE__ */ _("div", {
|
|
328
352
|
className: "flex items-center gap-3 mb-4",
|
|
329
|
-
children: [/* @__PURE__ */
|
|
353
|
+
children: [/* @__PURE__ */ g("div", {
|
|
330
354
|
className: "p-2 rounded-lg bg-status-error-bg/10 text-status-error-text",
|
|
331
|
-
children: /* @__PURE__ */
|
|
332
|
-
}), /* @__PURE__ */
|
|
355
|
+
children: /* @__PURE__ */ g(fe, { className: "size-5" })
|
|
356
|
+
}), /* @__PURE__ */ g("h2", {
|
|
333
357
|
className: "text-xl font-bold text-status-error-text",
|
|
334
358
|
children: Z("security.vaultSettings.danger.title", "Danger Zone")
|
|
335
359
|
})]
|
|
336
|
-
}), /* @__PURE__ */
|
|
360
|
+
}), /* @__PURE__ */ _("div", {
|
|
337
361
|
className: "flex flex-col sm:flex-row sm:items-center justify-between gap-4",
|
|
338
|
-
children: [/* @__PURE__ */
|
|
362
|
+
children: [/* @__PURE__ */ _("div", {
|
|
339
363
|
className: "flex-1",
|
|
340
|
-
children: [/* @__PURE__ */
|
|
364
|
+
children: [/* @__PURE__ */ g("p", {
|
|
341
365
|
className: "text-sm font-semibold text-text-primary mb-1",
|
|
342
366
|
children: Z("security.vaultSettings.danger.deleteTitle", "Delete this vault")
|
|
343
|
-
}), /* @__PURE__ */
|
|
367
|
+
}), /* @__PURE__ */ g("p", {
|
|
344
368
|
className: "text-xs text-text-secondary max-w-lg",
|
|
345
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.")
|
|
346
370
|
})]
|
|
347
|
-
}), /* @__PURE__ */
|
|
371
|
+
}), /* @__PURE__ */ g(f, {
|
|
348
372
|
permission: "vault:delete",
|
|
349
|
-
children: /* @__PURE__ */
|
|
373
|
+
children: /* @__PURE__ */ g(i, {
|
|
350
374
|
variant: "destructive",
|
|
351
|
-
onClick: () => void
|
|
375
|
+
onClick: () => void Ae(),
|
|
352
376
|
className: "shrink-0",
|
|
353
377
|
children: Z("security.vaultSettings.danger.deleteAction", "Delete Vault")
|
|
354
378
|
})
|
|
@@ -357,14 +381,14 @@ function D() {
|
|
|
357
381
|
})
|
|
358
382
|
]
|
|
359
383
|
}),
|
|
360
|
-
/* @__PURE__ */
|
|
361
|
-
isOpen:
|
|
384
|
+
/* @__PURE__ */ g(ce, {
|
|
385
|
+
isOpen: Ee,
|
|
362
386
|
onClose: () => q(!1),
|
|
363
|
-
onInvite:
|
|
387
|
+
onInvite: je,
|
|
364
388
|
vaultName: F?.name ?? Z("security.common.breadcrumbs.vault", "Vault")
|
|
365
389
|
}),
|
|
366
|
-
/* @__PURE__ */
|
|
367
|
-
isOpen:
|
|
390
|
+
/* @__PURE__ */ g(o, {
|
|
391
|
+
isOpen: De,
|
|
368
392
|
onClose: () => J(!1),
|
|
369
393
|
onConfirm: Q,
|
|
370
394
|
title: Z("security.vaultSettings.delete.title", "Delete Vault"),
|