Skip to content

Commit

Permalink
Merge pull request #3840 from nextcloud/fix/logo-visibility
Browse files Browse the repository at this point in the history
fix: Allow passing css var to change Collabora logo color
  • Loading branch information
elzody committed Jul 30, 2024
2 parents 0269a5c + 719a124 commit d4f0c2c
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/helpers/coolParameters.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,17 @@ const generateCSSVarTokens = () => {
darkElement.remove()
const customLogo = loadState('richdocuments', 'theming-customLogo', false)
if (customLogo) {
str += ';--nc-custom-logo=' + window.OCA?.Theming?.cacheBuster ?? 0 + ';'
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, '\\\'')
}

Expand Down

0 comments on commit d4f0c2c

Please sign in to comment.