diff options
Diffstat (limited to 'viewer/src/views/MainLayout.vue')
-rw-r--r-- | viewer/src/views/MainLayout.vue | 30 |
1 files changed, 11 insertions, 19 deletions
diff --git a/viewer/src/views/MainLayout.vue b/viewer/src/views/MainLayout.vue index bcd2249..6ef9a3b 100644 --- a/viewer/src/views/MainLayout.vue +++ b/viewer/src/views/MainLayout.vue | |||
@@ -18,13 +18,10 @@ | |||
18 | --> | 18 | --> |
19 | 19 | ||
20 | <template> | 20 | <template> |
21 | <div :class="{'fullscreen': $uiStore.fullscreen, 'fullwidth': $uiStore.fullWidth}"> | 21 | <div :class="{ fullscreen: $uiStore.fullscreen, fullwidth: $uiStore.fullWidth }"> |
22 | <ld-title | 22 | <ld-title :gallery-title="$galleryStore.galleryTitle" :current-item="$galleryStore.currentItem" /> |
23 | :gallery-title="$galleryStore.galleryTitle" | 23 | <panel-top v-if="isReady" class="layout layout-top" /> |
24 | :current-item="$galleryStore.currentItem" | 24 | <panel-left v-if="isReady" class="layout layout-left" /> |
25 | /> | ||
26 | <panel-top v-if="!isLoading" class="layout layout-top" /> | ||
27 | <panel-left v-if="!isLoading" class="layout layout-left" /> | ||
28 | <router-view v-if="!isLoading" ref="content" class="layout layout-content scrollbar" /> | 25 | <router-view v-if="!isLoading" ref="content" class="layout layout-content scrollbar" /> |
29 | <b-loading :active="isLoading" is-full-page /> | 26 | <b-loading :active="isLoading" is-full-page /> |
30 | <ld-key-press :keycode="27" @action="$uiStore.toggleFullscreen(false)" /> | 27 | <ld-key-press :keycode="27" @action="$uiStore.toggleFullscreen(false)" /> |
@@ -67,14 +64,19 @@ export default class MainLayout extends Vue { | |||
67 | this.isLoading = true; | 64 | this.isLoading = true; |
68 | this.$galleryStore | 65 | this.$galleryStore |
69 | .fetchConfig() | 66 | .fetchConfig() |
67 | .then(this.$uiStore.initFromConfig) | ||
70 | .then(this.$galleryStore.fetchGalleryItems) | 68 | .then(this.$galleryStore.fetchGalleryItems) |
71 | .finally(() => (this.isLoading = false)) | 69 | .finally(() => (this.isLoading = false)) |
72 | .catch(this.displayError); | 70 | .catch(this.displayError); |
73 | } | 71 | } |
74 | 72 | ||
73 | get isReady() { | ||
74 | return !this.isLoading && this.$galleryStore.config && this.$galleryStore.currentPath !== null; | ||
75 | } | ||
76 | |||
75 | displayError(reason: any) { | 77 | displayError(reason: any) { |
76 | this.$buefy.snackbar.open({ | 78 | this.$buefy.snackbar.open({ |
77 | message: `Error ${reason}`, | 79 | message: `${reason}`, |
78 | actionText: "Retry", | 80 | actionText: "Retry", |
79 | position: "is-top", | 81 | position: "is-top", |
80 | type: "is-danger", | 82 | type: "is-danger", |
@@ -109,7 +111,7 @@ html { | |||
109 | } | 111 | } |
110 | .layout { | 112 | .layout { |
111 | position: fixed; | 113 | position: fixed; |
112 | transition: all 0.1s linear; | 114 | transition: all $transition-flex-expand linear; |
113 | top: 0; | 115 | top: 0; |
114 | bottom: 0; | 116 | bottom: 0; |
115 | left: 0; | 117 | left: 0; |
@@ -156,15 +158,5 @@ html { | |||
156 | background-color: $content-bgcolor; | 158 | background-color: $content-bgcolor; |
157 | } | 159 | } |
158 | } | 160 | } |
159 | |||
160 | // TODO: Remove when #21 (remove explicit navigation/search modes) is resolved | ||
161 | // Forced at the bottom right corner so we can continue working on the sidebar without interference | ||
162 | .tmp-mode-selector { | ||
163 | position: absolute; | ||
164 | bottom: 0; | ||
165 | right: 0; | ||
166 | z-index: 100; | ||
167 | opacity: 0.75; | ||
168 | } | ||
169 | // ===== | 161 | // ===== |
170 | </style> | 162 | </style> |