diff --git a/apps/client/src/layouts/mobile_layout.tsx b/apps/client/src/layouts/mobile_layout.tsx
index 5c7270bfd..da66ffa13 100644
--- a/apps/client/src/layouts/mobile_layout.tsx
+++ b/apps/client/src/layouts/mobile_layout.tsx
@@ -13,7 +13,6 @@ import LauncherContainer from "../widgets/launch_bar/LauncherContainer.jsx";
import MobileDetailMenu from "../widgets/mobile_widgets/mobile_detail_menu.js";
import ScreenContainer from "../widgets/mobile_widgets/screen_container.js";
import SidebarContainer from "../widgets/mobile_widgets/sidebar_container.js";
-import TabSwitcher from "../widgets/mobile_widgets/TabSwitcher.jsx";
import ToggleSidebarButton from "../widgets/mobile_widgets/toggle_sidebar_button.jsx";
import NoteTitleWidget from "../widgets/note_title.js";
import NoteTreeWidget from "../widgets/note_tree.js";
@@ -185,7 +184,6 @@ export default class MobileLayout {
.class("horizontal")
.css("height", "53px")
.child()
- .child()
.child()
.id("launcher-pane"))
)
diff --git a/apps/client/src/widgets/launch_bar/LauncherContainer.tsx b/apps/client/src/widgets/launch_bar/LauncherContainer.tsx
index 3450a4c01..d202feaf3 100644
--- a/apps/client/src/widgets/launch_bar/LauncherContainer.tsx
+++ b/apps/client/src/widgets/launch_bar/LauncherContainer.tsx
@@ -3,6 +3,7 @@ import { useCallback, useLayoutEffect, useState } from "preact/hooks";
import FNote from "../../entities/fnote";
import froca from "../../services/froca";
import { isDesktop, isMobile } from "../../services/utils";
+import TabSwitcher from "../mobile_widgets/TabSwitcher";
import { useTriliumEvent } from "../react/hooks";
import { onWheelHorizontalScroll } from "../widget_utils";
import BookmarkButtons from "./BookmarkButtons";
@@ -97,6 +98,8 @@ function initBuiltinWidget(note: FNote, isHorizontalLayout: boolean) {
return ;
case "aiChatLauncher":
return ;
+ case "mobileTabSwitcher":
+ return ;
default:
throw new Error(`Unrecognized builtin widget ${builtinWidget} for launcher ${note.noteId} "${note.title}"`);
}
diff --git a/apps/server/src/assets/translations/en/server.json b/apps/server/src/assets/translations/en/server.json
index e6fa04b11..f6b23d489 100644
--- a/apps/server/src/assets/translations/en/server.json
+++ b/apps/server/src/assets/translations/en/server.json
@@ -356,7 +356,8 @@
"visible-launchers-title": "Visible Launchers",
"user-guide": "User Guide",
"localization": "Language & Region",
- "inbox-title": "Inbox"
+ "inbox-title": "Inbox",
+ "tab-switcher-title": "Tab Switcher"
},
"notes": {
"new-note": "New note",
diff --git a/apps/server/src/services/hidden_subtree_launcherbar.ts b/apps/server/src/services/hidden_subtree_launcherbar.ts
index d68c10c1c..55a3b6f70 100644
--- a/apps/server/src/services/hidden_subtree_launcherbar.ts
+++ b/apps/server/src/services/hidden_subtree_launcherbar.ts
@@ -48,7 +48,7 @@ export default function buildLaunchBarConfig() {
id: "_lbBackInHistory",
...sharedLaunchers.backInHistory
},
- {
+ {
id: "_lbForwardInHistory",
...sharedLaunchers.forwardInHistory
},
@@ -59,12 +59,12 @@ export default function buildLaunchBarConfig() {
command: "commandPalette",
icon: "bx bx-chevron-right-square"
},
- {
+ {
id: "_lbBackendLog",
title: t("hidden-subtree.backend-log-title"),
type: "launcher",
targetNoteId: "_backendLog",
- icon: "bx bx-detail"
+ icon: "bx bx-detail"
},
{
id: "_zenMode",
@@ -128,7 +128,7 @@ export default function buildLaunchBarConfig() {
baseSize: "50",
growthFactor: "0"
},
- {
+ {
id: "_lbBookmarks",
title: t("hidden-subtree.bookmarks-title"),
type: "launcher",
@@ -139,7 +139,7 @@ export default function buildLaunchBarConfig() {
id: "_lbToday",
...sharedLaunchers.openToday
},
- {
+ {
id: "_lbSpacer2",
title: t("hidden-subtree.spacer-title"),
type: "launcher",
@@ -179,7 +179,11 @@ export default function buildLaunchBarConfig() {
const mobileAvailableLaunchers: HiddenSubtreeItem[] = [
{ id: "_lbMobileNewNote", ...sharedLaunchers.newNote },
- { id: "_lbMobileToday", ...sharedLaunchers.openToday }
+ { id: "_lbMobileToday", ...sharedLaunchers.openToday },
+ {
+ id: "_lbMobileRecentChanges",
+ ...sharedLaunchers.recentChanges
+ }
];
const mobileVisibleLaunchers: HiddenSubtreeItem[] = [
@@ -203,8 +207,10 @@ export default function buildLaunchBarConfig() {
...sharedLaunchers.calendar
},
{
- id: "_lbMobileRecentChanges",
- ...sharedLaunchers.recentChanges
+ id: "_lbMobileTabSwitcher",
+ title: t("hidden-subtree.tab-switcher-title"),
+ type: "launcher",
+ builtinWidget: "mobileTabSwitcher"
}
];
@@ -214,4 +220,4 @@ export default function buildLaunchBarConfig() {
mobileAvailableLaunchers,
mobileVisibleLaunchers
};
-}
\ No newline at end of file
+}
diff --git a/packages/commons/src/lib/hidden_subtree.ts b/packages/commons/src/lib/hidden_subtree.ts
index 2fcd68f11..91e46b708 100644
--- a/packages/commons/src/lib/hidden_subtree.ts
+++ b/packages/commons/src/lib/hidden_subtree.ts
@@ -45,7 +45,8 @@ export interface HiddenSubtreeItem {
| "quickSearch"
| "aiChatLauncher"
| "commandPalette"
- | "toggleZenMode";
+ | "toggleZenMode"
+ | "mobileTabSwitcher";
command?: keyof typeof Command;
/**
* If set to true, then branches will be enforced to be in the correct place.