From a8806ad18528f5f258fb378b74a2afa151b79c99 Mon Sep 17 00:00:00 2001 From: Elizabeth Danzberger Date: Mon, 29 Jul 2024 11:18:47 -0400 Subject: [PATCH] fix: Default value for nc background, and nc logo visibility Signed-off-by: Elizabeth Danzberger --- src/helpers/coolParameters.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/helpers/coolParameters.js b/src/helpers/coolParameters.js index e0f1cea93d..f7f9d9c4e2 100644 --- a/src/helpers/coolParameters.js +++ b/src/helpers/coolParameters.js @@ -159,6 +159,15 @@ const generateCSSVarTokens = () => { if (customLogo) { str += ';--nc-custom-logo=' + window.OCA?.Theming?.cacheBuster ?? 0 + ';' } + + const rootEl = document.querySelector(':root') + + const logoBgColor = window.getComputedStyle(rootEl).getPropertyValue('--nc-logo-background') + str += '--nc-logo-background=' + (logoBgColor === '' ? 'transparent' : logoBgColor) + ';' + + const logoDisplay = window.getComputedStyle(rootEl).getPropertyValue('--nc-logo-display') + str += '--nc-logo-display=' + (logoDisplay === '' ? 'block' : logoDisplay) + ';' + return str.replace(/["']/g, '\\\'') }