`themeChanged` uses an object instead of "light" or "dark"

pull/1/head
Grandschtroumpf 6 years ago
parent 3113219241
commit 6de2c68fb6
  1. 4
      src/app/components/vertical-icons-component.js
  2. 4
      src/app/editor/editor.js
  3. 4
      src/app/ui/landing-page/landing-page.js

@ -35,8 +35,8 @@ class VerticalIconComponent {
this.store.event.on('remove', (api) => { })
let themeModule = globalRegistry.get('themeModule').api
themeModule.events.on('themeChanged', (type) => {
this.onThemeChanged(type)
themeModule.events.on('themeChanged', (theme) => {
this.onThemeChanged(theme.quality)
})
}

@ -52,8 +52,8 @@ class Editor {
'light': 'chrome',
'dark': 'chaos'
}
this._deps.themeModule.events.on('themeChanged', (type) => {
this.setTheme(type)
this._deps.themeModule.events.on('themeChanged', (theme) => {
this.setTheme(theme.quality)
})
// Init

@ -161,8 +161,8 @@ export class LandingPage extends BaseApi {
globalRegistry.get('verticalicon').api.select('fileExplorers')
}
globalRegistry.get('themeModule').api.events.on('themeChanged', (type) => {
const invert = type === 'dark' ? 1 : 0
globalRegistry.get('themeModule').api.events.on('themeChanged', (theme) => {
const invert = theme.quality === 'dark' ? 1 : 0
const img = document.getElementById('remixLogo')
if (img) {
img.style.filter = `invert(${invert})`

Loading…
Cancel
Save