dsh-vault 1.7.1 → 1.8.0-rc.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/lib/client.js CHANGED
@@ -17,89 +17,89 @@ window.__ModuleLoader__.load({
17
17
  document.head.appendChild(tag);
18
18
  }
19
19
  var VaultSection_module_css_default = {
20
- "resultCount": "t_j5va_resultCount",
21
- "copied": "t_j5va_copied",
22
- "genOptRow": "t_j5va_genOptRow",
20
+ "detailBox": "t_j5va_detailBox",
21
+ "title": "t_j5va_title",
22
+ "modeAsk": "t_j5va_modeAsk",
23
+ "reportLine": "t_j5va_reportLine",
23
24
  "srOnly": "t_j5va_srOnly",
24
- "rowExpired": "t_j5va_rowExpired",
25
- "badgeOk": "t_j5va_badgeOk",
26
- "dangerButton": "t_j5va_dangerButton",
27
- "checkField": "t_j5va_checkField",
28
- "toolbar": "t_j5va_toolbar",
29
- "dupMerge": "t_j5va_dupMerge",
30
- "pinStar": "t_j5va_pinStar",
31
- "auditRow": "t_j5va_auditRow",
32
- "searchBox": "t_j5va_searchBox",
33
- "pwLabel": "t_j5va_pwLabel",
34
- "lockedBanner": "t_j5va_lockedBanner",
35
- "footer": "t_j5va_footer",
36
25
  "detailItem": "t_j5va_detailItem",
26
+ "kindChip": "t_j5va_kindChip",
27
+ "editorBody": "t_j5va_editorBody",
37
28
  "dupGroup": "t_j5va_dupGroup",
29
+ "status": "t_j5va_status",
30
+ "toolbar": "t_j5va_toolbar",
31
+ "secretField": "t_j5va_secretField",
32
+ "searchBox": "t_j5va_searchBox",
33
+ "healthBar": "t_j5va_healthBar",
34
+ "checkField": "t_j5va_checkField",
35
+ "auditRow": "t_j5va_auditRow",
36
+ "totp": "t_j5va_totp",
37
+ "empty": "t_j5va_empty",
38
+ "kindIcon": "t_j5va_kindIcon",
39
+ "editorActions": "t_j5va_editorActions",
40
+ "reportSub": "t_j5va_reportSub",
41
+ "rowDue": "t_j5va_rowDue",
42
+ "uriCode": "t_j5va_uriCode",
43
+ "rowActions": "t_j5va_rowActions",
44
+ "pinStar": "t_j5va_pinStar",
38
45
  "reportBox": "t_j5va_reportBox",
39
- "totpRing": "t_j5va_totpRing",
46
+ "resultCount": "t_j5va_resultCount",
47
+ "revealButton": "t_j5va_revealButton",
40
48
  "dupNames": "t_j5va_dupNames",
49
+ "clearButton": "t_j5va_clearButton",
50
+ "dangerButton": "t_j5va_dangerButton",
51
+ "badgeOk": "t_j5va_badgeOk",
52
+ "copied": "t_j5va_copied",
53
+ "rowExpired": "t_j5va_rowExpired",
54
+ "totpRing": "t_j5va_totpRing",
55
+ "sortButton": "t_j5va_sortButton",
56
+ "section": "t_j5va_section",
57
+ "badge": "t_j5va_badge",
58
+ "highBadge": "t_j5va_highBadge",
59
+ "lockedBanner": "t_j5va_lockedBanner",
60
+ "dupMerge": "t_j5va_dupMerge",
61
+ "tabActive": "t_j5va_tabActive",
62
+ "deleteButton": "t_j5va_deleteButton",
63
+ "intro": "t_j5va_intro",
64
+ "pwWeak": "t_j5va_pwWeak",
65
+ "pwStrong": "t_j5va_pwStrong",
66
+ "genHist": "t_j5va_genHist",
67
+ "badgeDanger": "t_j5va_badgeDanger",
68
+ "badgeWarn": "t_j5va_badgeWarn",
69
+ "scoreRing": "t_j5va_scoreRing",
70
+ "kindFilter": "t_j5va_kindFilter",
71
+ "pwLabel": "t_j5va_pwLabel",
41
72
  "reportTitle": "t_j5va_reportTitle",
42
- "reportSub": "t_j5va_reportSub",
73
+ "lockedTag": "t_j5va_lockedTag",
43
74
  "tabs": "t_j5va_tabs",
44
- "badgeWarn": "t_j5va_badgeWarn",
45
- "healthBar": "t_j5va_healthBar",
46
- "intro": "t_j5va_intro",
75
+ "pwMeter": "t_j5va_pwMeter",
76
+ "addButton": "t_j5va_addButton",
47
77
  "tabPane": "t_j5va_tabPane",
48
- "badge": "t_j5va_badge",
49
- "pwFair": "t_j5va_pwFair",
50
- "editor": "t_j5va_editor",
51
78
  "modeReadonly": "t_j5va_modeReadonly",
52
- "editorBody": "t_j5va_editorBody",
79
+ "field": "t_j5va_field",
53
80
  "list": "t_j5va_list",
54
- "tabActive": "t_j5va_tabActive",
81
+ "policyField": "t_j5va_policyField",
82
+ "identity": "t_j5va_identity",
55
83
  "backupButton": "t_j5va_backupButton",
56
- "status": "t_j5va_status",
57
- "rowMain": "t_j5va_rowMain",
58
- "kindFilter": "t_j5va_kindFilter",
84
+ "row": "t_j5va_row",
85
+ "modeAuto": "t_j5va_modeAuto",
86
+ "footer": "t_j5va_footer",
87
+ "auditIssues": "t_j5va_auditIssues",
88
+ "emptyBox": "t_j5va_emptyBox",
59
89
  "retryButton": "t_j5va_retryButton",
60
- "modeAsk": "t_j5va_modeAsk",
61
- "deleteButton": "t_j5va_deleteButton",
62
- "genOpts": "t_j5va_genOpts",
63
- "pwBar": "t_j5va_pwBar",
64
90
  "tab": "t_j5va_tab",
65
- "rowDue": "t_j5va_rowDue",
66
- "kindIcon": "t_j5va_kindIcon",
67
- "pwStrong": "t_j5va_pwStrong",
91
+ "rowMain": "t_j5va_rowMain",
92
+ "saveButton": "t_j5va_saveButton",
68
93
  "trashButton": "t_j5va_trashButton",
69
- "kindChip": "t_j5va_kindChip",
70
- "pwWeak": "t_j5va_pwWeak",
71
- "sortButton": "t_j5va_sortButton",
72
- "empty": "t_j5va_empty",
73
- "identity": "t_j5va_identity",
74
- "emptyHint": "t_j5va_emptyHint",
75
- "field": "t_j5va_field",
76
- "error": "t_j5va_error",
77
94
  "dueBadge": "t_j5va_dueBadge",
78
- "reportLine": "t_j5va_reportLine",
79
- "uriCode": "t_j5va_uriCode",
80
- "revealButton": "t_j5va_revealButton",
81
- "editorActions": "t_j5va_editorActions",
82
- "badgeDanger": "t_j5va_badgeDanger",
83
- "detailBox": "t_j5va_detailBox",
84
- "lockedTag": "t_j5va_lockedTag",
85
- "totp": "t_j5va_totp",
86
- "saveButton": "t_j5va_saveButton",
87
- "scoreRing": "t_j5va_scoreRing",
88
- "pwMeter": "t_j5va_pwMeter",
89
- "secretField": "t_j5va_secretField",
95
+ "genOptRow": "t_j5va_genOptRow",
96
+ "error": "t_j5va_error",
90
97
  "policyBar": "t_j5va_policyBar",
91
- "row": "t_j5va_row",
92
- "title": "t_j5va_title",
93
- "highBadge": "t_j5va_highBadge",
94
- "auditIssues": "t_j5va_auditIssues",
95
- "section": "t_j5va_section",
96
- "addButton": "t_j5va_addButton",
97
- "policyField": "t_j5va_policyField",
98
- "genHist": "t_j5va_genHist",
99
- "clearButton": "t_j5va_clearButton",
100
- "rowActions": "t_j5va_rowActions",
101
- "modeAuto": "t_j5va_modeAuto",
102
- "emptyBox": "t_j5va_emptyBox"
98
+ "editor": "t_j5va_editor",
99
+ "genOpts": "t_j5va_genOpts",
100
+ "pwFair": "t_j5va_pwFair",
101
+ "pwBar": "t_j5va_pwBar",
102
+ "emptyHint": "t_j5va_emptyHint"
103
103
  };
104
104
  //#endregion
105
105
  //#region src/client/VaultSection.tsx
@@ -318,7 +318,9 @@ window.__ModuleLoader__.load({
318
318
  lowercase: true,
319
319
  digits: true,
320
320
  symbols: true,
321
- excludeAmbiguous: false
321
+ excludeAmbiguous: false,
322
+ passphrase: false,
323
+ words: 4
322
324
  });
323
325
  const [showGenOpts, setShowGenOpts] = (0, react.useState)(false);
324
326
  const [pwStrength, setPwStrength] = (0, react.useState)(null);
@@ -3400,6 +3402,29 @@ window.__ModuleLoader__.load({
3400
3402
  className: VaultSection_module_css_default.genOpts,
3401
3403
  children: [
3402
3404
  /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
3405
+ className: VaultSection_module_css_default.genOptRow,
3406
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t("genPassphrase") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
3407
+ type: "checkbox",
3408
+ checked: genOpts.passphrase,
3409
+ onChange: (event) => setGenOpts((previous) => ({
3410
+ ...previous,
3411
+ passphrase: event.target.checked
3412
+ }))
3413
+ })]
3414
+ }),
3415
+ genOpts.passphrase ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
3416
+ className: VaultSection_module_css_default.genOptRow,
3417
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t("genWords") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
3418
+ type: "number",
3419
+ min: 2,
3420
+ max: 12,
3421
+ value: genOpts.words,
3422
+ onChange: (event) => setGenOpts((previous) => ({
3423
+ ...previous,
3424
+ words: Math.max(2, Math.min(12, Number(event.target.value) || 4))
3425
+ }))
3426
+ })]
3427
+ }) : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
3403
3428
  className: VaultSection_module_css_default.genOptRow,
