From 430af8306b1ab17e59a6dabf8f65ab816d28695d Mon Sep 17 00:00:00 2001
From: Pitu <heyitspitu@gmail.com>
Date: Wed, 19 Sep 2018 04:45:50 -0300
Subject: Switch to Nuxt.js

---
 src/site/pages/a/_identifier.vue | 141 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 141 insertions(+)
 create mode 100644 src/site/pages/a/_identifier.vue

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

diff --git a/src/site/pages/a/_identifier.vue b/src/site/pages/a/_identifier.vue
new file mode 100644
index 0000000..624c835
--- /dev/null
+++ b/src/site/pages/a/_identifier.vue
@@ -0,0 +1,141 @@
+<style lang="scss" scoped>
+	@import '~/assets/styles/_colors.scss';
+	section { background-color: $backgroundLight1 !important; }
+
+	section.hero div.hero-body.align-top {
+		align-items: baseline;
+		flex-grow: 0;
+		padding-bottom: 0;
+	}
+
+	div.loading-container {
+		justify-content: center;
+		display: flex;
+	}
+</style>
+<style lang="scss">
+	@import '~/assets/styles/_colors.scss';
+</style>
+
+<template>
+	<section class="hero is-fullheight">
+		<template v-if="files && files.length">
+			<div class="hero-body align-top">
+				<div class="container">
+					<h1 class="title">{{ name }}</h1>
+					<h2 class="subtitle">Serving {{ files ? files.length : 0 }} files</h2>
+					<a v-if="downloadLink"
+						:href="downloadLink">Download Album</a>
+					<hr>
+				</div>
+			</div>
+			<div class="hero-body">
+				<div class="container">
+					<Grid v-if="files && files.length"
+						:files="files"
+						:isPublic="true"
+						:width="200"/>
+				</div>
+			</div>
+		</template>
+		<template v-else>
+			<div class="hero-body">
+				<div class="container loading-container">
+					<Loading class="square"/>
+				</div>
+			</div>
+		</template>
+	</section>
+</template>
+
+<script>
+import Grid from '~/components/grid/Grid.vue';
+import Loading from '~/components/loading/CubeShadow.vue';
+import axios from 'axios';
+import config from '~/config.js';
+
+export default {
+	components: { Grid, Loading },
+	async asyncData({ params, error }) {
+		try {
+			const res = await axios.get(`${config.baseURL}/album/${params.identifier}`);
+			const downloadLink = res.data.downloadEnabled ? `${config.baseURL}/album/${params.identifier}/zip` : null;
+			return {
+				name: res.data.name,
+				downloadEnabled: res.data.downloadEnabled,
+				files: res.data.files,
+				downloadLink
+			};
+		} catch (err) {
+			/*
+			return {
+				name: null,
+				downloadEnabled: false,
+				files: [],
+				downloadLink: null,
+				error: error.response.status
+			};
+			*/
+			error({ statusCode: 404, message: 'Post not found' });
+		}
+	},
+	data() {
+		return {};
+	},
+	computed: {
+		config() {
+			return this.$store.state.config;
+		}
+	},
+	metaInfo() {
+		if (this.files) {
+			return {
+				title: `${this.name ? this.name : ''}`,
+				meta: [
+					{ vmid: 'theme-color', name: 'theme-color', content: '#30a9ed' },
+					{ vmid: 'twitter:card', name: 'twitter:card', content: 'summary' },
+					{ vmid: 'twitter:title', name: 'twitter:title', content: `Album: ${this.name} | Files: ${this.files.length}` },
+					{ vmid: 'twitter:description', name: 'twitter: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.' },
+					{ vmid: 'twitter:image', name: 'twitter:image', content: `${this.files.length > 0 ? this.files[0].thumbSquare : '/public/images/share.jpg'}` },
+					{ vmid: 'twitter:image:src', name: 'twitter:image:src', value: `${this.files.length > 0 ? this.files[0].thumbSquare : '/public/images/share.jpg'}` },
+
+					{ vmid: 'og:url', property: 'og:url', content: `${config.URL}/a/${this.$route.params.identifier}` },
+					{ vmid: 'og:title', property: 'og:title', content: `Album: ${this.name} | Files: ${this.files.length}` },
+					{ 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.' },
+					{ vmid: 'og:image', property: 'og:image', content: `${this.files.length > 0 ? this.files[0].thumbSquare : '/public/images/share.jpg'}` },
+					{ vmid: 'og:image:secure_url', property: 'og:image:secure_url', content: `${this.files.length > 0 ? this.files[0].thumbSquare : '/public/images/share.jpg'}` }
+				]
+			};
+		}
+		return {
+			title: `${this.name ? this.name : ''}`,
+			meta: [
+				{ vmid: 'theme-color', name: 'theme-color', content: '#30a9ed' },
+				{ vmid: 'twitter:card', name: 'twitter:card', content: 'summary' },
+				{ vmid: 'twitter:title', name: 'twitter:title', content: 'lolisafe' },
+				{ vmid: 'twitter:description', name: 'twitter: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.' },
+				{ vmid: 'og:url', property: 'og:url', content: `${config.URL}/a/${this.$route.params.identifier}` },
+				{ vmid: 'og:title', property: 'og:title', content: 'lolisafe' },
+				{ 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);
+		}
+		*/
+		this.$ga.page({
+			page: `/a/${this.$route.params.identifier}`,
+			title: `Album | ${this.name}`,
+			location: window.location.href
+		});
+	}
+};
+</script>
-- 
cgit v1.2.3


From 4c241dc1d19116077fea5455d1688c81ac7933cc Mon Sep 17 00:00:00 2001
From: Pitu <heyitspitu@gmail.com>
Date: Mon, 18 Feb 2019 23:36:35 +0900
Subject: Styling

---
 src/site/pages/a/_identifier.vue | 4 ++--
 1 file changed, 2 insertions(+), 2 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 624c835..b01200c 100644
--- a/src/site/pages/a/_identifier.vue
+++ b/src/site/pages/a/_identifier.vue
@@ -34,14 +34,14 @@
 					<Grid v-if="files && files.length"
 						:files="files"
 						:isPublic="true"
-						:width="200"/>
+						:width="200" />
 				</div>
 			</div>
 		</template>
 		<template v-else>
 			<div class="hero-body">
 				<div class="container loading-container">
-					<Loading class="square"/>
+					<Loading class="square" />
 				</div>
 			</div>
 		</template>
-- 
cgit v1.2.3


From 84c4b442cf69f20730119fb4f68046b7d537bca8 Mon Sep 17 00:00:00 2001
From: Pitu <heyitspitu@gmail.com>
Date: Fri, 22 Feb 2019 00:12:51 +0900
Subject: whoops

---
 src/site/pages/a/_identifier.vue | 7 +++----
 1 file changed, 3 insertions(+), 4 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 b01200c..254ed36 100644
--- a/src/site/pages/a/_identifier.vue
+++ b/src/site/pages/a/_identifier.vue
@@ -52,14 +52,13 @@
 import Grid from '~/components/grid/Grid.vue';
 import Loading from '~/components/loading/CubeShadow.vue';
 import axios from 'axios';
-import config from '~/config.js';
 
 export default {
 	components: { Grid, Loading },
-	async asyncData({ params, error }) {
+	async asyncData({ app, params, error }) {
 		try {
-			const res = await axios.get(`${config.baseURL}/album/${params.identifier}`);
-			const downloadLink = res.data.downloadEnabled ? `${config.baseURL}/album/${params.identifier}/zip` : null;
+			const res = await axios.get(`${app.store.state.config.baseURL}/album/${params.identifier}`);
+			const downloadLink = res.data.downloadEnabled ? `${app.store.state.config.baseURL}/album/${params.identifier}/zip` : null;
 			return {
 				name: res.data.name,
 				downloadEnabled: res.data.downloadEnabled,
-- 
cgit v1.2.3


From 789f5fc259b90dd6a3b21fd2aef1a9e54a19506e Mon Sep 17 00:00:00 2001
From: Pitu <heyitspitu@gmail.com>
Date: Sat, 2 Mar 2019 22:16:35 +0900
Subject: Removed google analytics

---
 src/site/pages/a/_identifier.vue | 5 -----
 1 file changed, 5 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 254ed36..1a60332 100644
--- a/src/site/pages/a/_identifier.vue
+++ b/src/site/pages/a/_identifier.vue
@@ -130,11 +130,6 @@ export default {
 			this.$toast.open(`Error code ${this.error}`, true, 3000);
 		}
 		*/
-		this.$ga.page({
-			page: `/a/${this.$route.params.identifier}`,
-			title: `Album | ${this.name}`,
-			location: window.location.href
-		});
 	}
 };
 </script>
-- 
cgit v1.2.3


From 4a2ed9f0f48ec9c1bae38c3b5f155c50e155176d Mon Sep 17 00:00:00 2001
From: Pitu <heyitspitu@gmail.com>
Date: Tue, 12 Mar 2019 05:41:10 +0000
Subject: No more infinite loading if album is empty

---
 src/site/pages/a/_identifier.vue | 5 +++--
 1 file changed, 3 insertions(+), 2 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 1a60332..a1f719a 100644
--- a/src/site/pages/a/_identifier.vue
+++ b/src/site/pages/a/_identifier.vue
@@ -40,8 +40,9 @@
 		</template>
 		<template v-else>
 			<div class="hero-body">
-				<div class="container loading-container">
-					<Loading class="square" />
+				<div class="container">
+					<h1 class="title">:(</h1>
+					<h2 class="subtitle">This album seems to be empty</h2>
 				</div>
 			</div>
 		</template>
-- 
cgit v1.2.3


From ea3e503d13b7be477c064b02b9b2e5a9ef06c9a9 Mon Sep 17 00:00:00 2001
From: Pitu <heyitspitu@gmail.com>
Date: Fri, 29 Mar 2019 00:35:58 +0900
Subject: Added middleware for pages and switched to $axios

---
 src/site/pages/a/_identifier.vue | 29 ++++++++++++++---------------
 1 file changed, 14 insertions(+), 15 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 a1f719a..d00ad85 100644
--- a/src/site/pages/a/_identifier.vue
+++ b/src/site/pages/a/_identifier.vue
@@ -51,19 +51,26 @@
 
 <script>
 import Grid from '~/components/grid/Grid.vue';
-import Loading from '~/components/loading/CubeShadow.vue';
 import axios from 'axios';
 
 export default {
-	components: { Grid, Loading },
+	components: { Grid },
+	data() {
+		return {};
+	},
+	computed: {
+		config() {
+			return this.$store.state.config;
+		}
+	},
 	async asyncData({ app, params, error }) {
 		try {
-			const res = await axios.get(`${app.store.state.config.baseURL}/album/${params.identifier}`);
-			const downloadLink = res.data.downloadEnabled ? `${app.store.state.config.baseURL}/album/${params.identifier}/zip` : null;
+			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: res.data.name,
-				downloadEnabled: res.data.downloadEnabled,
-				files: res.data.files,
+				name: data.name,
+				downloadEnabled: data.downloadEnabled,
+				files: data.files,
 				downloadLink
 			};
 		} catch (err) {
@@ -79,14 +86,6 @@ export default {
 			error({ statusCode: 404, message: 'Post not found' });
 		}
 	},
-	data() {
-		return {};
-	},
-	computed: {
-		config() {
-			return this.$store.state.config;
-		}
-	},
 	metaInfo() {
 		if (this.files) {
 			return {
-- 
cgit v1.2.3


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


From cba7bf8586f59a049f79aba586db201ac6f3530b Mon Sep 17 00:00:00 2001
From: Pitu <heyitspitu@gmail.com>
Date: Sun, 13 Oct 2019 02:53:45 +0900
Subject: This commit adds a bunch of features for admins:

* banning IP
* see files from other users if you are admin
* be able to see details of an uploaded file and it's user
* improved display of thumbnails for non-image files
---
 src/site/pages/a/_identifier.vue | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

(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 923e8cc..62035b3 100644
--- a/src/site/pages/a/_identifier.vue
+++ b/src/site/pages/a/_identifier.vue
@@ -35,7 +35,8 @@
 						:files="files"
 						:isPublic="true"
 						:width="200"
-						:enableSearch="false" />
+						:enableSearch="false"
+						:enableToolbar="false" />
 				</div>
 			</div>
 		</template>
-- 
cgit v1.2.3


From f189ddf9e6e1dda0c8e56afd367bc378ee19b8fd Mon Sep 17 00:00:00 2001
From: Pitu <heyitspitu@gmail.com>
Date: Thu, 25 Jun 2020 02:05:48 +0900
Subject: Cleanup

---
 src/site/pages/a/_identifier.vue | 17 +++--------------
 1 file changed, 3 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 62035b3..ea36852 100644
--- a/src/site/pages/a/_identifier.vue
+++ b/src/site/pages/a/_identifier.vue
@@ -1,7 +1,5 @@
 <style lang="scss" scoped>
 	@import '~/assets/styles/_colors.scss';
-	section { background-color: $backgroundLight1 !important; }
-
 	section.hero div.hero-body.align-top {
 		align-items: baseline;
 		flex-grow: 0;
@@ -77,16 +75,7 @@ export default {
 			};
 		} catch (err) {
 			console.log('Error when retrieving album', err);
-			/*
-			return {
-				name: null,
-				downloadEnabled: false,
-				files: [],
-				downloadLink: null,
-				error: error.response.status
-			};
-			*/
-			error({ statusCode: 404, message: 'Post not found' });
+			error({ statusCode: 404, message: 'Album not found' });
 		}
 	},
 	metaInfo() {
@@ -101,7 +90,7 @@ export default {
 					{ vmid: 'twitter:image', name: 'twitter:image', content: `${this.files.length > 0 ? this.files[0].thumbSquare : '/public/images/share.jpg'}` },
 					{ vmid: 'twitter:image:src', name: 'twitter:image:src', value: `${this.files.length > 0 ? this.files[0].thumbSquare : '/public/images/share.jpg'}` },
 
-					{ vmid: 'og:url', property: 'og:url', content: `${config.URL}/a/${this.$route.params.identifier}` },
+					{ vmid: 'og:url', property: 'og:url', content: `${this.config.URL}/a/${this.$route.params.identifier}` },
 					{ vmid: 'og:title', property: 'og:title', content: `Album: ${this.name} | Files: ${this.files.length}` },
 					{ 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.' },
 					{ vmid: 'og:image', property: 'og:image', content: `${this.files.length > 0 ? this.files[0].thumbSquare : '/public/images/share.jpg'}` },
@@ -116,7 +105,7 @@ export default {
 				{ vmid: 'twitter:card', name: 'twitter:card', content: 'summary' },
 				{ vmid: 'twitter:title', name: 'twitter:title', content: 'lolisafe' },
 				{ vmid: 'twitter:description', name: 'twitter: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.' },
-				{ vmid: 'og:url', property: 'og:url', content: `${config.URL}/a/${this.$route.params.identifier}` },
+				{ vmid: 'og:url', property: 'og:url', content: `${this.config.URL}/a/${this.$route.params.identifier}` },
 				{ vmid: 'og:title', property: 'og:title', content: 'lolisafe' },
 				{ 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.' }
 			]
-- 
cgit v1.2.3


From ac037c773ef5f15372c6999445a2efe00034c0c0 Mon Sep 17 00:00:00 2001
From: Zephyrrus <krisztian1997@gmail.com>
Date: Mon, 29 Jun 2020 20:02:47 +0300
Subject: fix: Remove hero and hero body and use sections and containers
 instead

Hero is meant to be used as a full-width banner to showcare or present somethign, not to contain the entire content of the webpage
---
 src/site/pages/a/_identifier.vue | 28 ++++++++++++----------------
 1 file changed, 12 insertions(+), 16 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 ea36852..24d172b 100644
--- a/src/site/pages/a/_identifier.vue
+++ b/src/site/pages/a/_identifier.vue
@@ -16,9 +16,9 @@
 </style>
 
 <template>
-	<section class="hero is-fullheight">
+	<section class="section is-fullheight">
 		<template v-if="files && files.length">
-			<div class="hero-body align-top">
+			<div class="align-top">
 				<div class="container">
 					<h1 class="title">{{ name }}</h1>
 					<h2 class="subtitle">Serving {{ files ? files.length : 0 }} files</h2>
@@ -27,23 +27,19 @@
 					<hr>
 				</div>
 			</div>
-			<div class="hero-body">
-				<div class="container">
-					<Grid v-if="files && files.length"
-						:files="files"
-						:isPublic="true"
-						:width="200"
-						:enableSearch="false"
-						:enableToolbar="false" />
-				</div>
+			<div class="container">
+				<Grid v-if="files && files.length"
+					:files="files"
+					:isPublic="true"
+					:width="200"
+					:enableSearch="false"
+					:enableToolbar="false" />
 			</div>
 		</template>
 		<template v-else>
-			<div class="hero-body">
-				<div class="container">
-					<h1 class="title">:(</h1>
-					<h2 class="subtitle">This album seems to be empty</h2>
-				</div>
+			<div class="container">
+				<h1 class="title">:(</h1>
+				<h2 class="subtitle">This album seems to be empty</h2>
 			</div>
 		</template>
 	</section>
-- 
cgit v1.2.3


From fb0bc57542a44dcc94149f393d8a4ff0c2e7902b Mon Sep 17 00:00:00 2001
From: Zephyrrus <krisztian1997@gmail.com>
Date: Tue, 7 Jul 2020 02:02:59 +0300
Subject: feat: try fixing THE SHITTY WATERFALL

---
 src/site/pages/a/_identifier.vue | 38 ++++++++++++++++++++++++--------------
 1 file changed, 24 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 24d172b..3746cc6 100644
--- a/src/site/pages/a/_identifier.vue
+++ b/src/site/pages/a/_identifier.vue
@@ -20,15 +20,21 @@
 		<template v-if="files && files.length">
 			<div class="align-top">
 				<div class="container">
-					<h1 class="title">{{ name }}</h1>
-					<h2 class="subtitle">Serving {{ files ? files.length : 0 }} files</h2>
-					<a v-if="downloadLink"
+					<h1 class="title">
+						{{ name }}
+					</h1>
+					<h2 class="subtitle">
+						Serving {{ files ? files.length : 0 }} files
+					</h2>
+					<a
+						v-if="downloadLink"
 						:href="downloadLink">Download Album</a>
 					<hr>
 				</div>
 			</div>
 			<div class="container">
-				<Grid v-if="files && files.length"
+				<Grid
+					v-if="files && files.length"
 					:files="files"
 					:isPublic="true"
 					:width="200"
@@ -38,16 +44,20 @@
 		</template>
 		<template v-else>
 			<div class="container">
-				<h1 class="title">:(</h1>
-				<h2 class="subtitle">This album seems to be empty</h2>
+				<h1 class="title">
+					:(
+				</h1>
+				<h2 class="subtitle">
+					This album seems to be empty
+				</h2>
 			</div>
 		</template>
 	</section>
 </template>
 
 <script>
-import Grid from '~/components/grid/Grid.vue';
 import axios from 'axios';
+import Grid from '~/components/grid/Grid.vue';
 
 export default {
 	components: { Grid },
@@ -57,7 +67,7 @@ export default {
 	computed: {
 		config() {
 			return this.$store.state.config;
-		}
+		},
 	},
 	async asyncData({ app, params, error }) {
 		try {
@@ -67,7 +77,7 @@ export default {
 				name: data.name,
 				downloadEnabled: data.downloadEnabled,
 				files: data.files,
-				downloadLink
+				downloadLink,
 			};
 		} catch (err) {
 			console.log('Error when retrieving album', err);
@@ -90,8 +100,8 @@ export default {
 					{ vmid: 'og:title', property: 'og:title', content: `Album: ${this.name} | Files: ${this.files.length}` },
 					{ 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.' },
 					{ vmid: 'og:image', property: 'og:image', content: `${this.files.length > 0 ? this.files[0].thumbSquare : '/public/images/share.jpg'}` },
-					{ vmid: 'og:image:secure_url', property: 'og:image:secure_url', content: `${this.files.length > 0 ? this.files[0].thumbSquare : '/public/images/share.jpg'}` }
-				]
+					{ vmid: 'og:image:secure_url', property: 'og:image:secure_url', content: `${this.files.length > 0 ? this.files[0].thumbSquare : '/public/images/share.jpg'}` },
+				],
 			};
 		}
 		return {
@@ -103,9 +113,9 @@ export default {
 				{ vmid: 'twitter:description', name: 'twitter: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.' },
 				{ vmid: 'og:url', property: 'og:url', content: `${this.config.URL}/a/${this.$route.params.identifier}` },
 				{ vmid: 'og:title', property: 'og:title', content: 'lolisafe' },
-				{ 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.' }
-			]
+				{ 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.' },
+			],
 		};
-	}
+	},
 };
 </script>
-- 
cgit v1.2.3


From 90001c2df56d58e69fd199a518ae7f3e4ed327fc Mon Sep 17 00:00:00 2001
From: Zephyrrus <krisztian1997@gmail.com>
Date: Thu, 24 Dec 2020 10:40:50 +0200
Subject: chore: remove trailing commas

---
 src/site/pages/a/_identifier.vue | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 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 3746cc6..0c6261a 100644
--- a/src/site/pages/a/_identifier.vue
+++ b/src/site/pages/a/_identifier.vue
@@ -67,7 +67,7 @@ export default {
 	computed: {
 		config() {
 			return this.$store.state.config;
-		},
+		}
 	},
 	async asyncData({ app, params, error }) {
 		try {
@@ -77,7 +77,7 @@ export default {
 				name: data.name,
 				downloadEnabled: data.downloadEnabled,
 				files: data.files,
-				downloadLink,
+				downloadLink
 			};
 		} catch (err) {
 			console.log('Error when retrieving album', err);
@@ -100,8 +100,8 @@ export default {
 					{ vmid: 'og:title', property: 'og:title', content: `Album: ${this.name} | Files: ${this.files.length}` },
 					{ 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.' },
 					{ vmid: 'og:image', property: 'og:image', content: `${this.files.length > 0 ? this.files[0].thumbSquare : '/public/images/share.jpg'}` },
-					{ vmid: 'og:image:secure_url', property: 'og:image:secure_url', content: `${this.files.length > 0 ? this.files[0].thumbSquare : '/public/images/share.jpg'}` },
-				],
+					{ vmid: 'og:image:secure_url', property: 'og:image:secure_url', content: `${this.files.length > 0 ? this.files[0].thumbSquare : '/public/images/share.jpg'}` }
+				]
 			};
 		}
 		return {
@@ -113,9 +113,9 @@ export default {
 				{ vmid: 'twitter:description', name: 'twitter: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.' },
 				{ vmid: 'og:url', property: 'og:url', content: `${this.config.URL}/a/${this.$route.params.identifier}` },
 				{ vmid: 'og:title', property: 'og:title', content: 'lolisafe' },
-				{ 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.' },
-			],
+				{ 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.' }
+			]
 		};
-	},
+	}
 };
 </script>
-- 
cgit v1.2.3


From fb2c27086f570fec60f4d52dcc9ca80e53186293 Mon Sep 17 00:00:00 2001
From: Pitu <heyitspitu@gmail.com>
Date: Thu, 24 Dec 2020 23:45:16 +0900
Subject: Fix ESLint rules once and for all

---
 src/site/pages/a/_identifier.vue | 6 +++---
 1 file changed, 3 insertions(+), 3 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 0c6261a..c1e6179 100644
--- a/src/site/pages/a/_identifier.vue
+++ b/src/site/pages/a/_identifier.vue
@@ -36,10 +36,10 @@
 				<Grid
 					v-if="files && files.length"
 					:files="files"
-					:isPublic="true"
+					:is-public="true"
 					:width="200"
-					:enableSearch="false"
-					:enableToolbar="false" />
+					:enable-search="false"
+					:enable-toolbar="false" />
 			</div>
 		</template>
 		<template v-else>
-- 
cgit v1.2.3


From ec2f9e0d989792c1760b48e063467cf6e59c580a Mon Sep 17 00:00:00 2001
From: Pitu <heyitspitu@gmail.com>
Date: Fri, 25 Dec 2020 20:45:22 +0900
Subject: Rebrand

---
 src/site/pages/a/_identifier.vue | 4 ++--
 1 file changed, 2 insertions(+), 2 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 c1e6179..11e557b 100644
--- a/src/site/pages/a/_identifier.vue
+++ b/src/site/pages/a/_identifier.vue
@@ -109,10 +109,10 @@ export default {
 			meta: [
 				{ vmid: 'theme-color', name: 'theme-color', content: '#30a9ed' },
 				{ vmid: 'twitter:card', name: 'twitter:card', content: 'summary' },
-				{ vmid: 'twitter:title', name: 'twitter:title', content: 'lolisafe' },
+				{ vmid: 'twitter:title', name: 'twitter:title', content: 'chibisafe' },
 				{ vmid: 'twitter:description', name: 'twitter: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.' },
 				{ vmid: 'og:url', property: 'og:url', content: `${this.config.URL}/a/${this.$route.params.identifier}` },
-				{ vmid: 'og:title', property: 'og:title', content: 'lolisafe' },
+				{ vmid: 'og:title', property: 'og:title', content: 'chibisafe' },
 				{ 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.' }
 			]
 		};
-- 
cgit v1.2.3


From edb3bed98864e34695a5ae0093c414a2b578073a Mon Sep 17 00:00:00 2001
From: Pitu <heyitspitu@gmail.com>
Date: Mon, 28 Dec 2020 00:10:59 +0900
Subject: feat: Add warning to nsfw albums

---
 src/site/pages/a/_identifier.vue | 84 +++++++++++++++++++++++++++-------------
 1 file changed, 58 insertions(+), 26 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 11e557b..7ffed35 100644
--- a/src/site/pages/a/_identifier.vue
+++ b/src/site/pages/a/_identifier.vue
@@ -1,20 +1,3 @@
-<style lang="scss" scoped>
-	@import '~/assets/styles/_colors.scss';
-	section.hero div.hero-body.align-top {
-		align-items: baseline;
-		flex-grow: 0;
-		padding-bottom: 0;
-	}
-
-	div.loading-container {
-		justify-content: center;
-		display: flex;
-	}
-</style>
-<style lang="scss">
-	@import '~/assets/styles/_colors.scss';
-</style>
-
 <template>
 	<section class="section is-fullheight">
 		<template v-if="files && files.length">
@@ -33,13 +16,30 @@
 				</div>
 			</div>
 			<div class="container">
-				<Grid
-					v-if="files && files.length"
-					:files="files"
-					:is-public="true"
-					:width="200"
-					:enable-search="false"
-					:enable-toolbar="false" />
+				<template v-if="!isNsfw || (isNsfw && nsfwConsent)">
+					<Grid
+						v-if="files && files.length"
+						:files="files"
+						:is-public="true"
+						:width="200"
+						:enable-search="false"
+						:enable-toolbar="false" />
+				</template>
+				<template v-else>
+					<div class="nsfw">
+						<i class="mdi mdi-alert mdi-48px" />
+						<h1>NSFW Content</h1>
+						<p>
+							This album contains images or videos that are not safe for work or are inappropriate to view in some situations.<br>
+							Do you wish to proceed?
+						</p>
+						<button
+							class="button is-danger"
+							@click="nsfwConsent = true">
+							Show me the content
+						</button>
+					</div>
+				</template>
 			</div>
 		</template>
 		<template v-else>
@@ -62,7 +62,9 @@ import Grid from '~/components/grid/Grid.vue';
 export default {
 	components: { Grid },
 	data() {
-		return {};
+		return {
+			nsfwConsent: false
+		};
 	},
 	computed: {
 		config() {
@@ -77,7 +79,8 @@ export default {
 				name: data.name,
 				downloadEnabled: data.downloadEnabled,
 				files: data.files,
-				downloadLink
+				downloadLink,
+				isNsfw: data.isNsfw
 			};
 		} catch (err) {
 			console.log('Error when retrieving album', err);
@@ -119,3 +122,32 @@ export default {
 	}
 };
 </script>
+<style lang="scss" scoped>
+	section.hero div.hero-body.align-top {
+		align-items: baseline;
+		flex-grow: 0;
+		padding-bottom: 0;
+	}
+
+	div.loading-container {
+		justify-content: center;
+		display: flex;
+	}
+	.nsfw {
+		display: flex;
+		flex-direction: column;
+		justify-content: center;
+		align-items: center;
+		min-height: 50vh;
+
+		h1 {
+			font-size: 2rem;
+			margin-bottom: 2rem;
+		}
+		p {
+			font-size: 1.5rem;
+			margin-bottom: 2rem;
+			text-align: center;
+		}
+	}
+</style>
-- 
cgit v1.2.3

