mirror of
https://github.com/balena-io/etcher.git
synced 2025-07-23 03:06:38 +00:00
Autoselect the drive if only one drive is present
This commit is contained in:
parent
79ebe75472
commit
b7da4dfeda
@ -53,6 +53,12 @@ app.controller('AppController', function($q, DriveScannerService, SelectionState
|
|||||||
this.selection.clear();
|
this.selection.clear();
|
||||||
this.writer.setProgress(0);
|
this.writer.setProgress(0);
|
||||||
this.scanner.start(2000);
|
this.scanner.start(2000);
|
||||||
|
|
||||||
|
this.scanner.scan().then(function (res) {
|
||||||
|
if(res.length === 1){
|
||||||
|
self.selectDrive(res[0]);
|
||||||
|
}
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
this.restart();
|
this.restart();
|
||||||
|
@ -52,6 +52,12 @@ app.controller('AppController', function($q, DriveScannerService, SelectionState
|
|||||||
this.selection.clear();
|
this.selection.clear();
|
||||||
this.writer.setProgress(0);
|
this.writer.setProgress(0);
|
||||||
this.scanner.start(2000);
|
this.scanner.start(2000);
|
||||||
|
|
||||||
|
this.scanner.scan().then(function (res) {
|
||||||
|
if(res.length === 1){
|
||||||
|
self.selectDrive(res[0]);
|
||||||
|
}
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
this.restart();
|
this.restart();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user