🐛 Site > Fix download file
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.b110a58b2cbfb2577910.js></script><script type=text/javascript src=/static/js/app.87d39abf56f5bc182178.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.740d3494c804055a5113.js></script><script type=text/javascript src=/static/js/app.6410af1d45da75742280.js></script></body></html>
|
||||
+12
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
-12
File diff suppressed because one or more lines are too long
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:"87d39abf56f5bc182178"}[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.b110a58b2cbfb2577910.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:"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
|
||||
+1
-1
File diff suppressed because one or more lines are too long
@@ -23,6 +23,16 @@ export default
|
||||
return `${this.$store.state.url}/${this.$store.state.projects.current.slug}/files/${this.content.path.full}`
|
||||
},
|
||||
|
||||
downloadDataUri()
|
||||
{
|
||||
if(this.$store.state.files.currentVersion)
|
||||
{
|
||||
return `data:text/plain;charset=utf-8,${encodeURIComponent(this.$store.state.files.currentVersion.content)}`
|
||||
}
|
||||
|
||||
return ''
|
||||
},
|
||||
|
||||
isImage()
|
||||
{
|
||||
return ['jpg', 'jpeg', 'png', 'tiff', 'gif', 'webp'].indexOf(this.content.extension) !== -1
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<!-- Preview -->
|
||||
<div class="preview" v-if="isImage">
|
||||
<div class="inner">
|
||||
<img :src="downloadUrl">
|
||||
<!-- <img :src="downloadUrl"> -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<illustration name="sad-robot"></illustration>
|
||||
<div class="text">
|
||||
Sorry, I can't read this file.
|
||||
<br>But you can <a :href="downloadUrl" download class="download">download it</a>.
|
||||
<!-- <br>But you can <a :href="downloadUrl" download class="download">download it</a>. -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -45,10 +45,10 @@
|
||||
<tooltip position="bottom">Copy to clipboard</tooltip>
|
||||
</a>
|
||||
|
||||
<a class="download" :href="downloadUrl" download>
|
||||
<a class="download" :href="downloadDataUri" :download="content.name">
|
||||
<img class="icon default" src="../../../static/svg/download.svg" alt="">
|
||||
<img class="icon hover" src="../../../static/svg/download-hover.svg" alt="">
|
||||
<tooltip position="bottom-left">Download the latest version of the file</tooltip>
|
||||
<tooltip position="bottom-left">Download this version of the file</tooltip>
|
||||
</a>
|
||||
|
||||
</header>
|
||||
|
||||
Reference in New Issue
Block a user