dsh-vault 1.8.0-rc.1 → 1.8.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 CHANGED
@@ -17,89 +17,89 @@ window.__ModuleLoader__.load({
17
17
  document.head.appendChild(tag);
18
18
  }
19
19
  var VaultSection_module_css_default = {
20
- "detailBox": "t_j5va_detailBox",
21
- "title": "t_j5va_title",
22
- "modeAsk": "t_j5va_modeAsk",
23
- "reportLine": "t_j5va_reportLine",
24
- "srOnly": "t_j5va_srOnly",
25
- "detailItem": "t_j5va_detailItem",
26
- "kindChip": "t_j5va_kindChip",
27
- "editorBody": "t_j5va_editorBody",
28
- "dupGroup": "t_j5va_dupGroup",
29
- "status": "t_j5va_status",
30
- "toolbar": "t_j5va_toolbar",
31
- "secretField": "t_j5va_secretField",
20
+ "footer": "t_j5va_footer",
32
21
  "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",
22
+ "lockedBanner": "t_j5va_lockedBanner",
23
+ "emptyHint": "t_j5va_emptyHint",
40
24
  "reportSub": "t_j5va_reportSub",
41
- "rowDue": "t_j5va_rowDue",
42
- "uriCode": "t_j5va_uriCode",
43
- "rowActions": "t_j5va_rowActions",
25
+ "pwStrong": "t_j5va_pwStrong",
26
+ "pwLabel": "t_j5va_pwLabel",
27
+ "modeAuto": "t_j5va_modeAuto",
28
+ "editorActions": "t_j5va_editorActions",
29
+ "totpRing": "t_j5va_totpRing",
44
30
  "pinStar": "t_j5va_pinStar",
45
- "reportBox": "t_j5va_reportBox",
46
- "resultCount": "t_j5va_resultCount",
47
- "revealButton": "t_j5va_revealButton",
48
- "dupNames": "t_j5va_dupNames",
49
- "clearButton": "t_j5va_clearButton",
31
+ "dupGroup": "t_j5va_dupGroup",
32
+ "addButton": "t_j5va_addButton",
33
+ "healthBar": "t_j5va_healthBar",
34
+ "reportLine": "t_j5va_reportLine",
35
+ "pwWeak": "t_j5va_pwWeak",
36
+ "empty": "t_j5va_empty",
37
+ "trashButton": "t_j5va_trashButton",
38
+ "modeAsk": "t_j5va_modeAsk",
39
+ "kindFilter": "t_j5va_kindFilter",
50
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",
45
+ "badge": "t_j5va_badge",
46
+ "dueBadge": "t_j5va_dueBadge",
51
47
  "badgeOk": "t_j5va_badgeOk",
52
- "copied": "t_j5va_copied",
53
- "rowExpired": "t_j5va_rowExpired",
54
- "totpRing": "t_j5va_totpRing",
55
- "sortButton": "t_j5va_sortButton",
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",
56
57
  "section": "t_j5va_section",
57
- "badge": "t_j5va_badge",
58
- "highBadge": "t_j5va_highBadge",
59
- "lockedBanner": "t_j5va_lockedBanner",
60
- "dupMerge": "t_j5va_dupMerge",
58
+ "modeReadonly": "t_j5va_modeReadonly",
59
+ "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
+ "checkField": "t_j5va_checkField",
65
+ "rowExpired": "t_j5va_rowExpired",
61
66
  "tabActive": "t_j5va_tabActive",
62
- "deleteButton": "t_j5va_deleteButton",
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",
63
74
  "intro": "t_j5va_intro",
64
- "pwWeak": "t_j5va_pwWeak",
65
- "pwStrong": "t_j5va_pwStrong",
75
+ "copied": "t_j5va_copied",
76
+ "rowMain": "t_j5va_rowMain",
77
+ "tabPane": "t_j5va_tabPane",
78
+ "retryButton": "t_j5va_retryButton",
79
+ "auditIssues": "t_j5va_auditIssues",
80
+ "editorBody": "t_j5va_editorBody",
81
+ "pwBar": "t_j5va_pwBar",
66
82
  "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",
72
- "reportTitle": "t_j5va_reportTitle",
73
- "lockedTag": "t_j5va_lockedTag",
83
+ "row": "t_j5va_row",
74
84
  "tabs": "t_j5va_tabs",
85
+ "clearButton": "t_j5va_clearButton",
86
+ "genOpts": "t_j5va_genOpts",
75
87
  "pwMeter": "t_j5va_pwMeter",
76
- "addButton": "t_j5va_addButton",
77
- "tabPane": "t_j5va_tabPane",
78
- "modeReadonly": "t_j5va_modeReadonly",
79
- "field": "t_j5va_field",
80
- "list": "t_j5va_list",
81
- "policyField": "t_j5va_policyField",
82
- "identity": "t_j5va_identity",
83
- "backupButton": "t_j5va_backupButton",
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",
89
- "retryButton": "t_j5va_retryButton",
90
- "tab": "t_j5va_tab",
91
- "rowMain": "t_j5va_rowMain",
92
- "saveButton": "t_j5va_saveButton",
93
- "trashButton": "t_j5va_trashButton",
94
- "dueBadge": "t_j5va_dueBadge",
95
- "genOptRow": "t_j5va_genOptRow",
96
- "error": "t_j5va_error",
88
+ "highBadge": "t_j5va_highBadge",
89
+ "badgeWarn": "t_j5va_badgeWarn",
90
+ "revealButton": "t_j5va_revealButton",
91
+ "rowActions": "t_j5va_rowActions",
97
92
  "policyBar": "t_j5va_policyBar",
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"
93
+ "secretField": "t_j5va_secretField",
94
+ "emptyBox": "t_j5va_emptyBox",
95
+ "uriCode": "t_j5va_uriCode",
96
+ "kindIcon": "t_j5va_kindIcon",
97
+ "resultCount": "t_j5va_resultCount",
98
+ "dupNames": "t_j5va_dupNames",
99
+ "identity": "t_j5va_identity",
100
+ "detailBox": "t_j5va_detailBox",
101
+ "dupMerge": "t_j5va_dupMerge",
102
+ "tab": "t_j5va_tab"
103
103
  };
104
104
  //#endregion
105
105
  //#region src/client/VaultSection.tsx
@@ -422,12 +422,24 @@ window.__ModuleLoader__.load({
422
422
  /** Apply a template's field values to the current form. The form is reset
423
423
  * to its empty state first (so fields the template does not set are cleared
424
424
  * rather than leaking the previous template's values), then the template's
425
- * fields are applied. Secret-ish fields are never filled from a template. */
425
+ * fields are applied. Secret-ish fields are never filled from a template.
426
+ * Non-catalog kinds (wifi/server/database/identity/bank templates) map to
427
+ * the closest catalog kind so the kind selector and store stay consistent. */
428
+ const CATALOG_KIND = {
429
+ wifi: "login",
430
+ server: "ssh",
431
+ database: "ssh",
432
+ identity: "login",
433
+ bank: "card"
434
+ };
426
435
  function applyTemplate(name) {
427
436
  const tpl = tplList.find((t) => t.name === name);
428
437
  if (!tpl) return;
429
438
  const next = {};
430
- if (tpl.kind !== "builtin:custom") next.kind = tpl.kind.replace("builtin:", "");
439
+ if (tpl.kind !== "builtin:custom") {
440
+ const raw = tpl.kind.replace("builtin:", "");
441
+ next.kind = CATALOG_KIND[raw] ?? raw;
442
+ }
431
443
  for (const [key, value] of Object.entries(tpl.fields)) {
432
444
  if (key === "password" || key === "otpSecret" || key === "apiKey" || key === "secret") continue;
433
445
  next[key] = value;