dsh-vault 1.9.0-rc.2 → 1.9.0
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 +115 -84
- package/lib/client.js.map +1 -1
- package/package.json +1 -1
package/lib/client.js
CHANGED
|
@@ -17,91 +17,91 @@ window.__ModuleLoader__.load({
|
|
|
17
17
|
document.head.appendChild(tag);
|
|
18
18
|
}
|
|
19
19
|
var VaultSection_module_css_default = {
|
|
20
|
-
"
|
|
21
|
-
"
|
|
20
|
+
"reportSub": "t_j5va_reportSub",
|
|
21
|
+
"backupButton": "t_j5va_backupButton",
|
|
22
|
+
"dangerButton": "t_j5va_dangerButton",
|
|
23
|
+
"pwFair": "t_j5va_pwFair",
|
|
24
|
+
"pwLabel": "t_j5va_pwLabel",
|
|
25
|
+
"reportBox": "t_j5va_reportBox",
|
|
26
|
+
"pinStar": "t_j5va_pinStar",
|
|
22
27
|
"dupMerge": "t_j5va_dupMerge",
|
|
23
|
-
"uriCode": "t_j5va_uriCode",
|
|
24
|
-
"clearButton": "t_j5va_clearButton",
|
|
25
28
|
"genHist": "t_j5va_genHist",
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"saveButton": "t_j5va_saveButton",
|
|
30
|
-
"title": "t_j5va_title",
|
|
31
|
-
"policyBar": "t_j5va_policyBar",
|
|
32
|
-
"editorActions": "t_j5va_editorActions",
|
|
33
|
-
"reportSub": "t_j5va_reportSub",
|
|
34
|
-
"detailItem": "t_j5va_detailItem",
|
|
29
|
+
"modeAsk": "t_j5va_modeAsk",
|
|
30
|
+
"badgeDanger": "t_j5va_badgeDanger",
|
|
31
|
+
"reportTitle": "t_j5va_reportTitle",
|
|
35
32
|
"sortButton": "t_j5va_sortButton",
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
"
|
|
39
|
-
"
|
|
40
|
-
"
|
|
33
|
+
"totp": "t_j5va_totp",
|
|
34
|
+
"checkField": "t_j5va_checkField",
|
|
35
|
+
"genOptRow": "t_j5va_genOptRow",
|
|
36
|
+
"pwMeter": "t_j5va_pwMeter",
|
|
37
|
+
"modeReadonly": "t_j5va_modeReadonly",
|
|
38
|
+
"tabActive": "t_j5va_tabActive",
|
|
39
|
+
"rowMain": "t_j5va_rowMain",
|
|
40
|
+
"kindIcon": "t_j5va_kindIcon",
|
|
41
|
+
"uriCode": "t_j5va_uriCode",
|
|
42
|
+
"modeAuto": "t_j5va_modeAuto",
|
|
43
|
+
"section": "t_j5va_section",
|
|
44
|
+
"badgeOk": "t_j5va_badgeOk",
|
|
45
|
+
"status": "t_j5va_status",
|
|
46
|
+
"dupGroup": "t_j5va_dupGroup",
|
|
47
|
+
"intro": "t_j5va_intro",
|
|
48
|
+
"secretField": "t_j5va_secretField",
|
|
41
49
|
"tabs": "t_j5va_tabs",
|
|
42
|
-
"
|
|
43
|
-
"
|
|
44
|
-
"
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
"
|
|
48
|
-
"modeAsk": "t_j5va_modeAsk",
|
|
49
|
-
"healthBar": "t_j5va_healthBar",
|
|
50
|
-
"row": "t_j5va_row",
|
|
50
|
+
"editor": "t_j5va_editor",
|
|
51
|
+
"pinOff": "t_j5va_pinOff",
|
|
52
|
+
"retryButton": "t_j5va_retryButton",
|
|
53
|
+
"identity": "t_j5va_identity",
|
|
54
|
+
"srOnly": "t_j5va_srOnly",
|
|
55
|
+
"clearButton": "t_j5va_clearButton",
|
|
51
56
|
"badge": "t_j5va_badge",
|
|
52
|
-
"footer": "t_j5va_footer",
|
|
53
|
-
"list": "t_j5va_list",
|
|
54
|
-
"field": "t_j5va_field",
|
|
55
|
-
"trashButton": "t_j5va_trashButton",
|
|
56
|
-
"detailBox": "t_j5va_detailBox",
|
|
57
|
-
"kindIcon": "t_j5va_kindIcon",
|
|
58
57
|
"policyField": "t_j5va_policyField",
|
|
58
|
+
"auditIssues": "t_j5va_auditIssues",
|
|
59
59
|
"emptyHint": "t_j5va_emptyHint",
|
|
60
|
-
"
|
|
61
|
-
"
|
|
62
|
-
"
|
|
60
|
+
"pwWeak": "t_j5va_pwWeak",
|
|
61
|
+
"deleteButton": "t_j5va_deleteButton",
|
|
62
|
+
"rowDue": "t_j5va_rowDue",
|
|
63
|
+
"kindFilter": "t_j5va_kindFilter",
|
|
64
|
+
"copied": "t_j5va_copied",
|
|
65
|
+
"saveButton": "t_j5va_saveButton",
|
|
66
|
+
"title": "t_j5va_title",
|
|
63
67
|
"emptyBox": "t_j5va_emptyBox",
|
|
64
|
-
"
|
|
68
|
+
"searchBox": "t_j5va_searchBox",
|
|
69
|
+
"dueBadge": "t_j5va_dueBadge",
|
|
70
|
+
"rowActions": "t_j5va_rowActions",
|
|
71
|
+
"reportLine": "t_j5va_reportLine",
|
|
72
|
+
"error": "t_j5va_error",
|
|
65
73
|
"lockedBanner": "t_j5va_lockedBanner",
|
|
66
|
-
"
|
|
74
|
+
"trashButton": "t_j5va_trashButton",
|
|
75
|
+
"row": "t_j5va_row",
|
|
76
|
+
"badgeWarn": "t_j5va_badgeWarn",
|
|
77
|
+
"scoreRing": "t_j5va_scoreRing",
|
|
78
|
+
"detailBox": "t_j5va_detailBox",
|
|
67
79
|
"pinOn": "t_j5va_pinOn",
|
|
68
|
-
"
|
|
69
|
-
"
|
|
70
|
-
"
|
|
71
|
-
"badgeOk": "t_j5va_badgeOk",
|
|
72
|
-
"copied": "t_j5va_copied",
|
|
73
|
-
"genOptRow": "t_j5va_genOptRow",
|
|
80
|
+
"footer": "t_j5va_footer",
|
|
81
|
+
"revealButton": "t_j5va_revealButton",
|
|
82
|
+
"addButton": "t_j5va_addButton",
|
|
74
83
|
"rowExpired": "t_j5va_rowExpired",
|
|
75
|
-
"
|
|
76
|
-
"
|
|
77
|
-
"
|
|
78
|
-
"
|
|
79
|
-
"
|
|
80
|
-
"
|
|
81
|
-
"
|
|
82
|
-
"
|
|
83
|
-
"
|
|
84
|
+
"detailItem": "t_j5va_detailItem",
|
|
85
|
+
"dupNames": "t_j5va_dupNames",
|
|
86
|
+
"auditRow": "t_j5va_auditRow",
|
|
87
|
+
"list": "t_j5va_list",
|
|
88
|
+
"editorBody": "t_j5va_editorBody",
|
|
89
|
+
"editorActions": "t_j5va_editorActions",
|
|
90
|
+
"pwBar": "t_j5va_pwBar",
|
|
91
|
+
"resultCount": "t_j5va_resultCount",
|
|
92
|
+
"pwStrong": "t_j5va_pwStrong",
|
|
93
|
+
"lockedTag": "t_j5va_lockedTag",
|
|
84
94
|
"tabPane": "t_j5va_tabPane",
|
|
85
|
-
"retryButton": "t_j5va_retryButton",
|
|
86
|
-
"secretField": "t_j5va_secretField",
|
|
87
|
-
"section": "t_j5va_section",
|
|
88
|
-
"badgeDanger": "t_j5va_badgeDanger",
|
|
89
|
-
"pwMeter": "t_j5va_pwMeter",
|
|
90
|
-
"intro": "t_j5va_intro",
|
|
91
|
-
"deleteButton": "t_j5va_deleteButton",
|
|
92
|
-
"empty": "t_j5va_empty",
|
|
93
|
-
"dueBadge": "t_j5va_dueBadge",
|
|
94
|
-
"pinOff": "t_j5va_pinOff",
|
|
95
|
-
"reportTitle": "t_j5va_reportTitle",
|
|
96
|
-
"kindChip": "t_j5va_kindChip",
|
|
97
95
|
"toolbar": "t_j5va_toolbar",
|
|
98
|
-
"badgeWarn": "t_j5va_badgeWarn",
|
|
99
96
|
"totpRing": "t_j5va_totpRing",
|
|
100
|
-
"
|
|
97
|
+
"highBadge": "t_j5va_highBadge",
|
|
98
|
+
"policyBar": "t_j5va_policyBar",
|
|
99
|
+
"kindChip": "t_j5va_kindChip",
|
|
100
|
+
"healthBar": "t_j5va_healthBar",
|
|
101
|
+
"empty": "t_j5va_empty",
|
|
101
102
|
"genOpts": "t_j5va_genOpts",
|
|
102
|
-
"
|
|
103
|
-
"
|
|
104
|
-
"pwBar": "t_j5va_pwBar"
|
|
103
|
+
"tab": "t_j5va_tab",
|
|
104
|
+
"field": "t_j5va_field"
|
|
105
105
|
};
|
|
106
106
|
//#endregion
|
|
107
107
|
//#region src/client/VaultSection.tsx
|
|
@@ -322,7 +322,9 @@ window.__ModuleLoader__.load({
|
|
|
322
322
|
symbols: true,
|
|
323
323
|
excludeAmbiguous: false,
|
|
324
324
|
passphrase: false,
|
|
325
|
-
words: 4
|
|
325
|
+
words: 4,
|
|
326
|
+
separator: "-",
|
|
327
|
+
wordDigits: true
|
|
326
328
|
});
|
|
327
329
|
const [showGenOpts, setShowGenOpts] = (0, react.useState)(false);
|
|
328
330
|
const [pwStrength, setPwStrength] = (0, react.useState)(null);
|
|
@@ -3486,19 +3488,44 @@ window.__ModuleLoader__.load({
|
|
|
3486
3488
|
}))
|
|
3487
3489
|
})]
|
|
3488
3490
|
}),
|
|
3489
|
-
genOpts.passphrase ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(
|
|
3490
|
-
|
|
3491
|
-
|
|
3492
|
-
|
|
3493
|
-
|
|
3494
|
-
|
|
3495
|
-
|
|
3496
|
-
|
|
3497
|
-
|
|
3498
|
-
|
|
3499
|
-
|
|
3500
|
-
|
|
3501
|
-
|
|
3491
|
+
genOpts.passphrase ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
|
|
3492
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
|
|
3493
|
+
className: VaultSection_module_css_default.genOptRow,
|
|
3494
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t("genWords") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
3495
|
+
type: "number",
|
|
3496
|
+
min: 2,
|
|
3497
|
+
max: 12,
|
|
3498
|
+
value: genOpts.words,
|
|
3499
|
+
onChange: (event) => setGenOpts((previous) => ({
|
|
3500
|
+
...previous,
|
|
3501
|
+
words: Math.max(2, Math.min(12, Number(event.target.value) || 4))
|
|
3502
|
+
}))
|
|
3503
|
+
})]
|
|
3504
|
+
}),
|
|
3505
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
|
|
3506
|
+
className: VaultSection_module_css_default.genOptRow,
|
|
3507
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t("genSeparator") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
3508
|
+
type: "text",
|
|
3509
|
+
maxLength: 4,
|
|
3510
|
+
value: genOpts.separator,
|
|
3511
|
+
onChange: (event) => setGenOpts((previous) => ({
|
|
3512
|
+
...previous,
|
|
3513
|
+
separator: event.target.value
|
|
3514
|
+
}))
|
|
3515
|
+
})]
|
|
3516
|
+
}),
|
|
3517
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
|
|
3518
|
+
className: VaultSection_module_css_default.genOptRow,
|
|
3519
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t("genWordDigits") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
3520
|
+
type: "checkbox",
|
|
3521
|
+
checked: genOpts.wordDigits,
|
|
3522
|
+
onChange: (event) => setGenOpts((previous) => ({
|
|
3523
|
+
...previous,
|
|
3524
|
+
wordDigits: event.target.checked
|
|
3525
|
+
}))
|
|
3526
|
+
})]
|
|
3527
|
+
})
|
|
3528
|
+
] }) : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
|
|
3502
3529
|
className: VaultSection_module_css_default.genOptRow,
|
|
3503
3530
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t("genLength") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
3504
3531
|
type: "number",
|
|
@@ -3903,6 +3930,8 @@ window.__ModuleLoader__.load({
|
|
|
3903
3930
|
purgeOneConfirm: "Permanently delete \"{name}\"? This cannot be undone.",
|
|
3904
3931
|
genPassphrase: "Memorable passphrase",
|
|
3905
3932
|
genWords: "Words (2–12)",
|
|
3933
|
+
genSeparator: "Separator",
|
|
3934
|
+
genWordDigits: "Append 2 digits",
|
|
3906
3935
|
kindLogin: "Login",
|
|
3907
3936
|
kindSsh: "SSH",
|
|
3908
3937
|
kindApiKey: "API key",
|
|
@@ -4225,6 +4254,8 @@ window.__ModuleLoader__.load({
|
|
|
4225
4254
|
purgeOneConfirm: "永久删除「{name}」?此操作不可撤销。",
|
|
4226
4255
|
genPassphrase: "易记短语密码",
|
|
4227
4256
|
genWords: "单词数(2–12)",
|
|
4257
|
+
genSeparator: "分隔符",
|
|
4258
|
+
genWordDigits: "尾部加 2 位数字",
|
|
4228
4259
|
kindLogin: "登录",
|
|
4229
4260
|
kindSsh: "SSH",
|
|
4230
4261
|
kindApiKey: "API 密钥",
|