mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-11 03:24:16 +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 [wallpaperData, setWallpaperData] = React.useState(null)
|
||||||
|
|
||||||
const setRandomWallpaper = async () => {
|
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)
|
console.error(err)
|
||||||
return []
|
return []
|
||||||
})
|
})
|
||||||
@ -45,11 +45,11 @@ export default (props) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const onClickRegister = () => {
|
const onClickRegister = () => {
|
||||||
app.eventBus.emit("app.createRegister")
|
app.controls.openRegisterForm()
|
||||||
}
|
}
|
||||||
|
|
||||||
const onClickLogin = () => {
|
const onClickLogin = () => {
|
||||||
app.eventBus.emit("app.createLogin")
|
app.controls.openLoginForm()
|
||||||
}
|
}
|
||||||
|
|
||||||
React.useEffect(() => {
|
React.useEffect(() => {
|
||||||
@ -75,6 +75,25 @@ export default (props) => {
|
|||||||
<img src={window.isMobile ? config.logo.alt : config.logo.full} className="logo" />
|
<img src={window.isMobile ? config.logo.alt : config.logo.full} className="logo" />
|
||||||
</div>
|
</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">
|
<div className="actions">
|
||||||
<antd.Button
|
<antd.Button
|
||||||
onClick={onClickLogin}
|
onClick={onClickLogin}
|
||||||
|
@ -29,6 +29,12 @@
|
|||||||
|
|
||||||
animation: opacityIn 3s ease-in-out 0s forwards;
|
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 {
|
.wrapper {
|
||||||
|
@ -6,7 +6,7 @@ export default (props) => {
|
|||||||
const [wallpaperData, setWallpaperData] = React.useState(null)
|
const [wallpaperData, setWallpaperData] = React.useState(null)
|
||||||
|
|
||||||
const setRandomWallpaper = async () => {
|
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)
|
console.error(err)
|
||||||
return []
|
return []
|
||||||
})
|
})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user