🐛 Fix corrupt zip and remove project download on server
This commit is contained in:
Vendored
+1
-1
@@ -1 +1 @@
|
||||
<!DOCTYPE html><html><head><meta charset=utf-8><title>Keppler</title><meta name=viewport content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no"><link class=favicon rel=icon type=image/png href=""><link href=/static/css/app.d379c533b0023617002453dec20e90b9.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=/static/js/manifest.740d3494c804055a5113.js></script><script type=text/javascript src=/static/js/app.6410af1d45da75742280.js></script></body></html>
|
||||
<!DOCTYPE html><html><head><meta charset=utf-8><title>Keppler</title><meta name=viewport content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no"><link class=favicon rel=icon type=image/png href=""><link href=/static/css/app.d379c533b0023617002453dec20e90b9.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=/static/js/manifest.dccd405c2f8ce5d06dc2.js></script><script type=text/javascript src=/static/js/app.03226a35957b0c5066f6.js></script></body></html>
|
||||
+12
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
-12
File diff suppressed because one or more lines are too long
+2
-2
@@ -1,2 +1,2 @@
|
||||
!function(e){function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}var r=window.webpackJsonp;window.webpackJsonp=function(t,c,i){for(var u,a,f,s=0,l=[];s<t.length;s++)a=t[s],o[a]&&l.push(o[a][0]),o[a]=0;for(u in c)Object.prototype.hasOwnProperty.call(c,u)&&(e[u]=c[u]);for(r&&r(t,c,i);l.length;)l.shift()();if(i)for(s=0;s<i.length;s++)f=n(n.s=i[s]);return f};var t={},o={1:0};n.e=function(e){function r(){u.onerror=u.onload=null,clearTimeout(a);var n=o[e];0!==n&&(n&&n[1](new Error("Loading chunk "+e+" failed.")),o[e]=void 0)}var t=o[e];if(0===t)return new Promise(function(e){e()});if(t)return t[2];var c=new Promise(function(n,r){t=o[e]=[n,r]});t[2]=c;var i=document.getElementsByTagName("head")[0],u=document.createElement("script");u.type="text/javascript",u.charset="utf-8",u.async=!0,u.timeout=12e4,n.nc&&u.setAttribute("nonce",n.nc),u.src=n.p+"static/js/"+e+"."+{0:"6410af1d45da75742280"}[e]+".js";var a=setTimeout(r,12e4);return u.onerror=u.onload=r,i.appendChild(u),c},n.m=e,n.c=t,n.i=function(e){return e},n.d=function(e,r,t){n.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:t})},n.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(r,"a",r),r},n.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},n.p="/",n.oe=function(e){throw console.error(e),e}}([]);
|
||||
//# sourceMappingURL=manifest.740d3494c804055a5113.js.map
|
||||
!function(e){function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}var r=window.webpackJsonp;window.webpackJsonp=function(t,c,i){for(var u,a,f,s=0,l=[];s<t.length;s++)a=t[s],o[a]&&l.push(o[a][0]),o[a]=0;for(u in c)Object.prototype.hasOwnProperty.call(c,u)&&(e[u]=c[u]);for(r&&r(t,c,i);l.length;)l.shift()();if(i)for(s=0;s<i.length;s++)f=n(n.s=i[s]);return f};var t={},o={1:0};n.e=function(e){function r(){u.onerror=u.onload=null,clearTimeout(a);var n=o[e];0!==n&&(n&&n[1](new Error("Loading chunk "+e+" failed.")),o[e]=void 0)}var t=o[e];if(0===t)return new Promise(function(e){e()});if(t)return t[2];var c=new Promise(function(n,r){t=o[e]=[n,r]});t[2]=c;var i=document.getElementsByTagName("head")[0],u=document.createElement("script");u.type="text/javascript",u.charset="utf-8",u.async=!0,u.timeout=12e4,n.nc&&u.setAttribute("nonce",n.nc),u.src=n.p+"static/js/"+e+"."+{0:"03226a35957b0c5066f6"}[e]+".js";var a=setTimeout(r,12e4);return u.onerror=u.onload=r,i.appendChild(u),c},n.m=e,n.c=t,n.i=function(e){return e},n.d=function(e,r,t){n.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:t})},n.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(r,"a",r),r},n.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},n.p="/",n.oe=function(e){throw console.error(e),e}}([]);
|
||||
//# sourceMappingURL=manifest.dccd405c2f8ce5d06dc2.js.map
|
||||
+1
-1
File diff suppressed because one or more lines are too long
@@ -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