feat(node-browser): add upload spinner
parent
e171624fbd
commit
e6d4e802dc
|
@ -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;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue