Skip to content

Commit 54c7d61

Browse files
committed
Adds loading indicator
1 parent 5c3b1e6 commit 54c7d61

File tree

5 files changed

+10
-5
lines changed

5 files changed

+10
-5
lines changed

assets/js/dashboard.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ let vm = new Vue({
1313
delimiters: ['${', '}'],
1414

1515
data: {
16+
dataLoaded: false,
1617
status: {},
1718
recipes: {},
1819
repoColors: {
@@ -77,6 +78,7 @@ let vm = new Vue({
7778
this.$http.get('ui/data').then((response) => {
7879
this.status = response.body.status;
7980
this.recipes = response.body.recipes;
81+
this.dataLoaded = true;
8082
})
8183
},
8284
recipeUrl (recipe) {

public/build/dashboard.93b73cbfd99ca32ad3c4.js renamed to public/build/dashboard.f0867c6bf36ade70c00b.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/build/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
22
"build/dashboard.css": "/build/dashboard.b1963f9d56ce5d23c3b365942619a02a.css",
3-
"build/dashboard.js": "/build/dashboard.93b73cbfd99ca32ad3c4.js"
3+
"build/dashboard.js": "/build/dashboard.f0867c6bf36ade70c00b.js"
44
}

templates/dashboard.html.twig

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@
3737

3838
<v-card light color="grey">
3939
<v-card-text class="recipe-holder">
40+
<div class="text-xs-center" v-if="!dataLoaded">
41+
<v-progress-circular center :indeterminate="true" color="white" height="4"></v-progress-circular>
42+
</div>
4043
<v-card
4144
light elevation-0
4245
class="recipe-holder__recipe"
@@ -105,4 +108,4 @@
105108

106109
<script src="{{ asset('build/dashboard.js') }}"></script>
107110
</body>
108-
</html>
111+
</html>

templates/dashboard/repostatus.html.twig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<v-card color="grey">
1+
<v-card color="grey" v-if="dataLoaded">
22
<v-list subheader class="repostatus" v-for="repo in activeRepos" :key="repo.slug">
33
<v-toolbar light flat mini>
44
<v-toolbar-title>${ repo.slug | capitalize } recipes repo</v-toolbar-title>
@@ -29,4 +29,4 @@
2929
</v-list-tile>
3030
</v-list>
3131
<v-divider></v-divider>
32-
</v-card>
32+
</v-card>

0 commit comments

Comments
 (0)