diff --git a/apps/client/src/layouts/desktop_layout.tsx b/apps/client/src/layouts/desktop_layout.tsx index af47fd478..a4f60aa05 100644 --- a/apps/client/src/layouts/desktop_layout.tsx +++ b/apps/client/src/layouts/desktop_layout.tsx @@ -9,6 +9,7 @@ import CreatePaneButton from "../widgets/buttons/create_pane_button.js"; import GlobalMenu from "../widgets/buttons/global_menu.jsx"; import LeftPaneToggle from "../widgets/buttons/left_pane_toggle.js"; import MovePaneButton from "../widgets/buttons/move_pane_button.js"; +import RightPaneToggle from "../widgets/buttons/right_pane_toggle.jsx"; import CloseZenModeButton from "../widgets/close_zen_button.jsx"; import NoteList from "../widgets/collections/NoteList.jsx"; import ContentHeader from "../widgets/containers/content_header.js"; @@ -91,6 +92,7 @@ export default class DesktopLayout { .optChild(launcherPaneIsHorizontal, ) .child() .child(new TabRowWidget().class("full-width")) + .optChild(launcherPaneIsHorizontal && isNewLayout, ) .optChild(customTitleBarButtons, ) .css("height", "40px") .css("background-color", "var(--launcher-pane-background-color)") diff --git a/apps/client/src/translations/en/translation.json b/apps/client/src/translations/en/translation.json index c7aeaf50c..077d24fac 100644 --- a/apps/client/src/translations/en/translation.json +++ b/apps/client/src/translations/en/translation.json @@ -2199,6 +2199,7 @@ }, "right_pane": { "empty_message": "Nothing to show for this note", - "empty_button": "Hide the panel" + "empty_button": "Hide the panel", + "toggle": "Toggle right panel" } } diff --git a/apps/client/src/widgets/buttons/right_pane_toggle.tsx b/apps/client/src/widgets/buttons/right_pane_toggle.tsx new file mode 100644 index 000000000..53bf67ae2 --- /dev/null +++ b/apps/client/src/widgets/buttons/right_pane_toggle.tsx @@ -0,0 +1,21 @@ +import clsx from "clsx"; + +import { t } from "../../services/i18n"; +import ActionButton from "../react/ActionButton"; +import { useTriliumOptionBool } from "../react/hooks"; + +export default function RightPaneToggle() { + const [ rightPaneVisible, setRightPaneVisible ] = useTriliumOptionBool("rightPaneVisible"); + + return ( + setRightPaneVisible(!rightPaneVisible)} + /> + ); +}