Skip to content
Snippets Groups Projects
Commit 16b44b08 authored by Cédric Moreau's avatar Cédric Moreau
Browse files

[enh] sync: hide sandbox watcher with `--nosbx` option

parent e324c04b
No related branches found
No related tags found
No related merge requests found
......@@ -82,13 +82,15 @@ export class MultimeterWatcher implements Watcher {
this.multi.write('Progress:\n\n');
this.downloadBar = this.createBar('Download', 3)
this.savedBar = this.createBar('Storage', 4)
this.appliedBar = this.createBar('Apply', 5)
this.sbxBar = this.createBar('Sandbox', 6)
let line = 3
this.downloadBar = this.createBar('Download', line++)
this.savedBar = this.createBar('Storage', line++)
this.appliedBar = this.createBar('Apply', line++)
if (!cliprogram.nosbx) {
this.sbxBar = this.createBar('Sandbox', line++)
}
if (!cliprogram.nopeers) {
this.peersBar = this.createBar('Peers', 7)
this.peersBar = this.createBar('Peers', line++)
}
this.multi.write('\nStatus: ');
......@@ -103,7 +105,9 @@ export class MultimeterWatcher implements Watcher {
this.downloadBar.percent(0);
this.savedBar.percent(0);
this.appliedBar.percent(0);
if (!cliprogram.nosbx) {
this.sbxBar.percent(0);
}
if (!cliprogram.nopeers) {
this.peersBar.percent(0);
}
......@@ -131,8 +135,11 @@ export class MultimeterWatcher implements Watcher {
}
sbxPercent(pct:number) {
if (!cliprogram.nosbx) {
return this.sbxBar.percent(pct)
}
return 0
}
peersPercent(pct:number) {
if (!cliprogram.nopeers) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment