dsh-vault 1.9.5 → 1.9.6-rc.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/lib/client.js +133 -87
- package/lib/client.js.map +1 -1
- package/package.json +1 -1
package/lib/client.js
CHANGED
|
@@ -17,110 +17,110 @@ window.__ModuleLoader__.load({
|
|
|
17
17
|
document.head.appendChild(tag);
|
|
18
18
|
}
|
|
19
19
|
var VaultSection_module_css_default = {
|
|
20
|
-
"dangerButton": "t_j5va_dangerButton",
|
|
21
|
-
"tabs": "t_j5va_tabs",
|
|
22
|
-
"title": "t_j5va_title",
|
|
23
|
-
"reportBox": "t_j5va_reportBox",
|
|
24
|
-
"badgeDanger": "t_j5va_badgeDanger",
|
|
25
|
-
"genHist": "t_j5va_genHist",
|
|
26
|
-
"kindFilter": "t_j5va_kindFilter",
|
|
27
|
-
"moreWrap": "t_j5va_moreWrap",
|
|
28
|
-
"pwStrong": "t_j5va_pwStrong",
|
|
29
|
-
"clearButton": "t_j5va_clearButton",
|
|
30
|
-
"auditIssues": "t_j5va_auditIssues",
|
|
31
|
-
"selectActive": "t_j5va_selectActive",
|
|
32
|
-
"tab": "t_j5va_tab",
|
|
33
|
-
"reportTitle": "t_j5va_reportTitle",
|
|
34
|
-
"highBadge": "t_j5va_highBadge",
|
|
35
|
-
"reportSub": "t_j5va_reportSub",
|
|
36
|
-
"rowActions": "t_j5va_rowActions",
|
|
37
|
-
"copied": "t_j5va_copied",
|
|
38
|
-
"modeReadonly": "t_j5va_modeReadonly",
|
|
39
|
-
"addButton": "t_j5va_addButton",
|
|
40
|
-
"policyBar": "t_j5va_policyBar",
|
|
41
|
-
"pwHistBox": "t_j5va_pwHistBox",
|
|
42
|
-
"pwHistRow": "t_j5va_pwHistRow",
|
|
43
|
-
"saveButton": "t_j5va_saveButton",
|
|
44
|
-
"bulkItem": "t_j5va_bulkItem",
|
|
45
20
|
"editorBody": "t_j5va_editorBody",
|
|
46
|
-
"healthBar": "t_j5va_healthBar",
|
|
47
|
-
"editor": "t_j5va_editor",
|
|
48
|
-
"empty": "t_j5va_empty",
|
|
49
21
|
"dupGroup": "t_j5va_dupGroup",
|
|
50
|
-
"
|
|
51
|
-
"
|
|
22
|
+
"scoreRing": "t_j5va_scoreRing",
|
|
23
|
+
"rowActions": "t_j5va_rowActions",
|
|
24
|
+
"moreWrap": "t_j5va_moreWrap",
|
|
25
|
+
"identity": "t_j5va_identity",
|
|
26
|
+
"row": "t_j5va_row",
|
|
27
|
+
"retryButton": "t_j5va_retryButton",
|
|
28
|
+
"detailBox": "t_j5va_detailBox",
|
|
52
29
|
"field": "t_j5va_field",
|
|
30
|
+
"pwHistBox": "t_j5va_pwHistBox",
|
|
53
31
|
"genOpts": "t_j5va_genOpts",
|
|
54
|
-
"
|
|
55
|
-
"
|
|
56
|
-
"
|
|
57
|
-
"
|
|
58
|
-
"totp": "t_j5va_totp",
|
|
59
|
-
"error": "t_j5va_error",
|
|
60
|
-
"histAdd": "t_j5va_histAdd",
|
|
61
|
-
"trashButton": "t_j5va_trashButton",
|
|
62
|
-
"kindIcon": "t_j5va_kindIcon",
|
|
63
|
-
"dupMerge": "t_j5va_dupMerge",
|
|
64
|
-
"kindChip": "t_j5va_kindChip",
|
|
65
|
-
"modeAuto": "t_j5va_modeAuto",
|
|
66
|
-
"actionPrimary": "t_j5va_actionPrimary",
|
|
67
|
-
"emptyBox": "t_j5va_emptyBox",
|
|
32
|
+
"badgeOk": "t_j5va_badgeOk",
|
|
33
|
+
"histNeutral": "t_j5va_histNeutral",
|
|
34
|
+
"moreMenu": "t_j5va_moreMenu",
|
|
35
|
+
"backupButton": "t_j5va_backupButton",
|
|
68
36
|
"rowDue": "t_j5va_rowDue",
|
|
69
|
-
"
|
|
70
|
-
"
|
|
37
|
+
"section": "t_j5va_section",
|
|
38
|
+
"status": "t_j5va_status",
|
|
39
|
+
"reportLine": "t_j5va_reportLine",
|
|
40
|
+
"trashButton": "t_j5va_trashButton",
|
|
71
41
|
"emptyHint": "t_j5va_emptyHint",
|
|
72
|
-
"
|
|
73
|
-
"
|
|
74
|
-
"
|
|
75
|
-
"
|
|
76
|
-
"
|
|
77
|
-
"genOptRow": "t_j5va_genOptRow",
|
|
78
|
-
"pwLabel": "t_j5va_pwLabel",
|
|
79
|
-
"toolbar": "t_j5va_toolbar",
|
|
80
|
-
"healthSummary": "t_j5va_healthSummary",
|
|
42
|
+
"deleteButton": "t_j5va_deleteButton",
|
|
43
|
+
"clearButton": "t_j5va_clearButton",
|
|
44
|
+
"dupMerge": "t_j5va_dupMerge",
|
|
45
|
+
"lockedBanner": "t_j5va_lockedBanner",
|
|
46
|
+
"searchBox": "t_j5va_searchBox",
|
|
81
47
|
"checkField": "t_j5va_checkField",
|
|
82
|
-
"
|
|
83
|
-
"lockedTag": "t_j5va_lockedTag",
|
|
84
|
-
"pinStar": "t_j5va_pinStar",
|
|
85
|
-
"histDanger": "t_j5va_histDanger",
|
|
48
|
+
"reportBox": "t_j5va_reportBox",
|
|
86
49
|
"editorActions": "t_j5va_editorActions",
|
|
50
|
+
"detailItem": "t_j5va_detailItem",
|
|
51
|
+
"pwHistTime": "t_j5va_pwHistTime",
|
|
52
|
+
"pinOn": "t_j5va_pinOn",
|
|
53
|
+
"genOptRow": "t_j5va_genOptRow",
|
|
54
|
+
"pwFair": "t_j5va_pwFair",
|
|
55
|
+
"pwBar": "t_j5va_pwBar",
|
|
87
56
|
"tabActive": "t_j5va_tabActive",
|
|
88
|
-
"
|
|
57
|
+
"intro": "t_j5va_intro",
|
|
58
|
+
"kindChip": "t_j5va_kindChip",
|
|
59
|
+
"genHist": "t_j5va_genHist",
|
|
60
|
+
"title": "t_j5va_title",
|
|
61
|
+
"modeReadonly": "t_j5va_modeReadonly",
|
|
62
|
+
"auditIssues": "t_j5va_auditIssues",
|
|
63
|
+
"selectActive": "t_j5va_selectActive",
|
|
64
|
+
"highBadge": "t_j5va_highBadge",
|
|
65
|
+
"badgeDanger": "t_j5va_badgeDanger",
|
|
66
|
+
"histDanger": "t_j5va_histDanger",
|
|
67
|
+
"totp": "t_j5va_totp",
|
|
68
|
+
"bulkCount": "t_j5va_bulkCount",
|
|
89
69
|
"list": "t_j5va_list",
|
|
70
|
+
"rowCheck": "t_j5va_rowCheck",
|
|
90
71
|
"modeAsk": "t_j5va_modeAsk",
|
|
91
|
-
"
|
|
92
|
-
"
|
|
93
|
-
"
|
|
94
|
-
"
|
|
95
|
-
"rowExpired": "t_j5va_rowExpired",
|
|
96
|
-
"secretField": "t_j5va_secretField",
|
|
97
|
-
"badgeOk": "t_j5va_badgeOk",
|
|
98
|
-
"pwHistTime": "t_j5va_pwHistTime",
|
|
99
|
-
"pwFair": "t_j5va_pwFair",
|
|
100
|
-
"searchBox": "t_j5va_searchBox",
|
|
101
|
-
"moreMenu": "t_j5va_moreMenu",
|
|
102
|
-
"row": "t_j5va_row",
|
|
72
|
+
"bulkBar": "t_j5va_bulkBar",
|
|
73
|
+
"sortButton": "t_j5va_sortButton",
|
|
74
|
+
"totpRing": "t_j5va_totpRing",
|
|
75
|
+
"reportSub": "t_j5va_reportSub",
|
|
103
76
|
"pwHistPwd": "t_j5va_pwHistPwd",
|
|
77
|
+
"secretField": "t_j5va_secretField",
|
|
78
|
+
"kindIcon": "t_j5va_kindIcon",
|
|
79
|
+
"editor": "t_j5va_editor",
|
|
104
80
|
"histUpdate": "t_j5va_histUpdate",
|
|
105
|
-
"
|
|
106
|
-
"
|
|
107
|
-
"
|
|
108
|
-
"
|
|
81
|
+
"pwLabel": "t_j5va_pwLabel",
|
|
82
|
+
"footer": "t_j5va_footer",
|
|
83
|
+
"pinOff": "t_j5va_pinOff",
|
|
84
|
+
"dupNames": "t_j5va_dupNames",
|
|
85
|
+
"healthBar": "t_j5va_healthBar",
|
|
86
|
+
"rowExpired": "t_j5va_rowExpired",
|
|
87
|
+
"auditRow": "t_j5va_auditRow",
|
|
88
|
+
"bulkItem": "t_j5va_bulkItem",
|
|
89
|
+
"pwMeter": "t_j5va_pwMeter",
|
|
90
|
+
"pwWeak": "t_j5va_pwWeak",
|
|
91
|
+
"pwStrong": "t_j5va_pwStrong",
|
|
92
|
+
"tabs": "t_j5va_tabs",
|
|
93
|
+
"addButton": "t_j5va_addButton",
|
|
94
|
+
"tab": "t_j5va_tab",
|
|
109
95
|
"revealButton": "t_j5va_revealButton",
|
|
96
|
+
"healthSummary": "t_j5va_healthSummary",
|
|
97
|
+
"actionPrimary": "t_j5va_actionPrimary",
|
|
98
|
+
"reportTitle": "t_j5va_reportTitle",
|
|
99
|
+
"kindFilter": "t_j5va_kindFilter",
|
|
100
|
+
"pinStar": "t_j5va_pinStar",
|
|
101
|
+
"rowSelected": "t_j5va_rowSelected",
|
|
102
|
+
"copied": "t_j5va_copied",
|
|
110
103
|
"uriCode": "t_j5va_uriCode",
|
|
104
|
+
"lockedTag": "t_j5va_lockedTag",
|
|
111
105
|
"tabPane": "t_j5va_tabPane",
|
|
106
|
+
"histAdd": "t_j5va_histAdd",
|
|
107
|
+
"badge": "t_j5va_badge",
|
|
112
108
|
"policyField": "t_j5va_policyField",
|
|
113
|
-
"bulkBar": "t_j5va_bulkBar",
|
|
114
|
-
"pinOn": "t_j5va_pinOn",
|
|
115
|
-
"detailItem": "t_j5va_detailItem",
|
|
116
109
|
"resultCount": "t_j5va_resultCount",
|
|
117
|
-
"
|
|
110
|
+
"pwHistRow": "t_j5va_pwHistRow",
|
|
111
|
+
"toolbar": "t_j5va_toolbar",
|
|
112
|
+
"rowMain": "t_j5va_rowMain",
|
|
113
|
+
"error": "t_j5va_error",
|
|
114
|
+
"policyBar": "t_j5va_policyBar",
|
|
115
|
+
"modeAuto": "t_j5va_modeAuto",
|
|
116
|
+
"emptyBox": "t_j5va_emptyBox",
|
|
117
|
+
"badgeWarn": "t_j5va_badgeWarn",
|
|
118
|
+
"srOnly": "t_j5va_srOnly",
|
|
119
|
+
"saveButton": "t_j5va_saveButton",
|
|
120
|
+
"empty": "t_j5va_empty",
|
|
118
121
|
"moreButton": "t_j5va_moreButton",
|
|
119
|
-
"
|
|
120
|
-
"
|
|
121
|
-
"badge": "t_j5va_badge",
|
|
122
|
-
"histNeutral": "t_j5va_histNeutral",
|
|
123
|
-
"detailBox": "t_j5va_detailBox"
|
|
122
|
+
"dueBadge": "t_j5va_dueBadge",
|
|
123
|
+
"dangerButton": "t_j5va_dangerButton"
|
|
124
124
|
};
|
|
125
125
|
//#endregion
|
|
126
126
|
//#region src/client/VaultSection.tsx
|
|
@@ -359,6 +359,7 @@ window.__ModuleLoader__.load({
|
|
|
359
359
|
const [pwHistoryFor, setPwHistoryFor] = (0, react.useState)(null);
|
|
360
360
|
const [pwHistRevealed, setPwHistRevealed] = (0, react.useState)(null);
|
|
361
361
|
const [openMenuId, setOpenMenuId] = (0, react.useState)(null);
|
|
362
|
+
const [auditFilter, setAuditFilter] = (0, react.useState)("");
|
|
362
363
|
const [visibleCount, setVisibleCount] = (0, react.useState)(50);
|
|
363
364
|
const [sortBy, setSortBy] = (0, react.useState)("alpha");
|
|
364
365
|
const [activeTab, setActiveTab] = (0, react.useState)("entries");
|
|
@@ -3076,14 +3077,47 @@ window.__ModuleLoader__.load({
|
|
|
3076
3077
|
className: VaultSection_module_css_default.reportTitle,
|
|
3077
3078
|
children: t("recentActivity")
|
|
3078
3079
|
}),
|
|
3080
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
3081
|
+
className: VaultSection_module_css_default.toolbar,
|
|
3082
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("select", {
|
|
3083
|
+
className: VaultSection_module_css_default.kindFilter,
|
|
3084
|
+
value: auditFilter,
|
|
3085
|
+
onChange: (e) => setAuditFilter(e.target.value),
|
|
3086
|
+
"aria-label": t("auditFilter"),
|
|
3087
|
+
children: [
|
|
3088
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
|
|
3089
|
+
value: "",
|
|
3090
|
+
children: t("auditAll")
|
|
3091
|
+
}),
|
|
3092
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
|
|
3093
|
+
value: "add",
|
|
3094
|
+
children: t("auditAdd")
|
|
3095
|
+
}),
|
|
3096
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
|
|
3097
|
+
value: "update",
|
|
3098
|
+
children: t("auditUpdate")
|
|
3099
|
+
}),
|
|
3100
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
|
|
3101
|
+
value: "delete",
|
|
3102
|
+
children: t("auditDelete")
|
|
3103
|
+
}),
|
|
3104
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
|
|
3105
|
+
value: "restore",
|
|
3106
|
+
children: t("auditRestore")
|
|
3107
|
+
})
|
|
3108
|
+
]
|
|
3109
|
+
})
|
|
3110
|
+
}),
|
|
3079
3111
|
recentEvents.length === 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
3080
3112
|
className: VaultSection_module_css_default.empty,
|
|
3081
3113
|
children: t("recentActivityEmpty")
|
|
3082
3114
|
}),
|
|
3083
|
-
recentEvents.slice(0, 30).map((ev, i) => {
|
|
3115
|
+
recentEvents.filter((ev) => auditFilter === "" || String(ev.action ?? "") === auditFilter).slice(0, 30).map((ev, i) => {
|
|
3084
3116
|
const action = String(ev.action ?? "");
|
|
3085
3117
|
const icon = action === "add" ? "➕" : action === "delete" ? "🗑️" : action === "restore" ? "♻️" : action === "purge" ? "🔥" : action === "update" ? "✏️" : "•";
|
|
3086
3118
|
const cls = action === "delete" || action === "purge" ? VaultSection_module_css_default.histDanger : action === "add" ? VaultSection_module_css_default.histAdd : action === "update" ? VaultSection_module_css_default.histUpdate : VaultSection_module_css_default.histNeutral;
|
|
3119
|
+
const ts = Number(ev.at);
|
|
3120
|
+
const when = Number.isFinite(ts) && ts > 0 ? new Date(ts).toLocaleString() : "";
|
|
3087
3121
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("p", {
|
|
3088
3122
|
className: `${VaultSection_module_css_default.reportLine} ${cls}`,
|
|
3089
3123
|
children: [
|
|
@@ -3092,7 +3126,7 @@ window.__ModuleLoader__.load({
|
|
|
3092
3126
|
action,
|
|
3093
3127
|
" · ",
|
|
3094
3128
|
String(ev.title ?? ev.id ?? ""),
|
|
3095
|
-
|
|
3129
|
+
when !== "" && ` · ${when}`
|
|
3096
3130
|
]
|
|
3097
3131
|
}, i);
|
|
3098
3132
|
})
|
|
@@ -4267,6 +4301,12 @@ window.__ModuleLoader__.load({
|
|
|
4267
4301
|
tabSessions: "Sessions",
|
|
4268
4302
|
tabAudit: "Audit",
|
|
4269
4303
|
recentActivityEmpty: "No activity yet.",
|
|
4304
|
+
auditFilter: "Filter by action",
|
|
4305
|
+
auditAll: "All actions",
|
|
4306
|
+
auditAdd: "Add",
|
|
4307
|
+
auditUpdate: "Update",
|
|
4308
|
+
auditDelete: "Delete",
|
|
4309
|
+
auditRestore: "Restore",
|
|
4270
4310
|
tabTrash: "Trash",
|
|
4271
4311
|
sessionsIntro: "Log into any site in a real browser window, then save the session cookies here for automation (curl, requests, browser-less tools). HttpOnly cookies are captured too.",
|
|
4272
4312
|
sessionUrlPrompt: "Site URL to open:",
|
|
@@ -4620,6 +4660,12 @@ window.__ModuleLoader__.load({
|
|
|
4620
4660
|
tabSessions: "会话",
|
|
4621
4661
|
tabAudit: "审计",
|
|
4622
4662
|
recentActivityEmpty: "暂无活动记录。",
|
|
4663
|
+
auditFilter: "按操作类型筛选",
|
|
4664
|
+
auditAll: "全部操作",
|
|
4665
|
+
auditAdd: "新增",
|
|
4666
|
+
auditUpdate: "更新",
|
|
4667
|
+
auditDelete: "删除",
|
|
4668
|
+
auditRestore: "恢复",
|
|
4623
4669
|
tabTrash: "回收站",
|
|
4624
4670
|
sessionsIntro: "在真实浏览器窗口中登录任意网站,然后把登录后的 session cookie 保存到这里,供自动化任务使用(curl、requests 等)。HttpOnly cookie 也能捕获。",
|
|
4625
4671
|
sessionUrlPrompt: "要打开的网站地址:",
|