Skip to content
This repository was archived by the owner on Nov 8, 2022. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file removed public/bg/CircleSapres.jpeg
Binary file not shown.
Binary file added public/bg/Squares.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/bg/waves.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import styled from 'styled-components'
import type { TActive } from '@/spec'
import Img from '@/Img'
import css, { theme } from '@/utils/css'
import MoreSVG from '@/icons/More'
import MoreSVG from '@/icons/menu/More'

import { Divider } from '@/widgets/Common'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
WORKS_TAB,
SVG,
} from '@/constant'
import { shareTo, addCollection } from '@/utils/helper'
import { addCollection } from '@/utils/helper'
import { buildLog } from '@/utils/logger'

import ArticleBaseStats from '@/widgets/ArticleBaseStats'
Expand Down Expand Up @@ -75,7 +75,7 @@ const WorksLayout: FC<TProps> = ({ metric = METRIC.ARTICLE, article, tab }) => {
size={18}
onClick={() => addCollection()}
/>
<IconButton icon={SVG.SHARE} size={18} onClick={shareTo} />
<IconButton icon={SVG.SHARE} size={18} />
</Actions>
</Other>
</Intro>
Expand Down
1 change: 0 additions & 1 deletion src/containers/editor/ArticleEditor/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ const Footer: FC<TProps> = ({
<ArticleFooter>
<TagsList
items={tags}
mLeft={0}
size="medium"
community={community}
thread={thread}
Expand Down
2 changes: 1 addition & 1 deletion src/containers/editor/BlogEditor/Content/FeedItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ const FeedItem: FC<TProps> = ({
<IconButton
icon={SVG.EDIT_PEN}
onClick={() => toStep('STEP_2')}
mTop={3}
top={3}
/>
)}
</Header>
Expand Down
4 changes: 2 additions & 2 deletions src/containers/editor/BlogEditor/Content/TheRSSItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ import IconButton from '@/widgets/Buttons/IconButton'
import { Wrapper, Title, Subtitle } from '../styles/content/rss_item'
import { toStep } from '../logic'

type TProps = TSpace & {
type TProps = {
rssInfo: TBlogRSS
readonly?: boolean
}
} & TSpace

const RSSItem: FC<TProps> = ({ rssInfo, readonly = false, ...restProps }) => {
return (
Expand Down
1 change: 0 additions & 1 deletion src/containers/editor/BlogEditor/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ const Footer: FC<TProps> = ({ community, tags, submitState, mode }) => {
{mode === 'publish' && (
<TagsList
items={tags}
mLeft={0}
size="medium"
community={community}
thread={THREAD.BLOG}
Expand Down
2 changes: 1 addition & 1 deletion src/containers/editor/RichEditor/Menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const Menu: FC = () => {
placement="bottom-end"
onClick={console.log}
>
<IconButton path="shape/more.svg" mLeft={16} />
<IconButton path="shape/more.svg" left={16} />
</MenuButton>
)
}
Expand Down
1 change: 0 additions & 1 deletion src/containers/editor/WorksEditor/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ const Footer: FC<TProps> = ({ step, inputData, submitState, mode }) => {
<FooterExtra>
<TagsList
items={[]}
mLeft={0}
size="medium"
// community={community}
// thread={THREAD.WORKS}
Expand Down
3 changes: 1 addition & 2 deletions src/containers/layout/GlobalLayout/Addon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { isMobile } from 'react-device-detect'
import useShortcut from '@/hooks/useShortcut'

import { openDoraemon, logBuddha } from './logic'
import { AbuseReport, Doraemon, Share, Drawer, ErrorBox } from './dynamic'
import { AbuseReport, Doraemon, Drawer, ErrorBox } from './dynamic'

const Addon: FC = () => {
useEffect(() => logBuddha(), [])
Expand All @@ -17,7 +17,6 @@ const Addon: FC = () => {
{/* @ts-ignore */}
<Drawer />
{/* @ts-ignore */}
{!isMobile && <Share />}
{/* @ts-ignore */}
{!isMobile && <Doraemon />}
{/* @ts-ignore */}
Expand Down
10 changes: 8 additions & 2 deletions src/containers/layout/GlobalLayout/CustomBg.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ const ComstomBg: FC = () => {
bgColor: '#050139', // backgroundBg or fallback
},
k: {
bgImage: '/bg/CircleSapres.jpeg',
bgImage: '/bg/Squares.png',
},
m: {
bgImage: '/bg/Antiquitarian.jpeg',
Expand All @@ -90,16 +90,22 @@ const ComstomBg: FC = () => {
bgImage: '/bg/space.svg',
bgColor: '#002630', // backgroundBg
},
y: {
bgImage: '/bg/waves.png',
},
}

const effect: TBackgroundEffect = effects.l
// e, h,
// y, g
const effect = effects.g

// for linear/solid background colors
if (isString(effect)) {
// @ts-ignore
return <Wrapper effect={effect as string} />
}

// @ts-ignore
const { bgImage, bgColor = '', bgSize = 'contain' } = effect

// for custom image/svg
Expand Down
18 changes: 15 additions & 3 deletions src/containers/layout/ThemePalette/GlobalStyle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,25 @@ const GlobalStyle = createGlobalStyle`
background-color: ${theme('toast.bg')} !important;
min-height: 36px !important;
padding: 2px 45px 0px 0 !important;
box-shadow: none;

&:after {
box-shadow: ${theme('toast.boxShadow')};
}
}
/* make sure the toast will not show in custom bg */
.iziToast-wrapper {
align-items: center;
}
.iziToast-capsule {
/* general content page width, adjuust if need */
max-width: 1380px;
padding-left: 30px;
padding-right: 30px;
}
.iziToast > .iziToast-body .iziToast-title {
color: ${theme('toast.title')} !important;
}
.iziToast-wrapper-topRight {
top: 25px !important;
}
.iziToast > .iziToast-body .iziToast-message {
color: ${theme('toast.message')} !important;
}
Expand Down
6 changes: 3 additions & 3 deletions src/containers/thread/KanbanThread/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ const KanbanThreadContainer: FC<TProps> = ({
<Label>待办项</Label>
<SubTitle>{getRandomInt(5, 20)}</SubTitle>
<SpaceGrow />
<IconButton path="shape/add.svg" mRight={12} />
<IconButton path="shape/add.svg" right={12} />
</Header>
<Body>
<KanbanItem />
Expand All @@ -71,7 +71,7 @@ const KanbanThreadContainer: FC<TProps> = ({
<Label>正在完善</Label>
<SubTitle>{getRandomInt(5, 20)}</SubTitle>
<SpaceGrow />
<IconButton path="shape/add.svg" mRight={12} />
<IconButton path="shape/add.svg" right={12} />
</Header>
<Body>
<KanbanItem />
Expand All @@ -88,7 +88,7 @@ const KanbanThreadContainer: FC<TProps> = ({
<Label>已完成</Label>
<SubTitle>{getRandomInt(5, 20)}</SubTitle>
<SpaceGrow />
<IconButton path="shape/add.svg" mRight={12} />
<IconButton path="shape/add.svg" right={12} />
</Header>
<Body>
<KanbanItem />
Expand Down
12 changes: 5 additions & 7 deletions src/containers/tool/ArticleSticker/LeftSticker/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,15 @@ import { FC } from 'react'

import type { TArticle } from '@/spec'

import { SVG } from '@/constant'
import { shareTo } from '@/utils/helper'
import IconButton from '@/widgets/Buttons/IconButton'
import Share from '@/containers/tool/Share'
import Upvote from '@/widgets/Upvote'

import {
Wrapper,
InnerWrapper,
BackWrapper,
ArrowIcon,
BackText,
// BackWrapper,
// ArrowIcon,
// BackText,
Divider,
} from '../styles/left_sticker'
import { handleUpvote } from '../logic'
Expand Down Expand Up @@ -46,7 +44,7 @@ const LeftSticker: FC<TProps> = ({
onAction={handleUpvote}
/>
<Divider />
<IconButton icon={SVG.SHARE} onClick={shareTo} size={16} mRight={2} />
<Share left={5} size={17} right={3} />
</InnerWrapper>
</Wrapper>
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export const Wrapper = styled(FadeToggle).attrs(({ testid }: TTestable) => ({
font-size: 13px;

${css.media.desktopL`
left: 18%;
left: 22%;
`}

${css.media.laptopL`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,13 @@ const Header: FC<TProps> = ({ view, texts }) => {
<IconButton
path="article/community-mirror.svg"
size={18}
mRight={8}
hintDelay={0}
hint="镜像到其他社区"
active={action === COMMUNITY_ACTION.MIRROR}
/>
<IconButton
path="article/community-move.svg"
size={18}
mRight={0}
hintDelay={0}
hint="移动到其他社区"
active={action === COMMUNITY_ACTION.MOVE}
Expand Down
7 changes: 3 additions & 4 deletions src/containers/tool/CommunityTagSetter/TagSetter/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ const Header: FC<TProps> = ({ view }) => {
<IconButton
path="shape/settings.svg"
size={18}
mRight={8}
right={8}
hintDelay={0}
hint="设置标签"
active={view === TAG_VIEW.SELECT}
Expand All @@ -61,7 +61,7 @@ const Header: FC<TProps> = ({ view }) => {
<IconButton
path="shape/add.svg"
size={20}
mRight={8}
right={8}
hintDelay={0}
hint="新增标签"
active={view === TAG_VIEW.CREATE_ITEM}
Expand All @@ -70,7 +70,7 @@ const Header: FC<TProps> = ({ view }) => {
<IconButton
path="edit/publish-pen.svg"
size={18}
mRight={8}
right={8}
hintDelay={0}
hint="编辑标签"
active={view === TAG_VIEW.UPDATE}
Expand All @@ -79,7 +79,6 @@ const Header: FC<TProps> = ({ view }) => {
<IconButton
path="shape/delete.svg"
size={18}
mRight={0}
hintDelay={0}
hint="删除标签"
active={view === TAG_VIEW.DELETE}
Expand Down
4 changes: 2 additions & 2 deletions src/containers/tool/CommunityTagSetter/TagSetter/Tag.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ const Tag: FC<TProps> = ({ tag, view, checked, onTagSelect }) => {
{updateable && (
<IconButton
path="edit/publish-pen.svg"
mLeft={8}
mRight={5}
left={8}
right={5}
onClick={() => {
changeTagView(TAG_VIEW.UPDATE_ITEM)
}}
Expand Down
8 changes: 1 addition & 7 deletions src/containers/tool/Drawer/AddOn/CloseButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,7 @@ import { closeDrawer } from '../logic'

const CloseButton: FC = () => {
return (
<IconButton
icon="close"
onClick={closeDrawer}
mTop={4}
size={20}
mLeft={6}
/>
<IconButton icon="close" onClick={closeDrawer} top={4} size={20} left={6} />
)
}

Expand Down
22 changes: 0 additions & 22 deletions src/containers/tool/Drawer/AddOn/ShareButton.tsx

This file was deleted.

4 changes: 2 additions & 2 deletions src/containers/tool/Drawer/AddOn/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import ArticleNavi from './ArticleNavi'
import type { TArticleNavi } from '../spec'
import { ARTICLE_VIEWER_TYPES } from '../constant'

import Share from '@/containers/tool/Share'
import CloseButton from './CloseButton'
import ShareButton from './ShareButton'
import { Wrapper, TopArea } from '../styles/add_on'

type TProps = {
Expand All @@ -23,7 +23,7 @@ const AddOn: FC<TProps> = ({ type, articleNavi }) => {
<Wrapper>
<TopArea showShare={showShare}>
<CloseButton />
{showShare && <ShareButton />}
{showShare && <Share top={9} left={5} size={15} offsetLeft="50%" />}
</TopArea>

{showArticleNavi && <ArticleNavi articleNavi={articleNavi} />}
Expand Down
2 changes: 1 addition & 1 deletion src/containers/tool/Drawer/Content/DesktopView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const Content: FC<TProps> = ({ visible, type, attUser, userListerType }) => {
instanceKey={DRAWER_SCROLLER}
direction="vertical"
height="100vh"
shadowSize="small"
barSize="medium"
showShadow={false}
>
{renderContent(type, attUser, userListerType)}
Expand Down
1 change: 0 additions & 1 deletion src/containers/tool/Drawer/styles/add_on/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ export const TopArea = styled.div<{ showShare: boolean }>`
${css.flexColumn('align-both')}
padding-left: 12px;
z-index: 100000;
transform: rotate(2deg);

&:before {
content: '';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
Title,
CodeWrapper,
Inputer,
} from './styles/iframe_board'
} from '../styles/panel/iframe_board'

const IFrameBoard: FC = () => {
const code =
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
import { FC, memo } from 'react'

import { SITE_SHARE_TYPE } from './constant'
import { SITE_SHARE_TYPE } from '../constant'

import type { TLinksData } from '../spec'

import LinkBoard from './LinkBoard'
import IFrameBoard from './IFrameBoard'
import WechatBoard from './WechatBoard'

import { Wrapper } from './styles/info_panel'
import type { TLinksData } from './store'
import { Wrapper } from '../styles/panel/info_panel'

type TProps = {
type: string
Expand Down
Loading