mirror of
https://github.com/KubaPro010/fm-dx-webserver.git
synced 2026-07-29 16:29:19 +02:00
there
This commit is contained in:
+5
-2
@@ -80,11 +80,14 @@ if (process.platform === 'win32') {
|
|||||||
|
|
||||||
const pluginConfigs = [];
|
const pluginConfigs = [];
|
||||||
readJSFiles(pluginsDir).forEach(file => {
|
readJSFiles(pluginsDir).forEach(file => {
|
||||||
|
const dir = fs.statSync(filePath).isDirectory();
|
||||||
var filePath = path.join(pluginsDir, file);
|
var filePath = path.join(pluginsDir, file);
|
||||||
if(fs.statSync(filePath).isDirectory()) filePath = path.join(pluginsDir, file, file);
|
if(dir) filePath = path.join(pluginsDir, file, file);
|
||||||
|
|
||||||
const config = parsePluginConfig(filePath);
|
const config = parsePluginConfig(filePath);
|
||||||
if (Object.keys(config).length > 0) pluginConfigs.push(config);
|
if(dir) config = {...config, prefix: file}
|
||||||
|
else config = {...config, prefix: ""}
|
||||||
|
pluginConfigs.push(config);
|
||||||
});
|
});
|
||||||
|
|
||||||
module.exports = pluginConfigs;
|
module.exports = pluginConfigs;
|
||||||
|
|||||||
+3
-3
@@ -420,12 +420,12 @@
|
|||||||
<p>Any compatible <strong>.js</strong> plugin, which is in the "plugins" folder, will be listed here.<br>
|
<p>Any compatible <strong>.js</strong> plugin, which is in the "plugins" folder, will be listed here.<br>
|
||||||
Click on the individual plugins to enable/disable them.</p>
|
Click on the individual plugins to enable/disable them.</p>
|
||||||
<select id="plugins" class="multiselect" multiple>
|
<select id="plugins" class="multiselect" multiple>
|
||||||
<% plugins.forEach(function(plugin) {
|
<% plugins.forEach(function(plugin) {
|
||||||
if (plugin.frontEndPath) { %>
|
if (plugin.frontEndPath) { %>
|
||||||
<option data-name="<%= plugin.frontEndPath %>" title="<%= plugin.name %> by <%= plugin.author %> [v<%= plugin.version %>]">
|
<option data-name="<%= plugin.prefix %><%= plugin.frontEndPath %>" title="<%= plugin.name %> by <%= plugin.author %> [v<%= plugin.version %>]">
|
||||||
<%= plugin.name %> by <%= plugin.author %> [v<%= plugin.version %>]
|
<%= plugin.name %> by <%= plugin.author %> [v<%= plugin.version %>]
|
||||||
</option>
|
</option>
|
||||||
<% }
|
<% }
|
||||||
}); %>
|
}); %>
|
||||||
</select><br><br>
|
</select><br><br>
|
||||||
<a href="https://github.com/NoobishSVK/fm-dx-webserver/wiki/Plugin-List" target="_blank">Download new plugins here!</a>
|
<a href="https://github.com/NoobishSVK/fm-dx-webserver/wiki/Plugin-List" target="_blank">Download new plugins here!</a>
|
||||||
|
|||||||
Reference in New Issue
Block a user