From fe10a00ba9a3c30d8718ca004ccd19518466f5bd Mon Sep 17 00:00:00 2001
From: Pitu <7425261+Pitu@users.noreply.github.com>
Date: Sun, 16 Sep 2018 01:09:02 -0300
Subject: Site

---
 src/site/views/dashboard/Uploads.vue | 76 ++++++++++++++++++++++++++++++++++++
 1 file changed, 76 insertions(+)
 create mode 100644 src/site/views/dashboard/Uploads.vue

(limited to 'src/site/views/dashboard/Uploads.vue')

diff --git a/src/site/views/dashboard/Uploads.vue b/src/site/views/dashboard/Uploads.vue
new file mode 100644
index 0000000..52c3274
--- /dev/null
+++ b/src/site/views/dashboard/Uploads.vue
@@ -0,0 +1,76 @@
+<style lang="scss" scoped>
+	@import '../../styles/colors.scss';
+	section { background-color: $backgroundLight1 !important; }
+	section.hero div.hero-body {
+		align-items: baseline;
+	}
+</style>
+<style lang="scss">
+	@import '../../styles/colors.scss';
+</style>
+
+
+<template>
+	<section class="hero is-fullheight">
+		<div class="hero-body">
+			<div class="container">
+				<div class="columns">
+					<div class="column is-narrow">
+						<Sidebar/>
+					</div>
+					<div class="column">
+						<!--
+						<h1 class="title">Uploads</h1>
+						<h2 class="subtitle">Keep track of all your uploads in here</h2>
+						<hr>
+						-->
+						<Grid v-if="files.length"
+							:files="files"/>
+					</div>
+				</div>
+			</div>
+		</div>
+	</section>
+</template>
+
+<script>
+import Sidebar from '../../components/sidebar/Sidebar.vue';
+import Grid from '../../components/grid/Grid.vue';
+// import Waterfall from '../../components/waterfall/Waterfall.vue';
+// import WaterfallItem from '../../components/waterfall/WaterfallItem.vue';
+
+export default {
+	components: {
+		Sidebar,
+		Grid
+		// Waterfall,
+		// WaterfallSlot
+		// WaterfallItem
+	},
+	data() {
+		return { files: [] };
+	},
+	metaInfo() {
+		return { title: 'Uploads' };
+	},
+	mounted() {
+		this.getFiles();
+		this.$ga.page({
+			page: '/dashboard',
+			title: 'Dashboard',
+			location: window.location.href
+		});
+	},
+	methods: {
+		async getFiles() {
+			try {
+				const response = await this.axios.get(`${this.$config.baseURL}/files`);
+				this.files = response.data.files;
+				console.log(this.files);
+			} catch (error) {
+				console.error(error);
+			}
+		}
+	}
+};
+</script>
-- 
cgit v1.2.3

