Don't init twice
This commit is contained in:
parent
f4a3f06aae
commit
dd6672f9ba
2 changed files with 10 additions and 11 deletions
|
@ -103,5 +103,3 @@ export async function getTemperature(): Promise<number> {
|
||||||
return (await FAN_CLIENT!.get_temperature(true))?? -273;
|
return (await FAN_CLIENT!.get_temperature(true))?? -273;
|
||||||
//return (await call_backend("get_temperature", []))[0];
|
//return (await call_backend("get_temperature", []))[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
initBackend();
|
|
||||||
|
|
|
@ -305,8 +305,7 @@ const Content: VFC<{ serverAPI: ServerAPI }> = ({serverAPI}) => {
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
export default definePlugin((serverApi: ServerAPI) => {
|
(async function(){
|
||||||
(async function(){
|
|
||||||
if (!usdplReady) {
|
if (!usdplReady) {
|
||||||
await backend.initBackend();
|
await backend.initBackend();
|
||||||
usdplReady = true;
|
usdplReady = true;
|
||||||
|
@ -314,7 +313,9 @@ export default definePlugin((serverApi: ServerAPI) => {
|
||||||
name = await backend.getName();
|
name = await backend.getName();
|
||||||
version = await backend.getVersion();
|
version = await backend.getVersion();
|
||||||
}
|
}
|
||||||
})();
|
})();
|
||||||
|
|
||||||
|
export default definePlugin((serverApi: ServerAPI) => {
|
||||||
|
|
||||||
let ico = <FaFan />;
|
let ico = <FaFan />;
|
||||||
let now = new Date();
|
let now = new Date();
|
||||||
|
|
Loading…
Reference in a new issue