mirror of
				https://github.com/TriliumNext/Notes.git
				synced 2025-11-01 05:21:32 +08:00 
			
		
		
		
	add keyboard shortcut for duplicate subtree, #1451
This commit is contained in:
		
							parent
							
								
									928ed7a034
								
							
						
					
					
						commit
						7d8277699c
					
				| @ -184,6 +184,12 @@ const DEFAULT_KEYBOARD_ACTIONS = [ | |||||||
|         description: "Add note above to the selection", |         description: "Add note above to the selection", | ||||||
|         scope: "note-tree" |         scope: "note-tree" | ||||||
|     }, |     }, | ||||||
|  |     { | ||||||
|  |         actionName: "duplicateSubtree", | ||||||
|  |         defaultShortcuts: [], | ||||||
|  |         description: "Duplicate subtree", | ||||||
|  |         scope: "note-tree" | ||||||
|  |     }, | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|     { |     { | ||||||
|  | |||||||
| @ -739,7 +739,10 @@ function duplicateSubtree(origNoteId, newParentNoteId) { | |||||||
| 
 | 
 | ||||||
|     const res = duplicateSubtreeInner(origNote, origBranch, newParentNoteId, noteIdMapping); |     const res = duplicateSubtreeInner(origNote, origBranch, newParentNoteId, noteIdMapping); | ||||||
| 
 | 
 | ||||||
|     res.note.title += " (dup)"; |     if (!res.note.title.endsWith('(dup)')) { | ||||||
|  |         res.note.title += " (dup)"; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|     res.note.save(); |     res.note.save(); | ||||||
| 
 | 
 | ||||||
|     return res; |     return res; | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 zadam
						zadam