From 9a00aab618509728819dd0c292f8bcb22825137a Mon Sep 17 00:00:00 2001 From: Matteo Cominetti Date: Mon, 8 Mar 2021 12:00:09 +0000 Subject: [PATCH] feat(frontend): `/branches` page urls point to `branches/branch-name/commits` page --- packages/frontend/src/components/ListItemCommit.vue | 8 +++++--- packages/frontend/src/components/ListItemStream.vue | 2 ++ packages/frontend/src/views/Branches.vue | 4 +++- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/packages/frontend/src/components/ListItemCommit.vue b/packages/frontend/src/components/ListItemCommit.vue index 76a58b380..2bbeefbaf 100644 --- a/packages/frontend/src/components/ListItemCommit.vue +++ b/packages/frontend/src/components/ListItemCommit.vue @@ -11,8 +11,8 @@ {{ commit.message }} - - + + mdi-source-branch {{ commit.branchName }} @@ -47,7 +47,9 @@ export default { }, branchUrl() { if (!this.commit) return null - return `${window.location.origin}/streams/${this.$route.params.streamId}/branches/${this.commit.branchName}` + return `${window.location.origin}/streams/${ + this.$route.params.streamId + }/branches/${encodeURIComponent(this.commit.branchName)}` } }, methods: { diff --git a/packages/frontend/src/components/ListItemStream.vue b/packages/frontend/src/components/ListItemStream.vue index ff6d5ac19..aee456d9c 100644 --- a/packages/frontend/src/components/ListItemStream.vue +++ b/packages/frontend/src/components/ListItemStream.vue @@ -29,6 +29,7 @@ text class="px-0 ml-3" small + :to="'/streams/' + stream.id + '/branches'" > mdi-source-branch {{ stream.branches.totalCount }} @@ -43,6 +44,7 @@ text class="px-0" small + :to="'/streams/' + stream.id + '/branches/main/commits'" > mdi-source-commit {{ stream.commits.totalCount }} diff --git a/packages/frontend/src/views/Branches.vue b/packages/frontend/src/views/Branches.vue index dac71592f..973aedd11 100644 --- a/packages/frontend/src/views/Branches.vue +++ b/packages/frontend/src/views/Branches.vue @@ -52,7 +52,9 @@