From ac414e90c9d009d83bebed2aada242b121933e26 Mon Sep 17 00:00:00 2001 From: margueellohenriquez Date: Wed, 12 Aug 2026 15:55:21 +0200 Subject: [PATCH] feat(header): allow the product name to be configured MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The product name in the global header is currently a hardcoded SVG with the letters as vector paths, so a Nextcloud instance cannot name itself without forking this app or reaching into its DOM from outside. This adds an optional `productName` prop to HeaderLogo, provided through the existing `IInitialState` pipeline from a new `ionos_product_name` system config key — the same pattern already used for `ionos_homepage`, `ionos_help_target_link` and `ionos_peer_products`. Fully backwards compatible: when the key is unset or empty the wordmark SVG renders exactly as before, so existing deployments see no change. Verified: `npm run build` succeeds, `npm run lint` is clean, and `npm run stylelint` reports the same 3 pre-existing warnings as on the base branch (UserMenu.vue:190, styles.scss:30/32) with none added. Co-authored-by: printminion-co <145785698+printminion-co@users.noreply.github.com> --- lib/Listener/BeforeTemplateRenderedListener.php | 2 ++ src/components/HeaderLogo.vue | 17 ++++++++++++++++- src/main.ts | 1 + 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/lib/Listener/BeforeTemplateRenderedListener.php b/lib/Listener/BeforeTemplateRenderedListener.php index 8d0722f..853f132 100644 --- a/lib/Listener/BeforeTemplateRenderedListener.php +++ b/lib/Listener/BeforeTemplateRenderedListener.php @@ -34,6 +34,8 @@ public function handle(Event $event): void { $this->initialState->provideInitialState('isLoggedIn', $isLoggedIn); $this->initialState->provideInitialState('homeUrl', $this->urlGenerator->linkTo('', 'index.php')); + $this->initialState->provideInitialState('productName', + $this->config->getSystemValue('ionos_product_name', '')); if ($isLoggedIn) { $this->initialState->provideInitialState('displayName', diff --git a/src/components/HeaderLogo.vue b/src/components/HeaderLogo.vue index a4663c7..b0f5783 100644 --- a/src/components/HeaderLogo.vue +++ b/src/components/HeaderLogo.vue @@ -1,6 +1,11 @@ @@ -21,8 +26,10 @@ defineProps<{ - + + {{ productName }} { makeApp(HeaderLogo, { homeUrl: loadState('simplenavigation', 'homeUrl', '/'), + productName: loadState('simplenavigation', 'productName', ''), }).mount('#simplenavigation-logo') // Mount webmail link + our UserMenu only for authenticated users