Skip to content

Commit

Permalink
Fix "read more" link in comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
rizen committed Aug 16, 2019
1 parent 1b45c7f commit e000946
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions CHANGES.txt
Expand Up @@ -4,6 +4,9 @@ This file tracks the changes to Wing over time. Especially
with respect to new features and compatibility changes. with respect to new features and compatibility changes.
========================================================== ==========================================================


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

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


Expand Down
6 changes: 3 additions & 3 deletions public/wing.vue.js
Expand Up @@ -267,8 +267,8 @@ Vue.component('comments', {
<tr v-for="comment in comments.objects"> <tr v-for="comment in comments.objects">
<td> <td>
<textarea class="form-control" v-if="comment.stash('edit')" rows="5" v-model="comment.properties.comment" v-autosave="comment"></textarea> <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> <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_length < 1000000 && comment.properties.comment.length > 200" @click="comment_length=1000000">Read More</button> <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>
<td style="width: 40%"> <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> <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>
Expand Down Expand Up @@ -298,7 +298,7 @@ Vue.component('comments', {
</template>`, </template>`,
props: ['comments','special_badge_label','special_badge_user_id', 'current_user_id', 'is_admin'], props: ['comments','special_badge_label','special_badge_user_id', 'current_user_id', 'is_admin'],
data () { data () {
return { comment_length : 200, } return { }
}, },
methods : { methods : {
like_comment(comment) { like_comment(comment) {
Expand Down

0 comments on commit e000946

Please sign in to comment.