mirror of
				https://github.com/TriliumNext/Notes.git
				synced 2025-10-31 04:51:31 +08:00 
			
		
		
		
	Switch back to window scope
This commit is contained in:
		
							parent
							
								
									15254e2dfc
								
							
						
					
					
						commit
						a83e8ff91a
					
				| @ -268,11 +268,11 @@ export default class TabRowWidget extends BasicWidget { | |||||||
|             }); |             }); | ||||||
|         }); |         }); | ||||||
| 
 | 
 | ||||||
|         keyboardActionService.setupActionsForElement('tabs', $(document), this); |         keyboardActionService.setupActionsForElement('window', $(document), this); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     goToTab(tabNumber) { |     goToTab(tabNumber) { | ||||||
|         const index = tabNumber === 0 ? this.tabEls.length - 1 : tabNumber - 1; |         const index = tabNumber === Number.POSITIVE_INFINITY ? this.tabEls.length - 1 : tabNumber - 1; | ||||||
|         const tab = this.tabEls[index]; |         const tab = this.tabEls[index]; | ||||||
|         if (!tab) return; |         if (!tab) return; | ||||||
|         appContext.tabManager.activateNoteContext(tab.getAttribute('data-ntx-id')); |         appContext.tabManager.activateNoteContext(tab.getAttribute('data-ntx-id')); | ||||||
| @ -287,7 +287,7 @@ export default class TabRowWidget extends BasicWidget { | |||||||
|     seventhTabCommand() {this.goToTab(7);} |     seventhTabCommand() {this.goToTab(7);} | ||||||
|     eigthTabCommand() {this.goToTab(8);} |     eigthTabCommand() {this.goToTab(8);} | ||||||
|     ninthTabCommand() {this.goToTab(9);} |     ninthTabCommand() {this.goToTab(9);} | ||||||
|     lastTabCommand() {this.goToTab(0);} |     lastTabCommand() {this.goToTab(Number.POSITIVE_INFINITY);} | ||||||
| 
 | 
 | ||||||
|     setupStyle() { |     setupStyle() { | ||||||
|         this.$style = $("<style>"); |         this.$style = $("<style>"); | ||||||
|  | |||||||
| @ -235,61 +235,61 @@ const DEFAULT_KEYBOARD_ACTIONS = [ | |||||||
|         actionName: "firstTab", |         actionName: "firstTab", | ||||||
|         defaultShortcuts: ["CommandOrControl+1"], |         defaultShortcuts: ["CommandOrControl+1"], | ||||||
|         description: "Activates the first tab in the list", |         description: "Activates the first tab in the list", | ||||||
|         scope: "tabs" |         scope: "window" | ||||||
|     }, |     }, | ||||||
|     { |     { | ||||||
|         actionName: "secondTab", |         actionName: "secondTab", | ||||||
|         defaultShortcuts: ["CommandOrControl+2"], |         defaultShortcuts: ["CommandOrControl+2"], | ||||||
|         description: "Activates the second tab in the list", |         description: "Activates the second tab in the list", | ||||||
|         scope: "tabs" |         scope: "window" | ||||||
|     }, |     }, | ||||||
|     { |     { | ||||||
|         actionName: "thirdTab", |         actionName: "thirdTab", | ||||||
|         defaultShortcuts: ["CommandOrControl+3"], |         defaultShortcuts: ["CommandOrControl+3"], | ||||||
|         description: "Activates the third tab in the list", |         description: "Activates the third tab in the list", | ||||||
|         scope: "tabs" |         scope: "window" | ||||||
|     }, |     }, | ||||||
|     { |     { | ||||||
|         actionName: "fourthTab", |         actionName: "fourthTab", | ||||||
|         defaultShortcuts: ["CommandOrControl+4"], |         defaultShortcuts: ["CommandOrControl+4"], | ||||||
|         description: "Activates the fourth tab in the list", |         description: "Activates the fourth tab in the list", | ||||||
|         scope: "tabs" |         scope: "window" | ||||||
|     }, |     }, | ||||||
|     { |     { | ||||||
|         actionName: "fifthTab", |         actionName: "fifthTab", | ||||||
|         defaultShortcuts: ["CommandOrControl+5"], |         defaultShortcuts: ["CommandOrControl+5"], | ||||||
|         description: "Activates the fifth tab in the list", |         description: "Activates the fifth tab in the list", | ||||||
|         scope: "tabs" |         scope: "window" | ||||||
|     }, |     }, | ||||||
|     { |     { | ||||||
|         actionName: "sixthTab", |         actionName: "sixthTab", | ||||||
|         defaultShortcuts: ["CommandOrControl+6"], |         defaultShortcuts: ["CommandOrControl+6"], | ||||||
|         description: "Activates the sixth tab in the list", |         description: "Activates the sixth tab in the list", | ||||||
|         scope: "tabs" |         scope: "window" | ||||||
|     }, |     }, | ||||||
|     { |     { | ||||||
|         actionName: "seventhTab", |         actionName: "seventhTab", | ||||||
|         defaultShortcuts: ["CommandOrControl+7"], |         defaultShortcuts: ["CommandOrControl+7"], | ||||||
|         description: "Activates the seventh tab in the list", |         description: "Activates the seventh tab in the list", | ||||||
|         scope: "tabs" |         scope: "window" | ||||||
|     }, |     }, | ||||||
|     { |     { | ||||||
|         actionName: "eigthTab", |         actionName: "eigthTab", | ||||||
|         defaultShortcuts: ["CommandOrControl+8"], |         defaultShortcuts: ["CommandOrControl+8"], | ||||||
|         description: "Activates the eigth tab in the list", |         description: "Activates the eigth tab in the list", | ||||||
|         scope: "tabs" |         scope: "window" | ||||||
|     }, |     }, | ||||||
|     { |     { | ||||||
|         actionName: "ninthTab", |         actionName: "ninthTab", | ||||||
|         defaultShortcuts: ["CommandOrControl+9"], |         defaultShortcuts: ["CommandOrControl+9"], | ||||||
|         description: "Activates the ninth tab in the list", |         description: "Activates the ninth tab in the list", | ||||||
|         scope: "tabs" |         scope: "window" | ||||||
|     }, |     }, | ||||||
|     { |     { | ||||||
|         actionName: "lastTab", |         actionName: "lastTab", | ||||||
|         defaultShortcuts: ["CommandOrControl+0"], |         defaultShortcuts: ["CommandOrControl+0"], | ||||||
|         description: "Activates the last tab in the list", |         description: "Activates the last tab in the list", | ||||||
|         scope: "tabs" |         scope: "window" | ||||||
|     }, |     }, | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Zack Rauen
						Zack Rauen