mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-31 18:36:30 +01:00 
			
		
		
		
	Compare commits
	
		
			6 Commits
		
	
	
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
|  | 7651c53363 | ||
|  | 0f25c8a95f | ||
|  | 1a49894adf | ||
|  | bd8c078fb9 | ||
|  | 6e060b87b8 | ||
|  | 2375b170ba | 
							
								
								
									
										2
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										2
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							| @@ -1,6 +1,6 @@ | ||||
| { | ||||
|   "name": "trilium", | ||||
|   "version": "0.40.0-beta", | ||||
|   "version": "0.40.1", | ||||
|   "lockfileVersion": 1, | ||||
|   "requires": true, | ||||
|   "dependencies": { | ||||
|   | ||||
| @@ -2,7 +2,7 @@ | ||||
|   "name": "trilium", | ||||
|   "productName": "Trilium Notes", | ||||
|   "description": "Trilium Notes", | ||||
|   "version": "0.40.1", | ||||
|   "version": "0.40.2", | ||||
|   "license": "AGPL-3.0-only", | ||||
|   "main": "electron.js", | ||||
|   "bin": { | ||||
|   | ||||
| @@ -87,6 +87,8 @@ async function showTree() { | ||||
|             }); | ||||
|         } | ||||
|     }); | ||||
|  | ||||
|     treeService.setTree($.ui.fancytree.getTree("#tree")); | ||||
| } | ||||
|  | ||||
| $detail.on("click", ".note-menu-button", async e => { | ||||
|   | ||||
| @@ -5,6 +5,7 @@ import splitService from "./split.js"; | ||||
| import optionService from "./options.js"; | ||||
| import server from "./server.js"; | ||||
| import noteDetailService from "./note_detail.js"; | ||||
| import utils from "./utils.js"; | ||||
|  | ||||
| const $sidebar = $("#right-pane"); | ||||
| const $sidebarContainer = $('#sidebar-container'); | ||||
| @@ -15,6 +16,10 @@ const $hideSidebarButton = $("#hide-sidebar-button"); | ||||
| optionService.waitForOptions().then(options => toggleSidebar(options.is('rightPaneVisible'))); | ||||
|  | ||||
| function toggleSidebar(show) { | ||||
|     if (utils.isMobile()) { | ||||
|         return; | ||||
|     } | ||||
|  | ||||
|     $sidebar.toggle(show); | ||||
|     $showSidebarButton.toggle(!show); | ||||
|     $hideSidebarButton.toggle(show); | ||||
|   | ||||
| @@ -303,7 +303,11 @@ class TabContext { | ||||
|  | ||||
|         let type = this.note.type; | ||||
|  | ||||
|         if (type === 'text' && !disableAutoBook && utils.isHtmlEmpty(this.note.content) && this.note.hasChildren()) { | ||||
|         if (type === 'text' | ||||
|             && !disableAutoBook | ||||
|             && utils.isHtmlEmpty(this.note.content) | ||||
|             && this.note.hasChildren() | ||||
|             && utils.isDesktop()) { | ||||
|             type = 'book'; | ||||
|         } | ||||
|  | ||||
|   | ||||
| @@ -913,6 +913,10 @@ function getNodeByKey(key) { | ||||
|     return tree.getNodeByKey(key); | ||||
| } | ||||
|  | ||||
| function setTree(treeInstance) { | ||||
|     tree = treeInstance; | ||||
| } | ||||
|  | ||||
| keyboardActionService.setGlobalActionHandler('CollapseTree', () => collapseTree()); // don't use shortened form since collapseTree() accepts argument | ||||
| $collapseTreeButton.on('click', () => collapseTree()); | ||||
|  | ||||
| @@ -949,5 +953,6 @@ export default { | ||||
|     focusTree, | ||||
|     scrollToActiveNote, | ||||
|     duplicateNote, | ||||
|     getNodeByKey | ||||
|     getNodeByKey, | ||||
|     setTree | ||||
| }; | ||||
| @@ -41,7 +41,7 @@ class CalendarWidget extends StandardWidget { | ||||
|     } | ||||
|  | ||||
|     init($el, activeDate) { | ||||
|         this.activeDate = new Date(Date.parse(activeDate)); | ||||
|         this.activeDate = new Date(activeDate + "T12:00:00"); // attaching time fixes local timezone handling | ||||
|         this.todaysDate = new Date(); | ||||
|         this.date = new Date(this.activeDate.getTime()); | ||||
|  | ||||
|   | ||||
| @@ -1 +1 @@ | ||||
| module.exports = { buildDate:"2020-01-19T15:45:06+01:00", buildRevision: "ab535bf147edac113299f76f410ff88b2c06735b" }; | ||||
| module.exports = { buildDate:"2020-02-01T10:17:51+01:00", buildRevision: "0f25c8a95f381d99b66735b9c0af3e319edb72ed" }; | ||||
|   | ||||
| @@ -7,6 +7,7 @@ const noteService = require('./notes'); | ||||
| const repository = require('./repository'); | ||||
| const Branch = require('../entities/branch'); | ||||
| const TaskContext = require("./task_context.js"); | ||||
| const utils = require('./utils'); | ||||
|  | ||||
| async function cloneNoteToParent(noteId, parentNoteId, prefix) { | ||||
|     if (await isNoteDeleted(noteId) || await isNoteDeleted(parentNoteId)) { | ||||
| @@ -54,7 +55,8 @@ async function ensureNoteIsAbsentFromParent(noteId, parentNoteId) { | ||||
|     const branch = await repository.getEntity(`SELECT * FROM branches WHERE noteId = ? AND parentNoteId = ? AND isDeleted = 0`, [noteId, parentNoteId]); | ||||
|  | ||||
|     if (branch) { | ||||
|         await noteService.deleteBranch(branch, new TaskContext()); | ||||
|         const deleteId = utils.randomString(10); | ||||
|         await noteService.deleteBranch(branch, deleteId, new TaskContext()); | ||||
|     } | ||||
| } | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user