Handle and indicate duplicate repo ID:s (fixes #153)

This commit is contained in:
Jakob Borg
2014-04-27 21:53:27 +02:00
parent 89f5f3bf9a
commit dcd7d278aa
6 changed files with 41 additions and 9 deletions

View File

@@ -121,6 +121,10 @@ syncthing.controller('SyncthingCtrl', function ($scope, $http) {
return 'Unknown';
}
if ($scope.model[repo].invalid !== '') {
return 'Stopped';
}
var state = '' + $scope.model[repo].state;
state = state[0].toUpperCase() + state.substr(1);
@@ -136,6 +140,10 @@ syncthing.controller('SyncthingCtrl', function ($scope, $http) {
return 'text-info';
}
if ($scope.model[repo].invalid !== '') {
return 'text-warning';
}
var state = '' + $scope.model[repo].state;
if (state == 'idle') {
return 'text-success';