Skip to content

Commit

Permalink
update(console): pin status color / copyright / button focus etc (#2520)
Browse files Browse the repository at this point in the history
  • Loading branch information
waynelwz authored Jul 18, 2023
1 parent 892da55 commit 130d048
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 10 deletions.
3 changes: 3 additions & 0 deletions console/packages/starwhale-ui/src/Button/Button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,9 @@ function Button(
':hover': {
backgroundColor: 'transparent',
},
':focus': {
backgroundColor: 'transparent',
},
},
},
},
Expand Down
13 changes: 12 additions & 1 deletion console/packages/starwhale-ui/src/Tooltip/Tooltip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,18 +36,29 @@ function Tooltip({ children, ...props }: ITooltipProps) {
)
}

function IconTooltip({ content, icon, ...props }: { content: React.ReactNode; icon: IconTypesT }) {
function IconTooltip({
content,
icon,
style = {},
...props
}: {
content: React.ReactNode
icon: IconTypesT
style?: React.CSSProperties
}) {
const [css] = themedUseStyletron()

return (
<Tooltip content={content} showArrow placement='top' {...props}>
<p
// @ts-ignore
className={css({
'cursor': 'pointer',
'color': 'rgba(2,16,43,0.40)',
':hover': {
color: '#5181E0',
},
...style,
})}
>
<IconFont type={icon} />
Expand Down
7 changes: 6 additions & 1 deletion console/src/components/Header/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,12 @@ export default function Header() {
}}
>
<LanguageSelector />
<a target='_blank' rel='noreferrer' href={isZH ? docsZH : docsEN} style={{ color: '#FFF' }}>
<a
target='_blank'
rel='noreferrer'
href={isZH ? docsZH : docsEN}
style={{ color: '#FFF', textDecoration: 'none', lineHeight: '20px' }}
>
{t('docs')}
</a>
</div>
Expand Down
8 changes: 8 additions & 0 deletions console/src/i18n/locales.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1625,6 +1625,14 @@ const locales0 = {
en: 'Google',
zh: 'Google',
},
'Wechat': {
en: 'Wechat',
zh: '微信',
},
'copyright': {
en: 'Copyright © 2023 Starwhale, Inc. All rights reserved. ',
zh: '版权所有 © 2023 Starwhale, Inc. 保留所有权利。',
},
...basic,
...dataset,
...model,
Expand Down
16 changes: 8 additions & 8 deletions console/src/pages/Job/JobListCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -171,14 +171,11 @@ export default function JobListCard() {
}

const pinBtnStyle: ConfigurationOverride = {
'position': 'absolute',
'top': 0,
'bottom': 0,
'left': '-8px',
'display': job.pinnedTime ? 'block' : 'none',
'& .iconfont': {
color: '#666',
},
position: 'absolute',
top: 0,
bottom: 0,
left: '-8px',
display: job.pinnedTime ? 'block' : 'none',
}
if (canPinOrUnpin) {
pinBtnStyle[':hover .iconfont'] = {
Expand Down Expand Up @@ -210,6 +207,9 @@ export default function JobListCard() {
// eslint-disable-next-line no-nested-ternary
canPinOrUnpin ? (job.pinnedTime ? t('job.unpin') : t('job.pin')) : null
}
style={{
color: job.pinnedTime ? '#FFB23D' : 'rgba(2,16,43,0.40)',
}}
icon='top'
/>
)}
Expand Down

0 comments on commit 130d048

Please sign in to comment.