|
@@ -10,6 +10,7 @@ import ExitModal from '@/components/ExitModal';
|
|
import LanguageSettingModal from '@/components/LanguageSettingModal';
|
|
import LanguageSettingModal from '@/components/LanguageSettingModal';
|
|
import { showNotImplemented } from '@/utils/notificationHelper';
|
|
import { showNotImplemented } from '@/utils/notificationHelper';
|
|
import { FormattedMessage } from 'react-intl';
|
|
import { FormattedMessage } from 'react-intl';
|
|
|
|
+import { UserOutlined } from '@ant-design/icons';
|
|
|
|
|
|
interface SystemZoneProps {
|
|
interface SystemZoneProps {
|
|
onMenuClick?: (key: string) => void;
|
|
onMenuClick?: (key: string) => void;
|
|
@@ -57,10 +58,16 @@ const SystemZone = forwardRef<HTMLDivElement, SystemZoneProps>(
|
|
boxShadow: '0 -2px 5px rgba(0,0,0,0.1)',
|
|
boxShadow: '0 -2px 5px rgba(0,0,0,0.1)',
|
|
}}
|
|
}}
|
|
>
|
|
>
|
|
|
|
+ <style>{`
|
|
|
|
+ .system-zone-space .ant-space-item {
|
|
|
|
+ width: 100%;
|
|
|
|
+ }
|
|
|
|
+ `}</style>
|
|
<Space
|
|
<Space
|
|
direction="vertical"
|
|
direction="vertical"
|
|
align="start"
|
|
align="start"
|
|
style={{ width: '100%', paddingLeft: 20 }}
|
|
style={{ width: '100%', paddingLeft: 20 }}
|
|
|
|
+ className='system-zone-space'
|
|
>
|
|
>
|
|
<IconButton
|
|
<IconButton
|
|
icon={
|
|
icon={
|
|
@@ -77,6 +84,7 @@ const SystemZone = forwardRef<HTMLDivElement, SystemZoneProps>(
|
|
iconPlace="left"
|
|
iconPlace="left"
|
|
iconSize={32} // 和size 2x 保持一致
|
|
iconSize={32} // 和size 2x 保持一致
|
|
type="primary"
|
|
type="primary"
|
|
|
|
+ block
|
|
style={{ padding: '4px 16px' }}
|
|
style={{ padding: '4px 16px' }}
|
|
onClick={handleLanguageClick}
|
|
onClick={handleLanguageClick}
|
|
>
|
|
>
|
|
@@ -86,14 +94,49 @@ const SystemZone = forwardRef<HTMLDivElement, SystemZoneProps>(
|
|
/>
|
|
/>
|
|
</IconButton>
|
|
</IconButton>
|
|
|
|
|
|
- <MeButton
|
|
|
|
- size="large"
|
|
|
|
- isLogin={login}
|
|
|
|
- avatarUrl={avatarUrl || undefined}
|
|
|
|
- username={login ? username : '未登录'}
|
|
|
|
- //onClick={() => onMenuClick?.('me')}
|
|
|
|
|
|
+ <IconButton
|
|
|
|
+ icon={
|
|
|
|
+ login ? (
|
|
|
|
+ avatarUrl ? (
|
|
|
|
+ <Icon
|
|
|
|
+ module="module-common"
|
|
|
|
+ name="btn_3DCam_AIView"
|
|
|
|
+ userId="user-A"
|
|
|
|
+ theme="default"
|
|
|
|
+ size="2x"
|
|
|
|
+ state="normal"
|
|
|
|
+ url={avatarUrl}
|
|
|
|
+ />
|
|
|
|
+ ) : (
|
|
|
|
+ <Icon
|
|
|
|
+ module="module-security"
|
|
|
|
+ name="user-not-login"
|
|
|
|
+ userId="user-A"
|
|
|
|
+ theme="default"
|
|
|
|
+ size="2x"
|
|
|
|
+ state="normal"
|
|
|
|
+ />
|
|
|
|
+ )
|
|
|
|
+ ) : (
|
|
|
|
+ <Icon
|
|
|
|
+ module="module-common"
|
|
|
|
+ name="user-not-login"
|
|
|
|
+ userId="user-A"
|
|
|
|
+ theme="default"
|
|
|
|
+ size="2x"
|
|
|
|
+ state="normal"
|
|
|
|
+ />
|
|
|
|
+ )
|
|
|
|
+ }
|
|
|
|
+ iconPlace="left"
|
|
|
|
+ iconSize={32}
|
|
|
|
+ type="primary"
|
|
|
|
+ block
|
|
|
|
+ style={{ padding: '4px 16px' }}
|
|
onClick={() => showNotImplemented('我的')}
|
|
onClick={() => showNotImplemented('我的')}
|
|
- />
|
|
|
|
|
|
+ >
|
|
|
|
+ {login ? username : '未登录'}
|
|
|
|
+ </IconButton>
|
|
|
|
|
|
<IconButton
|
|
<IconButton
|
|
data-testid="exit-button"
|
|
data-testid="exit-button"
|
|
@@ -110,6 +153,7 @@ const SystemZone = forwardRef<HTMLDivElement, SystemZoneProps>(
|
|
iconPlace="left"
|
|
iconPlace="left"
|
|
iconSize={32}
|
|
iconSize={32}
|
|
type="primary"
|
|
type="primary"
|
|
|
|
+ block
|
|
style={{ padding: '4px 16px' }}
|
|
style={{ padding: '4px 16px' }}
|
|
onClick={handleExitClick}
|
|
onClick={handleExitClick}
|
|
>
|
|
>
|