From 0eb07283e5ad6af6e636df10c4a82c44efaf18bd Mon Sep 17 00:00:00 2001 From: Alexander Platov Date: Fri, 19 Jan 2024 11:12:40 +0300 Subject: [PATCH] Application header from the configuration (#4386) Signed-off-by: Alexander Platov --- dev/prod/src/platform.ts | 1 + packages/ui/src/components/internal/Root.svelte | 2 +- packages/ui/src/plugin.ts | 3 ++- products/tracker/src/platform.ts | 1 + 4 files changed, 5 insertions(+), 2 deletions(-) diff --git a/dev/prod/src/platform.ts b/dev/prod/src/platform.ts index f5483056cb..110f97297d 100644 --- a/dev/prod/src/platform.ts +++ b/dev/prod/src/platform.ts @@ -207,6 +207,7 @@ export async function configurePlatform() { // Disable for now, since it causes performance issues on linux/docker/kubernetes boxes for now. setMetadata(client.metadata.UseProtocolCompression, true) + setMetadata(uiPlugin.metadata.PlatformTitle, config.TITLE ?? 'Platform') setMetadata(workbench.metadata.PlatformTitle, config.TITLE ?? 'Platform') setDefaultLanguage(config.DEFAULT_LANGUAGE ?? 'en') setMetadata(workbench.metadata.DefaultApplication, 'tracker') diff --git a/packages/ui/src/components/internal/Root.svelte b/packages/ui/src/components/internal/Root.svelte index 8a2836cb42..0de51013db 100644 --- a/packages/ui/src/components/internal/Root.svelte +++ b/packages/ui/src/components/internal/Root.svelte @@ -167,7 +167,7 @@ {:else if status.severity !== Severity.OK} {:else} - Zenflow + {getMetadata(uiPlugin.metadata.PlatformTitle)} {/if}
diff --git a/packages/ui/src/plugin.ts b/packages/ui/src/plugin.ts index 0862b798b1..436b844fba 100644 --- a/packages/ui/src/plugin.ts +++ b/packages/ui/src/plugin.ts @@ -101,7 +101,8 @@ export const uis = plugin(uiId, { metadata: { DefaultApplication: '' as Metadata, Routes: '' as Metadata>, - Languages: '' as Metadata + Languages: '' as Metadata, + PlatformTitle: '' as Metadata } }) diff --git a/products/tracker/src/platform.ts b/products/tracker/src/platform.ts index ef2a0c43d2..6533d2a6ea 100644 --- a/products/tracker/src/platform.ts +++ b/products/tracker/src/platform.ts @@ -102,6 +102,7 @@ export async function configurePlatform() { addLocation(calendarId, () => import(/* webpackChunkName: "calendar" */ '@hcengineering/calendar-resources')) addLocation(trackerId, () => import(/* webpackChunkName: "tracker" */ '@hcengineering/tracker-resources')) + setMetadata(uiPlugin.metadata.PlatformTitle, 'Tracker') setMetadata(workbench.metadata.PlatformTitle, 'Tracker') setMetadata(client.metadata.FilterModel, true)