Skip to content

Commit 5c9f98d

Browse files
committed
feat: optimize icon
Signed-off-by: Innei <[email protected]>
1 parent 5402e7d commit 5c9f98d

File tree

8 files changed

+35
-37
lines changed

8 files changed

+35
-37
lines changed

src/components/icons/thumbs-up.tsx

+2-11
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,3 @@
1-
import type { SVGProps } from 'react'
2-
3-
export function IonThumbsup(props: SVGProps<SVGSVGElement>) {
4-
return (
5-
<svg width="1em" height="1em" viewBox="0 0 512 512" {...props}>
6-
<path
7-
d="M424.2 259.3c13.8-4.5 23.8-17.5 23.8-32.8 0-19-15.4-34.5-34.5-34.5H310.9c2-25 10-53.6 1.1-87.3-7.5-28.4-39.4-49.7-52.4-36.8-5 4.9-3.5 15.2-3.5 33.8 0 42.8-17.8 86.1-39.8 108.7-9.4 9.7-25.2 13-40.2 13.6v-16H64v240h112v-32c20.6-.5 52.6 5.2 75.8 6.6 52 3.1 102-2.4 126.3-8.1 24.3-5.7 35-13 35-30.6 0-6.4-1.9-12.3-5.1-17.3 11.8-4.7 20.1-16.2 20.1-29.7 0-7.2-2.4-13.8-6.4-19.2 11.9-4.6 20.4-16.2 20.4-29.8-.1-12.5-7.4-23.4-17.9-28.6zM112 415.7c-8.8 0-16-7.1-16-16 0-8.8 7.2-16 16-16s16 7.1 16 16c0 8.8-7.2 16-16 16z"
8-
fill="currentColor"
9-
/>
10-
</svg>
11-
)
1+
export function ThumbsupIcon() {
2+
return <i className="icon-[mingcute--thumb-up-line]" />
123
}

src/components/layout/header/config.ts

-13
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,9 @@ import {
1111
FaSolidHistory,
1212
FaSolidSubway,
1313
FaSolidUserFriends,
14-
IcBaselineLiveTv,
1514
IcTwotoneSignpost,
1615
IonBook,
1716
MdiFlask,
18-
RiNeteaseCloudMusicLine,
1917
} from '~/components/icons/menu-collection'
2018

2119
export interface IHeaderMenu {
@@ -95,17 +93,6 @@ export const headerMenuConfig: IHeaderMenu[] = [
9593
path: '/says',
9694
icon: h(FaSolidComments),
9795
},
98-
{
99-
title: '听歌',
100-
icon: h(RiNeteaseCloudMusicLine),
101-
type: 'Music',
102-
path: '/favorite/music',
103-
},
104-
{
105-
title: '看番',
106-
icon: h(IcBaselineLiveTv),
107-
path: '/favorite/bangumi',
108-
},
10996
],
11097
},
11198
{

src/components/widgets/note/NoteActionAside.tsx

+4-4
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,9 @@ const LikeButton = () => {
8585
>
8686
<m.i
8787
className={clsxm(
88-
'icon-[mingcute--heart-fill] text-[24px] opacity-80 duration-200 hover:text-uk-red-light hover:opacity-100',
89-
90-
isLiked && 'text-uk-red-light',
88+
'text-[24px] opacity-80 duration-200 hover:text-uk-red-light hover:opacity-100',
89+
!isLiked && 'icon-[mingcute--heart-line]',
90+
isLiked && 'icon-[mingcute--heart-fill] text-uk-red-light',
9191
)}
9292
animate={control}
9393
variants={{
@@ -143,7 +143,7 @@ const ShareButton = () => {
143143
}
144144
}}
145145
>
146-
<i className="icon-[mingcute--share-forward-fill] text-[24px] opacity-80 duration-200 hover:text-uk-cyan-light hover:opacity-100" />
146+
<i className="icon-[mingcute--share-forward-line] text-[24px] opacity-80 duration-200 hover:text-uk-cyan-light hover:opacity-100" />
147147
</MotionButtonBase>
148148
)
149149
}

src/components/widgets/note/index.ts

+11-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1-
export * from './NoteTimeline'
1+
export * from './NoteActionAside'
2+
export * from './NoteBanner'
3+
export * from './NoteFooterNavigation'
4+
export * from './NoteHideIfSecret'
25
export * from './NoteLeftSidebar'
6+
export * from './NoteMainContainer'
7+
export * from './NoteMetaBar'
8+
export * from './NotePasswordForm'
9+
export * from './NoteTimeline'
10+
export * from './NoteTopic'
11+
export * from './NoteTopicDetail'
312
export * from './NoteTopicInfo'
13+
export * from './NoteTopicMarkdownRender'

src/components/widgets/post/PostActionAside.tsx

+5-7
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import { m, useAnimationControls, useForceUpdate } from 'framer-motion'
44

5-
import { IonThumbsup } from '~/components/icons/thumbs-up'
5+
import { ThumbsupIcon } from '~/components/icons/thumbs-up'
66
import { MotionButtonBase } from '~/components/ui/button'
77
import { useIsClient } from '~/hooks/common/use-is-client'
88
import { routeBuilder, Routes } from '~/lib/route-builder'
@@ -59,9 +59,7 @@ const LikeButton = () => {
5959
className="flex flex-col space-y-2"
6060
onClick={() => {
6161
handleLike()
62-
control.start('tap', {
63-
repeat: 5,
64-
})
62+
control.start('tap')
6563
toast('捕捉一只大佬!', undefined, {
6664
iconElement: (
6765
<m.i
@@ -73,7 +71,7 @@ const LikeButton = () => {
7371
scale: 1.22,
7472
}}
7573
>
76-
<IonThumbsup />
74+
<ThumbsupIcon />
7775
</m.i>
7876
),
7977
})
@@ -95,7 +93,7 @@ const LikeButton = () => {
9593
easings: ['easeInOut'],
9694
}}
9795
>
98-
<IonThumbsup />
96+
<ThumbsupIcon />
9997
</m.i>
10098
</MotionButtonBase>
10199
)
@@ -142,7 +140,7 @@ const ShareButton = () => {
142140
}
143141
}}
144142
>
145-
<i className="icon-[mingcute--share-forward-fill] text-[24px] opacity-80 duration-200 hover:text-uk-cyan-light hover:opacity-100" />
143+
<i className="icon-[mingcute--share-forward-line] text-[24px] opacity-80 duration-200 hover:text-uk-cyan-light hover:opacity-100" />
146144
</MotionButtonBase>
147145
)
148146
}

src/components/widgets/post/index.ts

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
export * from './PostActionAside'
2+
export * from './PostCopyright'
3+
export * from './PostItem'
4+
export * from './PostItemHoverOverlay'
5+
export * from './PostMetaBar'
6+
export * from './PostOutdate'
7+
export * from './PostPagination'
8+
export * from './PostPinIcon'
9+
export * from './PostRelated'

src/components/widgets/shared/DonateButton.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ const DonateButtonInternal: Component<HTMLMotionProps<'button'>> = ({
117117
}}
118118
{...props}
119119
>
120-
<i className="icon-[material-symbols--coffee] text-[24px] opacity-80 duration-200 hover:text-uk-brown-dark hover:opacity-100" />
120+
<i className="icon-[material-symbols--coffee-outline-sharp] text-[24px] opacity-80 duration-200 hover:text-uk-brown-dark hover:opacity-100" />
121121
</MotionButtonBase>
122122
)
123123
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
export * from './SubscribeBell'
2+
export * from './SubscribeModal'
3+
export * from './hooks'

0 commit comments

Comments
 (0)