update dependencies

This commit is contained in:
Michael Schramm 2020-09-02 11:14:05 +02:00
parent 94af92711b
commit 1cd4464b5c
10 changed files with 2048 additions and 2706 deletions

View File

@ -17,6 +17,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
### Security ### Security
- upgraded dependencies
## [0.9.6] - 2020-07-17 ## [0.9.6] - 2020-07-17
### Added ### Added

View File

@ -30,7 +30,13 @@ const AuthFooterInner: React.FC<Props> = (props) => {
return ( return (
<footer className={scss.footer}> <footer className={scss.footer}>
<Link href={'/admin'}> <Link href={'/admin'}>
<Button type={'link'} ghost> <Button
type={'link'}
ghost
style={{
color: '#FFF',
}}
>
{t('admin')} {t('admin')}
</Button> </Button>
</Link> </Link>
@ -39,18 +45,39 @@ const AuthFooterInner: React.FC<Props> = (props) => {
<span style={{ color: '#FFF' }} key={'user'}> <span style={{ color: '#FFF' }} key={'user'}>
Hi, {props.me.username} Hi, {props.me.username}
</span>, </span>,
<Button key={'logout'} type={'link'} ghost onClick={logout}> <Button
key={'logout'}
type={'link'}
ghost
onClick={logout}
style={{
color: '#FFF',
}}
>
{t('logout')} {t('logout')}
</Button>, </Button>,
] ]
: [ : [
<Link href={'/login'} key={'login'}> <Link href={'/login'} key={'login'}>
<Button type={'link'} ghost> <Button
type={'link'}
ghost
style={{
color: '#FFF',
}}
>
{t('login')} {t('login')}
</Button> </Button>
</Link>, </Link>,
<Link href={'/register'} key={'register'}> <Link href={'/register'} key={'register'}>
<Button type={'link'} ghost disabled={data ? data.disabledSignUp.value : false}> <Button
type={'link'}
ghost
disabled={data ? data.disabledSignUp.value : false}
style={{
color: '#FFF',
}}
>
{t('register')} {t('register')}
</Button> </Button>
</Link>, </Link>,

View File

@ -6,7 +6,7 @@ import scss from './omf.module.scss'
export const Omf: React.FC = () => { export const Omf: React.FC = () => {
const { data, loading } = useQuery<SettingsQueryData>(SETTINGS_QUERY) const { data, loading } = useQuery<SettingsQueryData>(SETTINGS_QUERY)
if (loading || data.hideContrib.value) { if (loading || (data && data.hideContrib.value)) {
return null return null
} }

View File

@ -12,57 +12,58 @@
"translation:missing": "cross-env TS_NODE_TRANSPILE_ONLY=true ts-node locales/missing.ts" "translation:missing": "cross-env TS_NODE_TRANSPILE_ONLY=true ts-node locales/missing.ts"
}, },
"dependencies": { "dependencies": {
"@ant-design/icons": "^4.1.0", "@ant-design/icons": "^4.2.2",
"@apollo/react-hooks": "^3.1.5", "@apollo/react-common": "^3.1.4",
"@apollo/react-hooks": "^4.0.0",
"@lifeomic/axios-fetch": "^1.4.2", "@lifeomic/axios-fetch": "^1.4.2",
"antd": "^4.2.2", "antd": "^4.6.2",
"apollo-boost": "^0.4.9", "apollo-boost": "^0.4.9",
"axios": "^0.19.2", "axios": "^0.20.0",
"cross-env": "^7.0.2", "cross-env": "^7.0.2",
"dayjs": "^1.8.27", "dayjs": "^1.8.34",
"graphql": "^15.0.0", "graphql": "^15.3.0",
"i18next": "^19.4.5", "i18next": "^19.7.0",
"i18next-browser-languagedetector": "^4.2.0", "i18next-browser-languagedetector": "^6.0.1",
"next": "9.4.0", "next": "9.5.3",
"next-images": "^1.4.0", "next-images": "^1.4.1",
"next-redux-wrapper": "^6.0.0", "next-redux-wrapper": "^6.0.2",
"react": "16.13.1", "react": "16.13.1",
"react-color": "^2.18.1", "react-color": "^2.18.1",
"react-dom": "16.13.1", "react-dom": "16.13.1",
"react-github-button": "^0.1.11", "react-github-button": "^0.1.11",
"react-i18next": "^11.5.0", "react-i18next": "^11.7.2",
"react-icons": "^3.10.0", "react-icons": "^3.11.0",
"react-id-swiper": "^3.0.0", "react-id-swiper": "^4.0.0",
"react-markdown": "^4.3.1", "react-markdown": "^4.3.1",
"react-redux": "^7.2.0", "react-redux": "^7.2.1",
"redux": "^4.0.5", "redux": "^4.0.5",
"redux-devtools-extension": "^2.13.8", "redux-devtools-extension": "^2.13.8",
"redux-thunk": "^2.3.0", "redux-thunk": "^2.3.0",
"sass": "^1.26.5", "sass": "^1.26.10",
"styled-components": "^5.1.1", "styled-components": "^5.1.1",
"swiper": "^5.4.1" "swiper": "^6.1.2"
}, },
"devDependencies": { "devDependencies": {
"@types/axios": "^0.14.0", "@types/axios": "^0.14.0",
"@types/lifeomic__axios-fetch": "^1.4.0", "@types/lifeomic__axios-fetch": "^1.4.0",
"@types/node": "^14.0.1", "@types/node": "^14.6.2",
"@types/node-fetch": "^2.5.7", "@types/node-fetch": "^2.5.7",
"@types/react": "^16.9.35", "@types/react": "^16.9.49",
"@types/styled-components": "^5.1.0", "@types/styled-components": "^5.1.2",
"@types/swiper": "^5.3.1", "@types/swiper": "^5.4.0",
"@typescript-eslint/eslint-plugin": "^3.2.0", "@typescript-eslint/eslint-plugin": "^4.0.1",
"@typescript-eslint/parser": "^3.2.0", "@typescript-eslint/parser": "^4.0.1",
"commander": "^5.1.0", "commander": "^6.1.0",
"eslint": "^7.2.0", "eslint": "^7.8.1",
"eslint-config-prettier": "^6.11.0", "eslint-config-prettier": "^6.11.0",
"eslint-plugin-jsx-a11y": "^6.2.3", "eslint-plugin-jsx-a11y": "^6.3.1",
"eslint-plugin-prettier": "^3.1.3", "eslint-plugin-prettier": "^3.1.4",
"eslint-plugin-react": "^7.20.0", "eslint-plugin-react": "^7.20.6",
"eslint-plugin-react-hooks": "^4.0.4", "eslint-plugin-react-hooks": "^4.1.0",
"glob": "^7.1.6", "glob": "^7.1.6",
"lodash.merge": "^4.6.2", "lodash.merge": "^4.6.2",
"prettier": "^2.0.5", "prettier": "^2.1.1",
"ts-node": "^8.10.2", "ts-node": "^9.0.0",
"typescript": "^3.9.2" "typescript": "^4.0.2"
} }
} }

View File

@ -1,14 +1,16 @@
import { ApolloProvider } from '@apollo/react-common' import { ApolloProvider } from '@apollo/react-common'
import { buildAxiosFetch } from '@lifeomic/axios-fetch' import { buildAxiosFetch } from '@lifeomic/axios-fetch'
import 'antd/dist/antd.css' import 'antd/dist/antd.css'
import { ApolloProvider as ApolloHooksProvider } from '@apollo/react-hooks'
import ApolloClient from 'apollo-boost' import ApolloClient from 'apollo-boost'
import 'assets/global.scss' import 'assets/global.scss'
import 'assets/variables.scss' import 'assets/variables.scss'
import axios from 'axios' import axios from 'axios'
import { authConfig } from 'components/with.auth' import { authConfig } from 'components/with.auth'
import 'i18n' import 'i18n'
import { AppProps } from 'next/app' import { AppInitialProps, AppProps } from 'next/app'
import getConfig from 'next/config' import getConfig from 'next/config'
import { AppType } from 'next/dist/next-server/lib/utils'
import Head from 'next/head' import Head from 'next/head'
import React from 'react' import React from 'react'
import { wrapper } from 'store' import { wrapper } from 'store'
@ -22,22 +24,29 @@ const { publicRuntimeConfig } = getConfig() as {
const client = new ApolloClient({ const client = new ApolloClient({
uri: publicRuntimeConfig.endpoint, uri: publicRuntimeConfig.endpoint,
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-call,@typescript-eslint/no-explicit-any // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-call,@typescript-eslint/no-explicit-any
fetch: buildAxiosFetch(axios) as any, fetch: buildAxiosFetch(axios as any) as any,
request: (operation): void => { request: (operation): void => {
operation.setContext(authConfig()) operation.setContext(authConfig())
}, },
}) })
const App: React.FC<AppProps> = ({ Component, pageProps }) => { const App: AppType = ({ Component, pageProps }) => {
return ( return (
<ApolloProvider client={client}> <ApolloProvider client={client}>
{/* eslint-disable-next-line @typescript-eslint/no-unsafe-assignment */}
<ApolloHooksProvider client={client as any}>
<Head> <Head>
<title>OhMyForm</title> <title>OhMyForm</title>
<meta name="theme-color" content={'#4182e4'} /> <meta name="theme-color" content={'#4182e4'} />
</Head> </Head>
<Component {...pageProps} /> <Component {...pageProps} />
</ApolloHooksProvider>
</ApolloProvider> </ApolloProvider>
) )
} }
App.getInitialProps = (): AppInitialProps => ({
pageProps: {},
})
export default wrapper.withRedux(App) export default wrapper.withRedux(App)

View File

@ -65,7 +65,6 @@ const Index: NextPage<Props> = () => {
const goPrev = () => swiper && swiper.slidePrev() const goPrev = () => swiper && swiper.slidePrev()
const swiperConfig: ReactIdSwiperProps = { const swiperConfig: ReactIdSwiperProps = {
getSwiper: setSwiper,
direction: 'vertical', direction: 'vertical',
allowSlideNext: false, allowSlideNext: false,
allowSlidePrev: true, allowSlidePrev: true,
@ -79,7 +78,8 @@ const Index: NextPage<Props> = () => {
}} }}
> >
<Omf /> <Omf />
<Swiper {...swiperConfig}> {/* eslint-disable-next-line @typescript-eslint/no-unsafe-member-access */}
<Swiper {...swiperConfig} ref={(element) => element && setSwiper((element as any).swiper)}>
{[ {[
data.form.startPage.show ? ( data.form.startPage.show ? (
<FormPage <FormPage

View File

@ -111,13 +111,25 @@ const Index: NextPage = () => {
<Button.Group className={scss.otherActions}> <Button.Group className={scss.otherActions}>
{(!data || !data.disabledSignUp.value) && ( {(!data || !data.disabledSignUp.value) && (
<Link href={'/register'}> <Link href={'/register'}>
<Button type={'link'} ghost> <Button
type={'link'}
ghost
style={{
color: '#FFF',
}}
>
{t('register')} {t('register')}
</Button> </Button>
</Link> </Link>
)} )}
<Link href={'/login/recover'}> <Link href={'/login/recover'}>
<Button type={'link'} ghost> <Button
type={'link'}
ghost
style={{
color: '#FFF',
}}
>
{t('recover')} {t('recover')}
</Button> </Button>
</Link> </Link>

View File

@ -119,7 +119,13 @@ const Register: NextPage = () => {
<Button.Group className={scss.otherActions}> <Button.Group className={scss.otherActions}>
<Link href={'/login'}> <Link href={'/login'}>
<Button type={'link'} ghost> <Button
type={'link'}
ghost
style={{
color: '#FFF',
}}
>
{t('register:gotoLogin')} {t('register:gotoLogin')}
</Button> </Button>
</Link> </Link>

View File

@ -25,4 +25,4 @@ const makeStore: MakeStore<State> = () => {
return createStore(root, undefined, composeWithDevTools(applyMiddleware(thunkMiddleware))) return createStore(root, undefined, composeWithDevTools(applyMiddleware(thunkMiddleware)))
} }
export const wrapper = createWrapper<State>(makeStore, { debug: true }) export const wrapper = createWrapper<State>(makeStore, { debug: false })

4595
yarn.lock

File diff suppressed because it is too large Load Diff