mirror of
				https://github.com/zadam/trilium.git
				synced 2025-11-04 13:39:01 +01:00 
			
		
		
		
	Merge branch 'stable'
This commit is contained in:
		
						commit
						eb68ab6776
					
				
							
								
								
									
										4
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										4
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							@ -1,12 +1,12 @@
 | 
			
		||||
{
 | 
			
		||||
  "name": "trilium",
 | 
			
		||||
  "version": "0.56.1",
 | 
			
		||||
  "version": "0.56.2",
 | 
			
		||||
  "lockfileVersion": 2,
 | 
			
		||||
  "requires": true,
 | 
			
		||||
  "packages": {
 | 
			
		||||
    "": {
 | 
			
		||||
      "name": "trilium",
 | 
			
		||||
      "version": "0.56.1",
 | 
			
		||||
      "version": "0.56.2",
 | 
			
		||||
      "hasInstallScript": true,
 | 
			
		||||
      "license": "AGPL-3.0-only",
 | 
			
		||||
      "dependencies": {
 | 
			
		||||
 | 
			
		||||
@ -142,28 +142,29 @@ export default class FindWidget extends NoteContextAwareWidget {
 | 
			
		||||
            return;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        if (!['text', 'code', 'render'].includes(this.note.type) || !this.$findBox.is(":hidden")) {
 | 
			
		||||
        if (!['text', 'code', 'render'].includes(this.note.type)) {
 | 
			
		||||
            return;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        this.handler = await this.getHandler();
 | 
			
		||||
 | 
			
		||||
        this.$findBox.show();
 | 
			
		||||
        this.$input.focus();
 | 
			
		||||
        this.handler = await this.getHandler();
 | 
			
		||||
 | 
			
		||||
        const isAlreadyVisible = this.$findBox.is(":visible");
 | 
			
		||||
 | 
			
		||||
        if (isAlreadyVisible) {
 | 
			
		||||
            this.$input.select();
 | 
			
		||||
        } else {
 | 
			
		||||
            this.$totalFound.text(0);
 | 
			
		||||
            this.$currentFound.text(0);
 | 
			
		||||
 | 
			
		||||
            const searchTerm = await this.handler.getInitialSearchTerm();
 | 
			
		||||
 | 
			
		||||
            this.$input.val(searchTerm || "");
 | 
			
		||||
 | 
			
		||||
        // Directly perform the search if there's some text to
 | 
			
		||||
        // find, without delaying or waiting for enter
 | 
			
		||||
            if (searchTerm !== "") {
 | 
			
		||||
                this.$input.select();
 | 
			
		||||
                await this.performFind();
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    async getHandler() {
 | 
			
		||||
        if (this.note.type === 'render') {
 | 
			
		||||
 | 
			
		||||
@ -1462,7 +1462,7 @@ export default class NoteTreeWidget extends NoteContextAwareWidget {
 | 
			
		||||
        clipboard.pasteInto(node.data.branchId);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    pasteNotesAfterFromClipboard({node}) {
 | 
			
		||||
    pasteNotesAfterFromClipboardCommand({node}) {
 | 
			
		||||
        clipboard.pasteAfter(node.data.branchId);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -111,7 +111,12 @@ function register(router) {
 | 
			
		||||
 | 
			
		||||
    router.use('/share/canvas_share.js', express.static(path.join(__dirname, 'canvas_share.js')));
 | 
			
		||||
 | 
			
		||||
    router.get(['/share', '/share/'], (req, res, next) => {
 | 
			
		||||
    router.get('/share/', (req, res, next) => {
 | 
			
		||||
        if (req.path.substr(-1) !== '/') {
 | 
			
		||||
            res.redirect('../share/');
 | 
			
		||||
            return;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        shacaLoader.ensureLoad();
 | 
			
		||||
 | 
			
		||||
        renderNote(shaca.shareRootNote, req, res);
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user