fix(ui): card issue with value and icon color
This commit is contained in:
parent
e49792f7d2
commit
c3e8da8880
5 changed files with 10 additions and 3 deletions
|
|
@ -12,7 +12,7 @@ function CardIssueItem(props: Props) {
|
|||
<div className='flex items-center py-2 hover:bg-active-blue cursor-pointer'>
|
||||
<div className='mr-auto flex items-center'>
|
||||
<div className='flex items-center justify-center flex-shrink-0 mr-3 relative'>
|
||||
<Icon name={issue.icon} size='24' className='z-10 inset-0' />
|
||||
<Icon name={issue.icon} size='24' className='z-10 inset-0' style={{fill: issue.color }}/>
|
||||
</div>
|
||||
<div className='flex-1 overflow-hidden'>
|
||||
{issue.name}
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ export const INDEXES = {
|
|||
PLAYER_REQUEST_WINDOW: 10,
|
||||
BUG_REPORT_PICKER: 19,
|
||||
BUG_REPORT: 20,
|
||||
HEADER: 99,
|
||||
POPUP_GUIDE_BG: 99997,
|
||||
POPUP_GUIDE_BTN: 99998,
|
||||
TOOLTIP: 99999,
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ import { Layout, Space } from 'antd';
|
|||
import { useStore } from 'App/mstore';
|
||||
import { Icon } from 'UI';
|
||||
import { observer } from 'mobx-react-lite';
|
||||
import { INDEXES } from 'App/constants/zindex';
|
||||
|
||||
const { Header } = Layout;
|
||||
|
||||
|
|
@ -17,7 +18,7 @@ function TopHeader() {
|
|||
style={{
|
||||
position: 'sticky',
|
||||
top: 0,
|
||||
zIndex: 1,
|
||||
zIndex: INDEXES.HEADER,
|
||||
padding: '0 20px',
|
||||
display: 'flex',
|
||||
alignItems: 'center',
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@ export default class Issue {
|
|||
sessionCount: number = 0;
|
||||
icon: string = '';
|
||||
source: string = '';
|
||||
color: string = '';
|
||||
|
||||
constructor() {
|
||||
this.type = '';
|
||||
|
|
@ -28,6 +29,7 @@ export default class Issue {
|
|||
this.sessionCount = 0;
|
||||
this.icon = '';
|
||||
this.source = '';
|
||||
this.color = '';
|
||||
}
|
||||
|
||||
fromJSON(json: any) {
|
||||
|
|
@ -35,7 +37,8 @@ export default class Issue {
|
|||
this.name = ISSUE_MAP[json.name].name || '';
|
||||
this.sessionCount = json.sessionCount;
|
||||
this.icon = ISSUE_MAP[json.name].icon || '';
|
||||
this.source = json.source;
|
||||
this.source = json.value || json.source || '';
|
||||
this.color = ISSUE_MAP[json.name].color || '';
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
|
@ -191,6 +191,8 @@ export default class Widget {
|
|||
name: this.name,
|
||||
series: this.series.map((series: any) => series.toJson()),
|
||||
thumbnail: this.thumbnail,
|
||||
page: this.page,
|
||||
limit: this.limit,
|
||||
config: {
|
||||
...this.config,
|
||||
col:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue