|
|
@ -160,9 +160,9 @@ export class VerticalIcons extends Plugin { |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
// remove active
|
|
|
|
// remove active
|
|
|
|
const currentActive = this.view.querySelector(`.${css.active}`) |
|
|
|
const currentActive = this.view.querySelector(`.active`) |
|
|
|
if (currentActive) { |
|
|
|
if (currentActive) { |
|
|
|
currentActive.classList.remove(css.active) |
|
|
|
currentActive.classList.remove(`active`) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -176,7 +176,7 @@ export class VerticalIcons extends Plugin { |
|
|
|
const nextActive = this.view.querySelector(`[plugin="${name}"]`) |
|
|
|
const nextActive = this.view.querySelector(`[plugin="${name}"]`) |
|
|
|
if (nextActive) { |
|
|
|
if (nextActive) { |
|
|
|
let image = nextActive.querySelector('.image') |
|
|
|
let image = nextActive.querySelector('.image') |
|
|
|
nextActive.classList.add(css.active) |
|
|
|
nextActive.classList.add(`active`) |
|
|
|
image.style.setProperty('filter', `invert(${invert}) grayscale(1) brightness(0%)`) |
|
|
|
image.style.setProperty('filter', `invert(${invert}) grayscale(1) brightness(0%)`) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -210,7 +210,7 @@ export class VerticalIcons extends Plugin { |
|
|
|
|
|
|
|
|
|
|
|
onThemeChanged (themeType) { |
|
|
|
onThemeChanged (themeType) { |
|
|
|
const invert = themeType === 'dark' ? 1 : 0 |
|
|
|
const invert = themeType === 'dark' ? 1 : 0 |
|
|
|
const active = this.view.querySelector(`.${css.active}`) |
|
|
|
const active = this.view.querySelector(`.active`) |
|
|
|
if (active) { |
|
|
|
if (active) { |
|
|
|
let image = active.querySelector('.image') |
|
|
|
let image = active.querySelector('.image') |
|
|
|
image.style.setProperty('filter', `invert(${invert})`) |
|
|
|
image.style.setProperty('filter', `invert(${invert})`) |
|
|
|