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