From e6c2a8d9653ffde924632ca2f260c3a8cddc14ed Mon Sep 17 00:00:00 2001
From: Zero~Informatique
Date: Fri, 11 Sep 2020 00:15:04 +0200
Subject: viewer: item display order

github: resolves #28
---
 viewer/src/views/MainLayout.vue | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

(limited to 'viewer/src/views/MainLayout.vue')

diff --git a/viewer/src/views/MainLayout.vue b/viewer/src/views/MainLayout.vue
index 80778f6..21c9cb6 100644
--- a/viewer/src/views/MainLayout.vue
+++ b/viewer/src/views/MainLayout.vue
@@ -20,8 +20,8 @@
 <template>
   <div :class="{ fullscreen: $uiStore.fullscreen, fullwidth: $uiStore.fullWidth }">
     <ld-title :gallery-title="$galleryStore.galleryTitle" :current-item="$galleryStore.currentItem" />
-    <panel-top v-if="!isLoading" class="layout layout-top" />
-    <panel-left v-if="!isLoading" class="layout layout-left" />
+    <panel-top v-if="isReady" class="layout layout-top" />
+    <panel-left v-if="isReady" class="layout layout-left" />
     <router-view v-if="!isLoading" ref="content" class="layout layout-content scrollbar" />
     <b-loading :active="isLoading" is-full-page />
     <ld-key-press :keycode="27" @action="$uiStore.toggleFullscreen(false)" />
@@ -69,6 +69,10 @@ export default class MainLayout extends Vue {
       .catch(this.displayError);
   }
 
+  get isReady() {
+    return !this.isLoading && this.$galleryStore.currentPath !== null;
+  }
+
   displayError(reason: any) {
     this.$buefy.snackbar.open({
       message: `Error ${reason}`,
-- 
cgit v1.2.3

