diff --git a/src/components/viewComponents/galleryComponents/zipDownloader.vue b/src/components/viewComponents/galleryComponents/zipDownloader.vue index f9242565..c3eb4fbc 100644 --- a/src/components/viewComponents/galleryComponents/zipDownloader.vue +++ b/src/components/viewComponents/galleryComponents/zipDownloader.vue @@ -63,6 +63,10 @@ export default { } }, + mounted: function() { + this.updateZipperUri(); + }, + created: function() { // Watch for host 'ready', then update status this.unwatchStoreFunction = this.$store.watch( @@ -80,23 +84,28 @@ export default { methods: { updateZipperUri: function() { - axios - .get(this.pluginsUri) // Get a list of plugins - .then(response => { - var plugins = response.data; - var foundExtension = plugins.find( - e => e.title === "org.openflexure.zipbuilder" - ); - // if ZipBuilderPlugin is enabled - if (foundExtension) { - // Get plugin action links - this.zipBuilderUri = foundExtension.links.build.href; - this.zipGetterUri = foundExtension.links.get.href; - } - }) - .catch(error => { - this.modalError(error); // Let mixin handle error - }); + if (this.$store.state.available) { + axios + .get(this.pluginsUri) // Get a list of plugins + .then(response => { + var plugins = response.data; + var foundExtension = plugins.find( + e => e.title === "org.openflexure.zipbuilder" + ); + // if ZipBuilderPlugin is enabled + if (foundExtension) { + // Get plugin action links + this.zipBuilderUri = foundExtension.links.build.href; + this.zipGetterUri = foundExtension.links.get.href; + } + }) + .catch(error => { + this.modalError(error); // Let mixin handle error + }); + } else { + this.zipBuilderUri = null; + this.zipGetterUri = null; + } }, resetZipper: function() { diff --git a/src/components/viewComponents/galleryDisplay.vue b/src/components/viewComponents/galleryDisplay.vue index 8c331530..14f0b0c1 100644 --- a/src/components/viewComponents/galleryDisplay.vue +++ b/src/components/viewComponents/galleryDisplay.vue @@ -9,14 +9,14 @@ >
@@ -80,12 +80,17 @@ v-if="galleryFolder" class="uk-flex uk-flex-middle uk-padding uk-padding-remove-horizontal uk-padding-remove-bottom" > - arrow_back + arrow_back +