mirror of
https://github.com/Novaloop-AG/healthchat-web.git
synced 2026-10-31 08:15:07 +00:00
fix(desktop): show HealthChat brand in native About panel and menu
The native About panel and macOS app menu derived their name from Electron's app.name and ignored the configured brand, so they still showed "Element". Set the About panel options from vectorConfig.brand and use the brand for the macOS app/About menu labels.
This commit is contained in:
@@ -310,6 +310,14 @@ app.on("ready", async () => {
|
||||
return;
|
||||
}
|
||||
|
||||
// Drive the native "About" panel from the configured brand so it shows
|
||||
// "HealthChat" rather than the upstream Electron/bundle default.
|
||||
const brand = global.vectorConfig.brand || "Element";
|
||||
app.setAboutPanelOptions({
|
||||
applicationName: brand,
|
||||
applicationVersion: app.getVersion(),
|
||||
});
|
||||
|
||||
if (argv["devtools"]) {
|
||||
try {
|
||||
const { installExtension, REACT_DEVELOPER_TOOLS } = await import("electron-devtools-installer");
|
||||
|
||||
@@ -141,14 +141,16 @@ export function buildMenuTemplate(): Menu {
|
||||
|
||||
// macOS has specific menu conventions...
|
||||
if (isMac) {
|
||||
// XXX: vectorConfig won't have defaults applied to it so we need to duplicate them here
|
||||
const brand = global.vectorConfig?.brand || app.name;
|
||||
template.unshift({
|
||||
// first macOS menu is the name of the app
|
||||
role: "appMenu",
|
||||
label: app.name,
|
||||
label: brand,
|
||||
submenu: [
|
||||
{
|
||||
role: "about",
|
||||
label: _t("common|about") + " " + app.name,
|
||||
label: _t("common|about") + " " + brand,
|
||||
},
|
||||
{ type: "separator" },
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user