Merge branch 'development'
This commit is contained in:
commit
ea74e1d7a4
|
@ -1,6 +1,8 @@
|
||||||
Revision history for Lufi
|
Revision history for Lufi
|
||||||
|
|
||||||
?.??.? ????-??-??
|
?.??.? ????-??-??
|
||||||
|
- Update german language
|
||||||
|
- Smoother progress of progress bar (use smaller chunks)
|
||||||
|
|
||||||
0.04.4 2019-10-11
|
0.04.4 2019-10-11
|
||||||
- Fix invitations sorting order (#163)
|
- Fix invitations sorting order (#163)
|
||||||
|
|
|
@ -933,7 +933,7 @@ msgstr ""
|
||||||
|
|
||||||
#: themes/default/templates/partial/render.js.ep:12
|
#: themes/default/templates/partial/render.js.ep:12
|
||||||
msgid "Zip content:"
|
msgid "Zip content:"
|
||||||
msgstr ""
|
msgstr "Zip-Inhalt:"
|
||||||
|
|
||||||
#. (format_bytes($keys[$i])
|
#. (format_bytes($keys[$i])
|
||||||
#: themes/default/templates/delays.html.ep:20
|
#: themes/default/templates/delays.html.ep:20
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -81,9 +81,12 @@ function spawnWebsocket(pa) {
|
||||||
} else {
|
} else {
|
||||||
console.log('Getting slice '+(data.part + 1)+' of '+data.total);
|
console.log('Getting slice '+(data.part + 1)+' of '+data.total);
|
||||||
var slice = JSON.parse(res.shift());
|
var slice = JSON.parse(res.shift());
|
||||||
var percent = Math.round(100 * (data.part + 1)/data.total);
|
var percent = Math.round(1000 * (data.part + 1)/data.total)/10;
|
||||||
|
var wClass = percent.toString().replace('.', '-');
|
||||||
var pb = $('#pb');
|
var pb = $('#pb');
|
||||||
pb.css('width', percent+'%');
|
pb.removeClass();
|
||||||
|
pb.addClass('determinate');
|
||||||
|
pb.addClass('width-'+wClass);
|
||||||
pb.attr('aria-valuenow', percent);
|
pb.attr('aria-valuenow', percent);
|
||||||
$('#pbt').html(percent+'%');
|
$('#pbt').html(percent+'%');
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -6,8 +6,8 @@ window.fc = 0;
|
||||||
window.cancelled = [];
|
window.cancelled = [];
|
||||||
// Set websocket
|
// Set websocket
|
||||||
window.ws = spawnWebsocket(0, function() {return null;});
|
window.ws = spawnWebsocket(0, function() {return null;});
|
||||||
// Use slice of 2MB
|
// Use slice of 0.75MB
|
||||||
window.sliceLength = 2000000;
|
window.sliceLength = 750000;
|
||||||
// Global zip objects for currently created zip file
|
// Global zip objects for currently created zip file
|
||||||
window.zip = null;
|
window.zip = null;
|
||||||
window.zipSize = 0;
|
window.zipSize = 0;
|
||||||
|
@ -363,7 +363,6 @@ function sliceAndUpload(randomkey, i, parts, j, delay, del_at_first_view, short,
|
||||||
var b = window.btoa(bin);
|
var b = window.btoa(bin);
|
||||||
|
|
||||||
// Encrypt it
|
// Encrypt it
|
||||||
sl.html(i18n.encrypting.replace(/XX1(.*)XX2/, (j+1)+'$1'+parts));
|
|
||||||
var encrypted = sjcl.encrypt(randomkey, b);
|
var encrypted = sjcl.encrypt(randomkey, b);
|
||||||
|
|
||||||
// Prepare json
|
// Prepare json
|
||||||
|
@ -390,9 +389,10 @@ function sliceAndUpload(randomkey, i, parts, j, delay, del_at_first_view, short,
|
||||||
}
|
}
|
||||||
data = JSON.stringify(data)+'XXMOJOXX'+JSON.stringify(encrypted);;
|
data = JSON.stringify(data)+'XXMOJOXX'+JSON.stringify(encrypted);;
|
||||||
|
|
||||||
console.log('sending slice '+(j + 1)+'/'+parts+' of file '+file.name);
|
var percent = Math.round(1000 * j/parts)/10;
|
||||||
|
console.log('sending slice '+(j + 1)+'/'+parts+' of file '+file.name+' ('+percent+'%)');
|
||||||
|
|
||||||
sl.html(i18n.sending.replace(/XX1(.*)XX2/, (j+1)+'$1'+parts));
|
sl.html(percent.toFixed(1)+'%');
|
||||||
|
|
||||||
// Verify that we have a websocket and send json
|
// Verify that we have a websocket and send json
|
||||||
if (window.ws.readyState === 3) {
|
if (window.ws.readyState === 3) {
|
||||||
|
@ -568,10 +568,11 @@ function updateProgressBar(data) {
|
||||||
} else {
|
} else {
|
||||||
j++;
|
j++;
|
||||||
// Update progress bar
|
// Update progress bar
|
||||||
var percent = Math.round(100 * j/parts);
|
var percent = Math.round(1000 * j/parts)/10;
|
||||||
|
var wClass = percent.toString().replace('.', '-');
|
||||||
dp.removeClass();
|
dp.removeClass();
|
||||||
dp.addClass('determinate');
|
dp.addClass('determinate');
|
||||||
dp.addClass('width-'+percent);
|
dp.addClass('width-'+wClass);
|
||||||
dp.attr('aria-valuenow', percent);
|
dp.attr('aria-valuenow', percent);
|
||||||
|
|
||||||
// Encrypt and upload next slice
|
// Encrypt and upload next slice
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
<p id="please-wait"><%= l('Please wait while we are getting your file. We first need to download and decrypt all parts before you can get it.') %></p>
|
<p id="please-wait"><%= l('Please wait while we are getting your file. We first need to download and decrypt all parts before you can get it.') %></p>
|
||||||
<p id="loading"></p>
|
<p id="loading"></p>
|
||||||
<div class="progress" id="pbd">
|
<div class="progress" id="pbd">
|
||||||
<div id="pb" class="determinate" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100">
|
<div id="pb" class="determinate width-0" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100">
|
||||||
<span id="pbt" class="sr-only">0%</span>
|
<span id="pbt" class="sr-only">0%</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue