mirror of
				https://github.com/zadam/trilium.git
				synced 2025-11-04 05:28:59 +01:00 
			
		
		
		
	small fixes
This commit is contained in:
		
							parent
							
								
									9797942b8e
								
							
						
					
					
						commit
						e7af24c139
					
				@ -28,6 +28,43 @@ import splitService from "./services/split.js";
 | 
			
		||||
import options from "./services/options.js";
 | 
			
		||||
import noteContentRenderer from "./services/note_content_renderer.js";
 | 
			
		||||
import appContext from "./services/app_context.js";
 | 
			
		||||
import FlexContainer from "./widgets/flex_container.js";
 | 
			
		||||
import GlobalMenuWidget from "./widgets/global_menu.js";
 | 
			
		||||
import TabRowWidget from "./widgets/tab_row.js";
 | 
			
		||||
import TitleBarButtonsWidget from "./widgets/title_bar_buttons.js";
 | 
			
		||||
import StandardTopWidget from "./widgets/standard_top_widget.js";
 | 
			
		||||
import SidePaneContainer from "./widgets/side_pane_container.js";
 | 
			
		||||
import GlobalButtonsWidget from "./widgets/global_buttons.js";
 | 
			
		||||
import SearchBoxWidget from "./widgets/search_box.js";
 | 
			
		||||
import SearchResultsWidget from "./widgets/search_results.js";
 | 
			
		||||
import NoteTreeWidget from "./widgets/note_tree.js";
 | 
			
		||||
import TabCachingWidget from "./widgets/tab_caching_widget.js";
 | 
			
		||||
import NotePathsWidget from "./widgets/note_paths.js";
 | 
			
		||||
import NoteTitleWidget from "./widgets/note_title.js";
 | 
			
		||||
import RunScriptButtonsWidget from "./widgets/run_script_buttons.js";
 | 
			
		||||
import ProtectedNoteSwitchWidget from "./widgets/protected_note_switch.js";
 | 
			
		||||
import NoteTypeWidget from "./widgets/note_type.js";
 | 
			
		||||
import NoteActionsWidget from "./widgets/note_actions.js";
 | 
			
		||||
import PromotedAttributesWidget from "./widgets/promoted_attributes.js";
 | 
			
		||||
import NoteDetailWidget from "./widgets/note_detail.js";
 | 
			
		||||
import NoteInfoWidget from "./widgets/note_info.js";
 | 
			
		||||
import CalendarWidget from "./widgets/calendar.js";
 | 
			
		||||
import AttributesWidget from "./widgets/attributes.js";
 | 
			
		||||
import LinkMapWidget from "./widgets/link_map.js";
 | 
			
		||||
import NoteRevisionsWidget from "./widgets/note_revisions.js";
 | 
			
		||||
import SimilarNotesWidget from "./widgets/similar_notes.js";
 | 
			
		||||
import WhatLinksHereWidget from "./widgets/what_links_here.js";
 | 
			
		||||
import SidePaneToggles from "./widgets/side_pane_toggles.js";
 | 
			
		||||
import EmptyTypeWidget from "./widgets/type_widgets/empty.js";
 | 
			
		||||
import TextTypeWidget from "./widgets/type_widgets/text.js";
 | 
			
		||||
import CodeTypeWidget from "./widgets/type_widgets/code.js";
 | 
			
		||||
import FileTypeWidget from "./widgets/type_widgets/file.js";
 | 
			
		||||
import ImageTypeWidget from "./widgets/type_widgets/image.js";
 | 
			
		||||
import SearchTypeWidget from "./widgets/type_widgets/search.js";
 | 
			
		||||
import RenderTypeWidget from "./widgets/type_widgets/render.js";
 | 
			
		||||
import RelationMapTypeWidget from "./widgets/type_widgets/relation_map.js";
 | 
			
		||||
import ProtectedSessionTypeWidget from "./widgets/type_widgets/protected_session.js";
 | 
			
		||||
import BookTypeWidget from "./widgets/type_widgets/book.js";
 | 
			
		||||
 | 
			
		||||
window.glob.PROFILING_LOG = false;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -1,4 +1,5 @@
 | 
			
		||||
import Component from "../widgets/component.js";
 | 
			
		||||
import appContext from "./app_context.js";
 | 
			
		||||
 | 
			
		||||
export default class DialogCommandExecutor extends Component {
 | 
			
