mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-22 08:13:12 +09:00
Implement webpack build for web interface
Set up webpack for the master server's web interface and fix the issues from the imported interface source files. The .jsx files in package/master/web are bundled together into package/master/static and served by the master server via express.
This commit is contained in:
1 parent
2382f4bbdc
commit
701ff87bcd
25 files changed
+219
-191
No files matched your search
@@ -1,23 +1,9 @@
|
||||
import {
|
||||
Layout,
|
||||
Menu,
|
||||
Avatar,
|
||||
} from "antd";
|
||||
import 'antd/dist/antd.dark.css';
|
||||
import {
|
||||
UnorderedListOutlined,
|
||||
UserOutlined,
|
||||
SettingOutlined,
|
||||
GoldOutlined,
|
||||
FileTextOutlined,
|
||||
ScheduleOutlined,
|
||||
} from "@ant-design/icons";
|
||||
import { Layout, Menu } from "antd";
|
||||
|
||||
import { withRouter } from "react-router-dom";
|
||||
import { BrowserRouter as Router, Route, Link } from "react-router-dom";
|
||||
|
||||
import React, { Component } from "react";
|
||||
import { Helmet } from "react-helmet";
|
||||
import { Dashboard } from "../pages/dashboard";
|
||||
import { InstancesTable } from "../pages/instances/instancesTable";
|
||||
import { SlavesTable } from "../pages/slaves/slavesTable"
|
||||
@@ -40,8 +26,6 @@ class SiteLayout extends Component {
|
||||
|
||||
// this.history = useHistory();
|
||||
|
||||
this.onCollapse = this.onCollapse.bind(this);
|
||||
|
||||
this.state = {
|
||||
collapsed: false,
|
||||
setcollapsed: false,
|
||||
@@ -76,19 +60,11 @@ class SiteLayout extends Component {
|
||||
return (
|
||||
<Router>
|
||||
<Layout style={{ minHeight: "100vh" }}>
|
||||
<Helmet>
|
||||
<meta charSet="utf-8" />
|
||||
<title>Clusterio 2.0</title>
|
||||
<link
|
||||
href="https://fonts.googleapis.com/css?family=Titillium+Web:200,400&display=swap"
|
||||
rel="stylesheet"
|
||||
></link>
|
||||
</Helmet>
|
||||
{document.location.search !== "?hideExtras" ? (
|
||||
<Sider
|
||||
collapsible
|
||||
collapsed={this.state.collapsed}
|
||||
onCollapse={this.onCollapse}
|
||||
onCollapse={this.onCollapse.bind(this)}
|
||||
width={250}
|
||||
breakpoint="lg"
|
||||
>
|
||||
|
||||
Reference in new issue
Block a user