mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-13 01:36:22 +00:00
dark theme
This commit is contained in:
@@ -27,7 +27,13 @@ class Main extends React.Component {
|
||||
}
|
||||
|
||||
componentDidMount () {
|
||||
let { dispatch } = this.props
|
||||
let { dispatch, config } = this.props
|
||||
|
||||
if (config.ui.theme === 'dark') {
|
||||
document.body.setAttribute('data-theme', 'dark')
|
||||
} else {
|
||||
document.body.setAttribute('data-theme', 'default')
|
||||
}
|
||||
|
||||
// Reload all data
|
||||
dataApi.init()
|
||||
|
||||
Reference in New Issue
Block a user