webconfig: Skip colors not named in a theme

This is a stop gap. Ideally setting a theme would be idempotent. You
set it, all colors change to match it, even the ones it does not
specify.

However, I do not believe we can *erase* colors that aren't set, and
we don't currently do so in the CLI version. So skip setting these at
all, for now.

If a color is mentioned but empty, it will be set to empty.
This commit is contained in:
Fabian Homborg 2021-12-14 22:54:28 +01:00
parent 3daba1b070
commit 67dc86cfa4

View File

@ -177,7 +177,7 @@ controllers.controller("colorsController", function($scope, $http) {
// js is dumb - the empty string is false,
// but we want that to mean unsetting a var.
if (!$scope.selectedColorScheme[realname] && $scope.selectedColorScheme[realname] !== '') {
selected = '';
continue;
} else {
selected = $scope.selectedColorScheme[realname];
}