mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-21 16:13:12 +09:00
Merge branch 'master' into feature/update-all
This commit is contained in:
275 files changed
+2394
-2073
No files matched your search
@@ -46,11 +46,14 @@ export default function PluginViewPage() {
|
||||
}
|
||||
|
||||
const pluginError = pluginMeta.web.error ?? pluginInfo?.error;
|
||||
const hasWebModule = Boolean(pluginMeta.web.main || pluginMeta.web.error);
|
||||
if (!plugin) {
|
||||
return <PageLayout nav={nav}>
|
||||
<Descriptions bordered size="small" title={pluginTitle}>
|
||||
<Descriptions.Item label="Version">{pluginMeta.version}</Descriptions.Item>
|
||||
<Descriptions.Item label="Loaded in Web UI" span={2}>No</Descriptions.Item>
|
||||
<Descriptions.Item label="Loaded in Web UI" span={2}>
|
||||
{hasWebModule ? "No" : "No web module"}
|
||||
</Descriptions.Item>
|
||||
<Descriptions.Item label="Loaded on controller">{pluginMeta.loaded ? "Yes" : "No"}</Descriptions.Item>
|
||||
<Descriptions.Item label="Enabled on controller" span={2}>
|
||||
{pluginMeta.enabled ? "Yes" : "No"}
|
||||
|
||||
@@ -88,6 +88,9 @@ export default function PluginsPage() {
|
||||
if (!plugin.meta.enabled) {
|
||||
return <><InfoCircleFilled style={{ color: "#1668dc" }} /> Disabled on controller</>;
|
||||
}
|
||||
if (!plugin.meta.web.main && !plugin.meta.web.error) {
|
||||
return plugin.meta.version;
|
||||
}
|
||||
if (!plugin.meta.web.error && !control.pluginInfos.has(plugin.meta.name)) {
|
||||
return <><InfoCircleFilled style={{ color: "#1668dc" }} /> Reload page to load</>;
|
||||
}
|
||||
@@ -105,7 +108,15 @@ export default function PluginsPage() {
|
||||
{
|
||||
title: "Loaded",
|
||||
key: "loaded",
|
||||
render: (_, plugin) => (plugin.package ? "Yes" : null),
|
||||
render: (_, plugin) => {
|
||||
if (plugin.package) {
|
||||
return "Yes";
|
||||
}
|
||||
if (!plugin.meta.web.main && !plugin.meta.web.error) {
|
||||
return "No web module";
|
||||
}
|
||||
return null;
|
||||
},
|
||||
sorter: (a, b) => Number(Boolean(a.package)) - Number(Boolean(b.package)),
|
||||
sortOrder: tableState.sortOrder("loaded"),
|
||||
responsive: ["sm"],
|
||||
|
||||
Reference in new issue
Block a user