mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2024-12-15 05:41:51 +08:00
[#708] Added "back" links
- Added a back link /server -> /network if on a network - Added a back link /player -> /server if on a server - Added a back link /player -> /network if on a network
This commit is contained in:
parent
ff266893d1
commit
7621167407
@ -23,6 +23,7 @@ import com.djrapitops.plan.system.file.PlanFiles;
|
|||||||
import com.djrapitops.plan.system.update.VersionCheckSystem;
|
import com.djrapitops.plan.system.update.VersionCheckSystem;
|
||||||
import com.djrapitops.plan.utilities.formatting.Formatter;
|
import com.djrapitops.plan.utilities.formatting.Formatter;
|
||||||
import com.djrapitops.plan.utilities.formatting.PlaceholderReplacer;
|
import com.djrapitops.plan.utilities.formatting.PlaceholderReplacer;
|
||||||
|
import com.djrapitops.plugin.api.Check;
|
||||||
import com.djrapitops.plugin.benchmarking.Timings;
|
import com.djrapitops.plugin.benchmarking.Timings;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
@ -74,6 +75,11 @@ public class AnalysisPage implements Page {
|
|||||||
TPS_LOW_COLOR, WORLD_MAP_HIGH_COLOR, WORLD_MAP_LOW_COLOR,
|
TPS_LOW_COLOR, WORLD_MAP_HIGH_COLOR, WORLD_MAP_LOW_COLOR,
|
||||||
AVG_PING_COLOR, MAX_PING_COLOR, MIN_PING_COLOR
|
AVG_PING_COLOR, MAX_PING_COLOR, MIN_PING_COLOR
|
||||||
);
|
);
|
||||||
|
if (Check.isBungeeAvailable() || Check.isVelocityAvailable()) {
|
||||||
|
placeholderReplacer.put("backButton", "<li><a title=\"to Network page\" href=\"/network\"><i class=\"material-icons\">arrow_back</i><i class=\"material-icons\">cloud</i></a></li>");
|
||||||
|
} else {
|
||||||
|
placeholderReplacer.put("backButton", "");
|
||||||
|
}
|
||||||
placeholderReplacer.put("update", versionCheckSystem.getUpdateHtml().orElse(""));
|
placeholderReplacer.put("update", versionCheckSystem.getUpdateHtml().orElse(""));
|
||||||
playersTable(placeholderReplacer);
|
playersTable(placeholderReplacer);
|
||||||
sessionStructures(placeholderReplacer);
|
sessionStructures(placeholderReplacer);
|
||||||
|
@ -45,6 +45,7 @@ import com.djrapitops.plan.utilities.html.structure.Accordions;
|
|||||||
import com.djrapitops.plan.utilities.html.structure.ServerAccordion;
|
import com.djrapitops.plan.utilities.html.structure.ServerAccordion;
|
||||||
import com.djrapitops.plan.utilities.html.structure.SessionAccordion;
|
import com.djrapitops.plan.utilities.html.structure.SessionAccordion;
|
||||||
import com.djrapitops.plan.utilities.html.tables.HtmlTables;
|
import com.djrapitops.plan.utilities.html.tables.HtmlTables;
|
||||||
|
import com.djrapitops.plugin.api.Check;
|
||||||
import com.djrapitops.plugin.api.TimeAmount;
|
import com.djrapitops.plugin.api.TimeAmount;
|
||||||
import com.djrapitops.plugin.benchmarking.Timings;
|
import com.djrapitops.plugin.benchmarking.Timings;
|
||||||
|
|
||||||
@ -252,6 +253,12 @@ public class InspectPage implements Page {
|
|||||||
: serverName
|
: serverName
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if (Check.isBungeeAvailable() || Check.isVelocityAvailable()) {
|
||||||
|
replacer.put("backButton", "<li><a title=\"to Network page\" href=\"/network\"><i class=\"material-icons\">arrow_back</i><i class=\"material-icons\">cloud</i></a></li>");
|
||||||
|
} else {
|
||||||
|
replacer.put("backButton", "<li><a title=\"to Server page\" href=\"/server\"><i class=\"material-icons\">arrow_back</i><i class=\"material-icons\">storage</i></a></li>");
|
||||||
|
}
|
||||||
|
|
||||||
return replacer.apply(files.readCustomizableResourceFlat("web/player.html"));
|
return replacer.apply(files.readCustomizableResourceFlat("web/player.html"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -87,9 +87,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="collapse navbar-collapse" id="navbar-collapse">
|
<div class="collapse navbar-collapse" id="navbar-collapse">
|
||||||
<ul class="nav navbar-nav navbar-right">
|
<ul class="nav navbar-nav navbar-right">
|
||||||
<!-- Call Search (Disabled)
|
${backButton}
|
||||||
<li><a href="javascript:void(0);" class="js-search" data-close="true"><i class="material-icons">search</i></a></li>
|
|
||||||
<!-- #END# Call Search -->
|
|
||||||
<li class="pull-right"><a href="javascript:void(0);" class="js-right-sidebar" data-close="true"><i
|
<li class="pull-right"><a href="javascript:void(0);" class="js-right-sidebar" data-close="true"><i
|
||||||
class="material-icons">settings</i></a></li>
|
class="material-icons">settings</i></a></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -87,9 +87,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="collapse navbar-collapse" id="navbar-collapse">
|
<div class="collapse navbar-collapse" id="navbar-collapse">
|
||||||
<ul class="nav navbar-nav navbar-right">
|
<ul class="nav navbar-nav navbar-right">
|
||||||
<!-- Call Search (Disabled)
|
${backButton}
|
||||||
<li><a href="javascript:void(0);" class="js-search" data-close="true"><i class="material-icons">search</i></a></li>
|
|
||||||
<!-- #END# Call Search -->
|
|
||||||
<li class="pull-right"><a href="javascript:void(0);" class="js-right-sidebar" data-close="true"><i
|
<li class="pull-right"><a href="javascript:void(0);" class="js-right-sidebar" data-close="true"><i
|
||||||
class="material-icons">settings</i></a></li>
|
class="material-icons">settings</i></a></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
Loading…
Reference in New Issue
Block a user