feat(frontend): /branches page urls point to branches/branch-name/commits page

This commit is contained in:
Matteo Cominetti
2021-03-08 12:00:09 +00:00
parent 650d977222
commit 9a00aab618
3 changed files with 10 additions and 4 deletions
@@ -11,8 +11,8 @@
<v-list-item-content>
<v-list-item-title class="my-2 py-1">
{{ commit.message }}
<span class="caption" v-if="commit.branchName">
<v-chip small style="top:-3px">
<span v-if="commit.branchName" class="caption">
<v-chip small style="top: -3px">
<v-icon small class="mr-2">mdi-source-branch</v-icon>
{{ commit.branchName }}
</v-chip>
@@ -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: {
@@ -29,6 +29,7 @@
text
class="px-0 ml-3"
small
:to="'/streams/' + stream.id + '/branches'"
>
<v-icon small class="mr-2 float-left">mdi-source-branch</v-icon>
{{ stream.branches.totalCount }}
@@ -43,6 +44,7 @@
text
class="px-0"
small
:to="'/streams/' + stream.id + '/branches/main/commits'"
>
<v-icon small class="mr-2 float-left">mdi-source-commit</v-icon>
{{ stream.commits.totalCount }}
+3 -1
View File
@@ -52,7 +52,9 @@
<template v-for="item in branches.items">
<v-list-item
:key="item.id"
:to="`/streams/${$route.params.streamId}/branches/${encodeURIComponent(item.name)}`"
:to="`/streams/${$route.params.streamId}/branches/${encodeURIComponent(
item.name
)}/commits`"
>
<v-list-item-content>
<v-list-item-title>