mirror of
https://github.com/balena-io/etcher.git
synced 2025-07-23 03:06:38 +00:00
Allow to re-select the first two step selections
You can click on the selected image/drive label to select them again. The re-selection is disabled if there is a burning in process. Fixes: https://github.com/resin-io/resin-etcher/issues/90
This commit is contained in:
parent
b3dde83083
commit
8026cef1df
@ -93,6 +93,29 @@ app.controller('AppController', function($q, DriveScannerService, SelectionState
|
||||
console.debug('Drive selected: ' + drive.device);
|
||||
};
|
||||
|
||||
this.reselectImage = function() {
|
||||
if (self.writer.isBurning()) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Reselecting an image automatically
|
||||
// de-selects the current drive, if any.
|
||||
// This is made so the user effectively
|
||||
// "returns" to the first step.
|
||||
self.selection.clear();
|
||||
|
||||
console.debug('Reselecting image');
|
||||
};
|
||||
|
||||
this.reselectDrive = function() {
|
||||
if (self.writer.isBurning()) {
|
||||
return;
|
||||
}
|
||||
|
||||
self.selection.removeDrive();
|
||||
console.debug('Reselecting drive');
|
||||
};
|
||||
|
||||
this.burn = function(image, drive) {
|
||||
|
||||
// Stop scanning drives when burning
|
||||
|
@ -92,6 +92,29 @@ app.controller('AppController', function($q, DriveScannerService, SelectionState
|
||||
console.debug('Drive selected: ' + drive.device);
|
||||
};
|
||||
|
||||
this.reselectImage = function() {
|
||||
if (self.writer.isBurning()) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Reselecting an image automatically
|
||||
// de-selects the current drive, if any.
|
||||
// This is made so the user effectively
|
||||
// "returns" to the first step.
|
||||
self.selection.clear();
|
||||
|
||||
console.debug('Reselecting image');
|
||||
};
|
||||
|
||||
this.reselectDrive = function() {
|
||||
if (self.writer.isBurning()) {
|
||||
return;
|
||||
}
|
||||
|
||||
self.selection.removeDrive();
|
||||
console.debug('Reselecting drive');
|
||||
};
|
||||
|
||||
this.burn = function(image, drive) {
|
||||
|
||||
// Stop scanning drives when burning
|
||||
|
@ -30,7 +30,7 @@
|
||||
<hero-button ng-click="app.selectImage()">Select image</hero-button>
|
||||
</div>
|
||||
<div ng-show="app.selection.hasImage()">
|
||||
<span ng-bind="app.selection.getImage() | basename"></span>
|
||||
<span ng-bind="app.selection.getImage() | basename" ng-click="app.reselectImage()"></span>
|
||||
</div>
|
||||
|
||||
<p class="step-footer tiny">*supported files: .img, .iso</p>
|
||||
@ -67,7 +67,7 @@
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div ng-show="app.selection.hasDrive()" ng-bind="app.selection.getDrive().name"></div>
|
||||
<div ng-show="app.selection.hasDrive()" ng-bind="app.selection.getDrive().name" ng-click="app.reselectDrive()"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
Loading…
x
Reference in New Issue
Block a user