dsh-vault 1.9.4 → 1.9.5-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 +102 -90
- 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
|
-
"
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
"
|
|
24
|
-
"
|
|
20
|
+
"dupGroup": "t_j5va_dupGroup",
|
|
21
|
+
"histDanger": "t_j5va_histDanger",
|
|
22
|
+
"healthBar": "t_j5va_healthBar",
|
|
23
|
+
"identity": "t_j5va_identity",
|
|
24
|
+
"rowDue": "t_j5va_rowDue",
|
|
25
|
+
"pwLabel": "t_j5va_pwLabel",
|
|
26
|
+
"moreWrap": "t_j5va_moreWrap",
|
|
27
|
+
"pinOff": "t_j5va_pinOff",
|
|
28
|
+
"healthSummary": "t_j5va_healthSummary",
|
|
25
29
|
"totpRing": "t_j5va_totpRing",
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
"
|
|
32
|
-
"
|
|
30
|
+
"reportTitle": "t_j5va_reportTitle",
|
|
31
|
+
"histAdd": "t_j5va_histAdd",
|
|
32
|
+
"histNeutral": "t_j5va_histNeutral",
|
|
33
|
+
"saveButton": "t_j5va_saveButton",
|
|
34
|
+
"backupButton": "t_j5va_backupButton",
|
|
35
|
+
"actionPrimary": "t_j5va_actionPrimary",
|
|
36
|
+
"section": "t_j5va_section",
|
|
37
|
+
"row": "t_j5va_row",
|
|
38
|
+
"footer": "t_j5va_footer",
|
|
39
|
+
"badge": "t_j5va_badge",
|
|
40
|
+
"searchBox": "t_j5va_searchBox",
|
|
41
|
+
"deleteButton": "t_j5va_deleteButton",
|
|
33
42
|
"modeAuto": "t_j5va_modeAuto",
|
|
43
|
+
"rowExpired": "t_j5va_rowExpired",
|
|
34
44
|
"kindIcon": "t_j5va_kindIcon",
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
"retryButton": "t_j5va_retryButton",
|
|
38
|
-
"genOptRow": "t_j5va_genOptRow",
|
|
39
|
-
"status": "t_j5va_status",
|
|
40
|
-
"modeReadonly": "t_j5va_modeReadonly",
|
|
45
|
+
"bulkBar": "t_j5va_bulkBar",
|
|
46
|
+
"dangerButton": "t_j5va_dangerButton",
|
|
41
47
|
"clearButton": "t_j5va_clearButton",
|
|
42
|
-
"
|
|
43
|
-
"rowMain": "t_j5va_rowMain",
|
|
44
|
-
"pwHistRow": "t_j5va_pwHistRow",
|
|
45
|
-
"sortButton": "t_j5va_sortButton",
|
|
46
|
-
"pwFair": "t_j5va_pwFair",
|
|
47
|
-
"moreButton": "t_j5va_moreButton",
|
|
48
|
-
"pinOff": "t_j5va_pinOff",
|
|
49
|
-
"badgeOk": "t_j5va_badgeOk",
|
|
50
|
-
"lockedTag": "t_j5va_lockedTag",
|
|
51
|
-
"tab": "t_j5va_tab",
|
|
52
|
-
"histAdd": "t_j5va_histAdd",
|
|
53
|
-
"selectActive": "t_j5va_selectActive",
|
|
54
|
-
"pinOn": "t_j5va_pinOn",
|
|
48
|
+
"reportBox": "t_j5va_reportBox",
|
|
55
49
|
"rowSelected": "t_j5va_rowSelected",
|
|
50
|
+
"intro": "t_j5va_intro",
|
|
51
|
+
"moreMenu": "t_j5va_moreMenu",
|
|
52
|
+
"error": "t_j5va_error",
|
|
56
53
|
"list": "t_j5va_list",
|
|
57
|
-
"
|
|
54
|
+
"editor": "t_j5va_editor",
|
|
55
|
+
"detailItem": "t_j5va_detailItem",
|
|
58
56
|
"badgeDanger": "t_j5va_badgeDanger",
|
|
59
|
-
"
|
|
60
|
-
"
|
|
61
|
-
"
|
|
62
|
-
"
|
|
63
|
-
"
|
|
64
|
-
"
|
|
57
|
+
"auditIssues": "t_j5va_auditIssues",
|
|
58
|
+
"policyBar": "t_j5va_policyBar",
|
|
59
|
+
"detailBox": "t_j5va_detailBox",
|
|
60
|
+
"retryButton": "t_j5va_retryButton",
|
|
61
|
+
"highBadge": "t_j5va_highBadge",
|
|
62
|
+
"scoreRing": "t_j5va_scoreRing",
|
|
63
|
+
"pinStar": "t_j5va_pinStar",
|
|
64
|
+
"toolbar": "t_j5va_toolbar",
|
|
65
|
+
"selectActive": "t_j5va_selectActive",
|
|
66
|
+
"pwHistTime": "t_j5va_pwHistTime",
|
|
67
|
+
"editorActions": "t_j5va_editorActions",
|
|
65
68
|
"bulkItem": "t_j5va_bulkItem",
|
|
66
|
-
"
|
|
67
|
-
"
|
|
68
|
-
"pwHistBox": "t_j5va_pwHistBox",
|
|
69
|
+
"bulkCount": "t_j5va_bulkCount",
|
|
70
|
+
"pwMeter": "t_j5va_pwMeter",
|
|
69
71
|
"rowCheck": "t_j5va_rowCheck",
|
|
70
|
-
"
|
|
71
|
-
"
|
|
72
|
-
"
|
|
73
|
-
"
|
|
74
|
-
"
|
|
75
|
-
"modeAsk": "t_j5va_modeAsk",
|
|
72
|
+
"empty": "t_j5va_empty",
|
|
73
|
+
"pwFair": "t_j5va_pwFair",
|
|
74
|
+
"resultCount": "t_j5va_resultCount",
|
|
75
|
+
"uriCode": "t_j5va_uriCode",
|
|
76
|
+
"addButton": "t_j5va_addButton",
|
|
76
77
|
"reportSub": "t_j5va_reportSub",
|
|
77
|
-
"histUpdate": "t_j5va_histUpdate",
|
|
78
|
-
"detailBox": "t_j5va_detailBox",
|
|
79
|
-
"detailItem": "t_j5va_detailItem",
|
|
80
|
-
"healthSummary": "t_j5va_healthSummary",
|
|
81
|
-
"policyField": "t_j5va_policyField",
|
|
82
|
-
"dupMerge": "t_j5va_dupMerge",
|
|
83
|
-
"tabActive": "t_j5va_tabActive",
|
|
84
|
-
"healthBar": "t_j5va_healthBar",
|
|
85
|
-
"emptyBox": "t_j5va_emptyBox",
|
|
86
|
-
"saveButton": "t_j5va_saveButton",
|
|
87
|
-
"auditRow": "t_j5va_auditRow",
|
|
88
|
-
"editorActions": "t_j5va_editorActions",
|
|
89
|
-
"auditIssues": "t_j5va_auditIssues",
|
|
90
|
-
"pwStrong": "t_j5va_pwStrong",
|
|
91
78
|
"pwWeak": "t_j5va_pwWeak",
|
|
79
|
+
"tabActive": "t_j5va_tabActive",
|
|
80
|
+
"policyField": "t_j5va_policyField",
|
|
81
|
+
"rowActions": "t_j5va_rowActions",
|
|
82
|
+
"rowMain": "t_j5va_rowMain",
|
|
83
|
+
"modeAsk": "t_j5va_modeAsk",
|
|
84
|
+
"pwHistPwd": "t_j5va_pwHistPwd",
|
|
85
|
+
"badgeWarn": "t_j5va_badgeWarn",
|
|
86
|
+
"badgeOk": "t_j5va_badgeOk",
|
|
92
87
|
"kindChip": "t_j5va_kindChip",
|
|
93
|
-
"reportBox": "t_j5va_reportBox",
|
|
94
88
|
"tabs": "t_j5va_tabs",
|
|
95
|
-
"
|
|
96
|
-
"
|
|
97
|
-
"
|
|
98
|
-
"
|
|
89
|
+
"lockedBanner": "t_j5va_lockedBanner",
|
|
90
|
+
"title": "t_j5va_title",
|
|
91
|
+
"field": "t_j5va_field",
|
|
92
|
+
"sortButton": "t_j5va_sortButton",
|
|
93
|
+
"dupMerge": "t_j5va_dupMerge",
|
|
94
|
+
"genOpts": "t_j5va_genOpts",
|
|
95
|
+
"genOptRow": "t_j5va_genOptRow",
|
|
96
|
+
"editorBody": "t_j5va_editorBody",
|
|
97
|
+
"dueBadge": "t_j5va_dueBadge",
|
|
98
|
+
"histUpdate": "t_j5va_histUpdate",
|
|
99
|
+
"checkField": "t_j5va_checkField",
|
|
100
|
+
"genHist": "t_j5va_genHist",
|
|
101
|
+
"status": "t_j5va_status",
|
|
102
|
+
"pwHistRow": "t_j5va_pwHistRow",
|
|
99
103
|
"revealButton": "t_j5va_revealButton",
|
|
100
|
-
"
|
|
101
|
-
"
|
|
102
|
-
"
|
|
103
|
-
"
|
|
104
|
+
"dupNames": "t_j5va_dupNames",
|
|
105
|
+
"kindFilter": "t_j5va_kindFilter",
|
|
106
|
+
"pwHistBox": "t_j5va_pwHistBox",
|
|
107
|
+
"pwBar": "t_j5va_pwBar",
|
|
108
|
+
"tabPane": "t_j5va_tabPane",
|
|
104
109
|
"totp": "t_j5va_totp",
|
|
105
|
-
"
|
|
106
|
-
"srOnly": "t_j5va_srOnly",
|
|
107
|
-
"emptyHint": "t_j5va_emptyHint",
|
|
108
|
-
"reportLine": "t_j5va_reportLine",
|
|
109
|
-
"addButton": "t_j5va_addButton",
|
|
110
|
+
"pinOn": "t_j5va_pinOn",
|
|
110
111
|
"copied": "t_j5va_copied",
|
|
111
|
-
"
|
|
112
|
-
"
|
|
113
|
-
"
|
|
114
|
-
"
|
|
115
|
-
"
|
|
116
|
-
"
|
|
117
|
-
"
|
|
118
|
-
"
|
|
119
|
-
"
|
|
120
|
-
"
|
|
121
|
-
"
|
|
122
|
-
"
|
|
123
|
-
"histDanger": "t_j5va_histDanger"
|
|
112
|
+
"reportLine": "t_j5va_reportLine",
|
|
113
|
+
"modeReadonly": "t_j5va_modeReadonly",
|
|
114
|
+
"emptyHint": "t_j5va_emptyHint",
|
|
115
|
+
"trashButton": "t_j5va_trashButton",
|
|
116
|
+
"auditRow": "t_j5va_auditRow",
|
|
117
|
+
"moreButton": "t_j5va_moreButton",
|
|
118
|
+
"lockedTag": "t_j5va_lockedTag",
|
|
119
|
+
"tab": "t_j5va_tab",
|
|
120
|
+
"secretField": "t_j5va_secretField",
|
|
121
|
+
"pwStrong": "t_j5va_pwStrong",
|
|
122
|
+
"srOnly": "t_j5va_srOnly",
|
|
123
|
+
"emptyBox": "t_j5va_emptyBox"
|
|
124
124
|
};
|
|
125
125
|
//#endregion
|
|
126
126
|
//#region src/client/VaultSection.tsx
|
|
@@ -1409,7 +1409,7 @@ window.__ModuleLoader__.load({
|
|
|
1409
1409
|
try {
|
|
1410
1410
|
const result = await get(id);
|
|
1411
1411
|
if (!result.found || result.entry === void 0) {
|
|
1412
|
-
setMessage(t("
|
|
1412
|
+
setMessage(t("entryNotFound"));
|
|
1413
1413
|
return;
|
|
1414
1414
|
}
|
|
1415
1415
|
const entry = result.entry;
|
|
@@ -1452,7 +1452,15 @@ window.__ModuleLoader__.load({
|
|
|
1452
1452
|
/** Save the current form (create or update). */
|
|
1453
1453
|
async function save() {
|
|
1454
1454
|
if (!(form.title ?? "").trim()) {
|
|
1455
|
-
setMessage(t("
|
|
1455
|
+
setMessage(t("errTitleEmpty"));
|
|
1456
|
+
return;
|
|
1457
|
+
}
|
|
1458
|
+
if (form.port !== void 0 && form.port !== "" && !/^\d{1,5}$/.test(form.port.trim())) {
|
|
1459
|
+
setMessage(t("errInvalidPort"));
|
|
1460
|
+
return;
|
|
1461
|
+
}
|
|
1462
|
+
if (form.port !== void 0 && form.port !== "" && Number(form.port) > 65535) {
|
|
1463
|
+
setMessage(t("errInvalidPort"));
|
|
1456
1464
|
return;
|
|
1457
1465
|
}
|
|
1458
1466
|
const entryPw = editor.status === "editing" ? editor.entry?.password ?? "" : "";
|
|
@@ -4396,6 +4404,8 @@ window.__ModuleLoader__.load({
|
|
|
4396
4404
|
error: "Something went wrong.",
|
|
4397
4405
|
errLocked: "Vault is locked — unlock first.",
|
|
4398
4406
|
errTitleEmpty: "Title must not be empty.",
|
|
4407
|
+
entryNotFound: "Entry not found.",
|
|
4408
|
+
errInvalidPort: "Port must be a number (1-65535).",
|
|
4399
4409
|
errInvalidVaultName: "Invalid vault name.",
|
|
4400
4410
|
errReadonly: "This action is disabled in readonly mode.",
|
|
4401
4411
|
errDetail: "Something went wrong: {detail}",
|
|
@@ -4747,6 +4757,8 @@ window.__ModuleLoader__.load({
|
|
|
4747
4757
|
error: "操作失败。",
|
|
4748
4758
|
errLocked: "保险库已锁定,请先解锁。",
|
|
4749
4759
|
errTitleEmpty: "标题不能为空。",
|
|
4760
|
+
entryNotFound: "条目不存在。",
|
|
4761
|
+
errInvalidPort: "端口必须为 1-65535 的数字。",
|
|
4750
4762
|
errInvalidVaultName: "保险库名称无效。",
|
|
4751
4763
|
errReadonly: "当前为只读模式,此操作已禁用。",
|
|
4752
4764
|
errDetail: "操作失败:{detail}",
|