dsh-vault 1.6.1-rc.7 → 1.6.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 +85 -84
- package/lib/client.js.map +1 -1
- package/package.json +1 -1
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
|
-
"rowActions": "t_j5va_rowActions",
|
|
21
|
-
"emptyBox": "t_j5va_emptyBox",
|
|
22
|
-
"badge": "t_j5va_badge",
|
|
23
20
|
"healthBar": "t_j5va_healthBar",
|
|
21
|
+
"highBadge": "t_j5va_highBadge",
|
|
22
|
+
"intro": "t_j5va_intro",
|
|
23
|
+
"badge": "t_j5va_badge",
|
|
24
|
+
"addButton": "t_j5va_addButton",
|
|
25
|
+
"detailBox": "t_j5va_detailBox",
|
|
26
|
+
"pwStrong": "t_j5va_pwStrong",
|
|
27
|
+
"trashButton": "t_j5va_trashButton",
|
|
28
|
+
"reportLine": "t_j5va_reportLine",
|
|
29
|
+
"secretField": "t_j5va_secretField",
|
|
30
|
+
"revealButton": "t_j5va_revealButton",
|
|
31
|
+
"tab": "t_j5va_tab",
|
|
32
|
+
"rowMain": "t_j5va_rowMain",
|
|
33
|
+
"dangerButton": "t_j5va_dangerButton",
|
|
34
|
+
"kindFilter": "t_j5va_kindFilter",
|
|
35
|
+
"pinStar": "t_j5va_pinStar",
|
|
36
|
+
"row": "t_j5va_row",
|
|
37
|
+
"auditRow": "t_j5va_auditRow",
|
|
38
|
+
"empty": "t_j5va_empty",
|
|
39
|
+
"editor": "t_j5va_editor",
|
|
40
|
+
"genOpts": "t_j5va_genOpts",
|
|
24
41
|
"sortButton": "t_j5va_sortButton",
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
"badgeWarn": "t_j5va_badgeWarn",
|
|
42
|
+
"policyBar": "t_j5va_policyBar",
|
|
43
|
+
"dueBadge": "t_j5va_dueBadge",
|
|
44
|
+
"editorBody": "t_j5va_editorBody",
|
|
45
|
+
"genHist": "t_j5va_genHist",
|
|
46
|
+
"editorActions": "t_j5va_editorActions",
|
|
31
47
|
"kindIcon": "t_j5va_kindIcon",
|
|
48
|
+
"modeReadonly": "t_j5va_modeReadonly",
|
|
49
|
+
"list": "t_j5va_list",
|
|
50
|
+
"dupNames": "t_j5va_dupNames",
|
|
51
|
+
"field": "t_j5va_field",
|
|
52
|
+
"saveButton": "t_j5va_saveButton",
|
|
32
53
|
"checkField": "t_j5va_checkField",
|
|
33
|
-
"
|
|
34
|
-
"row": "t_j5va_row",
|
|
35
|
-
"status": "t_j5va_status",
|
|
36
|
-
"srOnly": "t_j5va_srOnly",
|
|
37
|
-
"modeAuto": "t_j5va_modeAuto",
|
|
38
|
-
"editorBody": "t_j5va_editorBody",
|
|
39
|
-
"searchBox": "t_j5va_searchBox",
|
|
40
|
-
"reportBox": "t_j5va_reportBox",
|
|
41
|
-
"genOpts": "t_j5va_genOpts",
|
|
42
|
-
"pwMeter": "t_j5va_pwMeter",
|
|
43
|
-
"pwFair": "t_j5va_pwFair",
|
|
44
|
-
"pinStar": "t_j5va_pinStar",
|
|
54
|
+
"rowExpired": "t_j5va_rowExpired",
|
|
45
55
|
"detailItem": "t_j5va_detailItem",
|
|
46
|
-
"
|
|
47
|
-
"
|
|
48
|
-
"
|
|
56
|
+
"tabActive": "t_j5va_tabActive",
|
|
57
|
+
"emptyHint": "t_j5va_emptyHint",
|
|
58
|
+
"srOnly": "t_j5va_srOnly",
|
|
59
|
+
"modeAsk": "t_j5va_modeAsk",
|
|
60
|
+
"badgeWarn": "t_j5va_badgeWarn",
|
|
49
61
|
"pwWeak": "t_j5va_pwWeak",
|
|
62
|
+
"uriCode": "t_j5va_uriCode",
|
|
63
|
+
"rowDue": "t_j5va_rowDue",
|
|
64
|
+
"pwMeter": "t_j5va_pwMeter",
|
|
65
|
+
"title": "t_j5va_title",
|
|
66
|
+
"lockedBanner": "t_j5va_lockedBanner",
|
|
67
|
+
"copied": "t_j5va_copied",
|
|
50
68
|
"kindChip": "t_j5va_kindChip",
|
|
69
|
+
"searchBox": "t_j5va_searchBox",
|
|
70
|
+
"dupGroup": "t_j5va_dupGroup",
|
|
71
|
+
"tabs": "t_j5va_tabs",
|
|
72
|
+
"status": "t_j5va_status",
|
|
73
|
+
"auditIssues": "t_j5va_auditIssues",
|
|
74
|
+
"resultCount": "t_j5va_resultCount",
|
|
75
|
+
"badgeDanger": "t_j5va_badgeDanger",
|
|
51
76
|
"reportTitle": "t_j5va_reportTitle",
|
|
52
|
-
"addButton": "t_j5va_addButton",
|
|
53
|
-
"policyField": "t_j5va_policyField",
|
|
54
|
-
"totp": "t_j5va_totp",
|
|
55
|
-
"pwStrong": "t_j5va_pwStrong",
|
|
56
|
-
"modeReadonly": "t_j5va_modeReadonly",
|
|
57
|
-
"modeAsk": "t_j5va_modeAsk",
|
|
58
|
-
"saveButton": "t_j5va_saveButton",
|
|
59
|
-
"highBadge": "t_j5va_highBadge",
|
|
60
|
-
"backupButton": "t_j5va_backupButton",
|
|
61
77
|
"pwBar": "t_j5va_pwBar",
|
|
62
|
-
"
|
|
78
|
+
"backupButton": "t_j5va_backupButton",
|
|
79
|
+
"lockedTag": "t_j5va_lockedTag",
|
|
80
|
+
"deleteButton": "t_j5va_deleteButton",
|
|
81
|
+
"rowActions": "t_j5va_rowActions",
|
|
82
|
+
"totpRing": "t_j5va_totpRing",
|
|
83
|
+
"footer": "t_j5va_footer",
|
|
84
|
+
"dupMerge": "t_j5va_dupMerge",
|
|
63
85
|
"retryButton": "t_j5va_retryButton",
|
|
64
|
-
"
|
|
65
|
-
"
|
|
86
|
+
"pwLabel": "t_j5va_pwLabel",
|
|
87
|
+
"toolbar": "t_j5va_toolbar",
|
|
66
88
|
"scoreRing": "t_j5va_scoreRing",
|
|
67
89
|
"tabPane": "t_j5va_tabPane",
|
|
68
|
-
"
|
|
69
|
-
"
|
|
70
|
-
"dangerButton": "t_j5va_dangerButton",
|
|
71
|
-
"clearButton": "t_j5va_clearButton",
|
|
72
|
-
"tab": "t_j5va_tab",
|
|
73
|
-
"resultCount": "t_j5va_resultCount",
|
|
74
|
-
"toolbar": "t_j5va_toolbar",
|
|
90
|
+
"identity": "t_j5va_identity",
|
|
91
|
+
"reportBox": "t_j5va_reportBox",
|
|
75
92
|
"reportSub": "t_j5va_reportSub",
|
|
76
|
-
"
|
|
77
|
-
"
|
|
78
|
-
"kindFilter": "t_j5va_kindFilter",
|
|
79
|
-
"tabActive": "t_j5va_tabActive",
|
|
80
|
-
"policyBar": "t_j5va_policyBar",
|
|
81
|
-
"lockedBanner": "t_j5va_lockedBanner",
|
|
82
|
-
"emptyHint": "t_j5va_emptyHint",
|
|
83
|
-
"intro": "t_j5va_intro",
|
|
84
|
-
"list": "t_j5va_list",
|
|
85
|
-
"dupMerge": "t_j5va_dupMerge",
|
|
93
|
+
"modeAuto": "t_j5va_modeAuto",
|
|
94
|
+
"totp": "t_j5va_totp",
|
|
86
95
|
"genOptRow": "t_j5va_genOptRow",
|
|
87
|
-
"
|
|
88
|
-
"
|
|
89
|
-
"
|
|
90
|
-
"
|
|
91
|
-
"
|
|
92
|
-
"
|
|
93
|
-
"
|
|
94
|
-
"editorActions": "t_j5va_editorActions",
|
|
95
|
-
"revealButton": "t_j5va_revealButton",
|
|
96
|
-
"badgeDanger": "t_j5va_badgeDanger",
|
|
97
|
-
"detailBox": "t_j5va_detailBox",
|
|
98
|
-
"trashButton": "t_j5va_trashButton",
|
|
99
|
-
"uriCode": "t_j5va_uriCode",
|
|
100
|
-
"deleteButton": "t_j5va_deleteButton",
|
|
101
|
-
"rowDue": "t_j5va_rowDue",
|
|
102
|
-
"totpRing": "t_j5va_totpRing"
|
|
96
|
+
"badgeOk": "t_j5va_badgeOk",
|
|
97
|
+
"clearButton": "t_j5va_clearButton",
|
|
98
|
+
"error": "t_j5va_error",
|
|
99
|
+
"emptyBox": "t_j5va_emptyBox",
|
|
100
|
+
"policyField": "t_j5va_policyField",
|
|
101
|
+
"pwFair": "t_j5va_pwFair",
|
|
102
|
+
"section": "t_j5va_section"
|
|
103
103
|
};
|
|
104
104
|
//#endregion
|
|
105
105
|
//#region src/client/VaultSection.tsx
|
|
@@ -1138,7 +1138,8 @@ window.__ModuleLoader__.load({
|
|
|
1138
1138
|
status().then((value) => setLocked(value.locked)).catch(() => {});
|
|
1139
1139
|
} catch (err) {
|
|
1140
1140
|
const st = await status().catch(() => null);
|
|
1141
|
-
|
|
1141
|
+
const raw = err instanceof Error ? err.message : String(err ?? "");
|
|
1142
|
+
if (st !== null && st.locked || /vault is locked/i.test(raw)) {
|
|
1142
1143
|
setLocked(true);
|
|
1143
1144
|
setState({
|
|
1144
1145
|
status: "ready",
|
|
@@ -1693,7 +1694,7 @@ window.__ModuleLoader__.load({
|
|
|
1693
1694
|
className: VaultSection_module_css_default.emptyHint,
|
|
1694
1695
|
children: readonly ? t("emptyHintReadonly") : t("emptyHint")
|
|
1695
1696
|
}),
|
|
1696
|
-
!readonly && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
1697
|
+
!readonly && !locked && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
1697
1698
|
type: "button",
|
|
1698
1699
|
className: VaultSection_module_css_default.addButton,
|
|
1699
1700
|
onClick: startCreate,
|
|
@@ -2233,7 +2234,7 @@ window.__ModuleLoader__.load({
|
|
|
2233
2234
|
value: sessionUrl,
|
|
2234
2235
|
onChange: (event) => setSessionUrl(event.target.value),
|
|
2235
2236
|
placeholder: t("sessionUrlPlaceholder"),
|
|
2236
|
-
disabled: busy || readonly
|
|
2237
|
+
disabled: busy || readonly || locked
|
|
2237
2238
|
})]
|
|
2238
2239
|
}),
|
|
2239
2240
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
@@ -2283,7 +2284,7 @@ window.__ModuleLoader__.load({
|
|
|
2283
2284
|
value: sessionTitle,
|
|
2284
2285
|
onChange: (event) => setSessionTitle(event.target.value),
|
|
2285
2286
|
placeholder: t("sessionNamePlaceholder"),
|
|
2286
|
-
disabled: busy || readonly
|
|
2287
|
+
disabled: busy || readonly || locked
|
|
2287
2288
|
})
|
|
2288
2289
|
}),
|
|
2289
2290
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
@@ -2454,7 +2455,7 @@ window.__ModuleLoader__.load({
|
|
|
2454
2455
|
value: sessionPasteTitle,
|
|
2455
2456
|
onChange: (event) => setSessionPasteTitle(event.target.value),
|
|
2456
2457
|
placeholder: t("sessionNamePlaceholder"),
|
|
2457
|
-
disabled: busy || readonly
|
|
2458
|
+
disabled: busy || readonly || locked
|
|
2458
2459
|
})]
|
|
2459
2460
|
}),
|
|
2460
2461
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
|
|
@@ -2463,7 +2464,7 @@ window.__ModuleLoader__.load({
|
|
|
2463
2464
|
value: sessionPaste,
|
|
2464
2465
|
onChange: (event) => setSessionPaste(event.target.value),
|
|
2465
2466
|
rows: 4,
|
|
2466
|
-
disabled: busy || readonly
|
|
2467
|
+
disabled: busy || readonly || locked
|
|
2467
2468
|
})]
|
|
2468
2469
|
}),
|
|
2469
2470
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
@@ -2572,7 +2573,7 @@ window.__ModuleLoader__.load({
|
|
|
2572
2573
|
type: "button",
|
|
2573
2574
|
className: VaultSection_module_css_default.dupMerge,
|
|
2574
2575
|
onClick: () => void renameTagAll(tag.name),
|
|
2575
|
-
disabled: busy || readonly,
|
|
2576
|
+
disabled: busy || readonly || locked,
|
|
2576
2577
|
children: t("tagRename")
|
|
2577
2578
|
})]
|
|
2578
2579
|
}, tag.name))]
|
|
@@ -2596,7 +2597,7 @@ window.__ModuleLoader__.load({
|
|
|
2596
2597
|
type: "button",
|
|
2597
2598
|
className: VaultSection_module_css_default.dupMerge,
|
|
2598
2599
|
onClick: () => void mergeEntries(group),
|
|
2599
|
-
disabled: busy || readonly,
|
|
2600
|
+
disabled: busy || readonly || locked,
|
|
2600
2601
|
children: t("dupMerge")
|
|
2601
2602
|
})]
|
|
2602
2603
|
}, gi))]
|
|
@@ -2633,7 +2634,7 @@ window.__ModuleLoader__.load({
|
|
|
2633
2634
|
refresh();
|
|
2634
2635
|
});
|
|
2635
2636
|
},
|
|
2636
|
-
disabled: busy || readonly,
|
|
2637
|
+
disabled: busy || readonly || locked,
|
|
2637
2638
|
children: t("restore")
|
|
2638
2639
|
})
|
|
2639
2640
|
})]
|
|
@@ -2650,7 +2651,7 @@ window.__ModuleLoader__.load({
|
|
|
2650
2651
|
setBusy(false);
|
|
2651
2652
|
}, () => setBusy(false));
|
|
2652
2653
|
},
|
|
2653
|
-
disabled: busy || readonly,
|
|
2654
|
+
disabled: busy || readonly || locked,
|
|
2654
2655
|
children: t("restoreAll")
|
|
2655
2656
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
2656
2657
|
type: "button",
|
|
@@ -2664,7 +2665,7 @@ window.__ModuleLoader__.load({
|
|
|
2664
2665
|
setBusy(false);
|
|
2665
2666
|
}, () => setBusy(false));
|
|
2666
2667
|
},
|
|
2667
|
-
disabled: busy || readonly,
|
|
2668
|
+
disabled: busy || readonly || locked,
|
|
2668
2669
|
children: t("clearTrash")
|
|
2669
2670
|
})] })
|
|
2670
2671
|
]
|
|
@@ -2851,7 +2852,7 @@ window.__ModuleLoader__.load({
|
|
|
2851
2852
|
setBusy(false);
|
|
2852
2853
|
}, () => setBusy(false));
|
|
2853
2854
|
},
|
|
2854
|
-
disabled: busy || readonly,
|
|
2855
|
+
disabled: busy || readonly || locked,
|
|
2855
2856
|
children: t("copyPassword")
|
|
2856
2857
|
}),
|
|
2857
2858
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
@@ -2882,21 +2883,21 @@ window.__ModuleLoader__.load({
|
|
|
2882
2883
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
2883
2884
|
type: "button",
|
|
2884
2885
|
onClick: () => void touch(entry.id).then(() => void refresh()),
|
|
2885
|
-
disabled: busy || readonly,
|
|
2886
|
+
disabled: busy || readonly || locked,
|
|
2886
2887
|
title: t("touchHint"),
|
|
2887
2888
|
children: t("touch")
|
|
2888
2889
|
}),
|
|
2889
2890
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
2890
2891
|
type: "button",
|
|
2891
2892
|
onClick: () => void startEdit(entry.id),
|
|
2892
|
-
disabled: busy || readonly,
|
|
2893
|
+
disabled: busy || readonly || locked,
|
|
2893
2894
|
children: t("edit")
|
|
2894
2895
|
}),
|
|
2895
2896
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
2896
2897
|
type: "button",
|
|
2897
2898
|
className: VaultSection_module_css_default.deleteButton,
|
|
2898
2899
|
onClick: () => void removeEntry(entry.id),
|
|
2899
|
-
disabled: busy || readonly,
|
|
2900
|
+
disabled: busy || readonly || locked,
|
|
2900
2901
|
children: t("delete")
|
|
2901
2902
|
})
|
|
2902
2903
|
]
|