diff --git a/lib/gui/pages/main/controllers/main.js b/lib/gui/pages/main/controllers/main.js index 95427f21..286e6afc 100644 --- a/lib/gui/pages/main/controllers/main.js +++ b/lib/gui/pages/main/controllers/main.js @@ -93,6 +93,32 @@ module.exports = function( } }); + this.getProgressButtonLabel = () => { + const flashState = this.state.getFlashState(); + + if (!this.state.isFlashing()) { + return 'Flash!'; + } + + if (flashState.percentage === 100) { + if (flashState.type === 'check' && this.settings.get('unmountOnSuccess')) { + return 'Unmounting...'; + } + + return 'Finishing...'; + } + + if (flashState.percentage === 0) { + return 'Starting...'; + } + + if (flashState.type === 'check') { + return `${flashState.percentage}% Validating...`; + } + + return `${flashState.percentage}%`; + }; + this.selectImage = (image) => { if (!SupportedFormatsModel.isSupportedImage(image.path)) { OSDialogService.showError('Invalid image', `${image.path} is not a supported image type.`); diff --git a/lib/gui/pages/main/templates/main.tpl.html b/lib/gui/pages/main/templates/main.tpl.html index 5333351c..2ba9ee20 100644 --- a/lib/gui/pages/main/templates/main.tpl.html +++ b/lib/gui/pages/main/templates/main.tpl.html @@ -90,13 +90,7 @@ ng-show="main.state.wasLastFlashSuccessful()" ng-click="main.flash(main.selection.getImagePath(), main.selection.getDrive())" ng-disabled="!main.selection.hasImage() || !main.selection.hasDrive()"> - Finishing... - Flash! - Starting... - - +