feat(node-browser): add upload spinner

pull/2337/head
Chaim Lev-Ari 2018-10-07 11:37:27 +03:00
parent e171624fbd
commit e6d4e802dc
2 changed files with 5 additions and 4 deletions

View File

@ -13,10 +13,10 @@ angular.module('portainer.agent').controller('FileUploaderController', [
if (!file) {
return;
}
ctrl.state.uploadInProgress = true;
$q.when(ctrl.uploadFile(file)).finally(function toggleProgress() {
ctrl.state.uploadInProgress = false;
ctrl.state.uploadInProgress = false;
});
}
}

View File

@ -1,5 +1,6 @@
<button
ngf-select="$ctrl.onFileSelected($file)"
class="btn ng-scope">
<i class="fa fa-upload"></i>
class="btn ng-scope"
button-spinner="$ctrl.state.uploadInProgress">
<i style="margin:0" class="fa fa-upload" ng-if="!$ctrl.state.uploadInProgress"></i>
</button>