LiskArchive / lisk-ui

🖥️ Lisk user-interface submodule
https://lisk.io/
GNU General Public License v3.0
24 stars 35 forks source link

Forging indicator always off if Access Denied #93

Closed mrv777 closed 7 years ago

mrv777 commented 7 years ago

With the new endpoint, if you don't whitelist the IP you are checking the forging page from, the forging indicator always says off even if it's on for that account. I think you can edit the code here: https://github.com/LiskHQ/lisk-ui/blob/29b37ac0aa43232cde93fe5b9178533558146b5b/js/controllers/appController.js#L321

so if the response is access denied you can just apply a css rule to the class .forgin-start to hide it

mrv777 commented 7 years ago

I think you can do this: Add this:

$scope.forgingAPI = resp.data.success;

Here: https://github.com/LiskHQ/lisk-ui/blob/29b37ac0aa43232cde93fe5b9178533558146b5b/js/controllers/appController.js#L324

and change this line https://github.com/LiskHQ/lisk-ui/blob/fd51d1aa7788f0c7d374097ea4167262e69a3359/partials/template.html#L243 to:

<ul class="nav nav-underline pull-right forgin-start" ng-show="delegate.username && forgingAPI">