client/global menu: reduce the width of the "Download update" menu item

This commit is contained in:
Adorian Doran 2025-10-16 07:39:27 +03:00
parent 4a359ffa0e
commit b6788298b5
2 changed files with 10 additions and 4 deletions

View File

@ -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"

View File

@ -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>
)