diff --git a/client/pages/author/_id.vue b/client/pages/author/_id.vue index 5ef1bef2..4e72f061 100644 --- a/client/pages/author/_id.vue +++ b/client/pages/author/_id.vue @@ -17,7 +17,10 @@

{{ $strings.LabelDescription }}

-

{{ author.description }}

+

{{ author.description }}

+ @@ -62,7 +65,10 @@ export default { } }, data() { - return {} + return { + isDescriptionClamped: false, + showFullDescription: false + } }, computed: { streamLibraryItem() { @@ -82,6 +88,10 @@ export default { } }, methods: { + checkDescriptionClamped() { + if (!this.$refs.description) return + this.isDescriptionClamped = this.$refs.description.scrollHeight > this.$refs.description.clientHeight + }, editAuthor() { this.$store.commit('globals/showEditAuthorModal', this.author) }, @@ -93,6 +103,7 @@ export default { series: this.authorSeries, libraryItems: this.libraryItems } + this.$nextTick(this.checkDescriptionClamped) } }, authorRemoved(author) { @@ -104,6 +115,7 @@ export default { }, mounted() { if (!this.author) this.$router.replace('/') + this.checkDescriptionClamped() this.$root.socket.on('author_updated', this.authorUpdated) this.$root.socket.on('author_removed', this.authorRemoved) @@ -113,4 +125,19 @@ export default { this.$root.socket.off('author_removed', this.authorRemoved) } } - \ No newline at end of file + + + \ No newline at end of file