diff --git a/src/renderer/src/App.jsx b/src/renderer/src/App.jsx index a875a38..81f59d9 100644 --- a/src/renderer/src/App.jsx +++ b/src/renderer/src/App.jsx @@ -6,8 +6,9 @@ import GlobalStateContext from "contexts/global" import getRootCssVar from "utils/getRootCssVar" import ManifestInfo from "components/ManifestInfo" +import PackageUpdateAvailable from "components/PackageUpdateAvailable" -import AppHeader from "layout/components/Header" +import AppLayout from "layout" import AppModalDialog from "layout/components/ModalDialog" import { InternalRouter, PageRender } from "./router.jsx" @@ -33,6 +34,14 @@ window.app = { } }) }, + pkgUpdateAvailable: (update_data) => { + app.modal.open(PackageUpdateAvailable, { + update: update_data, + close: () => { + app.modal.close() + } + }) + }, checkUpdates: () => { ipc.exec("updater:check") }, @@ -58,12 +67,13 @@ class App extends React.Component { antd.message.info(data) }, "new:notification": (event, data) => { - antd.notification[data.type || "info"]({ + app.notification[data.type || "info"]({ message: data.message, description: data.description, loading: data.loading, duration: data.duration, icon: data.icon, + placement: "bottomLeft" }) }, "new:message": (event, data) => { @@ -72,6 +82,9 @@ class App extends React.Component { "update-available": (event, data) => { this.onUpdateAvailable(data) }, + "pkg:update_available": (event, data) => { + app.pkgUpdateAvailable(data) + }, "initializing_text": (event, data) => { this.setState({ initializing_text: data, @@ -163,13 +176,9 @@ class App extends React.Component { - - - - - - - + + +