use of com.djrapitops.plan.delivery.formatting.PlaceholderReplacer in project Plan by plan-player-analytics.
the class InternalErrorPage method toHtml.
@Override
public String toHtml() {
PlaceholderReplacer placeholders = new PlaceholderReplacer();
placeholders.put("title", Icon.called("bug") + " 500 Internal Error occurred");
placeholders.put("titleText", "500 Internal Error occurred");
placeholders.put("paragraph", createContent());
placeholders.put("versionButton", versionChecker.getUpdateButton().orElse(versionChecker.getCurrentVersionButton()));
placeholders.put("version", versionChecker.getCurrentVersion());
placeholders.put("updateModal", versionChecker.getUpdateModal());
placeholders.put("contributors", Contributors.generateContributorHtml());
return placeholders.apply(template);
}
use of com.djrapitops.plan.delivery.formatting.PlaceholderReplacer in project Plan by plan-player-analytics.
the class ErrorsPage method toHtml.
@Override
public String toHtml() {
PlaceholderReplacer placeholders = new PlaceholderReplacer();
placeholders.put("title", Icon.called("bug").build().toHtml() + " Error logs");
placeholders.put("titleText", "Error logs");
placeholders.put("paragraph", buildBody());
placeholders.put("versionButton", versionChecker.getUpdateButton().orElse(versionChecker.getCurrentVersionButton()));
placeholders.put("version", versionChecker.getCurrentVersion());
placeholders.put("updateModal", versionChecker.getUpdateModal());
placeholders.put("contributors", Contributors.generateContributorHtml());
return UnaryChain.of(template).chain(theme::replaceThemeColors).chain(placeholders::apply).chain(locale::replaceLanguageInHtml).apply();
}
use of com.djrapitops.plan.delivery.formatting.PlaceholderReplacer in project Plan by plan-player-analytics.
the class PlayersPage method toHtml.
@Override
public String toHtml() {
PlaceholderReplacer placeholders = new PlaceholderReplacer();
placeholders.put("refreshBarrier", config.get(WebserverSettings.REDUCED_REFRESH_BARRIER));
placeholders.put("versionButton", versionChecker.getUpdateButton().orElse(versionChecker.getCurrentVersionButton()));
placeholders.put("version", versionChecker.getCurrentVersion());
placeholders.put("updateModal", versionChecker.getUpdateModal());
placeholders.put("contributors", Contributors.generateContributorHtml());
if (serverInfo.getServer().isProxy()) {
placeholders.put("networkName", config.get(ProxySettings.NETWORK_NAME));
} else {
placeholders.put("networkName", config.get(PluginSettings.SERVER_NAME));
}
return locale.replaceLanguageInHtml(placeholders.apply(theme.replaceThemeColors(templateHtml)));
}
use of com.djrapitops.plan.delivery.formatting.PlaceholderReplacer in project Plan by plan-player-analytics.
the class QueryPage method toHtml.
@Override
public String toHtml() {
PlaceholderReplacer placeholders = new PlaceholderReplacer();
placeholders.put("versionButton", versionChecker.getUpdateButton().orElse(versionChecker.getCurrentVersionButton()));
placeholders.put("version", versionChecker.getCurrentVersion());
placeholders.put("updateModal", versionChecker.getUpdateModal());
placeholders.put("contributors", Contributors.generateContributorHtml());
return UnaryChain.of(template).chain(theme::replaceThemeColors).chain(placeholders::apply).chain(locale::replaceLanguageInHtml).apply();
}
use of com.djrapitops.plan.delivery.formatting.PlaceholderReplacer in project Plan by plan-player-analytics.
the class LoginPage method toHtml.
@Override
public String toHtml() {
PlaceholderReplacer placeholders = new PlaceholderReplacer();
placeholders.put("command", getCommand());
placeholders.put("version", versionChecker.getCurrentVersion());
return UnaryChain.of(template).chain(theme::replaceThemeColors).chain(placeholders::apply).chain(locale::replaceLanguageInHtml).apply();
}
Aggregations