gui: Add new folder state "Failed Items" (fixes #5456) (#5614)

This commit is contained in:
Simon Frei 2019-03-22 18:57:53 +01:00 committed by Audrius Butkevicius
parent e7ae851900
commit 675f289aef
2 changed files with 5 additions and 1 deletions

View File

@ -328,6 +328,7 @@
<span ng-show="syncRemaining(folder.id)">({{syncPercentage(folder.id) | percent}}, {{syncRemaining(folder.id) | binary}}B)</span>
</span>
<span ng-switch-when="outofsync"><span class="hidden-xs" translate>Out of Sync</span><span class="visible-xs" aria-label="{{'Out of Sync' | translate}}"><i class="fas fa-fw fa-exclamation-circle"></i></span></span>
<span ng-switch-when="faileditems"><span class="hidden-xs" translate>Failed Items</span><span class="visible-xs" aria-label="{{'Failed Items' | translate}}"><i class="fas fa-fw fa-exclamation-circle"></i></span></span>
</div>
<div class="panel-title-text">
<span tooltip data-original-title="{{folder.label.length != 0 ? folder.id : ''}}">{{folder.label.length != 0 ? folder.label : folder.id}}</span>

View File

@ -751,6 +751,9 @@ angular.module('syncthing.core')
if (state === 'idle' && $scope.model[folderCfg.id].needTotalItems > 0) {
return 'outofsync';
}
if ($scope.hasFailedFiles(folderCfg.id)) {
return 'faileditems';
}
if (state === 'scanning') {
return state;
}
@ -777,7 +780,7 @@ angular.module('syncthing.core')
if (status === 'unknown') {
return 'info';
}
if (status === 'stopped' || status === 'outofsync' || status === 'error') {
if (status === 'stopped' || status === 'outofsync' || status === 'error' || status === 'faileditems') {
return 'danger';
}
if (status === 'unshared' || status === 'scan-waiting') {