From d3169b057c1b3522930b044df5ee68b808c0da13 Mon Sep 17 00:00:00 2001 From: Shpuld Shpuldson Date: Mon, 21 Aug 2017 15:35:14 +0300 Subject: Visual indicator for when posting is happening, as well as disabling the button to prevent double-posts. --- src/components/post_status_form/post_status_form.js | 3 +++ src/components/post_status_form/post_status_form.vue | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'src/components') diff --git a/src/components/post_status_form/post_status_form.js b/src/components/post_status_form/post_status_form.js index 6b78b7dd..3313ec3f 100644 --- a/src/components/post_status_form/post_status_form.js +++ b/src/components/post_status_form/post_status_form.js @@ -40,6 +40,7 @@ const PostStatusForm = { dropFiles: [], submitDisabled: false, error: null, + posting: false, newStatus: { status: statusText, files: [] @@ -86,6 +87,7 @@ const PostStatusForm = { this.caret = selectionStart }, postStatus (newStatus) { + this.posting = true statusPoster.postStatus({ status: newStatus.status, media: newStatus.files, @@ -104,6 +106,7 @@ const PostStatusForm = { } else { this.error = data.error } + this.posting = false }) }, addMediaFile (fileInfo) { diff --git a/src/components/post_status_form/post_status_form.vue b/src/components/post_status_form/post_status_form.vue index e1e3e4be..e775c45e 100644 --- a/src/components/post_status_form/post_status_form.vue +++ b/src/components/post_status_form/post_status_form.vue @@ -17,7 +17,8 @@
- + +
Error: {{ error }} -- cgit v1.2.3-70-g09d2