mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-19 07:33:12 +09:00
Move PluginWebApi to lib
Resolve circular dependency of controller depending on web_ui and web_ui depending on controller by moving the type from controller that was used in web_ui to lib.
This commit is contained in:
1 parent
47c5a727b5
commit
9df6717364
8 files changed
+18
-19
No files matched your search
@@ -3,7 +3,6 @@ import { useNavigate } from "react-router-dom";
|
||||
import { Button, Form, InputNumber, Modal, Table, Tag, Typography } from "antd";
|
||||
import CopyOutlined from "@ant-design/icons/lib/icons/CopyOutlined";
|
||||
|
||||
import type { PluginWebApi } from "@clusterio/controller/src/routes";
|
||||
import * as lib from "@clusterio/lib";
|
||||
|
||||
import { useAccount } from "../model/account";
|
||||
@@ -23,7 +22,7 @@ function GenerateHostTokenButton() {
|
||||
let [token, setToken] = useState<string|null>(null);
|
||||
let [hostId, setHostId] = useState<number|null>(null);
|
||||
let [form] = Form.useForm();
|
||||
let [pluginList, setPluginList] = useState<PluginWebApi[]>([]);
|
||||
let [pluginList, setPluginList] = useState<lib.PluginWebApi[]>([]);
|
||||
useEffect(() => {
|
||||
(async () => {
|
||||
let response = await fetch(`${window.webRoot}api/plugins`);
|
||||
|
||||
@@ -2,7 +2,7 @@ import React, { useEffect, useContext, useState } from "react";
|
||||
import { useParams } from "react-router-dom";
|
||||
import { Alert, Descriptions, Spin } from "antd";
|
||||
|
||||
import type { PluginWebApi } from "@clusterio/controller/src/routes";
|
||||
import type { PluginWebApi } from "@clusterio/lib";
|
||||
|
||||
import ControlContext from "./ControlContext";
|
||||
import PageLayout from "./PageLayout";
|
||||
|
||||
@@ -2,7 +2,7 @@ import React, { useContext, useEffect, useState } from "react";
|
||||
import { useNavigate } from "react-router-dom";
|
||||
import { Table } from "antd";
|
||||
|
||||
import type { PluginWebApi } from "@clusterio/controller/src/routes";
|
||||
import type { PluginWebApi } from "@clusterio/lib";
|
||||
|
||||
import notify from "../util/notify";
|
||||
import ControlContext from "./ControlContext";
|
||||
|
||||
Reference in new issue
Block a user