feat: headless filter in all pages tab (#2566)

Co-authored-by: himself65 <himself65@outlook.com>
This commit is contained in:
3720
2023-05-29 12:06:40 +08:00
committed by GitHub
parent e0eb216b9b
commit f3ac12254c
23 changed files with 1098 additions and 15 deletions

View File

@@ -8,7 +8,7 @@ import { WorkspaceFlavour } from '@affine/workspace/type';
import { CloseIcon, MinusIcon, RoundedRectangleIcon } from '@blocksuite/icons';
import type { Page } from '@blocksuite/store';
import { useAtom, useAtomValue } from 'jotai';
import type { FC, HTMLAttributes, PropsWithChildren } from 'react';
import type { FC, HTMLAttributes, PropsWithChildren, ReactNode } from 'react';
import {
forwardRef,
lazy,
@@ -44,6 +44,7 @@ export type BaseHeaderProps<
currentPage: Page | null;
isPublic: boolean;
isPreview: boolean;
leftSlot?: ReactNode;
};
export const enum HeaderRightItemName {
@@ -198,11 +199,14 @@ export const Header = forwardRef<
data-is-edgeless={mode === 'edgeless'}
>
<Suspense>
<SidebarSwitch
visible={!open}
tooltipContent={t['Expand sidebar']()}
data-testid="sliderBar-arrowButton-expand"
/>
<div style={{ display: 'flex', alignItems: 'center' }}>
<SidebarSwitch
visible={!open}
tooltipContent={t['Expand sidebar']()}
data-testid="sliderBar-arrowButton-expand"
/>
{props.leftSlot}
</div>
</Suspense>
{props.children}