2018-04-09 17:44:37 +00:00
|
|
|
import Status from '../status/status.vue'
|
|
|
|
import StillImage from '../still-image/still-image.vue'
|
|
|
|
import UserCardContent from '../user_card_content/user_card_content.vue'
|
2018-06-18 09:09:14 +00:00
|
|
|
import { highlightClass, highlightStyle } from '../../services/user_highlighter/user_highlighter.js'
|
2018-04-09 17:44:37 +00:00
|
|
|
|
|
|
|
const Notification = {
|
|
|
|
data () {
|
|
|
|
return {
|
2018-11-30 13:39:07 +00:00
|
|
|
userExpanded: false,
|
|
|
|
betterShadow: this.$store.state.interface.browserSupport.cssFilter
|
2018-04-09 17:44:37 +00:00
|
|
|
}
|
|
|
|
},
|
|
|
|
props: [
|
2018-12-10 20:12:51 +00:00
|
|
|
'notification',
|
|
|
|
'activatePanel'
|
2018-04-09 17:44:37 +00:00
|
|
|
],
|
|
|
|
components: {
|
|
|
|
Status, StillImage, UserCardContent
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
toggleUserExpanded () {
|
|
|
|
this.userExpanded = !this.userExpanded
|
|
|
|
}
|
2018-06-18 09:09:14 +00:00
|
|
|
},
|
|
|
|
computed: {
|
|
|
|
userClass () {
|
2018-06-19 13:17:50 +00:00
|
|
|
return highlightClass(this.notification.action.user)
|
2018-06-18 09:09:14 +00:00
|
|
|
},
|
|
|
|
userStyle () {
|
2018-06-19 13:17:50 +00:00
|
|
|
const highlight = this.$store.state.config.highlight
|
|
|
|
const user = this.notification.action.user
|
2018-08-05 02:18:04 +00:00
|
|
|
return highlightStyle(highlight[user.screen_name])
|
2018-06-19 13:17:50 +00:00
|
|
|
}
|
2018-04-09 17:44:37 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export default Notification
|