mirror of
https://github.com/ragestudio/relic.git
synced 2025-06-09 02:24: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 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 {
|
||||
<GlobalStateContext.Provider value={this.state}>
|
||||
<AppModalDialog />
|
||||
|
||||
<antd.Layout className="app_layout">
|
||||
<AppHeader />
|
||||
|
||||
<antd.Layout.Content className="app_content">
|
||||
<PageRender />
|
||||
</antd.Layout.Content>
|
||||
</antd.Layout>
|
||||
<AppLayout>
|
||||
<PageRender />
|
||||
</AppLayout>
|
||||
</GlobalStateContext.Provider>
|
||||
</InternalRouter>
|
||||
</antd.ConfigProvider>
|
||||
|
Loading…
x
Reference in New Issue
Block a user