diff --git a/main/Communication/index.js b/main/Communication/index.js index 949feba..ea2129c 100644 --- a/main/Communication/index.js +++ b/main/Communication/index.js @@ -1,7 +1,7 @@ import { ipcMain, app, shell } from "electron"; import { mainWindow } from "../background"; import log from "electron-log"; - +import Updates from "../updates"; // Channels import ConfigChannelClass from "./Channels/Config"; import ExportingChannelClass from "./Channels/Exporting"; @@ -22,6 +22,7 @@ export default class Communication { async Init() { this.getInfos(); this.OpenURL(); + this.checkUpdates(); // this.getVnStatInterfaces(); ConfigChannel.Init(); ExportingChannel.Init(); @@ -67,4 +68,9 @@ export default class Communication { send(channel, args) { mainWindow.webContents.send(channel, args); } + checkUpdates() { + ipcMain.on("check-for-updates", () => { + new Updates().check(); + }); + } } diff --git a/renderer/components/Settings/Info.js b/renderer/components/Settings/Info.js index cce2bac..041b6ed 100644 --- a/renderer/components/Settings/Info.js +++ b/renderer/components/Settings/Info.js @@ -1,9 +1,10 @@ -import { Stack, Box, Heading } from "@chakra-ui/react"; +import { Stack, Button, Heading } from "@chakra-ui/react"; import { ipcRenderer } from "electron"; import { useEffect, useState } from "react"; - +import { useConfig } from "@Context/configration"; function Info() { const [infos, setInfos] = useState([]); + const { config } = useConfig(); useEffect(() => { ipcRenderer.send("get-infos"); ipcRenderer.on("send-infos", (e, result) => { @@ -20,6 +21,16 @@ function Info() { {info?.value} ))} + ); }