Fixed backButton placeholder for plugins tabs

This commit is contained in:
Risto Lahtela 2020-03-26 11:15:45 +02:00
parent 6339696b58
commit 6936b6cb54
2 changed files with 2 additions and 2 deletions

View File

@ -102,7 +102,6 @@ public class PlayerPage implements Page {
placeholders.put("timeZone", config.getTimeZoneOffsetHours()); placeholders.put("timeZone", config.getTimeZoneOffsetHours());
placeholders.put("gmPieColors", theme.getValue(ThemeVal.GRAPH_GM_PIE)); placeholders.put("gmPieColors", theme.getValue(ThemeVal.GRAPH_GM_PIE));
placeholders.put("backButton", (serverInfo.getServer().isProxy() ? Html.BACK_BUTTON_NETWORK : Html.BACK_BUTTON_SERVER).create());
placeholders.put("contributors", Contributors.generateContributorHtml()); placeholders.put("contributors", Contributors.generateContributorHtml());
String html = locale.replaceLanguageInHtml(placeholders.apply(templateHtml)); String html = locale.replaceLanguageInHtml(placeholders.apply(templateHtml));
@ -110,6 +109,7 @@ public class PlayerPage implements Page {
placeholders = new PlaceholderReplacer(); placeholders = new PlaceholderReplacer();
PlayerPluginTab pluginTabs = pageFactory.inspectPluginTabs(playerUUID); PlayerPluginTab pluginTabs = pageFactory.inspectPluginTabs(playerUUID);
placeholders.put("backButton", (serverInfo.getServer().isProxy() ? Html.BACK_BUTTON_NETWORK : Html.BACK_BUTTON_SERVER).create());
placeholders.put("navPluginsTabs", pluginTabs.getNav()); placeholders.put("navPluginsTabs", pluginTabs.getNav());
placeholders.put("pluginsTabs", pluginTabs.getTab()); placeholders.put("pluginsTabs", pluginTabs.getTab());

View File

@ -88,7 +88,6 @@ public class ServerPage implements Page {
placeholders.put("timeZone", config.getTimeZoneOffsetHours()); placeholders.put("timeZone", config.getTimeZoneOffsetHours());
placeholders.put("gmPieColors", theme.getValue(ThemeVal.GRAPH_GM_PIE)); placeholders.put("gmPieColors", theme.getValue(ThemeVal.GRAPH_GM_PIE));
placeholders.put("backButton", serverInfo.getServer().isProxy() ? Html.BACK_BUTTON_NETWORK.create() : "");
placeholders.put("contributors", Contributors.generateContributorHtml()); placeholders.put("contributors", Contributors.generateContributorHtml());
placeholders.put("version", versionChecker.getUpdateButton().orElse(versionChecker.getCurrentVersionButton())); placeholders.put("version", versionChecker.getUpdateButton().orElse(versionChecker.getCurrentVersionButton()));
placeholders.put("updateModal", versionChecker.getUpdateModal()); placeholders.put("updateModal", versionChecker.getUpdateModal());
@ -102,6 +101,7 @@ public class ServerPage implements Page {
String tabs = JSONCache.getOrCacheString(DataID.EXTENSION_TABS, serverUUID, () -> pluginTabs.get().getTabs()); String tabs = JSONCache.getOrCacheString(DataID.EXTENSION_TABS, serverUUID, () -> pluginTabs.get().getTabs());
PlaceholderReplacer pluginPlaceholders = new PlaceholderReplacer(); PlaceholderReplacer pluginPlaceholders = new PlaceholderReplacer();
pluginPlaceholders.put("backButton", serverInfo.getServer().isProxy() ? Html.BACK_BUTTON_NETWORK.create() : "");
pluginPlaceholders.put("navPluginsTabs", nav); pluginPlaceholders.put("navPluginsTabs", nav);
pluginPlaceholders.put("tabsPlugins", tabs); pluginPlaceholders.put("tabsPlugins", tabs);