This repository was archived by the owner on Nov 8, 2022. It is now read-only.
- Notifications
You must be signed in to change notification settings - Fork37
feat(abuse report): redesign#1069
Merged
Uh oh!
There was an error while loading.Please reload this page.
Merged
Changes fromall commits
Commits
Show all changes
21 commits Select commitHold shift + click to select a range
160d1e9
chore(abuse-report): basic setup && fix generator typo
mydearxymbc7db91
chore(abuse-report): wip
mydearxymba1b4ea
chore(abuse-report): wip
mydearxymf378e63
chore(abuse-report): wip
mydearxym1980ef4
chore(abuse-report): wip
mydearxym8c9584d
chore(abuse-report): wip
mydearxymadd3391
chore(abuse-report): wip
mydearxym2b4f54d
chore(abuse-report): wip
mydearxym95f83af
chore(abuse-report): wip
mydearxym495d4b8
chore(abuse-report): wip
mydearxymdd5650c
chore(abuse-report): wip
mydearxymb0ad3f5
chore(abuse-report): wip
mydearxym2f1fa08
chore(abuse-report): wip
mydearxym04a3acb
refactor(reporter): update docs
mydearxymf8067ad
chore(abuse-report): wip
mydearxymae7d3e2
chore(abuse-report): wip
mydearxymd1ee672
chore(abuse-report): wip
mydearxym241f3ef
chore(abuse-report): remove old informer system
mydearxym1b064e5
chore(abuse-report): ignore error
mydearxymd996f82
chore(abuse-report): build error
mydearxymb42b55d
chore(abuse-report): build error
mydearxymFile filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
1 change: 0 additions & 1 deletion.gitignore
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -12,5 +12,4 @@ cypress//integration/examples | ||
cypress/videos/ | ||
.vscode/ | ||
.DS_Store | ||
.eslintcache |
1 change: 1 addition & 0 deletionspublic/icons/static/article/report-solid.svg
Loading
Sorry, something went wrong.Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletionspublic/icons/static/article/report.svg
Loading
Sorry, something went wrong.Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 1 addition & 13 deletionssrc/components/ArticleActionsPanel/index.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletionsrc/components/Buttons/ArrowButton.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletionssrc/components/Buttons/YesOrNoButtons.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import React from 'react' | ||
import { Space } from '@/components/Common' | ||
import Button from './Button' | ||
import { Wrapper, CancelBtn } from './styles/yes_or_no_buttons' | ||
type TProps = { | ||
align?: 'center' | 'right' | ||
cancelText?: string | ||
confirmText?: string | ||
onCancel?: () => void | ||
onConfirm?: () => void | ||
} | ||
const YesOrNoButton: React.FC<TProps> = ({ | ||
align = 'center', | ||
cancelText = '取消', | ||
confirmText = '确定', | ||
onCancel = console.log, | ||
onConfirm = console.log, | ||
}) => { | ||
return ( | ||
<Wrapper align={align}> | ||
<CancelBtn onClick={() => onCancel?.()}>{cancelText}</CancelBtn> | ||
<Space left={5} right={10} /> | ||
<Button size="small" type="primary" onClick={() => onConfirm?.()}> | ||
{confirmText} | ||
</Button> | ||
</Wrapper> | ||
) | ||
} | ||
export default YesOrNoButton |
1 change: 1 addition & 0 deletionssrc/components/Buttons/index.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletionssrc/components/Buttons/styles/yes_or_no_buttons.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import styled from 'styled-components' | ||
import { css, theme } from '@/utils' | ||
type TWrapper = { align: 'center' | 'right' } | ||
export const Wrapper = styled.div<TWrapper>` | ||
${css.flex('align-center')}; | ||
width: 100%; | ||
justify-content: ${({ align }) => | ||
align === 'center' ? 'center' : 'flex-end'}; | ||
` | ||
export const CancelBtn = styled.div` | ||
color: ${theme('button.primary')}; | ||
font-size: 14px; | ||
` |
8 changes: 4 additions & 4 deletionssrc/components/Checker/index.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
5 changes: 2 additions & 3 deletionssrc/components/Checker/styles/index.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletionssrc/components/FormItem/styles/index.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
51 changes: 0 additions & 51 deletionssrc/components/Input/Textarea.js
This file was deleted.
Oops, something went wrong.
Uh oh!
There was an error while loading.Please reload this page.
43 changes: 43 additions & 0 deletionssrc/components/Input/Textarea.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
/* | ||
* | ||
* Input | ||
* | ||
*/ | ||
import React, { useCallback } from 'react' | ||
import { pickBy } from 'ramda' | ||
import { buildLog } from '@/utils' | ||
import { Wrapper } from './styles/textarea' | ||
/* eslint-disable-next-line */ | ||
const log = buildLog('c:Input:index') | ||
type TProps = { | ||
testid?: string | ||
placeholder?: string | ||
value?: string | null | ||
onChange?: (e) => void | null | ||
} | ||
const Textarea: React.FC<TProps> = ({ | ||
onChange = null, | ||
testid = 'textarea', | ||
...restProps | ||
}) => { | ||
const handleOnChange = useCallback((e) => onChange?.(e), [onChange]) | ||
const validProps = pickBy((v) => v !== null, restProps) | ||
return ( | ||
<Wrapper | ||
testid={testid} | ||
onChange={handleOnChange} | ||
minRows={1} | ||
spellcheck="false" | ||
{...validProps} | ||
/> | ||
) | ||
} | ||
export default React.memo(Textarea) |
62 changes: 24 additions & 38 deletionssrc/components/Input/index.js → src/components/Input/index.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletionssrc/components/Input/styles/index.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
9 changes: 7 additions & 2 deletionssrc/components/Input/styles/textarea.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Oops, something went wrong.
Uh oh!
There was an error while loading.Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.