mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-12 14:40:22 +08:00
feat: add quick search listItem icon
This commit is contained in:
@@ -1,7 +1,12 @@
|
|||||||
import { Command } from 'cmdk';
|
import { Command } from 'cmdk';
|
||||||
import { StyledListItem, StyledNotFound } from './style';
|
import { StyledListItem, StyledNotFound } from './style';
|
||||||
import { useModal } from '@/providers/global-modal-provider';
|
import { useModal } from '@/providers/global-modal-provider';
|
||||||
import { PaperIcon, LogoUnlogIcon } from '@blocksuite/icons';
|
import {
|
||||||
|
PaperIcon,
|
||||||
|
EdgelessIcon,
|
||||||
|
LogoUnlogIcon,
|
||||||
|
AllPagesIcon,
|
||||||
|
} from '@blocksuite/icons';
|
||||||
import { useEditor } from '@/providers/editor-provider';
|
import { useEditor } from '@/providers/editor-provider';
|
||||||
import { Dispatch, SetStateAction, useEffect, useState } from 'react';
|
import { Dispatch, SetStateAction, useEffect, useState } from 'react';
|
||||||
import { useRouter } from 'next/router';
|
import { useRouter } from 'next/router';
|
||||||
@@ -36,6 +41,7 @@ export const Results = (props: {
|
|||||||
setShowCreatePage(resultsPageMeta.length ? false : true);
|
setShowCreatePage(resultsPageMeta.length ? false : true);
|
||||||
//Determine whether to display the ‘+ New page’
|
//Determine whether to display the ‘+ New page’
|
||||||
}, [resultsPageMeta, setShowCreatePage]);
|
}, [resultsPageMeta, setShowCreatePage]);
|
||||||
|
console.log(resultsPageMeta);
|
||||||
|
|
||||||
return loading ? null : (
|
return loading ? null : (
|
||||||
<Command.List>
|
<Command.List>
|
||||||
@@ -53,7 +59,11 @@ export const Results = (props: {
|
|||||||
value={result.title}
|
value={result.title}
|
||||||
>
|
>
|
||||||
<StyledListItem>
|
<StyledListItem>
|
||||||
<PaperIcon />
|
{result.mode === 'edgeless' ? (
|
||||||
|
<EdgelessIcon />
|
||||||
|
) : (
|
||||||
|
<PaperIcon />
|
||||||
|
)}
|
||||||
<span>{result.title}</span>
|
<span>{result.title}</span>
|
||||||
</StyledListItem>
|
</StyledListItem>
|
||||||
</Command.Item>
|
</Command.Item>
|
||||||
|
|||||||
Reference in New Issue
Block a user