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

Commit 3091526

Browse files
committed
chore: merge branch 'dev'
2 parents 10ebfe9 + acc5b35 commit 3091526

File tree

13 files changed

+75
-38
lines changed

13 files changed

+75
-38
lines changed

components/CommunityStatesPad/styles/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ export const NumberItem = styled.div`
5050
cursor: ${({ readOnly }) => (readOnly ? '' : 'pointer')};
5151
}
5252
53-
${cs.media.mobile`font-size: 1.2rem;`};
5453
${cs.media.tablet`font-size: 1.2rem;`};
54+
${cs.media.mobile`font-size: 1.2rem;`};
5555
`
5656
export const NumberDivider = styled.div`
5757
border: 1px solid;
@@ -61,9 +61,9 @@ export const NumberDivider = styled.div`
6161
align-self: center;
6262
margin-left: 10px;
6363
margin-right: 10px;
64-
${cs.media.mobile`display: none`};
6564
${cs.media.tablet`
6665
margin-left: 5px;
6766
margin-right: 5px;
6867
`};
68+
${cs.media.mobile`display: none`};
6969
`

containers/ArticleAuthorCard/styles/index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ export const Wrapper = styled.div`
1212
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
1313
margin-bottom: 15px;
1414
15-
${cs.media.mobile`
15+
${cs.media.tablet`
1616
width: 50%;
17-
padding: 10px;
1817
`};
1918
20-
${cs.media.tablet`
19+
${cs.media.mobile`
2120
width: 50%;
21+
padding: 10px;
2222
`};
2323
`
2424

containers/ArticleBanner/styles/reaction_numbers.js

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ export const NumberTitle = styled.div`
3333
text-decoration: ${({ readOnly }) => (readOnly ? '' : 'underline')};
3434
animation: ${animate.pulseRule};
3535
}
36-
${cs.media.mobile`font-size: 0.9rem`};
3736
${cs.media.tablet`font-size: 0.9rem`};
37+
${cs.media.mobile`font-size: 0.9rem`};
3838
`
3939
export const NumberItem = styled.div`
4040
font-size: 1.5rem;
@@ -47,8 +47,8 @@ export const NumberItem = styled.div`
4747
animation: ${animate.pulseRule};
4848
}
4949
50-
${cs.media.mobile`font-size: 1rem`};
5150
${cs.media.tablet`font-size: 1rem`};
51+
${cs.media.mobile`font-size: 1rem`};
5252
`
5353

5454
export const NumberLoading = styled(Img)`
@@ -66,12 +66,6 @@ export const NumberDivider = styled.div`
6666
align-self: center;
6767
margin-left: 10px;
6868
margin-right: 10px;
69-
${cs.media.mobile`
70-
margin-left: 2px;
71-
margin-right: 2px;
72-
height: 50%;
73-
`};
74-
7569
${cs.media.tablet`
7670
margin-left: 2px;
7771
margin-right: 2px;

containers/CommunitiesBanner/styles/search_box.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,12 @@ export const InputWrapper = styled.div`
1818
opacity: 1;
1919
}
2020
transition: all 0.2s ease-in;
21+
22+
${cs.media.mobile`
23+
width: 70%;
24+
margin-left: 15%;
25+
padding: 8px;
26+
`};
2127
`
2228
export const SearchIcon = styled(Img)`
2329
fill: ${theme('banner.desc')};

