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