Skip to content

Commit

Permalink
feat(configuration details): better loading UX
Browse files Browse the repository at this point in the history
  • Loading branch information
Guillaume Chau committed Aug 31, 2018
1 parent f8ccef1 commit 5efbd1b
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion packages/@vue/cli-ui/src/views/ProjectConfigurationDetails.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@
</div>
</template>

<VueLoadingIndicator
v-else
class="loading"
/>

<div class="actions-bar">
<VueButton
v-if="configuration && configuration.link"
Expand Down Expand Up @@ -102,13 +107,15 @@ export default {
id: this.id
}
},
manual: true,
async result ({ data, loading }) {
if (!this.$_init && !loading && data && data.configuration) {
this.$_init = true
this.tabsHaveChanges = data.configuration.tabs.reduce((obj, tab) => {
obj[tab.id] = false
return obj
}, {})
this.configuration = data.configuration
await this.$nextTick()
this.currentTab = data.configuration.tabs[0].id
}
Expand Down Expand Up @@ -136,6 +143,7 @@ export default {
methods: {
init (tab) {
this.currentTab = '__default'
this.configuration = null
this.$_init = false
},
Expand Down Expand Up @@ -176,9 +184,12 @@ export default {
align-items stretch
height 100%
.content
.content,
.loading
flex 100% 1 1
height 0
.content
overflow-x hidden
overflow-y auto
Expand Down

0 comments on commit 5efbd1b

Please sign in to comment.