aboutsummaryrefslogtreecommitdiff
path: root/src/views/Repository.vue
blob: 88635296c387290ffffee11c4abf1aa44fa86d69 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<template>
	<RepositoryHeader :repository="repository" />
	<router-view :repository="repository" />
</template>

<script>
import RepositoryHeader from "../components/RepositoryHeader";

export default {
	name: "Repository",
	components: {
		RepositoryHeader
	},
	props: {
		repository: {
			type: String,
			required: true
		}
	},
	created()
	{
		if(/^\/[a-zA-Z0-9.\-_]+[/]?$/.test(window.location.pathname)) {
			this.$router.push({ path: `${window.location.pathname}${( window.location.pathname.endsWith("/") ) ? "log" : "/log"}`, replace: true});
		}

		console.log(this.repository);
	}
}
</script>