dsh-vault 1.8.0 → 1.8.1-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 CHANGED
@@ -17,89 +17,89 @@ window.__ModuleLoader__.load({
17
17
  document.head.appendChild(tag);
18
18
  }
19
19
  var VaultSection_module_css_default = {
20
- "footer": "t_j5va_footer",
21
- "searchBox": "t_j5va_searchBox",
22
- "lockedBanner": "t_j5va_lockedBanner",
23
- "emptyHint": "t_j5va_emptyHint",
24
- "reportSub": "t_j5va_reportSub",
25
- "pwStrong": "t_j5va_pwStrong",
26
- "pwLabel": "t_j5va_pwLabel",
20
+ "genOpts": "t_j5va_genOpts",
21
+ "field": "t_j5va_field",
22
+ "deleteButton": "t_j5va_deleteButton",
27
23
  "modeAuto": "t_j5va_modeAuto",
28
- "editorActions": "t_j5va_editorActions",
29
- "totpRing": "t_j5va_totpRing",
30
- "pinStar": "t_j5va_pinStar",
31
- "dupGroup": "t_j5va_dupGroup",
32
- "addButton": "t_j5va_addButton",
33
- "healthBar": "t_j5va_healthBar",
24
+ "reportSub": "t_j5va_reportSub",
25
+ "toolbar": "t_j5va_toolbar",
26
+ "badgeWarn": "t_j5va_badgeWarn",
34
27
  "reportLine": "t_j5va_reportLine",
28
+ "kindChip": "t_j5va_kindChip",
29
+ "auditRow": "t_j5va_auditRow",
30
+ "detailItem": "t_j5va_detailItem",
31
+ "pwMeter": "t_j5va_pwMeter",
32
+ "dupMerge": "t_j5va_dupMerge",
35
33
  "pwWeak": "t_j5va_pwWeak",
36
- "empty": "t_j5va_empty",
37
- "trashButton": "t_j5va_trashButton",
38
- "modeAsk": "t_j5va_modeAsk",
39
- "kindFilter": "t_j5va_kindFilter",
40
- "dangerButton": "t_j5va_dangerButton",
41
- "saveButton": "t_j5va_saveButton",
42
- "field": "t_j5va_field",
43
- "reportBox": "t_j5va_reportBox",
44
- "lockedTag": "t_j5va_lockedTag",
34
+ "totp": "t_j5va_totp",
35
+ "rowDue": "t_j5va_rowDue",
36
+ "highBadge": "t_j5va_highBadge",
45
37
  "badge": "t_j5va_badge",
46
- "dueBadge": "t_j5va_dueBadge",
47
- "badgeOk": "t_j5va_badgeOk",
48
- "list": "t_j5va_list",
49
- "srOnly": "t_j5va_srOnly",
50
- "toolbar": "t_j5va_toolbar",
51
- "status": "t_j5va_status",
52
- "editor": "t_j5va_editor",
53
- "deleteButton": "t_j5va_deleteButton",
54
- "error": "t_j5va_error",
55
- "reportTitle": "t_j5va_reportTitle",
56
- "title": "t_j5va_title",
57
- "section": "t_j5va_section",
58
- "modeReadonly": "t_j5va_modeReadonly",
38
+ "reportBox": "t_j5va_reportBox",
39
+ "dupNames": "t_j5va_dupNames",
40
+ "emptyHint": "t_j5va_emptyHint",
59
41
  "sortButton": "t_j5va_sortButton",
60
- "pwFair": "t_j5va_pwFair",
61
- "genOptRow": "t_j5va_genOptRow",
62
- "scoreRing": "t_j5va_scoreRing",
63
- "kindChip": "t_j5va_kindChip",
64
42
  "checkField": "t_j5va_checkField",
43
+ "rowMain": "t_j5va_rowMain",
65
44
  "rowExpired": "t_j5va_rowExpired",
66
- "tabActive": "t_j5va_tabActive",
67
- "badgeDanger": "t_j5va_badgeDanger",
68
- "backupButton": "t_j5va_backupButton",
69
- "policyField": "t_j5va_policyField",
70
- "rowDue": "t_j5va_rowDue",
71
- "totp": "t_j5va_totp",
72
- "auditRow": "t_j5va_auditRow",
73
- "detailItem": "t_j5va_detailItem",
74
- "intro": "t_j5va_intro",
45
+ "genOptRow": "t_j5va_genOptRow",
46
+ "dupGroup": "t_j5va_dupGroup",
75
47
  "copied": "t_j5va_copied",
76
- "rowMain": "t_j5va_rowMain",
48
+ "modeAsk": "t_j5va_modeAsk",
49
+ "pwStrong": "t_j5va_pwStrong",
50
+ "tabs": "t_j5va_tabs",
51
+ "tab": "t_j5va_tab",
52
+ "trashButton": "t_j5va_trashButton",
53
+ "pinStar": "t_j5va_pinStar",
77
54
  "tabPane": "t_j5va_tabPane",
78
- "retryButton": "t_j5va_retryButton",
79
- "auditIssues": "t_j5va_auditIssues",
55
+ "modeReadonly": "t_j5va_modeReadonly",
56
+ "lockedBanner": "t_j5va_lockedBanner",
57
+ "searchBox": "t_j5va_searchBox",
58
+ "revealButton": "t_j5va_revealButton",
59
+ "error": "t_j5va_error",
60
+ "policyField": "t_j5va_policyField",
61
+ "dangerButton": "t_j5va_dangerButton",
80
62
  "editorBody": "t_j5va_editorBody",
81
- "pwBar": "t_j5va_pwBar",
82
- "genHist": "t_j5va_genHist",
83
- "row": "t_j5va_row",
84
- "tabs": "t_j5va_tabs",
85
63
  "clearButton": "t_j5va_clearButton",
86
- "genOpts": "t_j5va_genOpts",
87
- "pwMeter": "t_j5va_pwMeter",
88
- "highBadge": "t_j5va_highBadge",
89
- "badgeWarn": "t_j5va_badgeWarn",
90
- "revealButton": "t_j5va_revealButton",
91
- "rowActions": "t_j5va_rowActions",
64
+ "healthBar": "t_j5va_healthBar",
65
+ "totpRing": "t_j5va_totpRing",
92
66
  "policyBar": "t_j5va_policyBar",
93
- "secretField": "t_j5va_secretField",
94
67
  "emptyBox": "t_j5va_emptyBox",
68
+ "pwLabel": "t_j5va_pwLabel",
95
69
  "uriCode": "t_j5va_uriCode",
96
- "kindIcon": "t_j5va_kindIcon",
70
+ "title": "t_j5va_title",
71
+ "dueBadge": "t_j5va_dueBadge",
72
+ "lockedTag": "t_j5va_lockedTag",
73
+ "reportTitle": "t_j5va_reportTitle",
74
+ "retryButton": "t_j5va_retryButton",
75
+ "backupButton": "t_j5va_backupButton",
76
+ "rowActions": "t_j5va_rowActions",
77
+ "pwBar": "t_j5va_pwBar",
78
+ "row": "t_j5va_row",
79
+ "editorActions": "t_j5va_editorActions",
80
+ "badgeOk": "t_j5va_badgeOk",
81
+ "badgeDanger": "t_j5va_badgeDanger",
82
+ "editor": "t_j5va_editor",
83
+ "footer": "t_j5va_footer",
84
+ "detailBox": "t_j5va_detailBox",
85
+ "genHist": "t_j5va_genHist",
86
+ "section": "t_j5va_section",
87
+ "kindFilter": "t_j5va_kindFilter",
88
+ "secretField": "t_j5va_secretField",
97
89
  "resultCount": "t_j5va_resultCount",
98
- "dupNames": "t_j5va_dupNames",
90
+ "status": "t_j5va_status",
91
+ "kindIcon": "t_j5va_kindIcon",
92
+ "srOnly": "t_j5va_srOnly",
93
+ "empty": "t_j5va_empty",
94
+ "scoreRing": "t_j5va_scoreRing",
95
+ "auditIssues": "t_j5va_auditIssues",
96
+ "tabActive": "t_j5va_tabActive",
97
+ "saveButton": "t_j5va_saveButton",
99
98
  "identity": "t_j5va_identity",
100
- "detailBox": "t_j5va_detailBox",
101
- "dupMerge": "t_j5va_dupMerge",
102
- "tab": "t_j5va_tab"
99
+ "addButton": "t_j5va_addButton",
100
+ "pwFair": "t_j5va_pwFair",
101
+ "list": "t_j5va_list",
102
+ "intro": "t_j5va_intro"
103
103
  };
104
104
  //#endregion
105
105
  //#region src/client/VaultSection.tsx
@@ -740,7 +740,8 @@ window.__ModuleLoader__.load({
740
740
  }
741
741
  /** Export the vault as a 1Password 1PUX archive. */
742
742
  async function runExport1pux() {
743
- const path = window.prompt(t("export1puxPrompt"));
743
+ const suggested = t("exportDefaultPath").replace("{file}", `${(/* @__PURE__ */ new Date()).toISOString().slice(0, 10)}.1pux`);
744
+ const path = window.prompt(`${t("export1puxPrompt")}\n${t("exportPathHint")}: ${suggested}`, suggested);
744
745
  if (path === null || path.trim() === "") return;
745
746
  setBusy(true);
746
747
  setMessage(null);
@@ -755,7 +756,8 @@ window.__ModuleLoader__.load({
755
756
  }
756
757
  /** Export the vault as a Bitwarden JSON document. */
757
758
  async function runExportBitwarden() {
758
- const path = window.prompt(t("exportBitwardenPrompt"));
759
+ const suggested = t("exportDefaultPath").replace("{file}", `${(/* @__PURE__ */ new Date()).toISOString().slice(0, 10)}.json`);
760
+ const path = window.prompt(`${t("exportBitwardenPrompt")}\n${t("exportPathHint")}: ${suggested}`, suggested);
759
761
  if (path === null || path.trim() === "") return;
760
762
  setBusy(true);
761
763
  setMessage(null);
@@ -1418,9 +1420,12 @@ window.__ModuleLoader__.load({
1418
1420
  setCopiedId(id);
1419
1421
  window.setTimeout(() => setCopiedId(null), 3e3);
1420
1422
  if (clipboardTimer.current !== null) window.clearTimeout(clipboardTimer.current);
1423
+ const copied = value;
1421
1424
  clipboardTimer.current = window.setTimeout(() => {
1422
- navigator.clipboard.writeText("").catch(() => {});
1423
1425
  clipboardTimer.current = null;
1426
+ navigator.clipboard.readText().then((current) => {
1427
+ if (current === copied) navigator.clipboard.writeText("").catch(() => {});
1428
+ }).catch(() => {});
1424
1429
  }, CLIPBOARD_CLEAR_MS);
1425
1430
  }
1426
1431
  /** Fetch and show the otpauth URI for an entry (for adding to another device). */
@@ -3694,6 +3699,8 @@ window.__ModuleLoader__.load({
3694
3699
  export1pux: "Export 1Password 1PUX",
3695
3700
  export1puxDesc: "1Password 1PUX archive (.1pux)",
3696
3701
  export1puxPrompt: "Path to the output .1pux file:",
3702
+ exportDefaultPath: "dsh-vault-export-{file}",
3703
+ exportPathHint: "Suggested path (edit if needed)",
3697
3704
  exportBitwarden: "Export Bitwarden JSON",
3698
3705
  exportBitwardenDesc: "Bitwarden JSON document (.json)",
3699
3706
  exportBitwardenPrompt: "Path to the output .json file:",
@@ -4010,6 +4017,8 @@ window.__ModuleLoader__.load({
4010
4017
  export1pux: "导出 1Password 1PUX",
4011
4018
  export1puxDesc: "1Password 1PUX 归档(.1pux)",
4012
4019
  export1puxPrompt: "输出 .1pux 文件路径:",
4020
+ exportDefaultPath: "dsh-vault-export-{file}",
4021
+ exportPathHint: "建议路径(可按需修改)",
4013
4022
  exportBitwarden: "导出 Bitwarden JSON",
4014
4023
  exportBitwardenDesc: "Bitwarden JSON 文档(.json)",
4015
4024
  exportBitwardenPrompt: "输出 .json 文件路径:",