Skip to content

Commit

Permalink
re-enabled possibility to pause and resume hashing
Browse files Browse the repository at this point in the history
  • Loading branch information
kraiz committed Feb 20, 2015
1 parent 075fe39 commit 7abfd9d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 9 deletions.
4 changes: 4 additions & 0 deletions app/js/controllers/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,8 @@ EiskaltApp.controller('MainCtrl', function ($scope, $location, $interval, settin
$scope.refreshShare = function () {
EiskaltRPC.RefreshShare().success(refreshData);
}

$scope.toggleHashing = function () {
EiskaltRPC.PauseHash().success(refreshData);
}
});
19 changes: 10 additions & 9 deletions app/partials/navbar.html
Original file line number Diff line number Diff line change
Expand Up @@ -54,18 +54,19 @@
<span class="glyphicon glyphicon-hdd"></span>
Hash:
</span>
<span class="label"
ng-hide="hashing.status == 'idle'"
ng-class="{'label-info': hashing.status == 'hashing', 'label-warning': hashing.status == 'pause'}">
<button type="button" class="btn btn-xs btn-info" title="Click to pause"
ng-show="hashing.status == 'hashing'" ng-click="toggleHashing()">
{{ hashing.status }}
</span>
<button type="button" title="Click to refresh share"
class="btn btn-success btn-xs"
ng-click="refreshShare()"
ng-show="hashing.status == 'idle'">
</button>
<button type="button" class="btn btn-xs btn-warning" title="Click to resume"
ng-show="hashing.status == 'pause'" ng-click="toggleHashing()">
{{ hashing.status }}
</button>
<button type="button" class="btn btn-xs btn-success" title="Click to refresh share"
ng-show="hashing.status == 'idle'" ng-click="refreshShare()">
{{ hashing.status }}
</button>
<span ng-hide="hashing.status == 'idle'">
<span ng-show="hashing.status == 'hashing' || hashing.status == 'pause'">
{{ hashing.bytesleft | numeraljs:'0.0 b' }} left
</span>
</div>
Expand Down

0 comments on commit 7abfd9d

Please sign in to comment.