tree settings popup fixes

This commit is contained in:
zadam 2020-05-02 13:52:02 +02:00
parent 3466a19397
commit ed52f93bbb
2 changed files with 10 additions and 2 deletions

View file

@ -61,7 +61,7 @@ const TPL = `
border: 1px solid var(--main-border-color); border: 1px solid var(--main-border-color);
padding: 20px; padding: 20px;
z-index: 1000; z-index: 1000;
width: 300px; width: 320px;
border-radius: 10px 0 10px 10px; border-radius: 10px 0 10px 10px;
} }
</style> </style>
@ -81,6 +81,8 @@ const TPL = `
<input class="form-check-input hide-included-images" type="checkbox" value=""> <input class="form-check-input hide-included-images" type="checkbox" value="">
Hide images included in a note Hide images included in a note
<span class="bx bx-info-circle"
title="Images which are shown in the parent text note will not be displayed in the tree"></span>
</label> </label>
</div> </div>
@ -161,8 +163,14 @@ export default class NoteTreeWidget extends TabAwareWidget {
top: top, top: top,
left: left left: left
}).addClass("show"); }).addClass("show");
return false;
}); });
this.$treeSettingsPopup.on("click", e => { e.stopPropagation(); });
$(document).on('click', () => this.$treeSettingsPopup.hide());
this.$saveTreeSettingsButton = this.$treeSettingsPopup.find('.save-tree-settings-button'); this.$saveTreeSettingsButton = this.$treeSettingsPopup.find('.save-tree-settings-button');
this.$saveTreeSettingsButton.on('click', async () => { this.$saveTreeSettingsButton.on('click', async () => {
await this.setHideArchivedNotes(this.$hideArchivedNotesCheckbox.prop("checked")); await this.setHideArchivedNotes(this.$hideArchivedNotesCheckbox.prop("checked"));

View file

@ -42,7 +42,7 @@ async function loginSync(req) {
const givenHash = req.body.hash; const givenHash = req.body.hash;
if (expectedHash !== givenHash) { if (expectedHash !== givenHash) {
return [400, { message: "Sync login credentials are incorrect." }]; return [400, { message: "Sync login credentials are incorrect. It looks like you're trying to sync two different initialized documents which is not possible." }];
} }
req.session.loggedIn = true; req.session.loggedIn = true;