fix #1553: empty fields display for templates

This commit is contained in:
antelle 2020-08-08 14:11:12 +02:00
parent 02fe2b1754
commit 855370074f
No known key found for this signature in database
GPG Key ID: 63C9777AAB7C563C
3 changed files with 17 additions and 6 deletions

View File

@ -156,11 +156,19 @@ class DetailsView extends View {
if (hideEmptyFields) {
const value = fieldView.model.value();
if (!value || value.length === 0 || value.byteLength === 0) {
if (
this.model.isJustCreated &&
['$UserName', '$Password'].indexOf(fieldView.model.name) >= 0
) {
return; // don't hide user for new records
if (this.model.isJustCreated) {
const fieldsHiddenForNewEntriesWhenEmpty = [
'$URL',
'$Notes',
'Tags',
'Expires',
'History'
];
if (
!fieldsHiddenForNewEntriesWhenEmpty.includes(fieldView.model.name)
) {
continue;
}
}
fieldView.hide();
}

View File

@ -180,7 +180,7 @@ class ListView extends View {
}
createTemplate() {
if (!this.model.settings.templateHelpShown_) {
if (!this.model.settings.templateHelpShown) {
Alerts.yesno({
icon: 'sticky-note-o',
header: Locale.listAddTemplateHeader,

View File

@ -1,5 +1,8 @@
Release notes
-------------
##### v1.15.6 (2020-08-08)
`-` fix #1553: empty fields display for templates
##### v1.15.5 (2020-06-13)
`-` fix #1539: broken code signing on Windows