Наладил сжатие файлов книг в /tmp
This commit is contained in:
@@ -57,8 +57,9 @@ class Reader {
|
||||
async loadCachedBook(url, callback){
|
||||
const options = {
|
||||
onDownloadProgress: progress => {
|
||||
const total = (progress.total ? progress.total : progress.loaded + 200000);
|
||||
if (callback)
|
||||
callback({state: 'loading', progress: Math.round((progress.loaded*100)/progress.total)});
|
||||
callback({state: 'loading', progress: Math.round((progress.loaded*100)/total)});
|
||||
}
|
||||
}
|
||||
//загрузка
|
||||
|
||||
@@ -53,6 +53,7 @@ class ProgressPage extends Vue {
|
||||
this.step = (state.step ? state.step : this.step);
|
||||
this.totalSteps = (state.totalSteps > this.totalSteps ? state.totalSteps : this.totalSteps);
|
||||
this.progress = state.progress || 0;
|
||||
console.log(state);
|
||||
}
|
||||
|
||||
get percentage() {
|
||||
|
||||
Reference in New Issue
Block a user