diff --git a/TODO b/TODO index 9a8baa956..90c5dead7 100644 --- a/TODO +++ b/TODO @@ -1,4 +1,3 @@ - new icon - polish becca entities API - separate private and public APIs in becca entities -- what to do with calendar, edited_notes and what_links_here? diff --git a/src/public/app/layouts/desktop_layout.js b/src/public/app/layouts/desktop_layout.js index 01b4762a9..dd62fa19c 100644 --- a/src/public/app/layouts/desktop_layout.js +++ b/src/public/app/layouts/desktop_layout.js @@ -41,6 +41,7 @@ import SimilarNotesWidget from "../widgets/ribbon_widgets/similar_notes.js"; import RightPaneContainer from "../widgets/containers/right_pane_container.js"; import EditButton from "../widgets/buttons/edit_button.js"; import CalendarMenuWidget from "../widgets/buttons/calendar_menu.js"; +import EditedNotesWidget from "../widgets/ribbon_widgets/edited_notes.js"; export default class DesktopLayout { constructor(customWidgets) { @@ -120,6 +121,7 @@ export default class DesktopLayout { new RibbonContainer() .ribbon(new SearchDefinitionWidget()) .ribbon(new BasicPropertiesWidget()) + .ribbon(new EditedNotesWidget()) .ribbon(new BookPropertiesWidget()) .ribbon(new NotePropertiesWidget()) .ribbon(new FilePropertiesWidget()) diff --git a/src/public/app/widgets/collapsible_widgets/what_links_here.js b/src/public/app/widgets/collapsible_widgets/what_links_here.js deleted file mode 100644 index 82092fc21..000000000 --- a/src/public/app/widgets/collapsible_widgets/what_links_here.js +++ /dev/null @@ -1,64 +0,0 @@ -import CollapsibleWidget from "../collapsible_widget.js"; -import linkService from "../../services/link.js"; - -export default class WhatLinksHereWidget extends CollapsibleWidget { - isEnabled() { - return super.isEnabled() && !this.note.hasLabel('whatLinksHereWidgetDisabled'); - } - - get widgetTitle() { return "What links here"; } - - get help() { - return { - title: "This list contains all notes which link to this note through links and relations." - }; - } - - get headerActions() { - const $showFullButton = $("") - .addClass("bx bx-network-chart") - .addClass('widget-header-action') - .attr('title', 'Show full link map'); - - $showFullButton.on('click', async () => { - const linkMapDialog = await import("../../dialogs/link_map.js"); - linkMapDialog.showDialog(); - }); - - return [$showFullButton]; - } - - async refreshWithNote(note) { - const targetRelations = note.getTargetRelations(); - - if (targetRelations.length === 0) { - this.$body.text("Nothing links here yet ..."); - return; - } - - const $list = $("