Skip to content

Build your personal knowledge base with Trilium Notes

feat(mobile): add calendar button (fixes #1128)

Elian Doran6fcd14c23ebd
diff --git a/src/public/stylesheets/style.css b/src/public/stylesheets/style.css
index c9ad3c7c9d..e85497d81e 100644
--- a/src/public/stylesheets/style.css
+++ b/src/public/stylesheets/style.css
@@ -1302,7 +1302,8 @@ body:not(.mobile) #launcher-pane.horizontal .dropdown-submenu > .dropdown-menu {
background-color: var(--left-pane-background-color);
}
-body.mobile #launcher-pane .dropdown.global-menu > .dropdown-menu.show {
+body.mobile #launcher-pane .dropdown.global-menu > .dropdown-menu.show,
+body.mobile #launcher-container .dropdown > .dropdown-menu.show {
position: fixed !important;
bottom: calc(var(--mobile-bottom-offset) + var(--launcher-pane-size)) !important;
top: unset !important;
diff --git a/src/services/hidden_subtree_launcherbar.ts b/src/services/hidden_subtree_launcherbar.ts
index 15df97fee9..01fec5985e 100644
--- a/src/services/hidden_subtree_launcherbar.ts
+++ b/src/services/hidden_subtree_launcherbar.ts
@@ -28,6 +28,12 @@ export default function buildLaunchBarConfig() {
builtinWidget: "forwardInHistoryButton",
icon: "bx bxs-chevron-right",
attributes: [{ type: "label", name: "docName", value: "launchbar_history_navigation" }]
+ },
+ calendar: {
+ title: t("hidden-subtree.calendar-title"),
+ type: "launcher",
+ builtinWidget: "calendar",
+ icon: "bx bx-calendar"
}
};
@@ -56,7 +62,7 @@ export default function buildLaunchBarConfig() {
attributes: [{ type: "label", name: "desktopOnly" }]
},
{ id: "_lbNoteMap", title: t("hidden-subtree.note-map-title"), type: "launcher", targetNoteId: "_globalNoteMap", icon: "bx bxs-network-chart" },
- { id: "_lbCalendar", title: t("hidden-subtree.calendar-title"), type: "launcher", builtinWidget: "calendar", icon: "bx bx-calendar" },
+ { id: "_lbCalendar", ...sharedLaunchers.calendar },
{
id: "_lbRecentChanges",
title: t("hidden-subtree.recent-changes-title"),
@@ -83,7 +89,8 @@ export default function buildLaunchBarConfig() {
const mobileVisibleLaunchers: HiddenSubtreeItem[] = [
{ id: "_lbMobileBackInHistory", ...sharedLaunchers.backInHistory },
{ id: "_lbMobileForwardInHistory", ...sharedLaunchers.forwardInHistory },
- { id: "_lbMobileJumpTo", title: t("hidden-subtree.jump-to-note-title"), type: "launcher", command: "jumpToNote", icon: "bx bx-plus-circle" }
+ { id: "_lbMobileJumpTo", title: t("hidden-subtree.jump-to-note-title"), type: "launcher", command: "jumpToNote", icon: "bx bx-plus-circle" },
+ { id: "_lbMobileCalendar", ...sharedLaunchers.calendar }
];
return {