aboutsummaryrefslogtreecommitdiff
path: root/src/views/Repository.vue
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2021-05-23 21:53:08 +0200
committerHampusM <hampus@hampusmat.com>2021-05-23 21:53:08 +0200
commitb183160763955596dbdf179524b75fc10ab2a03c (patch)
tree870a0c6fb1a61af8fc08a4c0be435f98ccfa1ed8 /src/views/Repository.vue
parent7e828a5eb04afe476e596cf88000e53c2f93f45e (diff)
Frontend used Vue.js & Added ESLint
Diffstat (limited to 'src/views/Repository.vue')
-rw-r--r--src/views/Repository.vue29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/views/Repository.vue b/src/views/Repository.vue
new file mode 100644
index 0000000..8863529
--- /dev/null
+++ b/src/views/Repository.vue
@@ -0,0 +1,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> \ No newline at end of file