mirror of
https://github.com/toeverything/AFFiNE.git
synced 2024-12-25 01:42:02 +03:00
fix: banner blocking new page button issue (#3301)
This commit is contained in:
parent
57bac5d36b
commit
f4aa249138
@ -23,6 +23,7 @@ import {
|
||||
import { contentLayoutAtom } from '../../../atoms/layout';
|
||||
import { currentModeAtom } from '../../../atoms/mode';
|
||||
import type { AffineOfficialWorkspace } from '../../../shared';
|
||||
import DownloadClientTip from './download-tips';
|
||||
import { EditorOptionMenu } from './header-right-items/editor-option-menu';
|
||||
import TrashButtonGroup from './header-right-items/trash-button-group';
|
||||
import * as styles from './styles.css';
|
||||
@ -165,6 +166,7 @@ export const Header = forwardRef<
|
||||
PropsWithChildren<HeaderProps> & HTMLAttributes<HTMLDivElement>
|
||||
>((props, ref) => {
|
||||
const [showWarning, setShowWarning] = useState(false);
|
||||
const [showDownloadTip, setShowDownloadTip] = useState(true);
|
||||
// const [shouldShowGuideDownloadClientTip] = useAtom(
|
||||
// guideDownloadClientTipAtom
|
||||
// );
|
||||
@ -184,14 +186,20 @@ export const Header = forwardRef<
|
||||
data-open={open}
|
||||
data-sidebar-floating={appSidebarFloating}
|
||||
>
|
||||
<BrowserWarning
|
||||
show={showWarning}
|
||||
message={<OSWarningMessage />}
|
||||
onClose={() => {
|
||||
setShowWarning(false);
|
||||
}}
|
||||
/>
|
||||
|
||||
{showDownloadTip ? (
|
||||
<DownloadClientTip
|
||||
show={showDownloadTip}
|
||||
onClose={() => setShowDownloadTip(false)}
|
||||
/>
|
||||
) : (
|
||||
<BrowserWarning
|
||||
show={showWarning}
|
||||
message={<OSWarningMessage />}
|
||||
onClose={() => {
|
||||
setShowWarning(false);
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
<div
|
||||
className={styles.header}
|
||||
data-has-warning={showWarning}
|
||||
|
@ -2,7 +2,7 @@ import type { ComplexStyleRule } from '@vanilla-extract/css';
|
||||
import { style } from '@vanilla-extract/css';
|
||||
|
||||
export const headerContainer = style({
|
||||
height: '52px',
|
||||
height: 'auto',
|
||||
flexShrink: 0,
|
||||
position: 'sticky',
|
||||
top: 0,
|
||||
|
Loading…
Reference in New Issue
Block a user