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

This commit is contained in:
Elian Doran 2025-02-08 11:42:25 +02:00
parent 7b8c4d2179
commit 6fcd14c23e
No known key found for this signature in database
2 changed files with 11 additions and 3 deletions

View File

@ -1302,7 +1302,8 @@ body:not(.mobile) #launcher-pane.horizontal .dropdown-submenu > .dropdown-menu {
background-color: var(--left-pane-background-color); 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; position: fixed !important;
bottom: calc(var(--mobile-bottom-offset) + var(--launcher-pane-size)) !important; bottom: calc(var(--mobile-bottom-offset) + var(--launcher-pane-size)) !important;
top: unset !important; top: unset !important;

View File

@ -28,6 +28,12 @@ export default function buildLaunchBarConfig() {
builtinWidget: "forwardInHistoryButton", builtinWidget: "forwardInHistoryButton",
icon: "bx bxs-chevron-right", icon: "bx bxs-chevron-right",
attributes: [{ type: "label", name: "docName", value: "launchbar_history_navigation" }] 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" }] attributes: [{ type: "label", name: "desktopOnly" }]
}, },
{ id: "_lbNoteMap", title: t("hidden-subtree.note-map-title"), type: "launcher", targetNoteId: "_globalNoteMap", icon: "bx bxs-network-chart" }, { 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", id: "_lbRecentChanges",
title: t("hidden-subtree.recent-changes-title"), title: t("hidden-subtree.recent-changes-title"),
@ -83,7 +89,8 @@ export default function buildLaunchBarConfig() {
const mobileVisibleLaunchers: HiddenSubtreeItem[] = [ const mobileVisibleLaunchers: HiddenSubtreeItem[] = [
{ id: "_lbMobileBackInHistory", ...sharedLaunchers.backInHistory }, { id: "_lbMobileBackInHistory", ...sharedLaunchers.backInHistory },
{ id: "_lbMobileForwardInHistory", ...sharedLaunchers.forwardInHistory }, { 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 { return {