|
|
|
@ -4,7 +4,6 @@ import ProgressButton from '../progress_button/progress_button.vue'
|
|
|
|
|
import FollowButton from '../follow_button/follow_button.vue'
|
|
|
|
|
import ModerationTools from '../moderation_tools/moderation_tools.vue'
|
|
|
|
|
import AccountActions from '../account_actions/account_actions.vue'
|
|
|
|
|
import { hex2rgb } from '../../services/color_convert/color_convert.js'
|
|
|
|
|
import generateProfileLink from 'src/services/user_profile_link_generator/user_profile_link_generator'
|
|
|
|
|
import { mapGetters } from 'vuex'
|
|
|
|
|
|
|
|
|
@ -30,22 +29,12 @@ export default {
|
|
|
|
|
}]
|
|
|
|
|
},
|
|
|
|
|
style () {
|
|
|
|
|
const color = this.$store.getters.mergedConfig.customTheme.colors
|
|
|
|
|
? this.$store.getters.mergedConfig.customTheme.colors.bg // v2
|
|
|
|
|
: this.$store.getters.mergedConfig.colors.bg // v1
|
|
|
|
|
|
|
|
|
|
if (color) {
|
|
|
|
|
const rgb = (typeof color === 'string') ? hex2rgb(color) : color
|
|
|
|
|
const tintColor = `rgba(${Math.floor(rgb.r)}, ${Math.floor(rgb.g)}, ${Math.floor(rgb.b)}, .5)`
|
|
|
|
|
|
|
|
|
|
return {
|
|
|
|
|
backgroundColor: `rgb(${Math.floor(rgb.r * 0.53)}, ${Math.floor(rgb.g * 0.56)}, ${Math.floor(rgb.b * 0.59)})`,
|
|
|
|
|
backgroundImage: [
|
|
|
|
|
`linear-gradient(to bottom, ${tintColor}, ${tintColor})`,
|
|
|
|
|
`linear-gradient(to bottom, var(--profileTint), var(--profileTint))`,
|
|
|
|
|
`url(${this.user.cover_photo})`
|
|
|
|
|
].join(', ')
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
isOtherUser () {
|
|
|
|
|
return this.user.id !== this.$store.state.users.currentUser.id
|
|
|
|
|