mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-10 02:54:15 +00:00
use cores
This commit is contained in:
parent
6fd8670ee7
commit
91eb6647dc
@ -33,7 +33,7 @@ export default (props) => {
|
||||
const [wallpaperData, setWallpaperData] = React.useState(null)
|
||||
|
||||
const setRandomWallpaper = async () => {
|
||||
const featuredWallpapers = await app.api.request("main", "get", "featuredWallpapers").catch((err) => {
|
||||
const featuredWallpapers = await app.cores.api.request("main", "get", "featuredWallpapers").catch((err) => {
|
||||
console.error(err)
|
||||
return []
|
||||
})
|
||||
@ -45,11 +45,11 @@ export default (props) => {
|
||||
}
|
||||
|
||||
const onClickRegister = () => {
|
||||
app.eventBus.emit("app.createRegister")
|
||||
app.controls.openRegisterForm()
|
||||
}
|
||||
|
||||
const onClickLogin = () => {
|
||||
app.eventBus.emit("app.createLogin")
|
||||
app.controls.openLoginForm()
|
||||
}
|
||||
|
||||
React.useEffect(() => {
|
||||
@ -75,6 +75,25 @@ export default (props) => {
|
||||
<img src={window.isMobile ? config.logo.alt : config.logo.full} className="logo" />
|
||||
</div>
|
||||
|
||||
{
|
||||
props.user && <div
|
||||
className="actions"
|
||||
style={{
|
||||
marginBottom: "50px"
|
||||
}}
|
||||
>
|
||||
<antd.Button
|
||||
type="default"
|
||||
size="large"
|
||||
onClick={() => {
|
||||
app.navigation.goMain()
|
||||
}}
|
||||
>
|
||||
Continue as {props.user.username}
|
||||
</antd.Button>
|
||||
</div>
|
||||
}
|
||||
|
||||
<div className="actions">
|
||||
<antd.Button
|
||||
onClick={onClickLogin}
|
||||
|
@ -29,6 +29,12 @@
|
||||
|
||||
animation: opacityIn 3s ease-in-out 0s forwards;
|
||||
}
|
||||
|
||||
background-image: radial-gradient(rgba(var(--layout-background-contrast), 0.5) 1px, transparent 0),
|
||||
radial-gradient(rgba(var(--layout-background-contrast), 0.3) 1px, transparent 0);
|
||||
background-position: 0 0,
|
||||
25px 25px;
|
||||
background-size: 50px 50px;
|
||||
}
|
||||
|
||||
.wrapper {
|
||||
|
@ -6,7 +6,7 @@ export default (props) => {
|
||||
const [wallpaperData, setWallpaperData] = React.useState(null)
|
||||
|
||||
const setRandomWallpaper = async () => {
|
||||
const featuredWallpapers = await app.api.request("main", "get", "featuredWallpapers").catch((err) => {
|
||||
const featuredWallpapers = await app.cores.api.request("main", "get", "featuredWallpapers").catch((err) => {
|
||||
console.error(err)
|
||||
return []
|
||||
})
|
||||
|
Loading…
x
Reference in New Issue
Block a user