`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) => { }) this.store.event.on('remove', (api) => { })
let themeModule = globalRegistry.get('themeModule').api let themeModule = globalRegistry.get('themeModule').api
themeModule.events.on('themeChanged', (type) => { themeModule.events.on('themeChanged', (theme) => {
this.onThemeChanged(type) this.onThemeChanged(theme.quality)
}) })
} }

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

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

Loading…
Cancel
Save