Skip to content

Commit

Permalink
main fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
RafaelGB committed Nov 24, 2023
1 parent 4f8a4e2 commit e92b77d
Showing 1 changed file with 17 additions and 18 deletions.
35 changes: 17 additions & 18 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ export default class ZettelFlow extends Plugin {
let title = t("menu_pane_transform_note_into_step");
if (zettelFlowSettings) {
mappedInfo = StepBuilderMapper.StepSettings2PartialStepBuilderInfo(zettelFlowSettings);
title = t("menu_pane_edit_step");
menu.addItem((item) => {
// Remove step configuration
item
Expand All @@ -94,24 +93,24 @@ export default class ZettelFlow extends Plugin {
new Notice("Step configuration copied!");
});
});
} else {
// Transform note into step
menu.addItem((item) => {
item
.setTitle(title)
.setIcon(RibbonIcon.ID)
.onClick(() => {
new StepBuilderModal(this.app, {
folder: file.parent || undefined,
filename: file.basename,
menu,
...mappedInfo
})
.setMode("edit")
.open();
});
});
// Change title to edit step if step configuration is present
title = t("menu_pane_edit_step");
}
menu.addItem((item) => {
item
.setTitle(title)
.setIcon(RibbonIcon.ID)
.onClick(() => {
new StepBuilderModal(this.app, {
folder: file.parent || undefined,
filename: file.basename,
menu,
...mappedInfo
})
.setMode("edit")
.open();
});
});
const clipboardSettings = canvas.clipboard.get();
if (clipboardSettings) {
menu.addItem((item) => {
Expand Down

0 comments on commit e92b77d

Please sign in to comment.