From b6788298b5bc6266ef17cf974850d56c25699fc9 Mon Sep 17 00:00:00 2001 From: Adorian Doran Date: Thu, 16 Oct 2025 07:39:27 +0300 Subject: [PATCH] client/global menu: reduce the width of the "Download update" menu item --- apps/client/src/translations/en/translation.json | 4 +++- apps/client/src/widgets/buttons/global_menu.tsx | 10 +++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/apps/client/src/translations/en/translation.json b/apps/client/src/translations/en/translation.json index 4a59d0a61..08d8b8377 100644 --- a/apps/client/src/translations/en/translation.json +++ b/apps/client/src/translations/en/translation.json @@ -647,7 +647,9 @@ "logout": "Logout", "show-cheatsheet": "Show Cheatsheet", "toggle-zen-mode": "Zen Mode", - "update_available": "Version {{latestVersion}} is available, click to download." + "update_available": "Version {{latestVersion}} is available, click to download.", + "new-version-available": "New Update Available", + "download-update": "Get Version {{latestVersion}}" }, "zen_mode": { "button_exit": "Exit Zen Mode" diff --git a/apps/client/src/widgets/buttons/global_menu.tsx b/apps/client/src/widgets/buttons/global_menu.tsx index 0278e3fb9..9b36d83a5 100644 --- a/apps/client/src/widgets/buttons/global_menu.tsx +++ b/apps/client/src/widgets/buttons/global_menu.tsx @@ -3,7 +3,7 @@ import "./global_menu.css"; import { useStaticTooltip, useStaticTooltipWithKeyboardShortcut, useTriliumOption, useTriliumOptionBool, useTriliumOptionInt } from "../react/hooks"; import { useContext, useEffect, useRef, useState } from "preact/hooks"; import { t } from "../../services/i18n"; -import { FormDropdownDivider, FormDropdownSubmenu, FormListItem } from "../react/FormList"; +import { FormDropdownDivider, FormDropdownSubmenu, FormListHeader, FormListItem } from "../react/FormList"; import { CommandNames } from "../../components/app_context"; import KeyboardShortcut from "../react/KeyboardShortcut"; import { KeyboardActionNames } from "@triliumnext/commons"; @@ -58,10 +58,14 @@ export default function GlobalMenu({ isHorizontalLayout }: { isHorizontalLayout: + {isUpdateAvailable && <> - - window.open("https://github.com/TriliumNext/Trilium/releases/latest")} icon="bx bx-download" text={t("global_menu.update_available", { latestVersion })} /> + + window.open("https://github.com/TriliumNext/Trilium/releases/latest")} + icon="bx bx-download" + text={t("global_menu.download-update", {latestVersion})} /> } + {!isElectron() && } )