feat: integrate platform backend and application interfaces
This commit is contained in:
@@ -1,61 +1,32 @@
|
||||
import React from 'react';
|
||||
import { Button } from 'tdesign-react';
|
||||
import { LogoGithubIcon, HelpCircleIcon, SettingIcon } from 'tdesign-icons-react';
|
||||
import { MiragenFlowButton } from '@miragenflow/ui';
|
||||
import { SettingIcon } from 'components/LineIcons';
|
||||
import { useAppDispatch } from 'modules/store';
|
||||
import { toggleSetting } from 'modules/global';
|
||||
|
||||
import LogoFullIcon from 'assets/svg/assets-logo-full.svg?component';
|
||||
import Style from './index.module.less';
|
||||
|
||||
export default function Header() {
|
||||
const dispatch = useAppDispatch();
|
||||
|
||||
const navToGitHub = () => {
|
||||
window.open('https://github.com/tencent/tdesign-react-starter');
|
||||
};
|
||||
|
||||
const navToHelper = () => {
|
||||
window.open('http://tdesign.tencent.com/starter/docs/react/get-started');
|
||||
};
|
||||
|
||||
const toggleSettingPanel = () => {
|
||||
dispatch(toggleSetting());
|
||||
};
|
||||
|
||||
return (
|
||||
<div>
|
||||
<header className={Style.loginHeader}>
|
||||
<LogoFullIcon className={Style.logo} />
|
||||
<div className={Style.operationsContainer}>
|
||||
<Button
|
||||
className={Style.operationsButton}
|
||||
theme='default'
|
||||
shape='square'
|
||||
variant='text'
|
||||
onClick={navToGitHub}
|
||||
>
|
||||
<LogoGithubIcon className={Style.icon} />
|
||||
</Button>
|
||||
<Button
|
||||
className={Style.operationsButton}
|
||||
theme='default'
|
||||
shape='square'
|
||||
variant='text'
|
||||
onClick={navToHelper}
|
||||
>
|
||||
<HelpCircleIcon className={Style.icon} />
|
||||
</Button>
|
||||
<Button
|
||||
className={Style.operationsButton}
|
||||
theme='default'
|
||||
shape='square'
|
||||
variant='text'
|
||||
onClick={toggleSettingPanel}
|
||||
>
|
||||
<SettingIcon className={Style.icon} />
|
||||
</Button>
|
||||
</div>
|
||||
</header>
|
||||
</div>
|
||||
<header className={Style.loginHeader}>
|
||||
<div className={Style.logo}><strong>元境幻生</strong><small>MiragenFlow 管理台</small></div>
|
||||
<div className={Style.operationsContainer}>
|
||||
<MiragenFlowButton
|
||||
aria-label='页面设置'
|
||||
className={Style.operationsButton}
|
||||
shape='square'
|
||||
type='text'
|
||||
onClick={toggleSettingPanel}
|
||||
>
|
||||
<SettingIcon className={Style.icon} />
|
||||
</MiragenFlowButton>
|
||||
</div>
|
||||
</header>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user