Add support for themes (fixes #1925)

This commit is contained in:
Audrius Butkevicius
2016-01-10 15:37:31 +00:00
parent 6c0a973ac3
commit cd54186113
128 changed files with 205 additions and 138 deletions

View File

Before

Width:  |  Height:  |  Size: 6.4 KiB

After

Width:  |  Height:  |  Size: 6.4 KiB

View File

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 3.6 KiB

View File

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

View File

@@ -866,6 +866,7 @@ angular.module('syncthing.core')
$scope.saveSettings = function () {
// Make sure something changed
var changed = !angular.equals($scope.config.options, $scope.tmpOptions) || !angular.equals($scope.config.gui, $scope.tmpGUI);
var themeChanged = $scope.config.gui.theme !== $scope.tmpGUI.theme;
if (changed) {
// Check if usage reporting has been enabled or disabled
if ($scope.tmpOptions.urEnabled && $scope.tmpOptions.urAccepted <= 0) {
@@ -901,6 +902,10 @@ angular.module('syncthing.core')
}
$('#settings').modal("hide");
if (themeChanged) {
document.location.reload(true);
}
};
$scope.saveAdvanced = function () {

View File

@@ -136,8 +136,17 @@
<span class="fa fa-repeat"></span>&nbsp;<span translate>Generate</span>
</button>
</div>
</div>
<div class="form-group" ng-if="system.themes.length > 1">
<label>GUI Theme</label>
<select class="form-control" ng-model="tmpGUI.theme" ng->
<option ng-repeat="theme in system.themes" value="{{ theme }}">
{{ theme.charAt(0).toUpperCase() + theme.slice(1) }}
</option>
</select>
</div>
</div>
</div>
</form>
</div>

Some files were not shown because too many files have changed in this diff Show More