Skip to content

Build your personal knowledge base with Trilium Notes

feat(mobile/tab_switcher): new tab button

Elian Dorana486f5951e91
diff --git a/apps/client/src/widgets/mobile_widgets/TabSwitcher.css b/apps/client/src/widgets/mobile_widgets/TabSwitcher.css
index e37b364a96..37a68c5b15 100644
--- a/apps/client/src/widgets/mobile_widgets/TabSwitcher.css
+++ b/apps/client/src/widgets/mobile_widgets/TabSwitcher.css
@@ -96,4 +96,13 @@
}
}
}
+
+ .modal-footer {
+ .tn-link {
+ color: var(--main-text-color);
+ width: 40%;
+ text-align: center;
+ text-decoration: none;
+ }
+ }
}
diff --git a/apps/client/src/widgets/mobile_widgets/TabSwitcher.tsx b/apps/client/src/widgets/mobile_widgets/TabSwitcher.tsx
index 33ae931513..7f80360ee8 100644
--- a/apps/client/src/widgets/mobile_widgets/TabSwitcher.tsx
+++ b/apps/client/src/widgets/mobile_widgets/TabSwitcher.tsx
@@ -14,6 +14,7 @@ import { LaunchBarActionButton } from "../launch_bar/launch_bar_widgets";
import ActionButton from "../react/ActionButton";
import { useActiveNoteContext, useNoteIcon, useTriliumEvents } from "../react/hooks";
import Icon from "../react/Icon";
+import LinkButton from "../react/LinkButton";
import Modal from "../react/Modal";
export default function TabSwitcher() {
@@ -52,6 +53,16 @@ function TabBarModal({ mainNoteContexts, shown, setShown }: {
title={t("mobile_tab_switcher.title", { count: mainNoteContexts.length})}
show={shown}
onShown={() => setFullyShown(true)}
+ footer={<>
+ <LinkButton
+ text={t("tab_row.new_tab")}
+ onClick={() => {
+ appContext.triggerCommand("openNewTab");
+ setShown(false);
+ }}
+ />
+ </>}
+ scrollable
onHidden={() => {
setShown(false);
setFullyShown(false);