Replace theme colors in color-selector.js when exported

Affects issues:
- Fixed #1666
This commit is contained in:
Risto Lahtela 2021-01-03 12:51:06 +02:00
parent 7eb194e13f
commit 558e132b6e
4 changed files with 4 additions and 4 deletions

View File

@ -215,7 +215,7 @@ public class NetworkPageExporter extends FileExporter {
() -> files.getResourceFromJar("web/" + resourceName).asWebResource()); () -> files.getResourceFromJar("web/" + resourceName).asWebResource());
Path to = toDirectory.resolve(resourceName); Path to = toDirectory.resolve(resourceName);
if (resourceName.endsWith(".css")) { if (resourceName.endsWith(".css") || resourceName.endsWith("color-selector.js")) {
export(to, theme.replaceThemeColors(resource.asString())); export(to, theme.replaceThemeColors(resource.asString()));
} else if ("js/network-values.js".equalsIgnoreCase(resourceName) || "js/sessionAccordion.js".equalsIgnoreCase(resourceName)) { } else if ("js/network-values.js".equalsIgnoreCase(resourceName) || "js/sessionAccordion.js".equalsIgnoreCase(resourceName)) {
String relativePlayerLink = toRelativePathFromRoot("player"); String relativePlayerLink = toRelativePathFromRoot("player");

View File

@ -191,7 +191,7 @@ public class PlayerPageExporter extends FileExporter {
() -> files.getResourceFromJar("web/" + resourceName).asWebResource()); () -> files.getResourceFromJar("web/" + resourceName).asWebResource());
Path to = toDirectory.resolve(resourceName); Path to = toDirectory.resolve(resourceName);
if (resourceName.endsWith(".css")) { if (resourceName.endsWith(".css") || resourceName.endsWith("color-selector.js")) {
export(to, theme.replaceThemeColors(resource.asString())); export(to, theme.replaceThemeColors(resource.asString()));
} else if (Resource.isTextResource(resourceName)) { } else if (Resource.isTextResource(resourceName)) {
export(to, resource.asString()); export(to, resource.asString());

View File

@ -164,7 +164,7 @@ public class PlayersPageExporter extends FileExporter {
() -> files.getResourceFromJar("web/" + resourceName).asWebResource()); () -> files.getResourceFromJar("web/" + resourceName).asWebResource());
Path to = toDirectory.resolve(resourceName); Path to = toDirectory.resolve(resourceName);
if (resourceName.endsWith(".css")) { if (resourceName.endsWith(".css") || resourceName.endsWith("color-selector.js")) {
export(to, theme.replaceThemeColors(resource.asString())); export(to, theme.replaceThemeColors(resource.asString()));
} else if (Resource.isTextResource(resourceName)) { } else if (Resource.isTextResource(resourceName)) {
export(to, resource.asString()); export(to, resource.asString());

View File

@ -234,7 +234,7 @@ public class ServerPageExporter extends FileExporter {
() -> files.getResourceFromJar("web/" + resourceName).asWebResource()); () -> files.getResourceFromJar("web/" + resourceName).asWebResource());
Path to = toDirectory.resolve(resourceName); Path to = toDirectory.resolve(resourceName);
if (resourceName.endsWith(".css")) { if (resourceName.endsWith(".css") || resourceName.endsWith("color-selector.js")) {
export(to, theme.replaceThemeColors(resource.asString())); export(to, theme.replaceThemeColors(resource.asString()));
} else if (Resource.isTextResource(resourceName)) { } else if (Resource.isTextResource(resourceName)) {
export(to, resource.asString()); export(to, resource.asString());