Make private message character limit obvious on client (#10579)

* fix(messages): make character limit obvious on client
Fixes #10549

* fix(messages): localize hardcoded button text
This commit is contained in:
Sabe Jones
2018-08-10 08:46:46 -05:00
committed by Keith Holliday
parent 7019e32eed
commit 1134c7748b

View File

@@ -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>
@@ -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 {