3404
3429
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t("genLength") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
3405
3430
  type: "number",
@@ -3411,21 +3436,7 @@ window.__ModuleLoader__.load({
3411
3436
  length: Math.max(6, Math.min(64, Number(event.target.value) || 24))
3412
3437
  }))
3413
3438
  })]
3414
- }),
3415
- genHistory.length > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
3416
- className: VaultSection_module_css_default.genHist,
3417
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", { children: [t("genHistory"), ":"] }), genHistory.slice(0, 3).map((h, i) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
3418
- type: "button",
3419
- className: VaultSection_module_css_default.revealButton,
3420
- onClick: () => setForm((previous) => ({
3421
- ...previous,
3422
- password: h.password
3423
- })),
3424
- title: new Date(h.at).toLocaleString(),
3425
- children: h.password
3426
- }, i))]
3427
- }),
3428
- [
3439
+ }), [
3429
3440
  "uppercase",
3430
3441
  "lowercase",
3431
3442
  "digits",
@@ -3441,7 +3452,20 @@ window.__ModuleLoader__.load({
3441
3452
  [key]: event.target.checked
3442
3453
  }))
3443
3454
  })]
3444
- }, key))
3455
+ }, key))] }),
3456
+ genHistory.length > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
3457
+ className: VaultSection_module_css_default.genHist,
3458
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", { children: [t("genHistory"), ":"] }), genHistory.slice(0, 3).map((h, i) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
3459
+ type: "button",
3460
+ className: VaultSection_module_css_default.revealButton,
3461
+ onClick: () => setForm((previous) => ({
3462
+ ...previous,
3463
+ password: h.password
3464
+ })),
3465
+ title: new Date(h.at).toLocaleString(),
3466
+ children: h.password
3467
+ }, i))]
3468
+ })
3445
3469
  ]
3446
3470
  }),
3447
3471
  /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
@@ -3797,6 +3821,8 @@ window.__ModuleLoader__.load({
3797
3821
  autoLockNeverHint: "auto-lock off",
3798
3822
  purge: "Delete permanently",
3799
3823
  purgeOneConfirm: "Permanently delete \"{name}\"? This cannot be undone.",
3824
+ genPassphrase: "Memorable passphrase",
3825
+ genWords: "Words (2–12)",
3800
3826
  kindLogin: "Login",
3801
3827
  kindSsh: "SSH",
3802
3828
  kindApiKey: "API key",
@@ -4111,6 +4137,8 @@ window.__ModuleLoader__.load({
4111
4137
  autoLockNeverHint: "自动锁定已关闭",
4112
4138
  purge: "永久删除",
4113
4139
  purgeOneConfirm: "永久删除「{name}」?此操作不可撤销。",
4140
+ genPassphrase: "易记短语密码",
4141
+ genWords: "单词数(2–12)",
4114
4142
  kindLogin: "登录",
4115
4143
  kindSsh: "SSH",
4116
4144
  kindApiKey: "API 密钥",