🎨 Site > Improve URL

This commit is contained in:
brunosimon
2017-08-30 23:06:14 +02:00
parent 9d450fc0a1
commit 823f8fd2d8
9 changed files with 25 additions and 99 deletions
+1
View File
@@ -47,6 +47,7 @@ export default
this.projectsSocket.on('update_projects', (data) =>
{
this.$store.commit('updateUrl', data.domain)
this.$store.commit('updateProjects', data.all)
})
},
+2 -2
View File
@@ -13,9 +13,9 @@ export default
computed:
{
project()
downloadUrl()
{
return this.$store.state.projects.current
return `${this.$store.state.url}/${this.$store.state.projects.current.slug}/files/${this.content.path.full}`
}
},
+1 -1
View File
@@ -2,7 +2,7 @@
<header>
<a href="#" @click.prevent="onDifferencesClick">Differences <span v-if="differencesActive">(on)</span></a>
<a href="#" @click.prevent="onVersionsClick">Versions <span v-if="versionsActive">(on)</span></a>
<a :href="`${project.slug}/files/${content.path.full}`" download>Download</a>
<a :href="downloadUrl" download>Download</a>
{{ content.path.directory }} {{ content.name }}
</header>
<versions :file="content" :content="content.versions" v-if="versionsActive"></versions>
+5
View File
@@ -19,6 +19,11 @@ export default
computed:
{
downloadUrl()
{
return `${this.$store.state.url}/${this.project.slug}/download`
},
project()
{
return this.$store.state.projects.current
+1 -1
View File
@@ -1,6 +1,6 @@
<div>
{{ project.name }}
<a :href="`${project.slug}/download`" download>Download</a>
<a :href="downloadUrl" download>Download</a>
<files-tree></files-tree>
<file v-if="file" :content="file"></file>