FreeTube/src/renderer/components/ft-profile-bubble/ft-profile-bubble.js

36 lines
665 B
JavaScript
Raw Normal View History

2020-08-24 04:56:33 +02:00
import Vue from 'vue'
export default Vue.extend({
name: 'FtProfileBubble',
props: {
profileName: {
type: String,
required: true
},
profileId: {
type: String,
required: true
},
backgroundColor: {
type: String,
required: true
},
textColor: {
type: String,
required: true
}
},
computed: {
profileInitial: function () {
return this?.profileName?.length > 0 ? Array.from(this.profileName)[0].toUpperCase() : ''
2020-08-24 04:56:33 +02:00
}
},
methods: {
goToProfile: function () {
this.$router.push({
path: `/settings/profile/edit/${this.profileId}`
})
}
}
})