diff --git a/resources/assets/js/components/Timeline.vue b/resources/assets/js/components/Timeline.vue index b70c712bb..6b8b4a05b 100644 --- a/resources/assets/js/components/Timeline.vue +++ b/resources/assets/js/components/Timeline.vue @@ -185,10 +185,10 @@

-

+

{{reply.account.username}} - + @@ -540,7 +540,7 @@

- {{replyText.length}}/600 + {{replyText.length > config.uploader.max_caption_length ? config.uploader.max_caption_length - replyText.length : replyText.length}}/{{config.uploader.max_caption_length}}
@@ -958,6 +958,18 @@ return res.sensitive == false; }); this.replies = _.reverse(data); + setTimeout(function() { + document.querySelectorAll('.comments .comment-body a').forEach(function(i, e) { + if(i.href.startsWith(window.location.origin)) { + return; + } + let tag = i.innerText; + if(tag.startsWith('#')) { + tag = tag.substr(1); + } + i.href = '/discover/tags/'+tag+'?src=rph'; + }); + }, 500); }).catch(err => { }) }, @@ -1019,6 +1031,12 @@ this.replySending = true; let id = status.id; let comment = this.replyText; + let limit = this.config.uploader.max_caption_length; + if(comment.length > limit) { + this.replySending = false; + swal('Comment Too Long', 'Please make sure your comment is '+limit+' characters or less.', 'error'); + return; + } axios.post('/i/comment', { item: id, comment: comment