bitty-tui 0.0.9 → 0.0.10
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/dist/clients/bw.d.ts
CHANGED
|
@@ -61,6 +61,7 @@ export interface Cipher {
|
|
|
61
61
|
username?: string;
|
|
62
62
|
password?: string;
|
|
63
63
|
totp?: string | null;
|
|
64
|
+
currentTotp?: string | null;
|
|
64
65
|
};
|
|
65
66
|
identity?: {
|
|
66
67
|
address1: string | null;
|
|
@@ -204,6 +205,7 @@ export declare class Client {
|
|
|
204
205
|
username?: string;
|
|
205
206
|
password?: string;
|
|
206
207
|
totp?: string | null;
|
|
208
|
+
currentTotp?: string | null;
|
|
207
209
|
} | undefined;
|
|
208
210
|
identity?: {
|
|
209
211
|
address1: string | null;
|
|
@@ -14,7 +14,9 @@ export function MainTab({ isFocused, selectedCipher, onChange, }) {
|
|
|
14
14
|
interval = setInterval(() => {
|
|
15
15
|
setOtpTimeout((t) => {
|
|
16
16
|
if (t <= 1) {
|
|
17
|
-
|
|
17
|
+
const totp = authenticator.generate(selectedCipher.login.totp);
|
|
18
|
+
selectedCipher.login.currentTotp = totp;
|
|
19
|
+
setOtpCode(totp);
|
|
18
20
|
return 30;
|
|
19
21
|
}
|
|
20
22
|
return t - 1;
|
|
@@ -55,7 +55,7 @@ export function VaultList({ filteredCiphers, isFocused, selected, onSelect, }) {
|
|
|
55
55
|
}
|
|
56
56
|
else if (key.ctrl && input === "t") {
|
|
57
57
|
if (cipher?.type === CipherType.Login) {
|
|
58
|
-
field = cipher.login?.
|
|
58
|
+
field = cipher.login?.currentTotp;
|
|
59
59
|
fldName = "TOTP";
|
|
60
60
|
}
|
|
61
61
|
}
|