mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-18 23:33:12 +09:00
Serverside rendering of /slaves for more plugin functionality
This commit is contained in:
1 parent
8518cd54c6
commit
da268d57e7
2 files changed
+50
-6
No files matched your search
+6
-4
@@ -15,19 +15,21 @@
|
||||
<%# Very ugly ejs code to hide the Players button if the playerManager plugin isn`t installed %>
|
||||
<%
|
||||
sidebarPluginButtonsHtml = "";
|
||||
masterPlugins.forEach(plug => {
|
||||
for(let o in masterPlugins){
|
||||
let plug = masterPlugins[o];
|
||||
if(plug.main
|
||||
&& plug.main.ui
|
||||
&& typeof plug.main.ui.sidebar == "object"
|
||||
&& Array.isArray(plug.main.ui.sidebar)){
|
||||
let sidebarEntries = plug.main.ui.sidebar;
|
||||
sidebarEntries.forEach(button => {
|
||||
for(let i in sidebarEntries){
|
||||
let button = sidebarEntries[i];
|
||||
if(button.getHtml && typeof button.getHtml == "function"){
|
||||
sidebarPluginButtonsHtml += button.getHtml();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
%>
|
||||
<%- sidebarPluginButtonsHtml %>
|
||||
<a href="/settings"><div id="settings-menu" class="button-black menuItem">
|
||||
|
||||
Reference in new issue
Block a user