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

Commit 5d75b98

Browse files
authored
chore: adjust some UI comps (#1317)
* style: comps styles in postviewer * style(helpe-center): adjust full mode layout
1 parent c8bb69d commit 5d75b98

File tree

11 files changed

+51
-30
lines changed

11 files changed

+51
-30
lines changed

src/containers/thread/HelpThread/Category.tsx

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
import { FC, memo } from 'react'
22

3-
import { Wrapper, Header, Icon, Title, Item, MoreLink } from './styles/category'
3+
import {
4+
Wrapper,
5+
Header,
6+
IconWrapper,
7+
Icon,
8+
Title,
9+
Item,
10+
MoreLink,
11+
} from './styles/category'
412

513
type TProps = {
614
color: string
@@ -13,7 +21,9 @@ const Category: FC<TProps> = ({ color, title, desc, column = 2 }) => {
1321
return (
1422
<Wrapper color={color} column={column}>
1523
<Header>
16-
<Icon />
24+
<IconWrapper>
25+
<Icon />
26+
</IconWrapper>
1727
<Title color={color}>{title}</Title>
1828
</Header>
1929
<Item color={color}>{desc}</Item>

src/containers/thread/HelpThread/store.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@ import { markStates, toJS } from '@/utils/mobx'
1313
const log = buildLog('S:HelpThread')
1414

1515
const HelpThread = T.model('HelpThread', {
16-
// mode: T.optional(T.enumeration(['full', 'helpcenter', 'faq']), 'full'),
17-
mode: T.optional(T.enumeration(['full', 'helpcenter', 'faq']), 'faq'),
16+
mode: T.optional(T.enumeration(['full', 'helpcenter', 'faq']), 'full'),
1817
})
1918
.views((self) => ({
2019
get curCommunity(): TCommunity {

src/containers/thread/HelpThread/styles/category.ts

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import styled from 'styled-components'
33
import type { TTestable } from '@/spec'
44
import css, { theme } from '@/utils/css'
55

6-
import LaptopSVG from '@/icons/Laptop'
6+
import LaptopSVG from '@/icons/Works'
77

88
type TWrapper = TTestable & { color?: string; column: number }
99
export const Wrapper = styled.div.attrs(({ testid }: TTestable) => ({
@@ -21,24 +21,31 @@ export const Wrapper = styled.div.attrs(({ testid }: TTestable) => ({
2121
`
2222

2323
export const Header = styled.div`
24-
${css.flex('align-center')};
25-
margin-bottom: 10px;
24+
${css.flexColumn()};
25+
margin-bottom: 12px;
26+
`
27+
export const IconWrapper = styled.div`
28+
${css.circle(32)};
29+
${css.flex('align-both')};
30+
31+
${Wrapper}:hover & {
32+
background: #f5f5f5; //${theme('border')};
33+
}
2634
`
2735
export const Icon = styled(LaptopSVG)`
28-
${css.size(16)};
36+
${css.size(18)};
2937
fill: ${theme('thread.extraInfo')};
30-
margin-right: 10px;
3138
`
3239
export const Title = styled.div<{ color: string }>`
3340
color: ${theme('thread.articleTitle')};
3441
font-size: 18px;
3542
font-weight: 600;
43+
margin-top: 8px;
3644
`
3745
export const Item = styled.div<{ color: string }>`
3846
color: ${theme('thread.articleDigest')};
3947
font-size: 14px;
40-
margin-bottom: 4px;
41-
margin-left: 25px;
48+
margin-bottom: 6px;
4249
4350
&:hover {
4451
color: ${theme('thread.articleTitle')};
@@ -51,7 +58,6 @@ export const MoreLink = styled.div`
5158
color: ${theme('link')};
5259
font-size: 12px;
5360
margin-top: 5px;
54-
margin-left: 24px;
5561
5662
&:hover {
5763
cursor: pointer;

src/containers/thread/HelpThread/styles/full_layout.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,17 @@ export const Wrapper = styled.div`
88
width: 100%;
99
margin-top: 10px;
1010
`
11-
1211
export const CatsWrapper = styled(MainWrapper)`
1312
${css.flex()};
1413
flex-wrap: wrap;
1514
1615
flex-grow: 1;
1716
width: 100%;
1817
min-height: 600px;
18+
margin-top: 8px;
1919
2020
background: transparent;
2121
border-radius: 6px;
22-
margin-top: 5px;
2322
padding-left: 22px;
2423
padding-right: 50px;
2524

src/containers/tool/Drawer/AddOn/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const AddOn: FC<TProps> = ({ type, articleNavi }) => {
2323
<Wrapper>
2424
<TopArea showShare={showShare}>
2525
<CloseButton />
26-
{showShare && <Share top={9} left={5} size={15} offsetLeft="50%" />}
26+
{showShare && <Share top={9} left={6} size={15} offsetLeft="50%" />}
2727
</TopArea>
2828

2929
{showArticleNavi && <ArticleNavi articleNavi={articleNavi} />}

src/containers/unit/Comments/styles/comment/actions.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,12 @@ export const Wrapper = styled.div`
1212
`};
1313
`
1414
export const ReplyAction = styled.div`
15-
color: ${theme('comment.action')};
15+
color: ${theme('thread.extraInfo')};
16+
opacity: 0.7;
17+
font-weight: bold;
18+
1619
&:hover {
17-
font-weight: 500;
20+
opacity: 1;
1821
cursor: pointer;
1922
}
2023

src/containers/unit/Comments/styles/list/toggler_button.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,10 @@ export const SlashSign = styled.div`
1818

1919
export const Text = styled.div`
2020
font-size: 12px;
21-
opacity: 0.8;
2221
color: ${theme('thread.extraInfo')};
2322
margin-left: 14px;
23+
font-weight: bold;
24+
opacity: 0.85;
2425
2526
&:hover {
2627
opacity: 1;

src/widgets/ArtimentBody/styles/fold_box.ts

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,6 @@ export const Wrapper = styled.div<TWrapper>`
1919
/* border: 1px solid; */
2020
padding-bottom: 5px;
2121
22-
&:hover {
23-
cursor: pointer;
24-
}
25-
2622
${css.media.mobile`
2723
margin-top: 18px;
2824
margin-bottom: 18px;
@@ -35,11 +31,12 @@ export const Hint = styled.div<{ mode: 'article' | 'comment' }>`
3531
color: ${theme('thread.extraInfo')};
3632
font-size: ${({ mode }) => (mode === 'article' ? '15px' : '13px')};
3733
padding-right: 5%;
38-
font-weight: 400;
34+
font-weight: bold;
35+
opacity: 0.7;
3936
40-
${Wrapper}:hover & {
41-
font-weight: 500;
37+
&:hover {
4238
opacity: 1;
39+
cursor: pointer;
4340
}
4441
transition: all 0.2s;
4542
`
@@ -51,4 +48,9 @@ export const ArrowIcon = styled(Img)<{ reverse?: boolean }>`
5148
fill: ${theme('thread.extraInfo')};
5249
transform: ${({ reverse }) => (reverse ? 'rotate(90deg)' : 'rotate(-90deg)')};
5350
margin-left: 4px;
51+
opacity: 0.8;
52+
53+
${Hint}:hover {
54+
opacity: 1;
55+
}
5456
`

src/widgets/FaqList/Sidebar.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import { FC, memo } from 'react'
33
import {
44
Wrapper,
55
Header,
6-
FAQIcon,
76
Title,
87
Section,
98
Footer,
@@ -18,7 +17,6 @@ const Sidebar: FC<TProps> = ({ articles }) => {
1817
return (
1918
<Wrapper>
2019
<Header>
21-
<FAQIcon />
2220
<Title>常见问题</Title>
2321
</Header>
2422
{articles.map((item) => (

src/widgets/FaqList/styles/sidebar.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ export const Wrapper = styled.div.attrs(({ testid }: TTestable) => ({
1717
`
1818
export const Header = styled.div`
1919
${css.flex('align-center')};
20-
margin-bottom: 20px;
20+
margin-top: -2px;
21+
margin-bottom: 16px;
2122
`
2223
export const FAQIcon = styled(FAQSVG)`
2324
${css.size(15)};
@@ -27,7 +28,9 @@ export const FAQIcon = styled(FAQSVG)`
2728
margin-top: 2px;
2829
`
2930
export const Title = styled.div`
30-
color: ${theme('thread.articleDigest')};
31+
color: ${theme('thread.articleTitle')};
32+
font-weight: bold;
33+
font-size: 15px;
3134
`
3235
export const Section = styled.div`
3336
${css.lineClamp(2)}

0 commit comments

Comments
 (0)