diff --git a/src/renderer/components/TimelineSpace/NewTootModal.vue b/src/renderer/components/TimelineSpace/NewTootModal.vue index 8878fd66..f9c2c9a8 100644 --- a/src/renderer/components/TimelineSpace/NewTootModal.vue +++ b/src/renderer/components/TimelineSpace/NewTootModal.vue @@ -10,6 +10,7 @@ + {{ 500 - tootForm.body.length }} Cancel Toot @@ -46,6 +47,12 @@ export default { this.$store.commit('TimelineSpace/changeNewTootModal', false) }, toot () { + if (this.tootForm.body.length <= 0 || this.tootForm.body.length >= 500) { + return this.$message({ + message: 'Toot length should be 1 to 500', + type: 'error' + }) + } this.$store.dispatch('TimelineSpace/postToot', this.tootForm.body) .then(() => { this.tootForm.body = '' @@ -104,6 +111,11 @@ export default { .el-dialog__footer { background-color: #f2f6fc; + + .text-count { + padding-right: 24px; + color: #909399; + } } }