mirror of
https://github.com/ragestudio/relic.git
synced 2025-06-09 10:34:18 +00:00
use layout
This commit is contained in:
parent
f1440dfc29
commit
b25f3c0afe
@ -6,8 +6,9 @@ import GlobalStateContext from "contexts/global"
|
|||||||
import getRootCssVar from "utils/getRootCssVar"
|
import getRootCssVar from "utils/getRootCssVar"
|
||||||
|
|
||||||
import ManifestInfo from "components/ManifestInfo"
|
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 AppModalDialog from "layout/components/ModalDialog"
|
||||||
|
|
||||||
import { InternalRouter, PageRender } from "./router.jsx"
|
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: () => {
|
checkUpdates: () => {
|
||||||
ipc.exec("updater:check")
|
ipc.exec("updater:check")
|
||||||
},
|
},
|
||||||
@ -58,12 +67,13 @@ class App extends React.Component {
|
|||||||
antd.message.info(data)
|
antd.message.info(data)
|
||||||
},
|
},
|
||||||
"new:notification": (event, data) => {
|
"new:notification": (event, data) => {
|
||||||
antd.notification[data.type || "info"]({
|
app.notification[data.type || "info"]({
|
||||||
message: data.message,
|
message: data.message,
|
||||||
description: data.description,
|
description: data.description,
|
||||||
loading: data.loading,
|
loading: data.loading,
|
||||||
duration: data.duration,
|
duration: data.duration,
|
||||||
icon: data.icon,
|
icon: data.icon,
|
||||||
|
placement: "bottomLeft"
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
"new:message": (event, data) => {
|
"new:message": (event, data) => {
|
||||||
@ -72,6 +82,9 @@ class App extends React.Component {
|
|||||||
"update-available": (event, data) => {
|
"update-available": (event, data) => {
|
||||||
this.onUpdateAvailable(data)
|
this.onUpdateAvailable(data)
|
||||||
},
|
},
|
||||||
|
"pkg:update_available": (event, data) => {
|
||||||
|
app.pkgUpdateAvailable(data)
|
||||||
|
},
|
||||||
"initializing_text": (event, data) => {
|
"initializing_text": (event, data) => {
|
||||||
this.setState({
|
this.setState({
|
||||||
initializing_text: data,
|
initializing_text: data,
|
||||||
@ -163,13 +176,9 @@ class App extends React.Component {
|
|||||||
<GlobalStateContext.Provider value={this.state}>
|
<GlobalStateContext.Provider value={this.state}>
|
||||||
<AppModalDialog />
|
<AppModalDialog />
|
||||||
|
|
||||||
<antd.Layout className="app_layout">
|
<AppLayout>
|
||||||
<AppHeader />
|
<PageRender />
|
||||||
|
</AppLayout>
|
||||||
<antd.Layout.Content className="app_content">
|
|
||||||
<PageRender />
|
|
||||||
</antd.Layout.Content>
|
|
||||||
</antd.Layout>
|
|
||||||
</GlobalStateContext.Provider>
|
</GlobalStateContext.Provider>
|
||||||
</InternalRouter>
|
</InternalRouter>
|
||||||
</antd.ConfigProvider>
|
</antd.ConfigProvider>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user