summaryrefslogtreecommitdiff
path: root/src/client
diff options
context:
space:
mode:
authorAya Morisawa <AyaMorisawa4869@gmail.com>2018-07-23 13:37:29 +0900
committerAya Morisawa <AyaMorisawa4869@gmail.com>2018-07-23 13:37:29 +0900
commit138fa1454f65d1bb8b08a391dfbc9bc582c6cd79 (patch)
tree0515d4bfb46cd00d579696a14b56f26d25ff7255 /src/client
parentfix(package): update swagger-jsdoc to version 1.10.3 (diff)
downloadsharkey-138fa1454f65d1bb8b08a391dfbc9bc582c6cd79.tar.gz
sharkey-138fa1454f65d1bb8b08a391dfbc9bc582c6cd79.tar.bz2
sharkey-138fa1454f65d1bb8b08a391dfbc9bc582c6cd79.zip
Fix #1957
Diffstat (limited to 'src/client')
-rw-r--r--src/client/app/desktop/views/components/post-form.vue8
-rw-r--r--src/client/app/mobile/views/components/post-form.vue8
2 files changed, 10 insertions, 6 deletions
diff --git a/src/client/app/desktop/views/components/post-form.vue b/src/client/app/desktop/views/components/post-form.vue
index 5ae44eddaa..278c98dc9a 100644
--- a/src/client/app/desktop/views/components/post-form.vue
+++ b/src/client/app/desktop/views/components/post-form.vue
@@ -137,7 +137,9 @@ export default Vue.extend({
},
canPost(): boolean {
- return !this.posting && (this.text.length != 0 || this.files.length != 0 || this.poll || this.renote);
+ return !this.posting &&
+ (1 <= this.text.length || 1 <= this.files.length || this.poll || this.renote) &&
+ (this.text.length <= 1000);
}
},
@@ -307,8 +309,8 @@ export default Vue.extend({
}, err => {
alert('エラー: ' + err.message);
}, {
- enableHighAccuracy: true
- });
+ enableHighAccuracy: true
+ });
},
removeGeo() {
diff --git a/src/client/app/mobile/views/components/post-form.vue b/src/client/app/mobile/views/components/post-form.vue
index c558178cbb..f7b2988982 100644
--- a/src/client/app/mobile/views/components/post-form.vue
+++ b/src/client/app/mobile/views/components/post-form.vue
@@ -132,7 +132,9 @@ export default Vue.extend({
},
canPost(): boolean {
- return !this.posting && (this.text.length != 0 || this.files.length != 0 || this.poll || this.renote);
+ return !this.posting &&
+ (1 <= this.text.length || 1 <= this.files.length || this.poll || this.renote) &&
+ (this.text.length <= 1000);
}
},
@@ -221,8 +223,8 @@ export default Vue.extend({
}, err => {
alert('%i18n:@error%: ' + err.message);
}, {
- enableHighAccuracy: true
- });
+ enableHighAccuracy: true
+ });
},
removeGeo() {