Merge pull request #38 from resin-io/jviotti/23/fix/windows-drive-overflow

win32: Show drive letter instead of device in dropdown
This commit is contained in:
Juan Cruz Viotti 2015-11-19 16:03:20 -04:00
commit ee457805e6
3 changed files with 11 additions and 1 deletions

View File

@ -68,6 +68,8 @@ app.controller('AppController', function($q, DriveScannerService, SelectionState
console.debug('Drive selected: ' + drive);
};
this.platform = window.process.platform;
this.burn = function(image, drive) {
// Stop scanning drives when burning

View File

@ -67,6 +67,8 @@ app.controller('AppController', function($q, DriveScannerService, SelectionState
console.debug('Drive selected: ' + drive);
};
this.platform = window.process.platform;
this.burn = function(image, drive) {
// Stop scanning drives when burning

View File

@ -54,7 +54,13 @@
<ul class="dropdown-menu">
<li ng-repeat="drive in app.scanner.drives">
<a href="#" ng-click="app.selectDrive(drive.device)">{{ drive.device }} - {{ drive.size }}</a>
<a href="#" ng-click="app.selectDrive(drive.device)">
<!-- Show drive letter instead of phsycal drive name on Windows -->
<span ng-if="app.platform == 'win32'">Drive {{ drive.mountpoint }}\ - {{ drive.size }}</span>
<span ng-if="app.platform != 'win32'">{{ drive.device }} - {{ drive.size }}</span>
</a>
</li>
</ul>
</div>