@ai-matrx/vault 0.1.42 → 0.1.43
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/CHANGELOG.md +1 -1
- package/dist/index.cjs +4 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +4 -3
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1447,6 +1447,7 @@ function useCanScan() {
|
|
|
1447
1447
|
}, []);
|
|
1448
1448
|
return ok;
|
|
1449
1449
|
}
|
|
1450
|
+
var SETUP_KEY_PLACEHOLDER = "Setup key or otpauth link";
|
|
1450
1451
|
var CAMERA_NOTES = {
|
|
1451
1452
|
blocked: "Camera blocked. Paste the key or choose a QR image.",
|
|
1452
1453
|
missing: "No camera. Paste the key or choose a QR image.",
|
|
@@ -1507,7 +1508,7 @@ function QrScanInline({ onResult, onClose }) {
|
|
|
1507
1508
|
if (error) {
|
|
1508
1509
|
return /* @__PURE__ */ jsxs6("p", { className: "flex items-center gap-2 px-1 pt-1 text-xs text-muted-foreground", role: "status", "data-camera-note": "", children: [
|
|
1509
1510
|
/* @__PURE__ */ jsx7(CameraGlyph, { className: "size-3.5 shrink-0", "aria-hidden": true }),
|
|
1510
|
-
/* @__PURE__ */ jsx7("span", { className: "min-w-0 flex-1
|
|
1511
|
+
/* @__PURE__ */ jsx7("span", { className: "min-w-0 flex-1 break-words", children: error }),
|
|
1511
1512
|
/* @__PURE__ */ jsx7(Button5, { variant: "quiet", onClick: onClose, children: "Dismiss" })
|
|
1512
1513
|
] });
|
|
1513
1514
|
}
|
|
@@ -1522,7 +1523,7 @@ function QrScanInline({ onResult, onClose }) {
|
|
|
1522
1523
|
] })
|
|
1523
1524
|
] });
|
|
1524
1525
|
}
|
|
1525
|
-
function OtpSetupRow({ value, onChange, label = "Authenticator", placeholder =
|
|
1526
|
+
function OtpSetupRow({ value, onChange, label = "Authenticator", placeholder = SETUP_KEY_PLACEHOLDER, disabled = false, autoFocus = false, onImage, onRecognized, status, autoStartCamera = false }) {
|
|
1526
1527
|
const file = useRef6(null);
|
|
1527
1528
|
const canScan = useCanScan();
|
|
1528
1529
|
const [scanning, setScanning] = useState8(false);
|
|
@@ -1782,7 +1783,7 @@ function TotpEditRow({ value, onChange, hasExisting, item, port, onEnrolled, onR
|
|
|
1782
1783
|
setStatus(null);
|
|
1783
1784
|
onChange(v);
|
|
1784
1785
|
},
|
|
1785
|
-
placeholder: hasExisting ? "Paste a new key to replace" :
|
|
1786
|
+
placeholder: hasExisting ? "Paste a new key to replace" : SETUP_KEY_PLACEHOLDER,
|
|
1786
1787
|
status,
|
|
1787
1788
|
...uploadImage ? { onImage: (f) => void uploadImage(f) } : {},
|
|
1788
1789
|
...onRecognized ? { onRecognized } : {}
|