diff options
Diffstat (limited to 'src/site')
| -rw-r--r-- | src/site/components/grid/Grid.vue | 9 | ||||
| -rw-r--r-- | src/site/pages/a/_identifier.vue | 18 |
2 files changed, 12 insertions, 15 deletions
diff --git a/src/site/components/grid/Grid.vue b/src/site/components/grid/Grid.vue index 89ac125..07e5440 100644 --- a/src/site/components/grid/Grid.vue +++ b/src/site/components/grid/Grid.vue @@ -80,7 +80,8 @@ :gutterWidth="10" :gutterHeight="4"> <!-- Gotta implement search and pagination here --> - <input v-model="searchTerm" + <input v-if="enableSearch" + v-model="searchTerm" type="text" placeholder="Search..." @input="search()" @@ -115,12 +116,14 @@ <i class="icon-interface-window" /> </a> </b-tooltip> + <!-- <b-tooltip label="Tags" position="is-top"> <a @click="manageTags(item)"> <i class="icon-ecommerce-tag-c" /> </a> </b-tooltip> + --> <b-tooltip label="Delete" position="is-top"> <a @click="deleteFile(item, index)"> @@ -157,6 +160,10 @@ export default { width: { type: Number, default: 150 + }, + enableSearch: { + type: Boolean, + default: true } }, data() { diff --git a/src/site/pages/a/_identifier.vue b/src/site/pages/a/_identifier.vue index d00ad85..923e8cc 100644 --- a/src/site/pages/a/_identifier.vue +++ b/src/site/pages/a/_identifier.vue @@ -34,7 +34,8 @@ <Grid v-if="files && files.length" :files="files" :isPublic="true" - :width="200" /> + :width="200" + :enableSearch="false" /> </div> </div> </template> @@ -65,7 +66,7 @@ export default { }, async asyncData({ app, params, error }) { try { - const data = await axios.get(`${app.store.state.config.baseURL}/album/${params.identifier}`); + const { data } = await axios.get(`${app.store.state.config.baseURL}/album/${params.identifier}`); const downloadLink = data.downloadEnabled ? `${app.store.state.config.baseURL}/album/${params.identifier}/zip` : null; return { name: data.name, @@ -74,6 +75,7 @@ export default { downloadLink }; } catch (err) { + console.log('Error when retrieving album', err); /* return { name: null, @@ -118,18 +120,6 @@ export default { { vmid: 'og:description', property: 'og:description', content: 'A modern and self-hosted file upload service that can handle anything you throw at it. Fast uploads, file manager and sharing capabilities all crafted with a beautiful user experience in mind.' } ] }; - }, - mounted() { - /* - if (this.error) { - if (this.error === 404) { - this.$toast.open('Album not found', true, 3000); - setTimeout(() => this.$router.push('/404'), 3000); - return; - } - this.$toast.open(`Error code ${this.error}`, true, 3000); - } - */ } }; </script> |