-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: 功能补漏2 * Bump @types/node from 12.11.7 to 12.12.0 Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 12.11.7 to 12.12.0. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) Signed-off-by: dependabot-preview[bot] <support@dependabot.com> * Bump @types/webpack from 4.39.5 to 4.39.7 Bumps [@types/webpack](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/webpack) from 4.39.5 to 4.39.7. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/webpack) Signed-off-by: dependabot-preview[bot] <support@dependabot.com> * Bump immer from 4.0.2 to 5.0.0 Bumps [immer](https://github.com/immerjs/immer) from 4.0.2 to 5.0.0. - [Release notes](https://github.com/immerjs/immer/releases) - [Commits](immerjs/immer@v4.0.2...v5.0.0) Signed-off-by: dependabot-preview[bot] <support@dependabot.com> * Bump @types/react-router-dom from 5.1.0 to 5.1.1 Bumps [@types/react-router-dom](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react-router-dom) from 5.1.0 to 5.1.1. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react-router-dom) Signed-off-by: dependabot-preview[bot] <support@dependabot.com> * Bump @types/node from 12.12.0 to 12.12.3 Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 12.12.0 to 12.12.3. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) Signed-off-by: dependabot-preview[bot] <support@dependabot.com> * feat: 添加 AD * feat: 添加 PWA 跳转提示 * fix: prod css classnames * fix: env enum * Bump core-js from 3.3.5 to 3.3.6 Bumps [core-js](https://github.com/zloirock/core-js) from 3.3.5 to 3.3.6. - [Release notes](https://github.com/zloirock/core-js/releases) - [Changelog](https://github.com/zloirock/core-js/blob/master/CHANGELOG.md) - [Commits](zloirock/core-js@v3.3.5...v3.3.6) Signed-off-by: dependabot-preview[bot] <support@dependabot.com> * Bump autoprefixer from 9.7.0 to 9.7.1 Bumps [autoprefixer](https://github.com/postcss/autoprefixer) from 9.7.0 to 9.7.1. - [Release notes](https://github.com/postcss/autoprefixer/releases) - [Changelog](https://github.com/postcss/autoprefixer/blob/master/CHANGELOG.md) - [Commits](postcss/autoprefixer@9.7.0...9.7.1) Signed-off-by: dependabot-preview[bot] <support@dependabot.com> * feat: select 支持 tags * fix: many errors * Bump draft-js from 0.11.1 to 0.11.2 Bumps [draft-js](https://github.com/facebook/draft-js) from 0.11.1 to 0.11.2. - [Release notes](https://github.com/facebook/draft-js/releases) - [Changelog](https://github.com/facebook/draft-js/blob/master/CHANGELOG.md) - [Commits](https://github.com/facebook/draft-js/commits) Signed-off-by: dependabot-preview[bot] <support@dependabot.com> * Bump showdown from 1.9.0 to 1.9.1 Bumps [showdown](https://github.com/showdownjs/showdown) from 1.9.0 to 1.9.1. - [Release notes](https://github.com/showdownjs/showdown/releases) - [Changelog](https://github.com/showdownjs/showdown/blob/1.9.1/CHANGELOG.md) - [Commits](showdownjs/showdown@1.9.0...1.9.1) Signed-off-by: dependabot-preview[bot] <support@dependabot.com> * Bump @types/node from 12.12.3 to 12.12.5 Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 12.12.3 to 12.12.5. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) Signed-off-by: dependabot-preview[bot] <support@dependabot.com> * Bump @types/webpack from 4.39.7 to 4.39.8 Bumps [@types/webpack](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/webpack) from 4.39.7 to 4.39.8. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/webpack) Signed-off-by: dependabot-preview[bot] <support@dependabot.com> * Bump @types/react-router-dom from 5.1.1 to 5.1.2 Bumps [@types/react-router-dom](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react-router-dom) from 5.1.1 to 5.1.2. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react-router-dom) Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
- Loading branch information
Showing
53 changed files
with
532 additions
and
179 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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,4 @@ | ||
.img { | ||
width: 300px; | ||
height: 100px; | ||
} |
This file contains 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,30 @@ | ||
import React from 'react' | ||
import { IAdvertisement } from '@cc98/api' | ||
import Swipe from 'src/components/Swipe' | ||
import { getADs } from 'src/service/config' | ||
|
||
import s from './index.m.scss' | ||
|
||
const AD: React.FC = () => { | ||
const [data, setData] = React.useState<IAdvertisement[]>([]) | ||
|
||
React.useEffect(() => { | ||
getADs().then(setData) | ||
}, []) | ||
|
||
if (!data.length) return null | ||
|
||
return ( | ||
<Swipe duration={20000} initValue={Math.floor(Math.random() * data.length)}> | ||
{data.map(({ imageUrl, id, url }) => ( | ||
<div key={id}> | ||
<a href={url} target="_blank" rel="noopener noreferrer"> | ||
<img className={s.img} src={imageUrl} /> | ||
</a> | ||
</div> | ||
))} | ||
</Swipe> | ||
) | ||
} | ||
|
||
export default AD |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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 |
---|---|---|
@@ -1,24 +1,30 @@ | ||
import React from 'react' | ||
import { Link } from 'react-router-dom' | ||
import useDocumentTitle from 'src/hooks/useDocumentTitle' | ||
|
||
import s from './Status.m.scss' | ||
|
||
interface IStatusProps { | ||
description: string | ||
img: string | ||
title: string | ||
extraContent?: React.ReactNode | ||
} | ||
|
||
const Status: React.FC<IStatusProps> = ({ description, img, extraContent = null }) => ( | ||
<div className={s.root}> | ||
<img className={s.img} src={img} /> | ||
<p className={s.title}>糟糕!好像出错了</p> | ||
<p className={s.desc}>{description}</p> | ||
<div className={s.link}> | ||
<Link to="/">返回首页</Link> | ||
{extraContent} | ||
const Status: React.FC<IStatusProps> = ({ description, img, extraContent = null, title }) => { | ||
useDocumentTitle(title) | ||
|
||
return ( | ||
<div className={s.root}> | ||
<img className={s.img} src={img} /> | ||
<p className={s.title}>糟糕!好像出错了</p> | ||
<p className={s.desc}>{description}</p> | ||
<div className={s.link}> | ||
<Link to="/">返回首页</Link> | ||
{extraContent} | ||
</div> | ||
</div> | ||
</div> | ||
) | ||
) | ||
} | ||
|
||
export default Status |
This file contains 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
This file contains 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,53 @@ | ||
.background { | ||
display: flex; | ||
position: fixed; | ||
top: 0%; | ||
left: 0%; | ||
width: 100%; | ||
height: 100%; | ||
background-color: rgba(0, 0, 0, 0.5); | ||
z-index: 2000; | ||
justify-content: center; | ||
align-items: center; | ||
} | ||
|
||
.container { | ||
display: flex; | ||
flex-direction: column; | ||
justify-content: space-around; | ||
align-items: center; | ||
z-index: 2001; | ||
background-color: white; | ||
font-size: 48px; | ||
width: 80%; | ||
min-height: 80%; | ||
} | ||
|
||
.image { | ||
display: block; | ||
width: 80%; | ||
margin-top: 20px; | ||
} | ||
|
||
.text-container { | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
width: 80%; | ||
} | ||
|
||
.button { | ||
box-sizing: border-box; | ||
border: 2px solid #007acc; | ||
border-radius: 8px; | ||
background-color: #007acc; | ||
margin-bottom: 20px; | ||
padding: 8px 32px; | ||
color: white; | ||
font-size: 48px; | ||
} | ||
|
||
.button-container { | ||
display: flex; | ||
flex-direction: column; | ||
} |
Oops, something went wrong.