From 118666b4c3faeaeaf153a2ea7172764a3cbcffab Mon Sep 17 00:00:00 2001 From: Zero~Informatique Date: Wed, 29 Jan 2020 23:04:30 +0100 Subject: viewer: the loader now correctly waits for the json to be loaded and indexes to be processed before displaying the UI. resolves #61 --- viewer/src/store/galleryStore.ts | 2 +- viewer/src/views/MainLayout.vue | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/viewer/src/store/galleryStore.ts b/viewer/src/store/galleryStore.ts index 663340f..b2ff74e 100644 --- a/viewer/src/store/galleryStore.ts +++ b/viewer/src/store/galleryStore.ts @@ -61,7 +61,7 @@ export default class GalleryStore extends VuexModule { // Fetches the gallery's JSON metadata @action async fetchGalleryItems(url: string) { - fetch(url) + return fetch(url) .then(response => response.json()) .then(this.setGalleryItemsRoot) .then(this.indexTags); diff --git a/viewer/src/views/MainLayout.vue b/viewer/src/views/MainLayout.vue index 7a75eb1..f608b9d 100644 --- a/viewer/src/views/MainLayout.vue +++ b/viewer/src/views/MainLayout.vue @@ -19,9 +19,9 @@ @@ -35,7 +35,7 @@ import PanelTop from "./PanelTop.vue"; components: { PanelLeft, PanelTop }, }) export default class MainLayout extends Vue { - isLoading: boolean = false; + isLoading: boolean = true; mounted() { this.fetchGalleryItems(); -- cgit v1.2.3