diff --git a/packages/web_ui/src/components/ModDetails.jsx b/packages/web_ui/src/components/ModDetails.jsx
new file mode 100644
index 00000000..f6e1b1d0
--- /dev/null
+++ b/packages/web_ui/src/components/ModDetails.jsx
@@ -0,0 +1,46 @@
+import React, { Fragment } from "react";
+import { Descriptions, Grid, Typography } from "antd";
+
+import { libHelpers } from "@clusterio/lib";
+
+const { useBreakpoint } = Grid;
+
+
+export default function ModDetails(props) {
+ let screens = useBreakpoint();
+ const mod = props.mod;
+
+ return
+ {props.actions && !screens.lg
+ && {props.actions(mod)}
+ }
+ {mod.title && {mod.title}}
+ {mod.version && {mod.version}}
+ {mod.description && {mod.description} }
+ {mod.author && {mod.author}}
+
+
+ {`https://mods.factorio.com/mod/${mod.name}`}
+
+
+ {mod.contact && {mod.contact}}
+ {mod.homepage && {mod.homepage}}
+ {mod.name}
+ {mod.factorioVersion
+ && {mod.factorioVersion}
+ }
+ {mod.filename && {mod.filename}}
+ {mod.size !== undefined
+ && {libHelpers.formatBytes(mod.size)}
+ }
+ {mod.hash && {mod.hash}}
+ {mod.dependencies && mod.dependencies.length
+ &&
+ {mod.dependencies
+ .filter(e => !e.startsWith("(?)"))
+ .map((e, i) => {e}
)
+ }
+
+ }
+ ;
+}
diff --git a/packages/web_ui/src/components/ModsPage.jsx b/packages/web_ui/src/components/ModsPage.jsx
index 41625b36..bd97c786 100644
--- a/packages/web_ui/src/components/ModsPage.jsx
+++ b/packages/web_ui/src/components/ModsPage.jsx
@@ -10,8 +10,8 @@ import { notifyErrorHandler } from "../util/notify";
import ControlContext from "./ControlContext";
import PageLayout from "./PageLayout";
import PluginExtra from "./PluginExtra";
+import ModDetails from "./ModDetails";
-const { useBreakpoint } = Grid;
const strcmp = new Intl.Collator(undefined, { numerice: "true", sensitivity: "base" }).compare;
@@ -19,7 +19,6 @@ export default function ModsPage() {
let account = useAccount();
let control = useContext(ControlContext);
let [modList] = useModList();
- let screens = useBreakpoint();
function actions(mod) {
return
@@ -117,43 +116,7 @@ export default function ModsPage() {
},
]}
expandable={{
- expandedRowRender: mod => <>
-
- {!screens.lg
- && {actions(mod)}
- }
- {mod.title}
- {mod.version}
- {mod.description
- && {mod.description}
- }
- {mod.author}
-
-
- {`https://mods.factorio.com/mod/${mod.name}`}
-
-
- {mod.contact
- && {mod.contact}
- }
- {mod.homepage
- && {mod.homepage}
- }
- {mod.name}
- {mod.factorioVersion}
- {mod.filename}
- {libHelpers.formatBytes(mod.size)}
- {mod.hash}
- {mod.dependencies.length
- &&
- {mod.dependencies
- .filter(e => !e.startsWith("(?)"))
- .map((e, i) => {e}
)
- }
-
- }
-
- >,
+ expandedRowRender: mod => ,
expandedRowClassName: () => "no-expanded-padding",
}}
dataSource={modList}