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