mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 04:18:54 +00:00
fix: add guide to the other page (#2779)
This commit is contained in:
@@ -10,7 +10,7 @@ import {
|
|||||||
WorkspaceFallback,
|
WorkspaceFallback,
|
||||||
} from '@affine/component/workspace';
|
} from '@affine/component/workspace';
|
||||||
import { DebugLogger } from '@affine/debug';
|
import { DebugLogger } from '@affine/debug';
|
||||||
import { config, DEFAULT_HELLO_WORLD_PAGE_ID } from '@affine/env';
|
import { config, DEFAULT_HELLO_WORLD_PAGE_ID, env } from '@affine/env';
|
||||||
import { initEmptyPage, initPageWithPreloading } from '@affine/env/blocksuite';
|
import { initEmptyPage, initPageWithPreloading } from '@affine/env/blocksuite';
|
||||||
import type { BackgroundProvider } from '@affine/env/workspace';
|
import type { BackgroundProvider } from '@affine/env/workspace';
|
||||||
import { WorkspaceFlavour } from '@affine/env/workspace';
|
import { WorkspaceFlavour } from '@affine/env/workspace';
|
||||||
@@ -48,6 +48,7 @@ import {
|
|||||||
publicWorkspaceAtom,
|
publicWorkspaceAtom,
|
||||||
publicWorkspaceIdAtom,
|
publicWorkspaceIdAtom,
|
||||||
} from '../atoms/public-workspace';
|
} from '../atoms/public-workspace';
|
||||||
|
import type { IslandItemNames } from '../components/pure/help-island';
|
||||||
import { HelpIsland } from '../components/pure/help-island';
|
import { HelpIsland } from '../components/pure/help-island';
|
||||||
import {
|
import {
|
||||||
DROPPABLE_SIDEBAR_TRASH,
|
DROPPABLE_SIDEBAR_TRASH,
|
||||||
@@ -407,6 +408,10 @@ export const WorkspaceLayoutInner: FC<PropsWithChildren> = ({ children }) => {
|
|||||||
);
|
);
|
||||||
const t = useAFFiNEI18N();
|
const t = useAFFiNEI18N();
|
||||||
|
|
||||||
|
const showList: IslandItemNames[] = env.isDesktop
|
||||||
|
? ['whatNew', 'contact', 'guide']
|
||||||
|
: ['whatNew', 'contact'];
|
||||||
|
|
||||||
const handleDragEnd = useCallback(
|
const handleDragEnd = useCallback(
|
||||||
(e: DragEndEvent) => {
|
(e: DragEndEvent) => {
|
||||||
// Drag page into trash folder
|
// Drag page into trash folder
|
||||||
@@ -461,9 +466,7 @@ export const WorkspaceLayoutInner: FC<PropsWithChildren> = ({ children }) => {
|
|||||||
</div>
|
</div>
|
||||||
{!isPublicWorkspace && (
|
{!isPublicWorkspace && (
|
||||||
<HelpIsland
|
<HelpIsland
|
||||||
showList={
|
showList={router.query.pageId ? undefined : showList}
|
||||||
router.query.pageId ? undefined : ['whatNew', 'contact']
|
|
||||||
}
|
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
</ToolContainer>
|
</ToolContainer>
|
||||||
|
|||||||
Reference in New Issue
Block a user