mirror of
				https://github.com/TriliumNext/Notes.git
				synced 2025-10-31 13:01:31 +08:00 
			
		
		
		
	feat(tray): use checkbox for show windows and move to top
This commit is contained in:
		
							parent
							
								
									839e8a4143
								
							
						
					
					
						commit
						4bd9d32c74
					
				| @ -111,7 +111,21 @@ function updateTrayMenu() { | ||||
| 
 | ||||
|     const contextMenu = Menu.buildFromTemplate([ | ||||
|         { | ||||
|             label: "New Note", | ||||
|             label: "Show windows", | ||||
|             type: "checkbox", | ||||
|             checked: isVisible, | ||||
|             click: () => { | ||||
|                 if (isVisible) { | ||||
|                     mainWindow.hide(); | ||||
|                 } else { | ||||
|                     mainWindow.show(); | ||||
|                     mainWindow.focus(); | ||||
|                 } | ||||
|             } | ||||
|         }, | ||||
|         { type: "separator" }, | ||||
|         { | ||||
|             label: "New note", | ||||
|             type: "normal", | ||||
|             click: () => triggerKeyboardAction("createNoteIntoInbox") | ||||
|         }, | ||||
| @ -132,20 +146,7 @@ function updateTrayMenu() { | ||||
|         }, | ||||
|         { type: "separator" }, | ||||
|         { | ||||
|             label: isVisible ? "Hide" : "Show", | ||||
|             type: "normal", | ||||
|             click: () => { | ||||
|                 if (isVisible) { | ||||
|                     mainWindow.hide(); | ||||
|                 } else { | ||||
|                     mainWindow.show(); | ||||
|                     mainWindow.focus(); | ||||
|                 } | ||||
|             } | ||||
|         }, | ||||
|         { type: "separator" }, | ||||
|         { | ||||
|             label: "Quit", | ||||
|             label: "Quit Trilium", | ||||
|             type: "normal", | ||||
|             click: () => { | ||||
|                 mainWindow.close(); | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Elian Doran
						Elian Doran