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