diff --git a/src/components/ProjectTabDetails.vue b/src/components/ProjectTabDetails.vue
index 55b59e1..50e22a4 100644
--- a/src/components/ProjectTabDetails.vue
+++ b/src/components/ProjectTabDetails.vue
@@ -1,17 +1,70 @@
-
+
+
+
+
+
Branches
+
This project has no branches.
+
+ {{ branch.name }}
+
+
+
+
Project Groups
+
This project isn't part of any groups.
+
+ {{ group.title }}
+
+
+
+
@@ -24,4 +77,39 @@ export default {
font-weight: 300;
}
}
+
+.cards {
+ display: flex;
+ margin: 20px 0;
+}
+
+.column-lg {
+ flex: 2 0 0;
+}
+
+.column-md {
+ flex: 1 0 0;
+}
+
+.card {
+ margin: 10px;
+ padding: 30px;
+ border-radius: 5px;
+ background-color: #fff;
+ box-shadow: 0 2px 2px rgba(0, 0, 0, 0.12);
+
+ h2 {
+ margin-top: 0;
+ font-weight: 300;
+ }
+
+ .svg-inline--fa {
+ color: #777;
+ margin-right: 10px;
+ }
+
+ p:last-child {
+ margin-bottom: 0;
+ }
+}
diff --git a/src/views/ProjectDetail.vue b/src/views/ProjectDetail.vue
index 0a7aba4..6235a20 100644
--- a/src/views/ProjectDetail.vue
+++ b/src/views/ProjectDetail.vue
@@ -4,7 +4,7 @@
{{ project.name }}
@@ -41,12 +41,24 @@ export default {
}
},
created () {
- this.currentTab = this.tabs[0]
this.getProject(this.$route.params.id)
},
methods: {
async getProject (projectId) {
this.project = await project.get(projectId)
+ if (Object.keys(this.$route.query).length !== 0) {
+ this.currentTab = this.tabs[1]
+ } else {
+ this.currentTab = this.tabs[0]
+ }
+ },
+ switchToTab (tab) {
+ if (tab !== this.tabs[1]) {
+ // If we're navigating away from the Stories tab, clear
+ // the query string to keep the URL intuitive when shared.
+ this.$router.replace({ query: {} })
+ }
+ this.currentTab = tab
}
}
}