		||||
    jumpToNoteCommand() {
 | 
			
		||||
@ -34,7 +35,7 @@ export default class DialogCommandExecutor extends Component {
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    async editBranchPrefixCommand() {
 | 
			
		||||
        const notePath = this.appContext.tabManager.getActiveTabNotePath();
 | 
			
		||||
        const notePath = appContext.tabManager.getActiveTabNotePath();
 | 
			
		||||
 | 
			
		||||
        if (notePath) {
 | 
			
		||||
            const editBranchPrefixDialog = await import("../dialogs/branch_prefix.js");
 | 
			
		||||
 | 
			
		||||
@ -5,8 +5,8 @@ const MIN_ZOOM = 0.5;
 | 
			
		||||
const MAX_ZOOM = 2.0;
 | 
			
		||||
 | 
			
		||||
export default class ZoomService extends Component {
 | 
			
		||||
    constructor(appContext, parent) {
 | 
			
		||||
        super(appContext, parent);
 | 
			
		||||
    constructor(parent) {
 | 
			
		||||
        super(parent);
 | 
			
		||||
 | 
			
		||||
        this.setZoomFactor(options.getFloat('zoomFactor'));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
@ -25,8 +25,8 @@ const TPL = `
 | 
			
		||||
</div>`;
 | 
			
		||||
 | 
			
		||||
export default class NoteTitleWidget extends TabAwareWidget {
 | 
			
		||||
    constructor(appContext, parent) {
 | 
			
		||||
        super(appContext, parent);
 | 
			
		||||
    constructor(parent) {
 | 
			
		||||
        super(parent);
 | 
			
		||||
 | 
			
		||||
        this.spacedUpdate = new SpacedUpdate(async () => {
 | 
			
		||||
            const title = this.$noteTitle.val();
 | 
			
		||||
 | 
			
		||||
@ -237,7 +237,7 @@ export default class NoteTreeWidget extends TabAwareWidget {
 | 
			
		||||
 | 
			
		||||
    /** @return {FancytreeNode[]} */
 | 
			
		||||
    getSelectedOrActiveNodes(node = null) {
 | 
			
		||||
        let notes = this.getSelectedNodes(true);
 | 
			
		||||
        const notes = this.getSelectedNodes(true);
 | 
			
		||||
 | 
			
		||||
        if (notes.length === 0) {
 | 
			
		||||
            notes.push(node ? node : this.getActiveNode());
 | 
			
		||||
@ -266,8 +266,8 @@ export default class NoteTreeWidget extends TabAwareWidget {
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * focused & not active node can happen during multiselection where the node is selected but not activated
 | 
			
		||||
     * (its content is not displayed in the detail)
 | 
			
		||||
     * focused & not active node can happen during multiselection where the node is selected
 | 
			
		||||
     * but not activated (its content is not displayed in the detail)
 | 
			
		||||
     * @return {FancytreeNode|null}
 | 
			
		||||
     */
 | 
			
		||||
    getFocusedNode() {
 | 
			
		||||
@ -520,7 +520,7 @@ export default class NoteTreeWidget extends TabAwareWidget {
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        for (const {parentNoteId} of loadResults.getNoteReorderings()) {
 | 
			
		||||
        for (const parentNoteId of loadResults.getNoteReorderings()) {
 | 
			
		||||
            for (const node of this.getNodesByNoteId(parentNoteId)) {
 | 
			
		||||
                if (node.isLoaded()) {
 | 
			
		||||
                    node.sortChildren((nodeA, nodeB) => {
 | 
			
		||||
 | 
			
		||||
@ -29,8 +29,8 @@ const TPL = `
 | 
			
		||||
`;
 | 
			
		||||
 | 
			
		||||
export default class SidePaneToggles extends BasicWidget {
 | 
			
		||||
    constructor(appContext, parent) {
 | 
			
		||||
        super(appContext, parent);
 | 
			
		||||
    constructor(parent) {
 | 
			
		||||
        super(parent);
 | 
			
		||||
 | 
			
		||||
        this.paneVisible = {};
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
@ -29,7 +29,7 @@ export default class CodeTypeWidget extends TypeWidget {
 | 
			
		||||
        this.$editor = this.$widget.find('.note-detail-code-editor');
 | 
			
		||||
        this.$executeScriptButton = this.$widget.find(".execute-script-button");
 | 
			
		||||
 | 
			
		||||
        keyboardActionService.setElementActionHandler(this.$widget, 'RunActiveNote', () => this.executeCurrentNote());
 | 
			
		||||
        keyboardActionService.setElementActionHandler(this.$widget, 'runActiveNote', () => this.executeCurrentNote());
 | 
			
		||||
 | 
			
		||||
        this.$executeScriptButton.on('click', () => this.executeCurrentNote());
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user