mirror of https://github.com/keeweb/keeweb.git
Introduced a tooltip to make the secure field feature more understandable
Fixes #805
This commit is contained in:
parent
72c912d57f
commit
498dfad299
|
@ -268,6 +268,8 @@
|
|||
"detOtpQrErrorBody": "Sorry, we could not read the QR code, please try once again or contact the app authors with error details.",
|
||||
"detOtpQrWrong": "Wrong QR code",
|
||||
"detOtpQrWrongBody": "Your QR code was successfully scanned but it doesn't contain one-time password data.",
|
||||
"detLockField": "Lock this field, so its content isn't searchable and visible. Displaying the content requires explicitly clicking it.",
|
||||
"detUnlockField": "Unlock this field, making its content searchable and visible immediately",
|
||||
|
||||
"autoTypeEntryFields": "Entry fields",
|
||||
"autoTypeModifiers": "Modifier keys",
|
||||
|
|
|
@ -3,6 +3,8 @@ const FieldViewText = require('./field-view-text');
|
|||
const FieldView = require('./field-view');
|
||||
const Keys = require('../../const/keys');
|
||||
const kdbxweb = require('kdbxweb');
|
||||
const Tip = require('../../util/tip');
|
||||
const Locale = require('../../util/locale');
|
||||
|
||||
const FieldViewCustom = FieldViewText.extend({
|
||||
events: {
|
||||
|
@ -23,6 +25,14 @@ const FieldViewCustom = FieldViewText.extend({
|
|||
$('<div/>').addClass('details__field-value-btn details__field-value-btn-protect')
|
||||
.appendTo(this.valueEl)
|
||||
.mousedown(this.protectBtnClick.bind(this));
|
||||
let securityTipTitle = Locale.detLockField;
|
||||
if (this.isProtected) {
|
||||
securityTipTitle = Locale.detUnlockField;
|
||||
}
|
||||
const securityTip = new Tip($(this.valueEl).find('.details__field-value-btn'), {
|
||||
title: securityTipTitle
|
||||
});
|
||||
securityTip.init();
|
||||
},
|
||||
|
||||
endEdit: function(newVal, extra) {
|
||||
|
|
Loading…
Reference in New Issue