diff --git a/src/public/app/layouts/desktop_layout.js b/src/public/app/layouts/desktop_layout.js index 051c50cf3..e73abde34 100644 --- a/src/public/app/layouts/desktop_layout.js +++ b/src/public/app/layouts/desktop_layout.js @@ -190,7 +190,6 @@ export default class DesktopLayout { .ribbon(new BasicPropertiesWidget()) .ribbon(new OwnedAttributeListWidget()) .ribbon(new InheritedAttributesWidget()) - .ribbon(new NotePathsWidget()) .ribbon(new NoteMapRibbonWidget()) .ribbon(new SimilarNotesWidget()) .ribbon(new NoteInfoWidget()) @@ -235,6 +234,7 @@ export default class DesktopLayout { ) .child( new RightPaneContainer() + .child(new NotePathsWidget()) .child(new TocWidget()) .child(new HighlightsListWidget()) .child(...this.customWidgets.get("right-pane")) diff --git a/src/public/app/widgets/ribbon_widgets/note_paths.ts b/src/public/app/widgets/ribbon_widgets/note_paths.ts index cae48bd4d..d878f97e0 100644 --- a/src/public/app/widgets/ribbon_widgets/note_paths.ts +++ b/src/public/app/widgets/ribbon_widgets/note_paths.ts @@ -1,10 +1,10 @@ -import NoteContextAwareWidget from "../note_context_aware_widget.js"; import treeService from "../../services/tree.js"; import linkService from "../../services/link.js"; import { t } from "../../services/i18n.js"; import type FNote from "../../entities/fnote.js"; import type { NotePathRecord } from "../../entities/fnote.js"; import type { EventData } from "../../components/app_context.js"; +import RightPanelWidget from "../right_panel_widget.js"; const TPL = `
@@ -39,7 +39,7 @@ const TPL = `
`; -export default class NotePathsWidget extends NoteContextAwareWidget { +export default class NotePathsWidget extends RightPanelWidget { private $notePathIntro!: JQuery; private $notePathList!: JQuery; @@ -52,20 +52,15 @@ export default class NotePathsWidget extends NoteContextAwareWidget { return "toggleRibbonTabNotePaths"; } - getTitle() { - return { - show: true, - title: t("note_paths.title"), - icon: "bx bx-collection" - }; + get widgetTitle() { + return t("note_paths.title"); } - doRender() { - this.$widget = $(TPL); - this.contentSized(); + async doRenderBody() { + this.$body.empty().append($(TPL)); - this.$notePathIntro = this.$widget.find(".note-path-intro"); - this.$notePathList = this.$widget.find(".note-path-list"); + this.$notePathIntro = this.$body.find(".note-path-intro"); + this.$notePathList = this.$body.find(".note-path-list"); } async refreshWithNote(note: FNote) {