mirror of
https://github.com/zadam/trilium.git
synced 2025-03-01 14:22:32 +01:00
remove "hide included images" feature since with attachments it's no longer necessary
This commit is contained in:
parent
5cc5859211
commit
0b270ee87a
@ -0,0 +1,2 @@
|
||||
DELETE FROM options WHERE name = 'hideIncludedImages_main';
|
||||
DELETE FROM entity_changes WHERE entityName = 'options' AND entityId = 'hideIncludedImages_main';
|
@ -490,13 +490,6 @@ class FNote {
|
||||
return;
|
||||
}
|
||||
|
||||
if (options.is("hideIncludedImages_main")) {
|
||||
const imageLinks = this.getRelations('imageLink');
|
||||
|
||||
// image is already visible in the parent note so no need to display it separately in the book
|
||||
childBranches = childBranches.filter(branch => !imageLinks.find(rel => rel.value === branch.noteId));
|
||||
}
|
||||
|
||||
// we're not checking hideArchivedNotes since that would mean we need to lazy load the child notes
|
||||
// which would seriously slow down everything.
|
||||
// we check this flag only once user chooses to expand the parent. This has the negative consequence that
|
||||
|
@ -119,15 +119,6 @@ const TPL = `
|
||||
Hide archived notes
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<label class="form-check-label">
|
||||
<input class="form-check-input hide-included-images" type="checkbox" value="">
|
||||
|
||||
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>
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<label class="form-check-label">
|
||||
<input class="form-check-input auto-collapse-note-tree" type="checkbox" value="">
|
||||
@ -194,7 +185,6 @@ export default class NoteTreeWidget extends NoteContextAwareWidget {
|
||||
|
||||
this.$treeSettingsPopup = this.$widget.find('.tree-settings-popup');
|
||||
this.$hideArchivedNotesCheckbox = this.$treeSettingsPopup.find('.hide-archived-notes');
|
||||
this.$hideIncludedImages = this.$treeSettingsPopup.find('.hide-included-images');
|
||||
this.$autoCollapseNoteTree = this.$treeSettingsPopup.find('.auto-collapse-note-tree');
|
||||
|
||||
this.$treeSettingsButton = this.$widget.find('.tree-settings-button');
|
||||
@ -205,7 +195,6 @@ export default class NoteTreeWidget extends NoteContextAwareWidget {
|
||||
}
|
||||
|
||||
this.$hideArchivedNotesCheckbox.prop("checked", this.hideArchivedNotes);
|
||||
this.$hideIncludedImages.prop("checked", this.hideIncludedImages);
|
||||
this.$autoCollapseNoteTree.prop("checked", this.autoCollapseNoteTree);
|
||||
|
||||
const top = this.$treeActions[0].offsetTop - (this.$treeSettingsPopup.outerHeight());
|
||||
@ -229,7 +218,6 @@ export default class NoteTreeWidget extends NoteContextAwareWidget {
|
||||
this.$saveTreeSettingsButton = this.$treeSettingsPopup.find('.save-tree-settings-button');
|
||||
this.$saveTreeSettingsButton.on('click', async () => {
|
||||
await this.setHideArchivedNotes(this.$hideArchivedNotesCheckbox.prop("checked"));
|
||||
await this.setHideIncludedImages(this.$hideIncludedImages.prop("checked"));
|
||||
await this.setAutoCollapseNoteTree(this.$autoCollapseNoteTree.prop("checked"));
|
||||
|
||||
this.$treeSettingsPopup.hide();
|
||||
@ -279,14 +267,6 @@ export default class NoteTreeWidget extends NoteContextAwareWidget {
|
||||
await options.save(`hideArchivedNotes_${this.treeName}`, val.toString());
|
||||
}
|
||||
|
||||
get hideIncludedImages() {
|
||||
return options.is(`hideIncludedImages_${this.treeName}`);
|
||||
}
|
||||
|
||||
async setHideIncludedImages(val) {
|
||||
await options.save(`hideIncludedImages_${this.treeName}`, val.toString());
|
||||
}
|
||||
|
||||
get autoCollapseNoteTree() {
|
||||
return options.is("autoCollapseNoteTree");
|
||||
}
|
||||
|
@ -136,8 +136,7 @@ function isAllowed(name) {
|
||||
return ALLOWED_OPTIONS.has(name)
|
||||
|| name.startsWith("keyboardShortcuts")
|
||||
|| name.endsWith("Collapsed")
|
||||
|| name.startsWith("hideArchivedNotes")
|
||||
|| name.startsWith("hideIncludedImages");
|
||||
|| name.startsWith("hideArchivedNotes");
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
|
@ -4,7 +4,7 @@ const build = require('./build');
|
||||
const packageJson = require('../../package');
|
||||
const {TRILIUM_DATA_DIR} = require('./data_dir');
|
||||
|
||||
const APP_DB_VERSION = 218;
|
||||
const APP_DB_VERSION = 219;
|
||||
const SYNC_VERSION = 30;
|
||||
const CLIPPER_PROTOCOL_VERSION = "1.0";
|
||||
|
||||
|
@ -71,7 +71,6 @@ const defaultOptions = [
|
||||
{ name: 'nativeTitleBarVisible', value: 'false', isSynced: false },
|
||||
{ name: 'eraseEntitiesAfterTimeInSeconds', value: '604800', isSynced: true }, // default is 7 days
|
||||
{ name: 'hideArchivedNotes_main', value: 'false', isSynced: false },
|
||||
{ name: 'hideIncludedImages_main', value: 'true', isSynced: false },
|
||||
{ name: 'attributeListExpanded', value: 'false', isSynced: false },
|
||||
{ name: 'promotedAttributesExpanded', value: 'true', isSynced: true },
|
||||
{ name: 'similarNotesExpanded', value: 'true', isSynced: true },
|
||||
|
Loading…
x
Reference in New Issue
Block a user