aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHenry Jameson <me@hjkos.com>2018-08-05 05:41:37 +0300
committerHenry Jameson <me@hjkos.com>2018-08-05 05:41:37 +0300
commitb04a9d1229e1ed35f61634ae25519cfbcb8a2c29 (patch)
tree2f39cc68211c40144c08b3cf6d0dcfa1921ed458 /src
parent6a81aa274533b6af1f2514508f6f9fa3b0795c9f (diff)
cleanup, fixed self-highlighting in notifications, fixed incorrect hex code handling
Diffstat (limited to 'src')
-rw-r--r--src/components/status/status.js1
-rw-r--r--src/modules/config.js2
-rw-r--r--src/services/user_highlighter/user_highlighter.js6
3 files changed, 3 insertions, 6 deletions
diff --git a/src/components/status/status.js b/src/components/status/status.js
index 3a9363ab..10f93207 100644
--- a/src/components/status/status.js
+++ b/src/components/status/status.js
@@ -50,6 +50,7 @@ const Status = {
return highlightStyle(highlight[user.screen_name])
},
userStyle () {
+ if (this.noHeading) return
const user = this.retweet ? (this.statusoid.retweeted_status.user) : this.statusoid.user
const highlight = this.$store.state.config.highlight
return highlightStyle(highlight[user.screen_name])
diff --git a/src/modules/config.js b/src/modules/config.js
index 2d597640..2b50655b 100644
--- a/src/modules/config.js
+++ b/src/modules/config.js
@@ -22,8 +22,6 @@ const config = {
},
setHighlight (state, { user, color, type }) {
const data = this.state.config.highlight[user]
- console.log(user, color, type, data)
-
if (color || type) {
set(state.highlight, user, { color: color || data.color, type: type || data.type })
} else {
diff --git a/src/services/user_highlighter/user_highlighter.js b/src/services/user_highlighter/user_highlighter.js
index 31eba2c8..ebb25eca 100644
--- a/src/services/user_highlighter/user_highlighter.js
+++ b/src/services/user_highlighter/user_highlighter.js
@@ -1,12 +1,10 @@
import { hex2rgb } from '../color_convert/color_convert.js'
const highlightStyle = (prefs) => {
- if (prefs === undefined) {
- return
- }
+ if (prefs === undefined) return
const {color, type} = prefs
- console.log(arguments)
if (typeof color !== 'string') return
const rgb = hex2rgb(color)
+ if (rgb == null) return
const solidColor = `rgb(${Math.floor(rgb.r)}, ${Math.floor(rgb.g)}, ${Math.floor(rgb.b)})`
const tintColor = `rgba(${Math.floor(rgb.r)}, ${Math.floor(rgb.g)}, ${Math.floor(rgb.b)}, .1)`
const tintColor2 = `rgba(${Math.floor(rgb.r)}, ${Math.floor(rgb.g)}, ${Math.floor(rgb.b)}, .2)`