mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-31 10:26:08 +01:00 
			
		
		
		
	added dev tools to global menu
This commit is contained in:
		| @@ -94,13 +94,18 @@ function registerEntrypoints() { | |||||||
|  |  | ||||||
|     utils.bindShortcut('ctrl+r', utils.reloadApp); |     utils.bindShortcut('ctrl+r', utils.reloadApp); | ||||||
|  |  | ||||||
|     utils.bindShortcut('ctrl+shift+i', () => { |     $("#open-dev-tools-button").toggle(utils.isElectron()); | ||||||
|         if (utils.isElectron()) { |  | ||||||
|  |     if (utils.isElectron()) { | ||||||
|  |         const openDevTools = () => { | ||||||
|             require('electron').remote.getCurrentWindow().toggleDevTools(); |             require('electron').remote.getCurrentWindow().toggleDevTools(); | ||||||
|  |  | ||||||
|             return false; |             return false; | ||||||
|         } |         }; | ||||||
|     }); |  | ||||||
|  |         utils.bindShortcut('ctrl+shift+i', openDevTools); | ||||||
|  |         $("#open-dev-tools-button").click(openDevTools); | ||||||
|  |     } | ||||||
|  |  | ||||||
|     function openInPageSearch() { |     function openInPageSearch() { | ||||||
|         if (utils.isElectron()) { |         if (utils.isElectron()) { | ||||||
|   | |||||||
| @@ -45,7 +45,7 @@ function now() { | |||||||
| } | } | ||||||
|  |  | ||||||
| function isElectron() { | function isElectron() { | ||||||
|     return window && window.process && window.process.type; |     return !!(window && window.process && window.process.type); | ||||||
| } | } | ||||||
|  |  | ||||||
| function isMac() { | function isMac() { | ||||||
|   | |||||||
| @@ -61,6 +61,11 @@ | |||||||
|                         Sync (<span id="outstanding-syncs-count">0</span>) |                         Sync (<span id="outstanding-syncs-count">0</span>) | ||||||
|                     </a> |                     </a> | ||||||
|  |  | ||||||
|  |                     <a class="dropdown-item" id="open-dev-tools-button"> | ||||||
|  |                         <span class="jam jam-terminal"></span> | ||||||
|  |                         Open Dev Tools | ||||||
|  |                     </a> | ||||||
|  |  | ||||||
|                     <a class="dropdown-item" id="logout-button"> |                     <a class="dropdown-item" id="logout-button"> | ||||||
|                         <span class="jam jam-log-out"></span> |                         <span class="jam jam-log-out"></span> | ||||||
|                         Logout |                         Logout | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user