gui: Hide the Rescan All button when no folders exist (#7367)

If there are no folders present, show only the "Add Folder" button, and
hide the "Rescan All" button. Only show the latter when at least one
folder exists.

Signed-off-by: Tomasz Wilczyński <twilczynski@naver.com>
This commit is contained in:
tomasz1986 2021-02-18 02:02:55 +09:00 committed by Jakob Borg
parent 35316e9142
commit 07d3af21c2
2 changed files with 2 additions and 2 deletions

View File

@ -570,7 +570,7 @@
<button type="button" class="btn btn-sm btn-default" ng-click="setAllFoldersPause(false)" ng-if="isAtleastOneFolderPausedStateSetTo(true)"> <button type="button" class="btn btn-sm btn-default" ng-click="setAllFoldersPause(false)" ng-if="isAtleastOneFolderPausedStateSetTo(true)">
<span class="fas fa-play"></span>&nbsp;<span translate>Resume All</span> <span class="fas fa-play"></span>&nbsp;<span translate>Resume All</span>
</button> </button>
<button type="button" class="btn btn-sm btn-default" ng-click="rescanAllFolders()" ng-disabled="!isAtleastOneFolderPausedStateSetTo(false)"> <button type="button" class="btn btn-sm btn-default" ng-click="rescanAllFolders()" ng-if="folderList().length > 0" ng-disabled="!isAtleastOneFolderPausedStateSetTo(false)">
<span class="fas fa-refresh"></span>&nbsp;<span translate>Rescan All</span> <span class="fas fa-refresh"></span>&nbsp;<span translate>Rescan All</span>
</button> </button>
<button type="button" class="btn btn-sm btn-default" ng-click="addFolder()"> <button type="button" class="btn btn-sm btn-default" ng-click="addFolder()">

View File

@ -582,7 +582,7 @@
<button type="button" class="btn btn-sm btn-default" ng-click="setAllFoldersPause(false)" ng-if="isAtleastOneFolderPausedStateSetTo(true)"> <button type="button" class="btn btn-sm btn-default" ng-click="setAllFoldersPause(false)" ng-if="isAtleastOneFolderPausedStateSetTo(true)">
<span class="fas fa-play"></span>&nbsp;<span translate>Resume All</span> <span class="fas fa-play"></span>&nbsp;<span translate>Resume All</span>
</button> </button>
<button type="button" class="btn btn-sm btn-default" ng-click="rescanAllFolders()" ng-disabled="!isAtleastOneFolderPausedStateSetTo(false)"> <button type="button" class="btn btn-sm btn-default" ng-click="rescanAllFolders()" ng-if="folderList().length > 0" ng-disabled="!isAtleastOneFolderPausedStateSetTo(false)">
<span class="fas fa-refresh"></span>&nbsp;<span translate>Rescan All</span> <span class="fas fa-refresh"></span>&nbsp;<span translate>Rescan All</span>
</button> </button>
<button type="button" class="btn btn-sm btn-default" ng-click="addFolder()"> <button type="button" class="btn btn-sm btn-default" ng-click="addFolder()">