mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-10 02:54:15 +00:00
update administration
This commit is contained in:
parent
429a12cbf4
commit
927be26ece
@ -1,9 +1,49 @@
|
|||||||
import React from "react"
|
import React from "react"
|
||||||
|
import * as antd from "antd"
|
||||||
|
import { Icons, createIconRender } from "components/Icons"
|
||||||
|
|
||||||
import "./index.less"
|
import "./index.less"
|
||||||
|
|
||||||
|
const toolMap = {
|
||||||
|
userTools: {
|
||||||
|
label: "User Tools",
|
||||||
|
icon: "user",
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
label: "User List",
|
||||||
|
icon: "user",
|
||||||
|
path: "/administration/users/list",
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
export default (props) => {
|
export default (props) => {
|
||||||
return <div>
|
const generateMenu = (toolMap) => {
|
||||||
|
return Object.keys(toolMap).map((tool) => {
|
||||||
|
const toolData = toolMap[tool]
|
||||||
|
|
||||||
|
return (
|
||||||
|
<antd.Menu.Item key={tool}>
|
||||||
|
{createIconRender(toolData.icon)}
|
||||||
|
<span>{toolData.label}</span>
|
||||||
|
</antd.Menu.Item>
|
||||||
|
)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
return <div className="administation">
|
||||||
<h1>Administration</h1>
|
<h1>Administration</h1>
|
||||||
|
|
||||||
|
<div className="menus">
|
||||||
|
<antd.Menu
|
||||||
|
mode="inline"
|
||||||
|
defaultSelectedKeys={["userTools"]}
|
||||||
|
defaultOpenKeys={["userTools"]}
|
||||||
|
style={{ height: "100%", borderRight: 0 }}
|
||||||
|
>
|
||||||
|
{generateMenu(toolMap)}
|
||||||
|
</antd.Menu>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
@ -0,0 +1,13 @@
|
|||||||
|
import React from "react"
|
||||||
|
|
||||||
|
export default (props) => {
|
||||||
|
const [roles, setRoles] = React.useState(null)
|
||||||
|
|
||||||
|
const getRoles = () => {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return <div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user