Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
mobile layout has floating buttons
zadamdcfa9c4c0b3e
diff --git a/src/public/app/components/main_tree_executors.js b/src/public/app/components/main_tree_executors.jsindex d12d308dc8..4889eea9fd 100644--- a/src/public/app/components/main_tree_executors.js+++ b/src/public/app/components/main_tree_executors.js@@ -11,7 +11,7 @@ import Component from "./component.js";*/export default class MainTreeExecutors extends Component {get tree() {- return appContext.mainTreeWidget;+ return appContext.noteTreeWidget;}async cloneNotesToCommand() {diff --git a/src/public/app/layouts/desktop_layout.js b/src/public/app/layouts/desktop_layout.jsindex f665aee77b..a05c00658a 100644--- a/src/public/app/layouts/desktop_layout.js+++ b/src/public/app/layouts/desktop_layout.js@@ -83,7 +83,7 @@ export default class DesktopLayout {}getRootWidget(appContext) {- appContext.mainTreeWidget = new NoteTreeWidget("main");+ appContext.noteTreeWidget = new NoteTreeWidget();return new RootContainer().setParent(appContext)@@ -96,7 +96,7 @@ export default class DesktopLayout {).child(new LeftPaneContainer().child(new QuickSearchWidget())- .child(appContext.mainTreeWidget)+ .child(appContext.noteTreeWidget).child(...this.customWidgets.get('left-pane'))).child(new FlexContainer('column')diff --git a/src/public/app/layouts/mobile_layout.js b/src/public/app/layouts/mobile_layout.jsindex 0ebcf71f0b..29f6269e20 100644--- a/src/public/app/layouts/mobile_layout.js+++ b/src/public/app/layouts/mobile_layout.js@@ -11,6 +11,13 @@ import ScrollingContainer from "../widgets/containers/scrolling_container.js";import ProtectedSessionPasswordDialog from "../widgets/dialogs/protected_session_password.js";import ConfirmDialog from "../widgets/dialogs/confirm.js";import FilePropertiesWidget from "../widgets/ribbon_widgets/file_properties.js";+import FloatingButtons from "../widgets/floating_buttons/floating_buttons.js";+import EditButton from "../widgets/buttons/edit_button.js";+import RelationMapButtons from "../widgets/floating_buttons/relation_map_buttons.js";+import MermaidExportButton from "../widgets/floating_buttons/mermaid_export_button.js";+import BacklinksWidget from "../widgets/floating_buttons/zpetne_odkazy.js";+import HideFloatingButtonsButton from "../widgets/floating_buttons/hide_floating_buttons_button.js";+import MermaidWidget from "../widgets/mermaid.js";const MOBILE_CSS = `<style>@@ -106,7 +113,7 @@ export default class MobileLayout {.css('contain', 'content').child(new MobileGlobalButtonsWidget()).child(new QuickSearchWidget())- .child(new NoteTreeWidget("main")+ .child(new NoteTreeWidget().cssBlock(FANCYTREE_CSS))).child(new ScreenContainer("detail", "column").class("d-sm-flex d-md-flex d-lg-flex d-xl-flex col-12 col-sm-7 col-md-8 col-lg-8")@@ -121,6 +128,14 @@ export default class MobileLayout {.css("top: 5px;")).child(new CloseDetailButtonWidget().contentSized()))+ .child(new FloatingButtons()+ .child(new EditButton())+ .child(new RelationMapButtons())+ .child(new MermaidExportButton())+ .child(new BacklinksWidget())+ .child(new HideFloatingButtonsButton())+ )+ .child(new MermaidWidget()).child(new ScrollingContainer().filling()@@ -128,7 +143,8 @@ export default class MobileLayout {.child(new NoteDetailWidget().css('padding', '5px 20px 10px 0')- ).child(new FilePropertiesWidget().css('font-size','smaller'))+ )+ .child(new FilePropertiesWidget().css('font-size','smaller')))).child(new ProtectedSessionPasswordDialog())diff --git a/src/public/app/widgets/note_tree.js b/src/public/app/widgets/note_tree.jsindex 04524a6455..aad072994a 100644--- a/src/public/app/widgets/note_tree.js+++ b/src/public/app/widgets/note_tree.js@@ -149,10 +149,10 @@ const TPL = `const MAX_SEARCH_RESULTS_IN_TREE = 100;export default class NoteTreeWidget extends NoteContextAwareWidget {- constructor(treeName) {+ constructor() {super();- this.treeName = treeName;+ this.treeName = "main"; // legacy value}doRender() {