mirror of
https://github.com/balena-io/etcher.git
synced 2025-07-22 18:56:31 +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.writer.setProgress(0);
|
||||
this.scanner.start(2000);
|
||||
|
||||
this.scanner.scan().then(function (res) {
|
||||
if(res.length === 1){
|
||||
self.selectDrive(res[0]);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
this.restart();
|
||||
|
@ -52,6 +52,12 @@ app.controller('AppController', function($q, DriveScannerService, SelectionState
|
||||
this.selection.clear();
|
||||
this.writer.setProgress(0);
|
||||
this.scanner.start(2000);
|
||||
|
||||
this.scanner.scan().then(function (res) {
|
||||
if(res.length === 1){
|
||||
self.selectDrive(res[0]);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
this.restart();
|
||||
|
Loading…
x
Reference in New Issue
Block a user