diff options
author | Simon Knox <psimyn@gmail.com> | 2017-05-17 12:50:40 +0300 |
---|---|---|
committer | Simon Knox <psimyn@gmail.com> | 2017-05-24 14:19:50 +0300 |
commit | 6b8fac9de471646b36a822e2b18e1b3a97965288 (patch) | |
tree | 1e7621e2b2b76a582187fa75d6cdc943d8077a70 /app/assets/javascripts/sidebar | |
parent | e07c75513db023672b7042869f46ee35753cfd34 (diff) |
add loading spinner to sidebar assignees
store isFetching state to indicate if assignees has initial data
Diffstat (limited to 'app/assets/javascripts/sidebar')
-rw-r--r-- | app/assets/javascripts/sidebar/components/assignees/sidebar_assignees.js | 3 | ||||
-rw-r--r-- | app/assets/javascripts/sidebar/stores/sidebar_store.js | 4 |
2 files changed, 6 insertions, 1 deletions
diff --git a/app/assets/javascripts/sidebar/components/assignees/sidebar_assignees.js b/app/assets/javascripts/sidebar/components/assignees/sidebar_assignees.js index 1488a66c695..da4abf0b68f 100644 --- a/app/assets/javascripts/sidebar/components/assignees/sidebar_assignees.js +++ b/app/assets/javascripts/sidebar/components/assignees/sidebar_assignees.js @@ -69,10 +69,11 @@ export default { <div> <assignee-title :number-of-assignees="store.assignees.length" - :loading="loading" + :loading="loading || store.isFetching.assignees" :editable="store.editable" /> <assignees + v-if="!store.isFetching.assignees" class="value" :root-path="store.rootPath" :users="store.assignees" diff --git a/app/assets/javascripts/sidebar/stores/sidebar_store.js b/app/assets/javascripts/sidebar/stores/sidebar_store.js index 2d44c05bb8d..3356dd0191f 100644 --- a/app/assets/javascripts/sidebar/stores/sidebar_store.js +++ b/app/assets/javascripts/sidebar/stores/sidebar_store.js @@ -10,6 +10,9 @@ export default class SidebarStore { this.humanTimeEstimate = ''; this.humanTimeSpent = ''; this.assignees = []; + this.isFetching = { + assignees: true, + }; SidebarStore.singleton = this; } @@ -18,6 +21,7 @@ export default class SidebarStore { } setAssigneeData(data) { + this.isFetching.assignees = false; if (data.assignees) { this.assignees = data.assignees; } |