mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-12 23:56:36 +08:00
fix: page title support click to reload
This commit is contained in:
@@ -121,7 +121,7 @@ const StyledHeaderRoot = styled('div')(({ theme }) => {
|
||||
};
|
||||
});
|
||||
|
||||
const FlexContainer = styled('div')({ display: 'flex' });
|
||||
const FlexContainer = styled('div')({ display: 'flex', alignItems: 'center' });
|
||||
|
||||
const TitleContainer = styled('div')(({ theme }) => {
|
||||
return {
|
||||
|
||||
@@ -72,7 +72,11 @@ export const CurrentPageTitle = () => {
|
||||
}, [pageTitle]);
|
||||
|
||||
return pageTitle ? (
|
||||
<ContentText type="sm" title={pageTitle}>
|
||||
<ContentText
|
||||
type="sm"
|
||||
onClick={() => window.location.reload()}
|
||||
title={pageTitle}
|
||||
>
|
||||
{pageTitle}
|
||||
</ContentText>
|
||||
) : null;
|
||||
@@ -85,5 +89,12 @@ const ContentText = styled(Typography)(({ theme }) => {
|
||||
overflow: 'hidden',
|
||||
textOverflow: 'ellipsis',
|
||||
whiteSpace: 'nowrap',
|
||||
padding: '6px 12px',
|
||||
cursor: 'pointer',
|
||||
borderRadius: '5px',
|
||||
|
||||
'&:hover': {
|
||||
backgroundColor: '#F5F7F8',
|
||||
},
|
||||
};
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user