added branding option (#301)

added branding option via '@ <logo>' or '@ <name>' after the CodiMD logo and text.

This was a user can personalize their CodiMD instance

Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
Co-authored-by: Erik Michelson <github@erik.michelson.eu>
Co-authored-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
This commit is contained in:
Philip Molares 2020-07-01 23:20:00 +02:00 committed by GitHub
parent 50b04c8403
commit b23a73ac51
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 79 additions and 4 deletions

View file

@ -0,0 +1,13 @@
import React, { useEffect } from 'react'
import { useSelector } from 'react-redux'
import { ApplicationState } from '../../../redux'
export const DocumentTitle: React.FC = () => {
const branding = useSelector((state: ApplicationState) => state.backendConfig.branding)
useEffect(() => {
document.title = `CodiMD ${branding.name ? ` @ ${branding.name}` : ''}`
}, [branding])
return null
}