Skip to content
This repository was archived by the owner on Nov 8, 2022. It is now read-only.

Commit 4889a0e

Browse files
authored
style: adjust about thread (#1290)
* refactor(about-thread): imporeve the status icons * refactor(about-thread): adjust status & members block
1 parent 1fcb2a3 commit 4889a0e

File tree

6 files changed

+67
-23
lines changed

6 files changed

+67
-23
lines changed

src/containers/thread/AboutThread/BasicStates/index.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,31 +56,31 @@ const BasicStates: FC = () => {
5656
<UsersIcon />
5757
</UsersWrapper>
5858
<Title>参与者</Title>
59-
<Desc>参与反馈的用户总数</Desc>
59+
<Desc>参与互动的用户总和</Desc>
6060
<Num>28</Num>
6161
</Block>
6262
<Block>
6363
<ContentWrapper>
6464
<ContentIcon />
6565
</ContentWrapper>
6666
<Title>内容</Title>
67-
<Desc>所有内容总数</Desc>
67+
<Desc>所有板块内容总和</Desc>
6868
<Num>12k</Num>
6969
</Block>
7070
<Block>
7171
<CommentsWrapper>
7272
<CommentIcon />
7373
</CommentsWrapper>
7474
<Title>评论</Title>
75-
<Desc>所有评论总数</Desc>
75+
<Desc>所有评论总和</Desc>
7676
<Num>237</Num>
7777
</Block>
7878
<Block>
7979
<EmojisWrapper>
8080
<EmojiIcon />
8181
</EmojisWrapper>
8282
<Title>表情</Title>
83-
<Desc>收到的 Emoji 总数</Desc>
83+
<Desc>收到的 Emoji 总和</Desc>
8484
<Num>374</Num>
8585
</Block>
8686
</Wrapper>

src/containers/thread/AboutThread/Members.tsx

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ import { mockUsers } from '@/utils/mock'
55
import {
66
Wrapper,
77
Block,
8+
BottomBlock,
89
Header,
910
Title,
10-
Count,
1111
Row,
1212
Admin,
1313
AdminInfo,
@@ -23,7 +23,6 @@ const Members: FC = () => {
2323
<Block>
2424
<Header>
2525
<Title>团队成员</Title>
26-
<Count>23</Count>
2726
</Header>
2827

2928
<Row>
@@ -39,10 +38,9 @@ const Members: FC = () => {
3938
</Row>
4039
</Block>
4140

42-
<Block>
41+
<BottomBlock>
4342
<Header>
4443
<Title>参与者</Title>
45-
<Count>1839</Count>
4644
</Header>
4745
<Row>
4846
{mockUsers(15).map((user) => (
@@ -52,7 +50,7 @@ const Members: FC = () => {
5250
<NormalAvatar key={user.id} src={user.avatar} />
5351
))}
5452
</Row>
55-
</Block>
53+
</BottomBlock>
5654
</Wrapper>
5755
)
5856
}

src/containers/thread/AboutThread/styles/basic_states/index.ts

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,19 @@ import styled from 'styled-components'
22

33
import type { TTestable } from '@/spec'
44
import css, { theme } from '@/utils/css'
5-
import PostSVG from '@/icons/Post'
5+
import PostSVG from '@/icons/EditPen'
66
import CommentSVG from '@/icons/Comment'
7-
import UserSVG from '@/icons/User'
8-
import EmojiSVG from '@/icons/Emoji'
7+
import UserSVG from '@/icons/Users'
8+
import EmojiSVG from '@/icons/Heart'
99
import PulseSVG from '@/icons/Pulse'
1010

1111
export const Wrapper = styled.div.attrs(({ testid }: TTestable) => ({
1212
'data-test-id': testid,
1313
}))<TTestable>`
1414
${css.flex()};
1515
width: calc(100% + 38px);
16-
/* border: 1px solid; */
1716
margin-top: 30px;
18-
margin-bottom: 16px;
17+
margin-bottom: 22px;
1918
`
2019
export const Block = styled.div`
2120
${css.flexColumn('align-start')};
@@ -39,48 +38,53 @@ export const CommentsWrapper = styled(IconWrapper)`
3938
background: #f9dfc9;
4039
`
4140
export const EmojisWrapper = styled(IconWrapper)`
42-
background: #bcede5;
41+
background: #ffd5dc;
4342
`
4443
export const TrendWrapper = styled(IconWrapper)`
45-
background: #dfdfdf;
44+
background: #def0ba;
4645
`
4746
export const UsersIcon = styled(UserSVG)`
48-
${css.size(12)};
47+
${css.size(14)};
4948
fill: #2f71ff;
5049
`
5150
export const ContentIcon = styled(PostSVG)`
52-
${css.size(14)};
51+
${css.size(12)};
5352
fill: #860075;
53+
margin-top: 1px;
5454
`
5555
export const CommentIcon = styled(CommentSVG)`
5656
${css.size(15)};
5757
fill: #e75908;
58+
margin-left: 1px;
59+
margin-top: 1px;
5860
`
5961
export const EmojiIcon = styled(EmojiSVG)`
6062
${css.size(14)};
61-
fill: #00a88b;
63+
fill: #ff1717;
6264
`
6365
export const TrendIcon = styled(PulseSVG)`
6466
${css.size(14)};
65-
fill: ${theme('thread.articleTitle')};
67+
fill: #2a7c43;
6668
`
6769
export const Title = styled.div`
68-
color: ${theme('thread.articleTitle')};
70+
color: ${theme('thread.articleDigest')};
6971
font-weight: 600;
7072
font-size: 13px;
73+
margin-bottom: 2px;
7174
`
7275
export const Desc = styled.div`
7376
color: ${theme('thread.articleDigest')};
7477
font-size: 10px;
78+
opacity: 0.8;
7579
`
7680
export const Num = styled.div`
7781
color: ${theme('thread.articleTitle')};
78-
font-size: 24px;
82+
font-size: 22px;
7983
font-weight: 600;
8084
margin-top: 5px;
8185
`
8286
export const TrendLineWrapper = styled.div`
83-
margin-top: 8px;
87+
margin-top: 6px;
8488
margin-left: -5px;
8589
width: 100%;
8690
`

src/containers/thread/AboutThread/styles/members.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@ export const Block = styled.div`
2727
margin-bottom: 30px;
2828
width: 600px;
2929
`
30+
export const BottomBlock = styled(Block)`
31+
border-top: 1px solid;
32+
border-top-color: #eae9e9; // to-theme
33+
padding-top: 30px;
34+
`
3035
export const Header = styled.div`
3136
${css.flex('align-center')};
3237
margin-bottom: 30px;

src/widgets/Icons/Heart.tsx

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import { memo, SVGProps } from 'react'
2+
3+
const Heart = (props: SVGProps<SVGSVGElement>) => {
4+
return (
5+
<svg
6+
className="icon"
7+
viewBox="0 0 1024 1024"
8+
xmlns="http://www.w3.org/2000/svg"
9+
width={200}
10+
height={200}
11+
{...props}
12+
>
13+
<path d="M938.667 362.667A234.667 234.667 0 0 0 704 128a271.36 271.36 0 0 0-192 88.32A271.36 271.36 0 0 0 320 128 234.667 234.667 0 0 0 85.333 362.667c0 167.253 202.667 352 298.667 448l97.28 97.28a32 32 0 0 0 22.613 9.386h16.214a32 32 0 0 0 22.613-9.386l97.28-97.28c96-96 298.667-280.747 298.667-448z" />
14+
</svg>
15+
)
16+
}
17+
18+
export default memo(Heart)

src/widgets/Icons/Users.tsx

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import { memo, SVGProps } from 'react'
2+
3+
const Users = (props: SVGProps<SVGSVGElement>) => {
4+
return (
5+
<svg
6+
className="icon"
7+
viewBox="0 0 1024 1024"
8+
xmlns="http://www.w3.org/2000/svg"
9+
width={200}
10+
height={200}
11+
{...props}
12+
>
13+
<path d="M350.26 512a170.65 170.65 0 1 0 0-341.3 170.65 170.65 0 0 0 0 341.351zm581.12 118.22a170.598 170.598 0 0 0-120.73-49.92H589.21a131.84 131.84 0 0 1 85.35 49.92 170.7 170.7 0 0 1 50.74 121.191v68.25a34.15 34.15 0 0 1-34.151 34.15h256a34.15 34.15 0 0 0 34.15-34.15v-68.25a170.65 170.65 0 0 0-49.92-121.19z" />
14+
<path d="M503.91 581.99a169.472 169.472 0 0 0-17.05 0H213.35A170.65 170.65 0 0 0 42.7 752.691v68.25a34.15 34.15 0 0 0 34.151 34.15h546.56a34.15 34.15 0 0 0 34.1-34.15v-68.25a170.65 170.65 0 0 0-153.6-170.7zM729.6 512a113.51 113.51 0 1 0 0-227.02 113.51 113.51 0 0 0 0 227.02z" />
15+
</svg>
16+
)
17+
}
18+
19+
export default memo(Users)

0 commit comments

Comments
 (0)