🐛 Fix corrupt zip and remove project download on server
This commit is contained in:
@@ -19,6 +19,11 @@ export default
|
||||
|
||||
computed:
|
||||
{
|
||||
serverConfig()
|
||||
{
|
||||
return this.$store.state.serverConfig
|
||||
},
|
||||
|
||||
project()
|
||||
{
|
||||
return this.$store.state.projects.current
|
||||
|
||||
@@ -5,21 +5,25 @@
|
||||
<!-- Favicon -->
|
||||
<favicon></favicon>
|
||||
|
||||
<!-- Header -->
|
||||
<a class="application-header" href="#" @click.prevent="onHeaderClick">
|
||||
<img class="element background" src="../../../static/svg/header-background.svg" alt="">
|
||||
<span class="element robot-container">
|
||||
<img class="element robot" src="../../../static/svg/header-robot.svg" alt="">
|
||||
</span>
|
||||
<img class="element title" src="../../../static/svg/keppler-title.svg" alt="">
|
||||
</a>
|
||||
<div v-if="serverConfig">
|
||||
|
||||
<!-- Popin -->
|
||||
<popin></popin>
|
||||
<!-- Header -->
|
||||
<a class="application-header" href="#" @click.prevent="onHeaderClick">
|
||||
<img class="element background" src="../../../static/svg/header-background.svg" alt="">
|
||||
<span class="element robot-container">
|
||||
<img class="element robot" src="../../../static/svg/header-robot.svg" alt="">
|
||||
</span>
|
||||
<img class="element title" src="../../../static/svg/keppler-title.svg" alt="">
|
||||
</a>
|
||||
|
||||
<!-- Projects -->
|
||||
<projects-hub></projects-hub>
|
||||
<!-- Popin -->
|
||||
<popin></popin>
|
||||
|
||||
<!-- Project -->
|
||||
<project v-if="project"></project>
|
||||
<!-- Projects -->
|
||||
<projects-hub></projects-hub>
|
||||
|
||||
<!-- Project -->
|
||||
<project v-if="project"></project>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -40,14 +40,18 @@ export default
|
||||
const projectsUrl = `${process.env.NODE_ENV === 'production' ? '' : 'http://localhost:1571'}/projects`
|
||||
this.projectsSocket = socketIoClient(projectsUrl)
|
||||
|
||||
this.projectsSocket.on('connect', () =>
|
||||
this.projectsSocket.on('connect', (data) =>
|
||||
{
|
||||
// console.log('projects connected')
|
||||
})
|
||||
|
||||
this.projectsSocket.on('config', (data) =>
|
||||
{
|
||||
this.$store.commit('updateServerConfig', data)
|
||||
})
|
||||
|
||||
this.projectsSocket.on('update_projects', (data) =>
|
||||
{
|
||||
this.$store.commit('updateUrl', data.domain)
|
||||
this.$store.commit('updateProjects', data.all)
|
||||
})
|
||||
},
|
||||
|
||||
@@ -20,7 +20,7 @@ export default
|
||||
{
|
||||
downloadUrl()
|
||||
{
|
||||
return `${this.$store.state.url}/${this.$store.state.projects.current.slug}/files/${this.content.path.full}`
|
||||
return `${this.$store.state.serverConfig.domain}/${this.$store.state.projects.current.slug}/files/${this.content.path.full}`
|
||||
},
|
||||
|
||||
downloadDataUri()
|
||||
|
||||
@@ -30,7 +30,7 @@ export default
|
||||
quote: () => quotes[Math.floor(quotes.length * Math.random())],
|
||||
url()
|
||||
{
|
||||
return this.$store.state.url
|
||||
return this.$store.state.serverConfig.domain
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ export default
|
||||
{
|
||||
downloadUrl()
|
||||
{
|
||||
return `${this.$store.state.url}/${this.project.slug}/download`
|
||||
return `${this.$store.state.serverConfig.domain}/${this.project.slug}/download`
|
||||
},
|
||||
|
||||
project()
|
||||
|
||||
@@ -11,6 +11,11 @@ export default
|
||||
|
||||
computed:
|
||||
{
|
||||
serverConfig()
|
||||
{
|
||||
return this.$store.state.serverConfig
|
||||
},
|
||||
|
||||
projects()
|
||||
{
|
||||
return this.$store.state.projects.all
|
||||
@@ -34,7 +39,7 @@ export default
|
||||
return ''
|
||||
}
|
||||
|
||||
return `${this.$store.state.url}/${this.currentProject.slug}/download`
|
||||
return `${this.$store.state.serverConfig.domain}/${this.currentProject.slug}/download`
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a class="download" :href="downloadUrl" download>
|
||||
<a v-if="!serverConfig.server" class="download" :href="downloadUrl" download="test.zip">
|
||||
<img class="icon default" src="../../../static/svg/download.svg" alt="">
|
||||
<img class="icon hover" src="../../../static/svg/download-hover.svg" alt="">
|
||||
<tooltip position="right">Download the whole project</tooltip>
|
||||
|
||||
@@ -17,15 +17,15 @@ export default new Vuex.Store({
|
||||
|
||||
state:
|
||||
{
|
||||
url: '',
|
||||
serverConfig: null,
|
||||
scrollbarWidth: 0
|
||||
},
|
||||
|
||||
mutations:
|
||||
{
|
||||
updateUrl(state, data)
|
||||
updateServerConfig(state, data)
|
||||
{
|
||||
state.url = data
|
||||
state.serverConfig = data
|
||||
},
|
||||
|
||||
updateScrollbarWidth(state, data)
|
||||
|
||||
Reference in New Issue
Block a user