@dotrino/vaultd 0.139.1 → 0.140.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/package.json +1 -1
- package/src/ctl.js +157 -10
- package/src/daemon.js +40 -29
- package/src/hwkeys.js +247 -0
- package/src/manager.js +51 -3
- package/src/profiles.js +324 -64
- package/src/tui/app.js +47 -8
- package/src/tui/i18n.js +28 -0
- package/src/vaultControl.js +2 -1
package/src/tui/i18n.js
CHANGED
|
@@ -176,6 +176,20 @@ const es = {
|
|
|
176
176
|
locked: '🔒 bloqueada',
|
|
177
177
|
unlocked: '🔓 abierta',
|
|
178
178
|
passwordOf: (name) => `Contraseña de "${name}"`,
|
|
179
|
+
passwordWithKey: (name) => `Contraseña de "${name}" (su llave la pide también)`,
|
|
180
|
+
lookingForKey: 'Buscando la llave de seguridad…',
|
|
181
|
+
touchKey: 'Toca la llave de seguridad…',
|
|
182
|
+
keyFailed: (why) => `La llave no abrió: ${why}`,
|
|
183
|
+
plugKey: 'Esta bóveda se abre con su llave de seguridad: enchúfala y vuelve a intentarlo',
|
|
184
|
+
errNeedsKey: 'Esta bóveda no se abre solo con contraseña: usa su llave de seguridad',
|
|
185
|
+
errNeedsPassword: 'Esta llave pide también la contraseña',
|
|
186
|
+
errMasterSealedElsewhere: 'La llave maestra quedó cerrada con una contraseña anterior: pon esa misma para recuperarla',
|
|
187
|
+
hwToolsMissing: (tool, pkg) => `falta ${tool} (instala ${pkg})`,
|
|
188
|
+
hwNoDevice: 'no hay ninguna llave enchufada',
|
|
189
|
+
hwNotTouched: 'no se tocó la llave a tiempo',
|
|
190
|
+
hwWrongKey: 'esta llave no es la de esta bóveda',
|
|
191
|
+
hwWrongPin: 'el PIN de la llave no es ese',
|
|
192
|
+
hwPinBlocked: 'el PIN de la llave está bloqueado',
|
|
179
193
|
passwordToEdit: 'necesaria para abrir la bóveda: sin ella no se ve ni se toca',
|
|
180
194
|
unlocking: 'Desbloqueando…',
|
|
181
195
|
loading: 'Cargando…',
|
|
@@ -578,6 +592,20 @@ const en = {
|
|
|
578
592
|
locked: '🔒 locked',
|
|
579
593
|
unlocked: '🔓 unlocked',
|
|
580
594
|
passwordOf: (name) => `Password for "${name}"`,
|
|
595
|
+
passwordWithKey: (name) => `Password for "${name}" (its key asks for it too)`,
|
|
596
|
+
lookingForKey: 'Looking for the security key…',
|
|
597
|
+
touchKey: 'Touch the security key…',
|
|
598
|
+
keyFailed: (why) => `The key did not open it: ${why}`,
|
|
599
|
+
plugKey: 'This vault opens with its security key: plug it in and try again',
|
|
600
|
+
errNeedsKey: 'This vault does not open with a password alone: use its security key',
|
|
601
|
+
errNeedsPassword: 'This key also needs the password',
|
|
602
|
+
errMasterSealedElsewhere: 'The master key was left sealed with an earlier password: set that same one to recover it',
|
|
603
|
+
hwToolsMissing: (tool, pkg) => `${tool} is missing (install ${pkg})`,
|
|
604
|
+
hwNoDevice: 'no key is plugged in',
|
|
605
|
+
hwNotTouched: 'the key was not touched in time',
|
|
606
|
+
hwWrongKey: 'this key is not the one for this vault',
|
|
607
|
+
hwWrongPin: 'wrong key PIN',
|
|
608
|
+
hwPinBlocked: 'the key PIN is blocked',
|
|
581
609
|
passwordToEdit: 'needed to open this vault: without it, nothing is shown or touched',
|
|
582
610
|
unlocking: 'Unlocking…',
|
|
583
611
|
loading: 'Loading…',
|
package/src/vaultControl.js
CHANGED
|
@@ -229,7 +229,8 @@ export const addProfile = (name) => profileOp('add', { name })
|
|
|
229
229
|
export const useProfile = (profile) => profileOp('use', { profile })
|
|
230
230
|
export const renameProfile = (profile, name) => profileOp('rename', { profile, name })
|
|
231
231
|
export const removeProfile = (profile) => profileOp('rm', { profile })
|
|
232
|
-
|
|
232
|
+
// `key`: lo que devolvió la llave de seguridad para una puerta, `{ door, secret }` (base64).
|
|
233
|
+
export const unlockProfile = (profile, password, key = null) => profileOp('unlock', { profile, password, ...(key ? { door: key.door, secret: key.secret } : {}) })
|
|
233
234
|
export const lockProfile = (profile) => profileOp('lock', { profile })
|
|
234
235
|
/**
|
|
235
236
|
* «Sigo aquí»: estira el plazo del bloqueo automático sin hacer nada más.
|