containers/CommunityBanner/styles/digest_view.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,13 +101,13 @@ export const Desc = styled.div`
101101
}
102102
${cs.truncate('500px')};
103103
104-
${cs.media.mobile`
105-
${cs.truncate('180px')};
106-
`};
107-
108104
${cs.media.tablet`
109105
${cs.truncate('220px')};
110106
`};
107+
108+
${cs.media.mobile`
109+
${cs.truncate('180px')};
110+
`};
111111
`
112112
export const LogoHolder = styled(Img)`
113113
fill: ${theme('banner.desc')};

containers/Doraemon/logic.js

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@ import { SwissArmyKnife } from './helper/swissArmyKnife'
2525
import githubLoginHandler from './oauth/github_handler'
2626

2727
const debug = makeDebugger('L:Doraemon')
28-
const sr71$ = new SR71()
28+
const sr71$ = new SR71({
29+
resv_event: [EVENT.QUERY_DORAMON],
30+
})
2931

3032
let sub$ = null
3133
let store = null
@@ -428,6 +430,15 @@ const DataSolver = [
428430
convert2Sugguestions(data, totalCount)
429431
},
430432
},
433+
{
434+
match: asyncRes(EVENT.QUERY_DORAMON),
435+
action: res => {
436+
const { data } = res[EVENT.QUERY_DORAMON]
437+
store.open()
438+
store.markState({ inputValue: data })
439+
queryPocket()
440+
},
441+
},
431442
]
432443

433444
const ErrSolver = [

containers/Footer/MobilBottomInfo.js

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,31 @@ import { GITHUB_WEB_ADDR, ISSUE_ADDR } from 'config'
44
import DotDivider from 'components/DotDivider'
55

66
import {
7-
MainInfoWrapper,
7+
SiteInfoWrapper,
8+
LinkInfoWrapper,
89
BannerWrapper,
910
Item,
11+
ItemBtn,
1012
Thanks,
1113
ThxTitle,
1214
} from './styles/mobile_bottom_info'
1315

14-
import { toggleBusBanner } from './logic'
16+
import { toggleBusBanner, openDoraemon } from './logic'
1517

1618
const MobileBottomInfo = () => (
1719
<React.Fragment>
18-
<MainInfoWrapper>
19-
<Item
20-
href="https://coderplanets.com/home/post/1"
21-
rel="noopener noreferrer"
22-
target="_blank"
23-
>
20+
<LinkInfoWrapper>
21+
<ItemBtn as="a" href="/communities" rel="noopener noreferrer">
22+
所有社区
23+
</ItemBtn>
24+
<DotDivider radius="4px" />
25+
<ItemBtn onClick={openDoraemon.bind(this, '/')}>我的关注</ItemBtn>
26+
<DotDivider radius="4px" />
27+
<ItemBtn onClick={openDoraemon.bind(this, '/theme/')}>切换主题</ItemBtn>
28+
</LinkInfoWrapper>
29+
30+
<SiteInfoWrapper>
31+
<Item href="home/post/1" rel="noopener noreferrer" target="_blank">
2432
关于本站
2533
</Item>
2634
<DotDivider />
@@ -35,7 +43,7 @@ const MobileBottomInfo = () => (
3543
<Item href={`${ISSUE_ADDR}`} rel="noopener noreferrer" target="_blank">
3644
反馈与建议
3745
</Item>
38-
</MainInfoWrapper>
46+
</SiteInfoWrapper>
3947
<BannerWrapper>
4048
<Thanks onClick={toggleBusBanner}>
4149
<ThxTitle>广告位: (求赞助)</ThxTitle>

containers/Footer/logic.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
// import R from 'ramda'
22

3-
import { makeDebugger, $solver, PAYMENT_USAGE } from 'utils'
3+
import {
4+
makeDebugger,
5+
$solver,
6+
dispatchEvent,
7+
EVENT,
8+
PAYMENT_USAGE,
9+
} from 'utils'
410
import SR71 from 'utils/async/sr71'
511

612
// import S from './schema'
@@ -27,6 +33,9 @@ export const onPay = num => {
2733
if (!store.isLogin) return store.authWarning()
2834
store.cashierHelper({ paymentUsage: PAYMENT_USAGE.DONATE, amount: num })
2935
}
36+
37+
export const openDoraemon = data => dispatchEvent(EVENT.QUERY_DORAMON, { data })
38+
3039
// ###############################
3140
// Data & Error handlers
3241
// ###############################

containers/Footer/styles/brief_view.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ export const MainInfos = styled.footer`
99
${cs.flexColumn()};
1010
margin-left: 8%;
1111
margin-bottom: 20px;
12-
${cs.media.mobile`display: none;`};
1312
${cs.media.tablet`display: none;`};
1413
`
1514

containers/Footer/styles/mobile_bottom_info.js

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,36 @@ import styled from 'styled-components'
22

33
import { theme, cs } from 'utils'
44

5-
export const MainInfoWrapper = styled.div`
5+
const InfoSection = styled.div`
66
${cs.flex('align-both')};
7-
height: 50px;
7+
height: 45px;
88
display: none;
99
${cs.media.tablet`display: flex;`};
1010
`
11-
11+
export const LinkInfoWrapper = styled(InfoSection)``
12+
export const SiteInfoWrapper = styled(InfoSection)`
13+
background-color: ${theme('footer.bottomBg')};
14+
`
1215
export const Item = styled.a`
1316
color: ${theme('footer.text')};
1417
font-size: 0.9rem;
1518
text-decoration: underline;
1619
`
17-
20+
export const ItemBtn = styled.div`
21+
color: ${theme('footer.text')};
22+
font-size: 0.9rem;
23+
border: 1px solid;
24+
text-decoration: none;
25+
border-color: ${theme('footer.text')};
26+
border-radius: 5px;
27+
padding: 0 4px;
28+
`
1829
export const BannerWrapper = styled.div`
1930
${cs.flex('align-center')};
2031
justify-content: space-between;
2132
padding-left: 6%;
2233
padding-right: 6%;
23-
background: ${theme('footer.bottomBg')};
34+
background-color: ${theme('footer.bottomBg')};
2435
height: 80px;
2536
width: 100%;
2637
display: none;

0 commit comments

Comments
 (0)