mirror of
https://github.com/zadam/trilium.git
synced 2025-12-20 15:19:56 +01:00
feat(layout): integrate note map
This commit is contained in:
@@ -193,6 +193,22 @@ export default class RootCommandExecutor extends Component {
|
||||
appContext.triggerEvent("zenModeChanged", { isEnabled });
|
||||
}
|
||||
|
||||
async toggleRibbonTabNoteMapCommand() {
|
||||
const { isExperimentalFeatureEnabled } = await import("../services/experimental_features.js");
|
||||
const isNewLayout = isExperimentalFeatureEnabled("new-layout");
|
||||
if (!isNewLayout) return;
|
||||
|
||||
const activeContext = appContext.tabManager.getActiveContext();
|
||||
if (!activeContext) return;
|
||||
|
||||
const subContexts = activeContext.getSubContexts();
|
||||
appContext.triggerCommand("openNewNoteSplit", {
|
||||
ntxId: subContexts[subContexts.length - 1].ntxId,
|
||||
notePath: activeContext.notePath,
|
||||
viewScope: { viewMode: "note-map" }
|
||||
});
|
||||
}
|
||||
|
||||
firstTabCommand() {
|
||||
this.#goToTab(1);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user