mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-20 23:53:13 +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
@@ -4,7 +4,6 @@ import React from "react";
|
||||
import { createRoot } from "react-dom/client";
|
||||
|
||||
import * as lib from "@clusterio/lib";
|
||||
import type { PluginWebApi } from "@clusterio/controller/src/routes";
|
||||
|
||||
import App from "./components/App";
|
||||
import BaseWebPlugin from "./BaseWebPlugin";
|
||||
@@ -29,7 +28,7 @@ async function loadScript(url: string) {
|
||||
|
||||
async function loadPluginInfos(): Promise<lib.PluginWebpackEnvInfo[]> {
|
||||
let response = await fetch(`${window.webRoot}api/plugins`);
|
||||
let pluginList: PluginWebApi[];
|
||||
let pluginList: lib.PluginWebApi[];
|
||||
if (response.ok) {
|
||||
pluginList = await response.json();
|
||||
|
||||
|
||||
Reference in new issue
Block a user