mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-14 13:25:12 +00:00
fix(core): adjust some uis for sharing (#12486)
fix AF-2660 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Style** - Improved visual appearance of sidebar buttons and quick search input, including reduced sizes, updated padding, and enhanced hover effects. - Adjusted layout spacing for quick search and new page elements in the sidebar. - Updated share button styling to use the primary variant. - **New Features** - Notification cards now only display messages and action footers when relevant, providing a cleaner interface. - **Refactor** - Removed shortcut hint and spotlight elements from the quick search input for a simplified user experience. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
import { cssVar } from '@toeverything/theme';
|
||||
import { cssVarV2 } from '@toeverything/theme/v2';
|
||||
import { style } from '@vanilla-extract/css';
|
||||
|
||||
export const root = style({
|
||||
width: 32,
|
||||
height: 32,
|
||||
width: 28,
|
||||
height: 28,
|
||||
borderRadius: 8,
|
||||
boxShadow: '0px 1px 2px 0px rgba(0, 0, 0, 0.15)',
|
||||
borderWidth: 1,
|
||||
borderColor: cssVarV2('layer/insideBorder/border'),
|
||||
boxShadow: cssVar('buttonShadow'),
|
||||
borderWidth: 0,
|
||||
background: cssVarV2('button/siderbarPrimary/background'),
|
||||
});
|
||||
|
||||
@@ -15,7 +15,7 @@ export const withAskRoot = style([
|
||||
root,
|
||||
{
|
||||
width: 'auto',
|
||||
padding: 6,
|
||||
padding: 4,
|
||||
},
|
||||
]);
|
||||
|
||||
@@ -23,7 +23,7 @@ export const withAskContent = style({
|
||||
fontSize: 20,
|
||||
display: 'flex',
|
||||
alignItems: 'center',
|
||||
gap: 2,
|
||||
gap: 4,
|
||||
color: cssVarV2.icon.primary,
|
||||
});
|
||||
|
||||
|
||||
@@ -6,16 +6,18 @@ export const root = style({
|
||||
background: cssVarV2('button/siderbarPrimary/background'),
|
||||
alignItems: 'center',
|
||||
borderRadius: '8px',
|
||||
border: `1px solid ${cssVarV2('layer/insideBorder/border')}`,
|
||||
fontSize: cssVar('fontSm'),
|
||||
width: '100%',
|
||||
height: '36px',
|
||||
height: '30px',
|
||||
userSelect: 'none',
|
||||
cursor: 'pointer',
|
||||
padding: '0 12px',
|
||||
padding: '0 12px 0 20px',
|
||||
position: 'relative',
|
||||
whiteSpace: 'nowrap',
|
||||
overflow: 'hidden',
|
||||
':hover': {
|
||||
background: cssVarV2('layer/background/hoverOverlay'),
|
||||
},
|
||||
});
|
||||
export const icon = style({
|
||||
marginRight: '8px',
|
||||
|
||||
@@ -3,7 +3,6 @@ import { SearchIcon } from '@blocksuite/icons/rc';
|
||||
import clsx from 'clsx';
|
||||
import type { HTMLAttributes } from 'react';
|
||||
|
||||
import { Spotlight } from '../spolight';
|
||||
import * as styles from './index.css';
|
||||
|
||||
interface QuickSearchInputProps extends HTMLAttributes<HTMLDivElement> {
|
||||
@@ -25,11 +24,6 @@ export function QuickSearchInput({ onClick, ...props }: QuickSearchInputProps) {
|
||||
<span className={styles.quickSearchBarEllipsisStyle}>
|
||||
{t['Quick search']()}
|
||||
</span>
|
||||
<div className={styles.spacer} />
|
||||
<div className={styles.shortcutHint}>
|
||||
{environment.isMacOs ? ' ⌘ + K' : ' Ctrl + K'}
|
||||
</div>
|
||||
<Spotlight />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user