mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-13 12:55:00 +00:00
feat: support for view management (#2892)
This commit is contained in:
5
packages/env/src/filter.ts
vendored
5
packages/env/src/filter.ts
vendored
@@ -25,8 +25,11 @@ export type Filter = {
|
||||
args: Literal[];
|
||||
};
|
||||
|
||||
export type View = {
|
||||
export type Collection = {
|
||||
id: string;
|
||||
name: string;
|
||||
pinned?: boolean;
|
||||
filterList: Filter[];
|
||||
allowList?: string[];
|
||||
excludeList?: string[];
|
||||
};
|
||||
|
||||
7
packages/env/src/page-info.ts
vendored
Normal file
7
packages/env/src/page-info.ts
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
export type PageInfo = {
|
||||
isEdgeless: boolean;
|
||||
title: string;
|
||||
id: string;
|
||||
};
|
||||
|
||||
export type GetPageInfoById = (id: string) => PageInfo | undefined;
|
||||
4
packages/env/src/workspace.ts
vendored
4
packages/env/src/workspace.ts
vendored
@@ -7,7 +7,7 @@ import type {
|
||||
} from '@blocksuite/store';
|
||||
import type { FC, PropsWithChildren } from 'react';
|
||||
|
||||
import type { View } from './filter';
|
||||
import type { Collection } from './filter';
|
||||
import type { Workspace as RemoteWorkspace } from './workspace/legacy-cloud';
|
||||
|
||||
export enum WorkspaceVersion {
|
||||
@@ -185,7 +185,7 @@ type PageDetailProps<Flavour extends keyof WorkspaceRegistry> =
|
||||
type PageListProps<_Flavour extends keyof WorkspaceRegistry> = {
|
||||
blockSuiteWorkspace: BlockSuiteWorkspace;
|
||||
onOpenPage: (pageId: string, newTab?: boolean) => void;
|
||||
view: View;
|
||||
collection: Collection;
|
||||
};
|
||||
|
||||
export interface WorkspaceUISchema<Flavour extends keyof WorkspaceRegistry> {
|
||||
|
||||
Reference in New Issue
Block a user