Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Nov 8, 2022. It is now read-only.

Commit086974d

Browse files
authored
feat(abuse report): redesign (#1069)
* chore(abuse-report): basic setup && fix generator typo* chore(abuse-report): wip* chore(abuse-report): wip* chore(abuse-report): wip* chore(abuse-report): wip* chore(abuse-report): wip* chore(abuse-report): wip* chore(abuse-report): wip* chore(abuse-report): wip* chore(abuse-report): wip* chore(abuse-report): wip* chore(abuse-report): wip* chore(abuse-report): wip* refactor(reporter): update docs* chore(abuse-report): wip* chore(abuse-report): wip* chore(abuse-report): wip* chore(abuse-report): remove old informer system* chore(abuse-report): ignore error* chore(abuse-report): build error* chore(abuse-report): build error
1 parent793f576 commit086974d

File tree

76 files changed

+884
-585
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+884
-585
lines changed

‎.gitignore‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,4 @@ cypress//integration/examples
1212
cypress/videos/
1313
.vscode/
1414
.DS_Store
15-
report.*
1615
.eslintcache
Lines changed: 1 addition & 0 deletions
Loading
Lines changed: 1 addition & 0 deletions
Loading

‎src/components/ArticleActionsPanel/index.js‎

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,16 @@ import React from 'react'
88
importTfrom'prop-types'
99
import{values}from'ramda'
1010

11-
import{ICON_CMD}from'@/config'
1211
import{THREAD}from'@/constant'
1312
import{buildLog}from'@/utils'
1413

15-
importInformerfrom'@/containers/tool/Informer'
1614
importPinOptionfrom'./PinOption'
1715
importRefineOptionfrom'./RefineOption'
1816
importEditOptionfrom'./EditOption'
1917
importCommunitySetterOptionfrom'./CommunitySetterOption'
2018
importDeleteOptionfrom'./DeleteOption'
2119

22-
import{Wrapper,Option,OptionIcon,OptionTitle}from'./styles'
20+
import{Wrapper}from'./styles'
2321

2422
/* eslint-disable-next-line */
2523
constlog=buildLog('c:ArticleActionsPanel:index')
@@ -33,7 +31,6 @@ const ArticleActionsPanel = ({
3331
onSetRefined,
3432
onUnsetRefined,
3533
onEdit,
36-
onInform,
3734
onDelete,
3835
onCommunitySet,
3936
})=>{
@@ -66,13 +63,6 @@ const ArticleActionsPanel = ({
6663
onCommunitySet={onCommunitySet}
6764
/>
6865

69-
<Informer>
70-
<OptiononClick={onInform}>
71-
<OptionIconsrc={`${ICON_CMD}/flag.svg`}/>
72-
<OptionTitle>举报该内容</OptionTitle>
73-
</Option>
74-
</Informer>
75-
7666
<DeleteOption
7767
passport="owner"
7868
ownerId={data.author?.id}
@@ -100,7 +90,6 @@ ArticleActionsPanel.propTypes = {
10090
}).isRequired,
10191
communityRaw:T.string.isRequired,
10292
thread:T.oneOf(values(THREAD)),
103-
onInform:T.func,
10493
onDelete:T.func,
10594
onEdit:T.func,
10695
onPin:T.func,
@@ -112,7 +101,6 @@ ArticleActionsPanel.propTypes = {
112101

113102
ArticleActionsPanel.defaultProps={
114103
thread:THREAD.POST,
115-
onInform:log,
116104
onDelete:log,
117105
onEdit:log,
118106
onPin:log,

‎src/components/Buttons/ArrowButton.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ type TProps = {
2323
direction?:'left'|'right'
2424
dimWhenIdle?:boolean
2525
disabled?:boolean
26-
arrowStyle?:string
26+
arrowStyle?:'default'|'simple'
2727
}
2828

2929
constArrowButton:React.FC<TProps>=({
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
importReactfrom'react'
2+
3+
import{Space}from'@/components/Common'
4+
importButtonfrom'./Button'
5+
6+
import{Wrapper,CancelBtn}from'./styles/yes_or_no_buttons'
7+
8+
typeTProps={
9+
align?:'center'|'right'
10+
cancelText?:string
11+
confirmText?:string
12+
onCancel?:()=>void
13+
onConfirm?:()=>void
14+
}
15+
16+
constYesOrNoButton:React.FC<TProps>=({
17+
align='center',
18+
cancelText='取消',
19+
confirmText='确定',
20+
onCancel=console.log,
21+
onConfirm=console.log,
22+
})=>{
23+
return(
24+
<Wrapperalign={align}>
25+
<CancelBtnonClick={()=>onCancel?.()}>{cancelText}</CancelBtn>
26+
<Spaceleft={5}right={10}/>
27+
<Buttonsize="small"type="primary"onClick={()=>onConfirm?.()}>
28+
{confirmText}
29+
</Button>
30+
</Wrapper>
31+
)
32+
}
33+
34+
exportdefaultYesOrNoButton

‎src/components/Buttons/index.tsx‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ export { default as OrButton } from './OrButton'
66
export{defaultasDropdownButton}from'./DropdownButton'
77
export{defaultasNotifyButton}from'./NotifyButton'
88
export{defaultasFollowButton}from'./FollowButton'
9+
export{defaultasYesOrNoButtons}from'./YesOrNoButtons'
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
importstyledfrom'styled-components'
2+
3+
import{css,theme}from'@/utils'
4+
5+
typeTWrapper={align:'center'|'right'}
6+
exportconstWrapper=styled.div<TWrapper>`
7+
${css.flex('align-center')};
8+
width: 100%;
9+
justify-content:${({ align})=>
10+
align==='center' ?'center' :'flex-end'};
11+
`
12+
exportconstCancelBtn=styled.div`
13+
color:${theme('button.primary')};
14+
font-size: 14px;
15+
`

‎src/components/Checker/index.tsx‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,19 @@ import { Wrapper, IconWrapper, Icon, ChildWrapper } from './styles'
1717
constlog=buildLog('c:Checker:index')
1818

1919
typeTProps={
20-
children:React.ReactNode
20+
children?:React.ReactNode|null
2121
checked?:boolean
22-
hiddenMode:boolean
22+
hiddenMode?:boolean
2323
size?:TSIZE_SM
24-
onChange:(checked:boolean)=>void
24+
onChange?:(checked:boolean)=>void
2525
}
2626

2727
constChecker:React.FC<TProps>=({
2828
checked=false,
2929
onChange=log,
3030
hiddenMode=false,
3131
size=SIZE.MEDIUM,
32-
children,
32+
children=null,
3333
})=>{
3434
constshow=checked||!hiddenMode
3535

‎src/components/Checker/styles/index.ts‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,12 @@ export const Wrapper = styled.div<TActive>`
1414
`
1515
exportconstIconWrapper=styled.div<TItem>`
1616
position: relative;
17-
background:${({ checked})=>(checked ?'#114759' :'#00262F')};
17+
background:${({ checked})=>(checked ?'#0d3d4e' :'#012f3a')};
1818
width:${({ size})=>getIconSize(size)};
1919
height:${({ size})=>getIconSize(size)};
2020
${css.flex('align-both')};
2121
border: 1px solid;
22-
border-color:${({ checked})=>(checked ?'transparent' :'#114759')};
23-
22+
border-color:${({ checked})=>(checked ?'#246b8c' :'#1c5975')};
2423
border-radius:${({ size})=>getBorderRadius(size)};
2524
2625
transition: all 0.2s;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp