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