Add version history and bump project version to 0.19.0
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "planet-frontend",
|
||||
"version": "1.0.0",
|
||||
"version": "0.19.0",
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@ant-design/icons": "^5.2.6",
|
||||
|
||||
@@ -11,6 +11,7 @@ import {
|
||||
} from '@ant-design/icons'
|
||||
import { Link, useLocation } from 'react-router-dom'
|
||||
import { useAuthStore } from '../../stores/auth'
|
||||
import packageJson from '../../../package.json'
|
||||
|
||||
const { Sider, Content } = Layout
|
||||
const { Text } = Typography
|
||||
@@ -24,6 +25,7 @@ function AppLayout({ children }: AppLayoutProps) {
|
||||
const { user, logout } = useAuthStore()
|
||||
const [collapsed, setCollapsed] = useState(false)
|
||||
const showBanner = true
|
||||
const appVersion = `v${packageJson.version}`
|
||||
|
||||
const menuItems = [
|
||||
{ key: '/', icon: <DashboardOutlined />, label: <Link to="/">仪表盘</Link> },
|
||||
@@ -74,6 +76,10 @@ function AppLayout({ children }: AppLayoutProps) {
|
||||
<Text className="dashboard-sider-banner-label">当前账号</Text>
|
||||
<Text strong className="dashboard-sider-banner-value">{user?.username}</Text>
|
||||
</div>
|
||||
<div>
|
||||
<Text className="dashboard-sider-banner-label">版本号</Text>
|
||||
<Text strong className="dashboard-sider-banner-value">{appVersion}</Text>
|
||||
</div>
|
||||
<Button type="primary" danger ghost block onClick={logout}>
|
||||
退出登录
|
||||
</Button>
|
||||
|
||||
Reference in New Issue
Block a user