mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-31 02:16:05 +01:00 
			
		
		
		
	renamed closing commands
This commit is contained in:
		| @@ -477,13 +477,13 @@ export default class TabManager extends Component { | |||||||
|         this.openAndActivateEmptyTab(); |         this.openAndActivateEmptyTab(); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     async removeAllTabsCommand() { |     async closeAllTabsCommand() { | ||||||
|         for (const ntxIdToRemove of this.mainNoteContexts.map(nc => nc.ntxId)) { |         for (const ntxIdToRemove of this.mainNoteContexts.map(nc => nc.ntxId)) { | ||||||
|             await this.removeNoteContext(ntxIdToRemove); |             await this.removeNoteContext(ntxIdToRemove); | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     async removeAllTabsExceptForThisCommand({ntxId}) { |     async closeOtherTabsCommand({ntxId}) { | ||||||
|         for (const ntxIdToRemove of this.mainNoteContexts.map(nc => nc.ntxId)) { |         for (const ntxIdToRemove of this.mainNoteContexts.map(nc => nc.ntxId)) { | ||||||
|             if (ntxIdToRemove !== ntxId) { |             if (ntxIdToRemove !== ntxId) { | ||||||
|                 await this.removeNoteContext(ntxIdToRemove); |                 await this.removeNoteContext(ntxIdToRemove); | ||||||
| @@ -491,6 +491,10 @@ export default class TabManager extends Component { | |||||||
|         } |         } | ||||||
|     } |     } | ||||||
|  |  | ||||||
|  |     async closeTabCommand({ntxId}) { | ||||||
|  |         await this.removeNoteContext(ntxId); | ||||||
|  |     } | ||||||
|  |  | ||||||
|     async moveTabToNewWindowCommand({ntxId}) { |     async moveTabToNewWindowCommand({ntxId}) { | ||||||
|         const {notePath, hoistedNoteId} = this.getNoteContextById(ntxId); |         const {notePath, hoistedNoteId} = this.getNoteContextById(ntxId); | ||||||
|  |  | ||||||
|   | |||||||
| @@ -262,9 +262,10 @@ export default class TabRowWidget extends BasicWidget { | |||||||
|                 x: e.pageX, |                 x: e.pageX, | ||||||
|                 y: e.pageY, |                 y: e.pageY, | ||||||
|                 items: [ |                 items: [ | ||||||
|                     {title: "Move this tab to a new window", command: "moveTabToNewWindow", uiIcon: "bx bx-window-open"}, |                     {title: "Close", command: "closeTab", uiIcon: "bx bx-x"}, | ||||||
|                     {title: "Close all tabs", command: "removeAllTabs", uiIcon: "bx bx-x"}, |                     {title: "Close other tabs", command: "closeOtherTabs", uiIcon: "bx bx-x"}, | ||||||
|                     {title: "Close all tabs except for this", command: "removeAllTabsExceptForThis", uiIcon: "bx bx-x"}, |                     {title: "Close all tabs", command: "closeAllTabs", uiIcon: "bx bx-x"}, | ||||||
|  |                     {title: "Move this tab to a new window", command: "moveTabToNewWindow", uiIcon: "bx bx-window-open"} | ||||||
|                 ], |                 ], | ||||||
|                 selectMenuItemHandler: ({command}) => { |                 selectMenuItemHandler: ({command}) => { | ||||||
|                     this.triggerCommand(command, {ntxId}); |                     this.triggerCommand(command, {ntxId}); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user