Skip to content
Permalink
Browse files

Fix "read more" link in comments.

  • Loading branch information...
rizen committed Aug 16, 2019
1 parent 1b45c7f commit e000946f001d330723eb9a64fb655f92b9cded70
Showing with 6 additions and 3 deletions.
  1. +3 −0 CHANGES.txt
  2. +3 −3 public/wing.vue.js
@@ -4,6 +4,9 @@ This file tracks the changes to Wing over time. Especially
with respect to new features and compatibility changes.
==========================================================

2019-08-16
* Fix "read more" link in comments.

2019-07-10
* Add file-locked trends script to prevent more than 1 copy from running at a time.

@@ -267,8 +267,8 @@ Vue.component('comments', {
<tr v-for="comment in comments.objects">
<td>
<textarea class="form-control" v-if="comment.stash('edit')" rows="5" v-model="comment.properties.comment" v-autosave="comment"></textarea>
<div v-if="!comment.stash('edit')" style="white-space: pre-wrap;">{{comment.properties.comment|truncate(comment_length)}}</div>
<button class="btn btn-secondary btn-sm mt-3" v-if="comment_length < 1000000 && comment.properties.comment.length > 200" @click="comment_length=1000000">Read More</button>
<div v-if="!comment.stash('edit')" style="white-space: pre-wrap;">{{comment.properties.comment|truncate(comment.stash('comment_length')||200)}}</div>
<button class="btn btn-secondary btn-sm mt-3" v-if="comment.stash('comment_length') < 1000000 && comment.properties.comment.length > 200" @click="comment.stash('comment_length',1000000)">Read More</button>
</td>
<td style="width: 40%">
<a :href="comment.properties.user.profile_uri"><img v-if="comment.properties.user.avatar_uri" :src="comment.properties.user.avatar_uri" class="rounded" alt="avatar" style="height: 30px"> {{comment.properties.user.display_name}}</a>
@@ -298,7 +298,7 @@ Vue.component('comments', {
</template>`,
props: ['comments','special_badge_label','special_badge_user_id', 'current_user_id', 'is_admin'],
data () {
return { comment_length : 200, }
return { }
},
methods : {
like_comment(comment) {

0 comments on commit e000946

Please sign in to comment.
You can’t perform that action at this time.