From 8e4f1b7838e3c43320f2e25e691c1808ae3c4089 Mon Sep 17 00:00:00 2001
From: Pitu <heyitspitu@gmail.com>
Date: Mon, 30 Sep 2019 07:06:22 +0000
Subject: feature: album links

---
 src/site/pages/a/_identifier.vue | 18 ++++--------------
 1 file changed, 4 insertions(+), 14 deletions(-)

(limited to 'src/site/pages/a/_identifier.vue')

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>
-- 
cgit v1.2.3

