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