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 {
|
|
|
|
userExpanded: false
|
|
|
|
}
|
|
|
|
},
|
|
|
|
props: [
|
|
|
|
'notification'
|
|
|
|
],
|
|
|
|
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
|