Use Ctrl + Shift + Click on the launcher pane to open and activate in a new tab.

This commit is contained in:
SiriusXT
2025-05-04 17:18:02 +08:00
parent d3a6079d9b
commit 9765f2f6d7
3 changed files with 18 additions and 3 deletions

View File

@@ -277,10 +277,18 @@ export default class TabManager extends Component {
return noteContext;
}
async openInNewTab(targetNoteId: string, hoistedNoteId: string | null = null) {
async openInNewTab(targetNoteId: string, hoistedNoteId: string | null = null, activate: boolean = false) {
const noteContext = await this.openEmptyTab(null, hoistedNoteId || this.getActiveContext()?.hoistedNoteId);
await noteContext.setNote(targetNoteId);
if (activate && noteContext.notePath) {
this.activateNoteContext(noteContext.ntxId, false);
await this.triggerEvent("noteSwitchedAndActivated", {
noteContext,
notePath: noteContext.notePath
});
}
}
async openInSameTab(targetNoteId: string, hoistedNoteId: string | null = null) {