move explore page to home

This commit is contained in:
srgooglo 2022-09-03 03:47:41 +02:00
parent 277432982e
commit 001fd9581b
8 changed files with 8 additions and 104 deletions

View File

@ -7,16 +7,19 @@ const envOrigins = {
"development": {
mainApi: `http://${window.location.hostname}:3000`,
authApi: `http://${window.location.hostname}:4000`,
contentApi: `http://${window.location.hostname}:3050`,
streamingApi: `http://${window.location.hostname}:3002`,
},
"indev": {
mainApi: "https://indev_api.comty.pw",
authApi: `http://indev_auth.comty.pw`,
contentApi: `http://indev_content.comty.pw`,
streamingApi: "https://indev_live.comty.pw",
},
"nightly": {
mainApi: "https://nightly_api.comty.pw",
authApi: `https://nightly_auth.comty.pw`,
contentApi: `https://nightly_content.comty.pw`,
streamingApi: "https://nightly_live.comty.pw"
}
}
@ -40,7 +43,7 @@ export default {
app: {
title: packagejson.name,
siteName: "Comty",
mainPath: "/main",
mainPath: "/home",
storage: {
basics: "user",
token: "token",

View File

@ -17,8 +17,7 @@
"style.compactMode": false,
"language": "en",
"sidebarKeys": [
"main",
"explore",
"home",
"saved",
"marketplace",
"streams"

View File

@ -1,14 +1,9 @@
[
{
"id": "main",
"title": "Dashboard",
"id": "home",
"title": "Home",
"icon": "Home"
},
{
"id": "explore",
"title": "Explore",
"icon": "Compass"
},
{
"id": "saved",
"title": "Saved",

View File

@ -116,7 +116,7 @@ export default class Login extends React.Component {
<div className="session_card">
@{this.props.session.username}
</div>
<antd.Button type="primary" onClick={() => window.app.setLocation(config.app?.mainPath ?? "/main")} >Go to main</antd.Button>
<antd.Button type="primary" onClick={() => window.app.setLocation(config.app?.mainPath ?? "/home")} >Go to main</antd.Button>
</div>}
<FormGenerator
name="normal_login"

View File

@ -1,42 +0,0 @@
import React from "react"
import * as antd from "antd"
import { AppSearcher, Clock } from "components"
import { Translation } from "react-i18next"
import "./index.less"
// TODO: Customizable main menu
export default class Main extends React.Component {
render() {
const user = this.props.user ?? {}
return (
<div className="dashboard">
<div className="header">
<div>
<antd.Avatar
shape="square"
src={user.avatar}
size={window.isMobile ? undefined : 120}
/>
</div>
<div>
<div>
<Clock />
</div>
<div>
<Translation>{
(t) => <h1>{t("main_welcome")} {user.fullName ?? user.username ?? "Guest"}</h1>
}</Translation>
</div>
</div>
</div>
{!window.isMobile && <div>
<AppSearcher />
</div>}
</div>
)
}
}

View File

@ -1,51 +0,0 @@
.dashboard {
padding: 20px;
width: 100%;
height: 100%;
h1 {
font-size: 28px;
margin: 0;
}
> div {
margin-bottom: 20px;
}
.header {
display: flex;
> div {
margin-right: 20px;
}
}
.content {
> div {
margin-left: 20px;
}
}
.quick_actions {
display: flex;
flex-wrap: wrap;
> div {
margin: 6px 10px;
}
}
.widgets {
display: flex;
flex-direction: column;
.widget {
//background-color: var(--background-color-accent);
//padding: 10px;
}
> div {
margin-bottom: 20px;
}
}
}