Various bugfixes #40

Merged
hamcha merged 3 commits from bugfix/various into master 2019-09-21 08:54:21 +00:00
Showing only changes of commit f13f11d255 - Show all commits

View file

@ -176,9 +176,11 @@ export default class SettingsView extends Vue {
current = `${(this.downloadProgress.progress / 2) | 0}`; current = `${(this.downloadProgress.progress / 2) | 0}`;
total = `${(this.downloadProgress.total / 2) | 0}`; total = `${(this.downloadProgress.total / 2) | 0}`;
} else { } else {
current = `${Math.round(this.downloadProgress.progress / 10485.76) / const currentNum =
100}`; Math.round(this.downloadProgress.progress / 10485.76) / 100;
total = `${Math.round(this.downloadProgress.total / 10485.76) / 100} MB`; current = currentNum.toString().padEnd(currentNum < 10 ? 4 : 5, "0");
const totalNum = Math.round(this.downloadProgress.total / 10485.76) / 100;
total = totalNum.toString().padEnd(totalNum < 10 ? 4 : 5, "0") + " MB";
} }
const percent = Math.round( const percent = Math.round(
(this.downloadProgress.progress / this.downloadProgress.total) * 100 (this.downloadProgress.progress / this.downloadProgress.total) * 100