mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 04:18:54 +00:00
fix(core): adjust sidebar workspace card syncing tooltip style (#6356)
This commit is contained in:
@@ -18,6 +18,7 @@ import {
|
||||
UnsyncIcon,
|
||||
} from '@blocksuite/icons';
|
||||
import { useService, Workspace } from '@toeverything/infra';
|
||||
import { cssVar } from '@toeverything/theme';
|
||||
import { useSetAtom } from 'jotai';
|
||||
import { debounce } from 'lodash-es';
|
||||
import type { HTMLAttributes } from 'react';
|
||||
@@ -59,7 +60,7 @@ const LocalWorkspaceStatus = () => {
|
||||
return (
|
||||
<>
|
||||
{!environment.isDesktop ? (
|
||||
<InformationFillDuotoneIcon data-warning-color="true" />
|
||||
<InformationFillDuotoneIcon style={{ color: cssVar('errorColor') }} />
|
||||
) : (
|
||||
<LocalWorkspaceIcon />
|
||||
)}
|
||||
@@ -234,7 +235,10 @@ const WorkspaceInfo = ({ name }: { name: string }) => {
|
||||
|
||||
{/* when syncing/offline/... */}
|
||||
<div className={styles.workspaceInfo} data-type="events">
|
||||
<Tooltip content={message}>
|
||||
<Tooltip
|
||||
content={message}
|
||||
options={{ className: styles.workspaceInfoTooltip }}
|
||||
>
|
||||
<div className={styles.workspaceActiveStatus}>
|
||||
<SyncingWorkspaceStatus progress={progress} />
|
||||
</div>
|
||||
|
||||
@@ -96,4 +96,12 @@ export const workspaceActiveStatus = style({
|
||||
globalStyle(`.${workspaceActiveStatus} svg`, {
|
||||
width: 16,
|
||||
height: 16,
|
||||
color: cssVar('iconSecondary'),
|
||||
});
|
||||
|
||||
export const workspaceInfoTooltip = style({
|
||||
fontSize: cssVar('fontXs'),
|
||||
lineHeight: '20px',
|
||||
padding: '0 8px',
|
||||
minHeight: 20,
|
||||
});
|
||||
|
||||
@@ -1,54 +0,0 @@
|
||||
import { displayFlex, styled, textEllipsis } from '@affine/component';
|
||||
import { cssVar } from '@toeverything/theme';
|
||||
export const StyledSelectorContainer = styled('div')({
|
||||
height: '50px',
|
||||
display: 'flex',
|
||||
alignItems: 'center',
|
||||
padding: '0 6px',
|
||||
borderRadius: '8px',
|
||||
outline: 'none',
|
||||
width: 'fit-content',
|
||||
maxWidth: '100%',
|
||||
color: cssVar('textPrimaryColor'),
|
||||
':hover': {
|
||||
cursor: 'pointer',
|
||||
background: cssVar('hoverColor'),
|
||||
},
|
||||
});
|
||||
|
||||
export const StyledSelectorWrapper = styled('div')(() => {
|
||||
return {
|
||||
marginLeft: '8px',
|
||||
flexGrow: 1,
|
||||
overflow: 'hidden',
|
||||
};
|
||||
});
|
||||
export const StyledWorkspaceName = styled('div')(() => {
|
||||
return {
|
||||
fontSize: cssVar('fontSm'),
|
||||
lineHeight: '22px',
|
||||
fontWeight: 500,
|
||||
userSelect: 'none',
|
||||
...textEllipsis(1),
|
||||
marginLeft: '4px',
|
||||
};
|
||||
});
|
||||
|
||||
export const StyledWorkspaceStatus = styled('div')(() => {
|
||||
return {
|
||||
height: '22px',
|
||||
...displayFlex('flex-start', 'center'),
|
||||
fontSize: cssVar('fontXs'),
|
||||
color: cssVar('black50'),
|
||||
userSelect: 'none',
|
||||
padding: '0 4px',
|
||||
gap: '4px',
|
||||
zIndex: '1',
|
||||
svg: {
|
||||
color: cssVar('iconSecondary'),
|
||||
'&[data-warning-color="true"]': {
|
||||
color: cssVar('errorColor'),
|
||||
},
|
||||
},
|
||||
};
|
||||
});
|
||||
Reference in New Issue
Block a user