Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
client/global menu: reduce the width of the "Download update" menu item
Adorian Doranb6788298b5bc
diff --git a/apps/client/src/translations/en/translation.json b/apps/client/src/translations/en/translation.jsonindex 4a59d0a618..08d8b8377a 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.tsxindex 0278e3fb93..9b36d83a54 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:<KeyboardActionMenuItem command="showHelp" icon="bx bx-help-circle" text={t("global_menu.show_help")} /><KeyboardActionMenuItem command="showCheatsheet" icon="bx bxs-keyboard" text={t("global_menu.show-cheatsheet")} /><MenuItem command="openAboutDialog" icon="bx bx-info-circle" text={t("global_menu.about")} />+{isUpdateAvailable && <>- <FormDropdownDivider />- <MenuItem command={() => window.open("https://github.com/TriliumNext/Trilium/releases/latest")} icon="bx bx-download" text={t("global_menu.update_available", { latestVersion })} />+ <FormListHeader text={t("global_menu.new-version-available")} />+ <MenuItem command={() => window.open("https://github.com/TriliumNext/Trilium/releases/latest")}+ icon="bx bx-download"+ text={t("global_menu.download-update", {latestVersion})} /></>}+{!isElectron() && <BrowserOnlyOptions />}</Dropdown>)