webconfig: Stop validating colors

Now that we have modifiers and can have backgrounds and such, simply
setting it as css style doesn't cut it.

So let's stop validating for now, the worst that can happen is that
the color isn't rendered.
This commit is contained in:
Fabian Homborg 2021-12-13 21:42:26 +01:00
parent 5a46a61ffb
commit c954d70e2f

View File

@ -105,14 +105,12 @@ controllers.controller("colorsController", function($scope, $http) {
var cols = [];
for (var i in data) {
if (isValidColor(data[i].color)) {
currentScheme[data[i].name] = data[i].color;
// HACK: For some reason the colors array is cleared later
// So we cheesily encode the actual objects as colordata-, so we can send them.
// TODO: We should switch to keeping the objects, and also displaying them
// with underlines and such.
currentScheme["colordata-" + data[i].name] = data[i];
}
currentScheme[data[i].name] = data[i].color;
// HACK: For some reason the colors array is cleared later
// So we cheesily encode the actual objects as colordata-, so we can send them.
// TODO: We should switch to keeping the objects, and also displaying them
// with underlines and such.
currentScheme["colordata-" + data[i].name] = data[i];
}
$scope.colorSchemes.push(currentScheme);
}