mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-18 18:41:52 +08:00
fix: cleanup editor layout (#3822)
(cherry picked from commit 71cf36a300)
This commit is contained in:
@@ -106,11 +106,6 @@ const deleteLayoutAtom = atom<null, [string], void>(null, (_, set, id) => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
// clean up plugin windows when switching to other pages
|
|
||||||
rootStore.sub(currentPageAtom, () => {
|
|
||||||
rootStore.set(contentLayoutAtom, 'editor');
|
|
||||||
});
|
|
||||||
|
|
||||||
// module -> importName -> updater[]
|
// module -> importName -> updater[]
|
||||||
export const _rootImportsMap = new Map<string, Map<string, any>>();
|
export const _rootImportsMap = new Map<string, Map<string, any>>();
|
||||||
const rootImportsMapSetupPromise = setupImportsMap(_rootImportsMap, {
|
const rootImportsMapSetupPromise = setupImportsMap(_rootImportsMap, {
|
||||||
|
|||||||
@@ -100,7 +100,6 @@ export function WorkspaceHeader({
|
|||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
center={<WorkspaceModeFilterTab />}
|
center={<WorkspaceModeFilterTab />}
|
||||||
right={<PluginHeader />}
|
|
||||||
/>
|
/>
|
||||||
{<FilterContainer workspaceId={currentWorkspaceId} />}
|
{<FilterContainer workspaceId={currentWorkspaceId} />}
|
||||||
</>
|
</>
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import type { EditorContainer } from '@blocksuite/editor';
|
|||||||
import { assertExists } from '@blocksuite/global/utils';
|
import { assertExists } from '@blocksuite/global/utils';
|
||||||
import type { Page } from '@blocksuite/store';
|
import type { Page } from '@blocksuite/store';
|
||||||
import {
|
import {
|
||||||
|
contentLayoutAtom,
|
||||||
currentPageIdAtom,
|
currentPageIdAtom,
|
||||||
currentWorkspaceAtom,
|
currentWorkspaceAtom,
|
||||||
currentWorkspaceIdAtom,
|
currentWorkspaceIdAtom,
|
||||||
@@ -86,6 +87,7 @@ export const DetailPage = (): ReactElement => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export const loader: LoaderFunction = async args => {
|
export const loader: LoaderFunction = async args => {
|
||||||
|
rootStore.set(contentLayoutAtom, 'editor');
|
||||||
if (args.params.workspaceId) {
|
if (args.params.workspaceId) {
|
||||||
localStorage.setItem('last_workspace_id', args.params.workspaceId);
|
localStorage.setItem('last_workspace_id', args.params.workspaceId);
|
||||||
rootStore.set(currentWorkspaceIdAtom, args.params.workspaceId);
|
rootStore.set(currentWorkspaceIdAtom, args.params.workspaceId);
|
||||||
|
|||||||
Reference in New Issue
Block a user