diff options
| author | lambda <pleromagit@rogerbraun.net> | 2017-11-21 12:56:57 +0000 |
|---|---|---|
| committer | lambda <pleromagit@rogerbraun.net> | 2017-11-21 12:56:57 +0000 |
| commit | 118d60b871b790cfcf179b11a17af7d2787c8176 (patch) | |
| tree | 7c5d9d93b83da653e5e241ca7cc99b3e2aee3108 /src/components/style_switcher/style_switcher.js | |
| parent | 80203636803c3035a46d0d82c7778e4aff8d2612 (diff) | |
| parent | 4e07b89bcfb821afb65d39eb389bcb0b4de697c8 (diff) | |
Merge branch 'fix/fix-usercard-breaking-with-certain-colors-restructure' into 'develop'
Various fixes with usercard (and attachments), clean up
See merge request pleroma/pleroma-fe!170
Diffstat (limited to 'src/components/style_switcher/style_switcher.js')
| -rw-r--r-- | src/components/style_switcher/style_switcher.js | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/components/style_switcher/style_switcher.js b/src/components/style_switcher/style_switcher.js index b1359d13..a762f914 100644 --- a/src/components/style_switcher/style_switcher.js +++ b/src/components/style_switcher/style_switcher.js @@ -1,3 +1,5 @@ +import { rgbstr2hex } from '../../services/color_convert/color_convert.js' + export default { data () { return { @@ -19,13 +21,6 @@ export default { }) }, mounted () { - const rgbstr2hex = (rgb) => { - if (rgb[0] === '#') { - return rgb - } - rgb = rgb.match(/\d+/g) - return `#${((Number(rgb[0]) << 16) + (Number(rgb[1]) << 8) + Number(rgb[2])).toString(16)}` - } this.bgColorLocal = rgbstr2hex(this.$store.state.config.colors['base00']) this.fgColorLocal = rgbstr2hex(this.$store.state.config.colors['base02']) this.textColorLocal = rgbstr2hex(this.$store.state.config.colors['base05']) |
