Skip to content

Commit

Permalink
refactor(ui): optimize version number box style (#533)
Browse files Browse the repository at this point in the history
## What type of PR is this?
/kind refactor

## What this PR does / why we need it:

Optimize version number box style.


![image](https://github.com/user-attachments/assets/8c09edfe-51a3-4de0-9bab-3e2add85ecb7)

Co-authored-by: hai-tian <tianhai_th@163.com>
  • Loading branch information
elliotxx and hai-tian authored Jul 15, 2024
1 parent 05839e0 commit 91249f8
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions ui/src/components/layout/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import {
QuestionCircleOutlined,
SearchOutlined,
CaretDownOutlined,
TagOutlined,
} from '@ant-design/icons'
import type { MenuProps } from 'antd'
import { Outlet, useLocation, useNavigate } from 'react-router-dom'
Expand Down Expand Up @@ -208,15 +209,22 @@ const LayoutPage = () => {
/>
</div>
<div className={styles.right} style={{ marginRight: 80 }}>
<div className={styles.version_number}>
<span>{versionNumber}</span>
</div>
{isReadOnlyMode && (
<div className={styles.read_only_mode}>
<img className={styles.read_only_mode_img} src={showPng} />
<span>{t('ReadOnlyMode')}</span>
</div>
)}
{versionNumber && (
<div
className={styles.read_only_mode}
style={{ padding: '2px 5px' }}
>
<TagOutlined />
<span style={{ marginRight: 5 }}>{versionNumber}</span>
</div>
)}

<div className={styles.help}>
<Dropdown menu={{ items: languageItems }}>
<a
Expand Down

0 comments on commit 91249f8

Please sign in to comment.