diff --git a/apps/client/src/widgets/buttons/global_menu.tsx b/apps/client/src/widgets/buttons/global_menu.tsx index fcc1cda67..fa24c8387 100644 --- a/apps/client/src/widgets/buttons/global_menu.tsx +++ b/apps/client/src/widgets/buttons/global_menu.tsx @@ -38,7 +38,7 @@ export default function GlobalMenu({ isHorizontalLayout }: { isHorizontalLayout: text={<> {isVerticalLayout && } {isUpdateAvailable && } } noDropdownListStyle @@ -57,7 +57,7 @@ export default function GlobalMenu({ isHorizontalLayout }: { isHorizontalLayout: - + @@ -68,19 +68,19 @@ export default function GlobalMenu({ isHorizontalLayout }: { isHorizontalLayout: {isUpdateAvailable && <> window.open("https://github.com/TriliumNext/Trilium/releases/latest")} - icon="bx bx-download" - text={t("global_menu.download-update", {latestVersion})} /> + icon="bx bx-download" + text={t("global_menu.download-update", {latestVersion})} /> } {!isElectron() && } - {glob.isDev && } + {glob.isDev && } ); } -function AdvancedMenu() { +function AdvancedMenu({ dropStart }: { dropStart: boolean }) { return ( - + @@ -103,13 +103,11 @@ function BrowserOnlyOptions() { ; } -function DevelopmentOptions() { - const [ layoutOrientation ] = useTriliumOption("layoutOrientation"); - +function DevelopmentOptions({ dropStart }: { dropStart: boolean }) { return <> Development Options - + {experimentalFeatures.map((feature) => ( ))} @@ -136,10 +134,10 @@ function SwitchToOptions() { if (isElectron()) { return; } else if (!isMobile()) { - return - } else { - return - } + return ; + } + return ; + } function MenuItem({ icon, text, title, command, disabled, active }: MenuItemProps void)>) { @@ -150,7 +148,7 @@ function MenuItem({ icon, text, title, command, disabled, active }: MenuItemProp onClick={typeof command === "function" ? command : undefined} disabled={disabled} active={active} - >{text} + >{text}; } function KeyboardActionMenuItem({ text, command, ...props }: MenuItemProps) { @@ -158,7 +156,7 @@ function KeyboardActionMenuItem({ text, command, ...props }: MenuItemProps{text} } - /> + />; } function VerticalLayoutIcon() { @@ -181,7 +179,7 @@ function VerticalLayoutIcon() { - ) + ); } function ZoomControls({ parentComponent }: { parentComponent?: Component | null }) { @@ -205,7 +203,7 @@ function ZoomControls({ parentComponent }: { parentComponent?: Component | null }} className={`dropdown-item-button ${icon}`} >{children} - ) + ); } return isElectron() ? ( @@ -246,7 +244,7 @@ function ToggleWindowOnTop() { setIsAlwaysOnTop(newState); }} /> - ) + ); } function useTriliumUpdateStatus() { @@ -257,7 +255,7 @@ function useTriliumUpdateStatus() { async function updateVersionStatus() { const RELEASES_API_URL = "https://api.github.com/repos/TriliumNext/Trilium/releases/latest"; - let latestVersion: string | undefined = undefined; + let latestVersion: string | undefined; try { const resp = await fetch(RELEASES_API_URL); const data = await resp.json();