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-12-14 03:57:11 +11:00
|
|
|
import generateProfileLink from 'src/services/user_profile_link_generator/user_profile_link_generator'
|
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
|
|
|
}
|
|
|
|
},
|
2018-12-29 06:39:54 +11:00
|
|
|
props: [ 'notification' ],
|
2018-04-10 03:44:37 +10:00
|
|
|
components: {
|
|
|
|
Status, StillImage, UserCardContent
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
toggleUserExpanded () {
|
|
|
|
this.userExpanded = !this.userExpanded
|
2018-12-17 10:52:27 +11:00
|
|
|
},
|
|
|
|
userProfileLink (user) {
|
2018-12-27 00:50:48 +11:00
|
|
|
return generateProfileLink(user.id, user.screen_name, this.$store.state.instance.restrictedNicknames)
|
2018-04-10 03:44:37 +10:00
|
|
|
}
|
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
|