mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-24 05:07:06 +08:00
feat: modify icon name with new version
This commit is contained in:
@@ -11,7 +11,7 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@blocksuite/blocks": "0.3.0-alpha.7",
|
"@blocksuite/blocks": "0.3.0-alpha.7",
|
||||||
"@blocksuite/editor": "0.3.0-alpha.7",
|
"@blocksuite/editor": "0.3.0-alpha.7",
|
||||||
"@blocksuite/icons": "^1.0.5",
|
"@blocksuite/icons": "^2.0.0",
|
||||||
"@blocksuite/store": "0.3.0-alpha.7",
|
"@blocksuite/store": "0.3.0-alpha.7",
|
||||||
"@emotion/css": "^11.10.0",
|
"@emotion/css": "^11.10.0",
|
||||||
"@emotion/react": "^11.10.4",
|
"@emotion/react": "^11.10.4",
|
||||||
|
|||||||
@@ -7,12 +7,12 @@ import {
|
|||||||
StyledCloseButton,
|
StyledCloseButton,
|
||||||
} from './styles';
|
} from './styles';
|
||||||
import {
|
import {
|
||||||
MiddleExportIcon,
|
ExportIcon,
|
||||||
EdgelessIcon,
|
EdgelessIcon,
|
||||||
PaperIcon,
|
PaperIcon,
|
||||||
MiddleExportToHtmlIcon,
|
ExportToHtmlIcon,
|
||||||
MiddleExportToMarkdownIcon,
|
ExportToMarkdownIcon,
|
||||||
MoreVertical_24pxIcon,
|
MoreVerticalIcon,
|
||||||
} from '@blocksuite/icons';
|
} from '@blocksuite/icons';
|
||||||
import { useEditor } from '@/providers/editor-provider';
|
import { useEditor } from '@/providers/editor-provider';
|
||||||
import ThemeModeSwitch from '@/components/theme-mode-switch';
|
import ThemeModeSwitch from '@/components/theme-mode-switch';
|
||||||
@@ -44,7 +44,7 @@ const PopoverContent = () => {
|
|||||||
onClick={() => {
|
onClick={() => {
|
||||||
editor && editor.contentParser.onExportHtml();
|
editor && editor.contentParser.onExportHtml();
|
||||||
}}
|
}}
|
||||||
icon={<MiddleExportToHtmlIcon />}
|
icon={<ExportToHtmlIcon />}
|
||||||
>
|
>
|
||||||
Export to HTML
|
Export to HTML
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
@@ -52,14 +52,14 @@ const PopoverContent = () => {
|
|||||||
onClick={() => {
|
onClick={() => {
|
||||||
editor && editor.contentParser.onExportMarkdown();
|
editor && editor.contentParser.onExportMarkdown();
|
||||||
}}
|
}}
|
||||||
icon={<MiddleExportToMarkdownIcon />}
|
icon={<ExportToMarkdownIcon />}
|
||||||
>
|
>
|
||||||
Export to Markdown
|
Export to Markdown
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
</>
|
</>
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
<MenuItem icon={<MiddleExportIcon />} isDir={true}>
|
<MenuItem icon={<ExportIcon />} isDir={true}>
|
||||||
Export
|
Export
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
</Menu>
|
</Menu>
|
||||||
@@ -134,7 +134,7 @@ const HeaderRight = () => {
|
|||||||
<ThemeModeSwitch />
|
<ThemeModeSwitch />
|
||||||
<Menu content={<PopoverContent />} placement="bottom-end">
|
<Menu content={<PopoverContent />} placement="bottom-end">
|
||||||
<IconButton>
|
<IconButton>
|
||||||
<MoreVertical_24pxIcon />
|
<MoreVerticalIcon />
|
||||||
</IconButton>
|
</IconButton>
|
||||||
</Menu>
|
</Menu>
|
||||||
</>
|
</>
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import { IconButton } from '@/ui/button';
|
|||||||
import { Content } from '@/ui/layout';
|
import { Content } from '@/ui/layout';
|
||||||
import { useEditor } from '@/providers/editor-provider';
|
import { useEditor } from '@/providers/editor-provider';
|
||||||
import EditorModeSwitch from '@/components/editor-mode-switch';
|
import EditorModeSwitch from '@/components/editor-mode-switch';
|
||||||
import { MiddleIconArrowDownSmallIcon } from '@blocksuite/icons';
|
import { ArrowDownIcon } from '@blocksuite/icons';
|
||||||
import { useModal } from '@/providers/global-modal-provider';
|
import { useModal } from '@/providers/global-modal-provider';
|
||||||
|
|
||||||
import Header from './header';
|
import Header from './header';
|
||||||
@@ -59,7 +59,7 @@ export const PageHeader = () => {
|
|||||||
triggerQuickSearchModal();
|
triggerQuickSearchModal();
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<MiddleIconArrowDownSmallIcon />
|
<ArrowDownIcon />
|
||||||
</IconButton>
|
</IconButton>
|
||||||
</StyledSearchArrowWrapper>
|
</StyledSearchArrowWrapper>
|
||||||
</StyledTitleWrapper>
|
</StyledTitleWrapper>
|
||||||
|
|||||||
@@ -1,8 +1,5 @@
|
|||||||
import { PageMeta, useEditor } from '@/providers/editor-provider';
|
import { PageMeta, useEditor } from '@/providers/editor-provider';
|
||||||
import {
|
import { FavouritedIcon, FavouritesIcon } from '@blocksuite/icons';
|
||||||
MiddleFavouritedStatus2Icon,
|
|
||||||
MiddleFavouritesIcon,
|
|
||||||
} from '@blocksuite/icons';
|
|
||||||
import {
|
import {
|
||||||
StyledFavoriteButton,
|
StyledFavoriteButton,
|
||||||
StyledTableContainer,
|
StyledTableContainer,
|
||||||
@@ -26,11 +23,7 @@ const FavoriteTag = ({ pageMeta }: { pageMeta: PageMeta }) => {
|
|||||||
toggleFavoritePage(pageMeta.id);
|
toggleFavoritePage(pageMeta.id);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{pageMeta.favorite ? (
|
{pageMeta.favorite ? <FavouritedIcon /> : <FavouritesIcon />}
|
||||||
<MiddleFavouritedStatus2Icon />
|
|
||||||
) : (
|
|
||||||
<MiddleFavouritesIcon />
|
|
||||||
)}
|
|
||||||
</StyledFavoriteButton>
|
</StyledFavoriteButton>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -3,11 +3,7 @@ import { useConfirm } from '@/providers/confirm-provider';
|
|||||||
import { Menu, MenuItem } from '@/ui/menu';
|
import { Menu, MenuItem } from '@/ui/menu';
|
||||||
import { Wrapper } from '@/ui/layout';
|
import { Wrapper } from '@/ui/layout';
|
||||||
import { IconButton } from '@/ui/button';
|
import { IconButton } from '@/ui/button';
|
||||||
import {
|
import { MoreVerticalIcon, RestoreIcon, DeleteIcon } from '@blocksuite/icons';
|
||||||
MoreVertical_24pxIcon,
|
|
||||||
RestoreIcon,
|
|
||||||
TrashDeleteforeverIcon,
|
|
||||||
} from '@blocksuite/icons';
|
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
|
||||||
export const OperationCell = ({ pageMeta }: { pageMeta: PageMeta }) => {
|
export const OperationCell = ({ pageMeta }: { pageMeta: PageMeta }) => {
|
||||||
@@ -52,7 +48,7 @@ export const OperationCell = ({ pageMeta }: { pageMeta: PageMeta }) => {
|
|||||||
<Wrapper alignItems="center" justifyContent="center">
|
<Wrapper alignItems="center" justifyContent="center">
|
||||||
<Menu content={OperationMenu} placement="bottom-end" disablePortal={true}>
|
<Menu content={OperationMenu} placement="bottom-end" disablePortal={true}>
|
||||||
<IconButton hoverBackground="#E0E6FF">
|
<IconButton hoverBackground="#E0E6FF">
|
||||||
<MoreVertical_24pxIcon />
|
<MoreVerticalIcon />
|
||||||
</IconButton>
|
</IconButton>
|
||||||
</Menu>
|
</Menu>
|
||||||
</Wrapper>
|
</Wrapper>
|
||||||
@@ -89,7 +85,7 @@ export const TrashOperationCell = ({ pageMeta }: { pageMeta: PageMeta }) => {
|
|||||||
});
|
});
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<TrashDeleteforeverIcon />
|
<DeleteIcon />
|
||||||
</IconButton>
|
</IconButton>
|
||||||
</Wrapper>
|
</Wrapper>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,9 +1,5 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import {
|
import { FavouritesIcon, TrashIcon, AllPagesIcon } from '@blocksuite/icons';
|
||||||
MiddleFavouritesIcon,
|
|
||||||
MiddleTrashIcon,
|
|
||||||
MiddleAllPagesIcon,
|
|
||||||
} from '@blocksuite/icons';
|
|
||||||
import Link from 'next/link';
|
import Link from 'next/link';
|
||||||
import { StyledJumpTo } from '../style';
|
import { StyledJumpTo } from '../style';
|
||||||
import { useModal } from '@/providers/global-modal-provider';
|
import { useModal } from '@/providers/global-modal-provider';
|
||||||
@@ -16,21 +12,21 @@ const JumpTo = () => {
|
|||||||
href={{ pathname: '/page-list/all' }}
|
href={{ pathname: '/page-list/all' }}
|
||||||
onClick={() => triggerQuickSearchModal()}
|
onClick={() => triggerQuickSearchModal()}
|
||||||
>
|
>
|
||||||
<MiddleAllPagesIcon width={20} height={20} />
|
<AllPagesIcon width={20} height={20} />
|
||||||
<span> All pages</span>
|
<span> All pages</span>
|
||||||
</Link>
|
</Link>
|
||||||
<Link
|
<Link
|
||||||
href={{ pathname: '/page-list/favorite' }}
|
href={{ pathname: '/page-list/favorite' }}
|
||||||
onClick={() => triggerQuickSearchModal()}
|
onClick={() => triggerQuickSearchModal()}
|
||||||
>
|
>
|
||||||
<MiddleFavouritesIcon width={20} height={20} />
|
<FavouritesIcon width={20} height={20} />
|
||||||
<span> Favourites</span>
|
<span> Favourites</span>
|
||||||
</Link>
|
</Link>
|
||||||
<Link
|
<Link
|
||||||
href={{ pathname: '/page-list/trash' }}
|
href={{ pathname: '/page-list/trash' }}
|
||||||
onClick={() => triggerQuickSearchModal()}
|
onClick={() => triggerQuickSearchModal()}
|
||||||
>
|
>
|
||||||
<MiddleTrashIcon width={20} height={20} />
|
<TrashIcon width={20} height={20} />
|
||||||
<span> Trash</span>
|
<span> Trash</span>
|
||||||
</Link>
|
</Link>
|
||||||
</StyledJumpTo>
|
</StyledJumpTo>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { MiddleAddIcon } from '@blocksuite/icons';
|
import { AddIcon } from '@blocksuite/icons';
|
||||||
import { StyledModalFooterContent } from './style';
|
import { StyledModalFooterContent } from './style';
|
||||||
import { useEditor } from '@/providers/editor-provider';
|
import { useEditor } from '@/providers/editor-provider';
|
||||||
import { useModal } from '@/providers/global-modal-provider';
|
import { useModal } from '@/providers/global-modal-provider';
|
||||||
@@ -11,7 +11,7 @@ const QuickSearchFooter = () => {
|
|||||||
return (
|
return (
|
||||||
<StyledModalFooterContent>
|
<StyledModalFooterContent>
|
||||||
<IconButton>
|
<IconButton>
|
||||||
<MiddleAddIcon
|
<AddIcon
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
createPage();
|
createPage();
|
||||||
triggerQuickSearchModal();
|
triggerQuickSearchModal();
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import React, { Dispatch, SetStateAction } from 'react';
|
import React, { Dispatch, SetStateAction } from 'react';
|
||||||
import { MiddleSearchIcon } from '@blocksuite/icons';
|
import { SearchIcon } from '@blocksuite/icons';
|
||||||
import { StyledInputContent, StyledLabel } from './style';
|
import { StyledInputContent, StyledLabel } from './style';
|
||||||
import { Command } from 'cmdk';
|
import { Command } from 'cmdk';
|
||||||
const Input = (props: {
|
const Input = (props: {
|
||||||
@@ -9,7 +9,7 @@ const Input = (props: {
|
|||||||
return (
|
return (
|
||||||
<StyledInputContent>
|
<StyledInputContent>
|
||||||
<StyledLabel htmlFor=":r5:">
|
<StyledLabel htmlFor=":r5:">
|
||||||
<MiddleSearchIcon />
|
<SearchIcon />
|
||||||
</StyledLabel>
|
</StyledLabel>
|
||||||
<Command.Input
|
<Command.Input
|
||||||
value={props.query}
|
value={props.query}
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import {
|
|||||||
} from './style';
|
} from './style';
|
||||||
import { Arrow } from './icons';
|
import { Arrow } from './icons';
|
||||||
import Collapse from '@mui/material/Collapse';
|
import Collapse from '@mui/material/Collapse';
|
||||||
import { MiddleIconArrowDownSmallIcon } from '@blocksuite/icons';
|
import { ArrowDownIcon } from '@blocksuite/icons';
|
||||||
import Link from 'next/link';
|
import Link from 'next/link';
|
||||||
import { useEditor } from '@/providers/editor-provider';
|
import { useEditor } from '@/providers/editor-provider';
|
||||||
import { useModal } from '@/providers/global-modal-provider';
|
import { useModal } from '@/providers/global-modal-provider';
|
||||||
@@ -63,18 +63,6 @@ export const WorkSpaceSliderBar = () => {
|
|||||||
>
|
>
|
||||||
Quick search
|
Quick search
|
||||||
</StyledListItem>
|
</StyledListItem>
|
||||||
<StyledListItem
|
|
||||||
onClick={() => {
|
|
||||||
router.push({
|
|
||||||
pathname: '/',
|
|
||||||
query: {
|
|
||||||
pageId: new Date().getTime().toString(),
|
|
||||||
},
|
|
||||||
});
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
Back to Doc
|
|
||||||
</StyledListItem>
|
|
||||||
<Link href={{ pathname: '/page-list/all' }}>
|
<Link href={{ pathname: '/page-list/all' }}>
|
||||||
<StyledListItem active={router.pathname === '/page-list/all'}>
|
<StyledListItem active={router.pathname === '/page-list/all'}>
|
||||||
All pages
|
All pages
|
||||||
@@ -93,7 +81,7 @@ export const WorkSpaceSliderBar = () => {
|
|||||||
setShowSubFavorite(!showSubFavorite);
|
setShowSubFavorite(!showSubFavorite);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<MiddleIconArrowDownSmallIcon
|
<ArrowDownIcon
|
||||||
style={{
|
style={{
|
||||||
transform: `rotate(${showSubFavorite ? '180' : '0'}deg)`,
|
transform: `rotate(${showSubFavorite ? '180' : '0'}deg)`,
|
||||||
}}
|
}}
|
||||||
|
|||||||
@@ -4,10 +4,7 @@ import { Loading } from '@/components/loading';
|
|||||||
import Modal from '@/ui/modal';
|
import Modal from '@/ui/modal';
|
||||||
import { useState } from 'react';
|
import { useState } from 'react';
|
||||||
import { Button } from '@/ui/button';
|
import { Button } from '@/ui/button';
|
||||||
import {
|
import { FavouritedIcon } from '@blocksuite/icons';
|
||||||
MiddleFavouritedStatus2Icon,
|
|
||||||
MiddleFavouritesIcon,
|
|
||||||
} from '@blocksuite/icons';
|
|
||||||
export const StyledHeader = styled('div')({
|
export const StyledHeader = styled('div')({
|
||||||
height: '60px',
|
height: '60px',
|
||||||
width: '100vw',
|
width: '100vw',
|
||||||
@@ -41,19 +38,19 @@ const Affine = () => {
|
|||||||
</Modal>
|
</Modal>
|
||||||
<Loading />
|
<Loading />
|
||||||
|
|
||||||
<Button icon={<MiddleFavouritedStatus2Icon />}>click me!</Button>
|
<Button icon={<FavouritedIcon />}>click me!</Button>
|
||||||
<Button icon={<MiddleFavouritedStatus2Icon />} type={'primary'}>
|
<Button icon={<FavouritedIcon />} type={'primary'}>
|
||||||
click me!
|
click me!
|
||||||
</Button>
|
</Button>
|
||||||
<Button icon={<MiddleFavouritedStatus2Icon />} type={'warning'}>
|
<Button icon={<FavouritedIcon />} type={'warning'}>
|
||||||
click me!
|
click me!
|
||||||
</Button>
|
</Button>
|
||||||
<Button icon={<MiddleFavouritedStatus2Icon />} type={'danger'}>
|
<Button icon={<FavouritedIcon />} type={'danger'}>
|
||||||
click me!
|
click me!
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
<Button icon={<MiddleFavouritedStatus2Icon />}></Button>
|
<Button icon={<FavouritedIcon />}></Button>
|
||||||
<Button icon={<MiddleFavouritedStatus2Icon />} shape="round"></Button>
|
<Button icon={<FavouritedIcon />} shape="round"></Button>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
export * from './editor-provider';
|
export * from './editor-provider';
|
||||||
export * from './example-markdown';
|
export * from './example-markdown';
|
||||||
export * from './utils';
|
export * from './utils';
|
||||||
|
export * from './interface';
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { displayFlex, styled } from '@/styles';
|
import { displayFlex, styled } from '@/styles';
|
||||||
import StyledPopperContainer from '../shared/Container';
|
import StyledPopperContainer from '../shared/Container';
|
||||||
import { MiddleArrowRightIcon } from '@blocksuite/icons';
|
import { ArrowRightIcon } from '@blocksuite/icons';
|
||||||
|
|
||||||
export const StyledMenuWrapper = styled(StyledPopperContainer)(({ theme }) => {
|
export const StyledMenuWrapper = styled(StyledPopperContainer)(({ theme }) => {
|
||||||
return {
|
return {
|
||||||
@@ -13,7 +13,7 @@ export const StyledMenuWrapper = styled(StyledPopperContainer)(({ theme }) => {
|
|||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
export const StyledArrow = styled(MiddleArrowRightIcon)(({ theme }) => {
|
export const StyledArrow = styled(ArrowRightIcon)(({ theme }) => {
|
||||||
return {
|
return {
|
||||||
position: 'absolute',
|
position: 'absolute',
|
||||||
right: 0,
|
right: 0,
|
||||||
|
|||||||
Generated
+4
-4
@@ -24,7 +24,7 @@ importers:
|
|||||||
specifiers:
|
specifiers:
|
||||||
'@blocksuite/blocks': 0.3.0-alpha.7
|
'@blocksuite/blocks': 0.3.0-alpha.7
|
||||||
'@blocksuite/editor': 0.3.0-alpha.7
|
'@blocksuite/editor': 0.3.0-alpha.7
|
||||||
'@blocksuite/icons': ^1.0.5
|
'@blocksuite/icons': ^2.0.0
|
||||||
'@blocksuite/store': 0.3.0-alpha.7
|
'@blocksuite/store': 0.3.0-alpha.7
|
||||||
'@emotion/css': ^11.10.0
|
'@emotion/css': ^11.10.0
|
||||||
'@emotion/react': ^11.10.4
|
'@emotion/react': ^11.10.4
|
||||||
@@ -56,7 +56,7 @@ importers:
|
|||||||
dependencies:
|
dependencies:
|
||||||
'@blocksuite/blocks': 0.3.0-alpha.7
|
'@blocksuite/blocks': 0.3.0-alpha.7
|
||||||
'@blocksuite/editor': 0.3.0-alpha.7
|
'@blocksuite/editor': 0.3.0-alpha.7
|
||||||
'@blocksuite/icons': 1.0.5_w5j4k42lgipnm43s3brx6h3c34
|
'@blocksuite/icons': 2.0.0_w5j4k42lgipnm43s3brx6h3c34
|
||||||
'@blocksuite/store': 0.3.0-alpha.7
|
'@blocksuite/store': 0.3.0-alpha.7
|
||||||
'@emotion/css': 11.10.0
|
'@emotion/css': 11.10.0
|
||||||
'@emotion/react': 11.10.4_w5j4k42lgipnm43s3brx6h3c34
|
'@emotion/react': 11.10.4_w5j4k42lgipnm43s3brx6h3c34
|
||||||
@@ -204,8 +204,8 @@ packages:
|
|||||||
- utf-8-validate
|
- utf-8-validate
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
/@blocksuite/icons/1.0.5_w5j4k42lgipnm43s3brx6h3c34:
|
/@blocksuite/icons/2.0.0_w5j4k42lgipnm43s3brx6h3c34:
|
||||||
resolution: {integrity: sha512-0iagAntIBvrGoaQ6eM6QQFYNkR1WRh6vLU+eOyV9o69eoXjRU8BgC3+U4ljY+1X30enfr3tf8X97iAxWuAVJcw==}
|
resolution: {integrity: sha512-r+wpkHGol85dOKkvbAZoXfZFVzGtI2YXT4qqwb76ekSAHlfIcVi+Gs6eVDpH8fZl8vvr6FquDiQWMEbYaN4BEA==}
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
'@types/react': ^18.0.25
|
'@types/react': ^18.0.25
|
||||||
react: ^18.2.0
|
react: ^18.2.0
|
||||||
|
|||||||
Reference in New Issue
Block a user