diff --git a/www/file/file.css b/www/file/file.css
index 0207620a9..ad4ab8afa 100644
--- a/www/file/file.css
+++ b/www/file/file.css
@@ -63,6 +63,19 @@ media-tag img {
height: 50vh;
box-sizing: border-box;
}
+#download-form label {
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ white-space: normal;
+ word-wrap: break-word;
+}
+#download-form label span {
+ width: 50vh;
+ max-width: 80vw;
+ text-align: center;
+ line-height: 1.5em;
+}
.hovering {
background-color: rgba(255, 0, 115, 0.5) !important;
}
@@ -92,5 +105,4 @@ body #uploadStatusContainer {
background-color: rgba(255, 255, 255, 0.9);
color: black;
opacity: 0.9;
- display: block !important;
}
diff --git a/www/file/file.less b/www/file/file.less
index a5fc8d65c..ed1c43076 100644
--- a/www/file/file.less
+++ b/www/file/file.less
@@ -70,6 +70,21 @@ media-tag {
box-sizing: border-box;
}
}
+#download-form {
+ label {
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ white-space: normal;
+ word-wrap: break-word;
+ span {
+ width: 50vh;
+ max-width: 80vw;
+ text-align: center;
+ line-height: 1.5em;
+ }
+ }
+}
.hovering {
background-color: rgba(255, 0, 115, 0.5) !important;
}
@@ -111,5 +126,4 @@ body #uploadStatusContainer {
background-color: rgba(255, 255, 255, 0.9);
color: black;
opacity: 0.9;
- display: block !important;
}
diff --git a/www/file/inner.html b/www/file/inner.html
index 4ad590bd8..cc2ec2753 100644
--- a/www/file/inner.html
+++ b/www/file/inner.html
@@ -18,8 +18,7 @@
-
+
diff --git a/www/file/main.js b/www/file/main.js
index 2163b51fa..baaf2baab 100644
--- a/www/file/main.js
+++ b/www/file/main.js
@@ -26,6 +26,7 @@ define([
var $dlform = $iframe.find('#download-form');
var $dlview = $iframe.find('#download-view');
var $label = $form.find('label');
+ var $dllabel = $dlform.find('label span');
var $progress = $iframe.find('#progress');
var $body = $iframe.find('body');
@@ -60,13 +61,6 @@ define([
return data ? data.title : undefined;
};
- var exportFile = function () {
- var filename = Cryptpad.fixFileName(document.title);
- if (!(typeof(filename) === 'string' && filename)) { return; }
- var blob = new Blob([myFile], {type: myDataType});
- saveAs(blob, filename);
- };
-
Title = Cryptpad.createTitle({}, function(){}, Cryptpad);
var displayed = ['title', 'useradmin', 'newpad', 'limit', 'upgrade'];
@@ -88,11 +82,6 @@ define([
if (uploadMode) { toolbar.title.hide(); }
- var $rightside = toolbar.$rightside;
-
- var $export = Cryptpad.createButton('export', true, {}, exportFile);
- $rightside.append($export);
-
Title.updateTitle(Cryptpad.initialName || getTitle() || Title.defaultTitle);
if (!uploadMode) {
@@ -123,7 +112,6 @@ define([
$appContainer.css('background', 'white');
}
$dlButton.addClass('btn btn-success');
- Cryptpad.removeLoadingScreen();
})
.on('decryptionError', function (e) {
var error = e.originalEvent;
@@ -167,6 +155,10 @@ define([
var todoBigFile = function (sizeMb) {
$dlform.show();
Cryptpad.removeLoadingScreen();
+ $dllabel.append($('
'));
+ $dllabel.append(metadata.name);
+ $dllabel.append($('
'));
+ $dllabel.append(Messages._getKey('formattedMB', [sizeMb]));
var decrypting = false;
var onClick = function (ev) {
if (decrypting) { return; }
@@ -175,7 +167,6 @@ define([
displayFile(ev);
};
if (sizeMb < 5) { return void onClick(); }
- Cryptpad.removeLoadingScreen();
$dlform.find('#dl, #progress').click(onClick);
};
Cryptpad.getFileSize(window.location.href, function (e, data) {