Skip to content

Commit

Permalink
Make private message character limit obvious on client (#10579)
Browse files Browse the repository at this point in the history
* fix(messages): make character limit obvious on client
Fixes #10549

* fix(messages): localize hardcoded button text
  • Loading branch information
SabreCat authored and TheHollidayInn committed Aug 10, 2018
1 parent 7019e32 commit 1134c77
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions website/client/components/userMenu/inbox.vue
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,14 @@
// @TODO: Implement new message header here when we fix the above
.new-message-row(v-if='selectedConversation.key && !user.flags.chatRevoked')
textarea(v-model='newMessage', @keyup.ctrl.enter='sendPrivateMessage()')
button.btn.btn-secondary(@click='sendPrivateMessage()') Send
textarea(
v-model='newMessage',
@keyup.ctrl.enter='sendPrivateMessage()',
maxlength='3000'
)
button.btn.btn-secondary(@click='sendPrivateMessage()') {{$t('send')}}
.row
span.ml-3 {{ currentLength }} / 3000
</template>

<style lang="scss" scoped>
Expand Down Expand Up @@ -322,6 +328,9 @@ export default {
return conversation.name.toLowerCase().indexOf(this.search.toLowerCase()) !== -1;
});
},
currentLength () {
return this.newMessage.length;
},
placeholderTexts () {
if (this.user.flags.chatRevoked) {
return {
Expand Down

0 comments on commit 1134c77

Please sign in to comment.