Webconfig: Use theme's name if available

The "name" here refers to the `# name:` line from the .theme file.
That's a much more descriptive name and allows using simpler filenames.
This commit is contained in:
Fabian Homborg 2021-09-03 17:37:54 +02:00
parent 4c98757f85
commit 08690e0303

View file

@ -93,6 +93,7 @@ controllers.controller("colorsController", function($scope, $http) {
for (var scheme of arg.data) {
var currentScheme = { "name": "Current", "colors":[], "preferred_background": "black" };
currentScheme["name"] = scheme["theme"];
if (scheme["name"]) currentScheme["name"] = scheme["name"];
var data = scheme["colors"];
if (scheme["preferred_background"]) {
if (isValidColor(scheme["preferred_background"])) {