Add support for themes (fixes #1925)
This commit is contained in:
|
Before Width: | Height: | Size: 6.4 KiB After Width: | Height: | Size: 6.4 KiB |
|
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 3.6 KiB |
|
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 3.1 KiB |
@@ -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 () {
|
||||
@@ -136,8 +136,17 @@
|
||||
<span class="fa fa-repeat"></span> <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
Reference in New Issue
Block a user