1
0
Fork 0
mirror of https://github.com/plankanban/planka.git synced 2025-08-02 20:15:27 +02:00

Update dependencies

This commit is contained in:
Maksim Eltyshev 2022-02-09 00:56:01 +05:00
parent da9878f220
commit 99862c2f9a
20 changed files with 18933 additions and 27589 deletions

View file

@ -9,18 +9,20 @@ import { ProjectBackgroundTypes } from '../../constants/Enums';
import styles from './Background.module.scss';
import globalStyles from '../../styles.module.scss';
const Background = ({ type, name, imageUrl }) => (
<div
className={classNames(
styles.wrapper,
type === ProjectBackgroundTypes.GRADIENT &&
globalStyles[`background${upperFirst(camelCase(name))}`],
)}
style={{
background: type === 'image' && `url("${imageUrl}") center / cover`,
}}
/>
);
function Background({ type, name, imageUrl }) {
return (
<div
className={classNames(
styles.wrapper,
type === ProjectBackgroundTypes.GRADIENT &&
globalStyles[`background${upperFirst(camelCase(name))}`],
)}
style={{
background: type === 'image' && `url("${imageUrl}") center / cover`,
}}
/>
);
}
Background.propTypes = {
type: PropTypes.string.isRequired,

View file

@ -40,9 +40,7 @@ const Tasks = React.memo(({ items }) => {
<span
className={classNames(styles.count, isOpened ? styles.countOpened : styles.countClosed)}
>
{completedItems.length}
{'/'}
{items.length}
{completedItems.length}/{items.length}
</span>
</div>
{isOpened && (

View file

@ -9,22 +9,24 @@ import UserSettingsModalContainer from '../containers/UserSettingsModalContainer
import ProjectAddModalContainer from '../containers/ProjectAddModalContainer';
import Background from './Background';
const Core = ({ currentModal, currentProject }) => (
<>
{currentProject && currentProject.background && (
<Background
type={currentProject.background.type}
name={currentProject.background.name}
imageUrl={currentProject.backgroundImage && currentProject.backgroundImage.url}
/>
)}
<FixedContainer />
<StaticContainer />
{currentModal === ModalTypes.USERS && <UsersModalContainer />}
{currentModal === ModalTypes.USER_SETTINGS && <UserSettingsModalContainer />}
{currentModal === ModalTypes.PROJECT_ADD && <ProjectAddModalContainer />}
</>
);
function Core({ currentModal, currentProject }) {
return (
<>
{currentProject && currentProject.background && (
<Background
type={currentProject.background.type}
name={currentProject.background.name}
imageUrl={currentProject.backgroundImage && currentProject.backgroundImage.url}
/>
)}
<FixedContainer />
<StaticContainer />
{currentModal === ModalTypes.USERS && <UsersModalContainer />}
{currentModal === ModalTypes.USER_SETTINGS && <UserSettingsModalContainer />}
{currentModal === ModalTypes.PROJECT_ADD && <ProjectAddModalContainer />}
</>
);
}
Core.propTypes = {
currentModal: PropTypes.oneOf(Object.values(ModalTypes)),

View file

@ -7,13 +7,15 @@ import BoardActionsContainer from '../../containers/BoardActionsContainer';
import styles from './Fixed.module.scss';
const Fixed = ({ projectId, board }) => (
<div className={styles.wrapper}>
<HeaderContainer />
{projectId && <ProjectContainer />}
{board && !board.isFetching && <BoardActionsContainer />}
</div>
);
function Fixed({ projectId, board }) {
return (
<div className={styles.wrapper}>
<HeaderContainer />
{projectId && <ProjectContainer />}
{board && !board.isFetching && <BoardActionsContainer />}
</div>
);
}
Fixed.propTypes = {
projectId: PropTypes.string,

View file

@ -1,7 +1,7 @@
import React from 'react';
import { useTranslation } from 'react-i18next';
const NotFound = () => {
function NotFound() {
const [t] = useTranslation();
return (
@ -11,6 +11,6 @@ const NotFound = () => {
})}
</h1>
);
};
}
export default NotFound;

View file

@ -14,20 +14,22 @@ import '../lib/custom-ui/styles.css';
import '../styles.module.scss';
const Root = ({ store, history }) => (
<Provider store={store}>
<ConnectedRouter history={history}>
<Switch>
<Route exact path={Paths.LOGIN} component={LoginContainer} />
<Route exact path={Paths.ROOT} component={CoreWrapperContainer} />
<Route exact path={Paths.PROJECTS} component={CoreWrapperContainer} />
<Route exact path={Paths.BOARDS} component={CoreWrapperContainer} />
<Route exact path={Paths.CARDS} component={CoreWrapperContainer} />
<Route path="*" component={NotFound} />
</Switch>
</ConnectedRouter>
</Provider>
);
function Root({ store, history }) {
return (
<Provider store={store}>
<ConnectedRouter history={history}>
<Switch>
<Route exact path={Paths.LOGIN} component={LoginContainer} />
<Route exact path={Paths.ROOT} component={CoreWrapperContainer} />
<Route exact path={Paths.PROJECTS} component={CoreWrapperContainer} />
<Route exact path={Paths.BOARDS} component={CoreWrapperContainer} />
<Route exact path={Paths.CARDS} component={CoreWrapperContainer} />
<Route path="*" component={NotFound} />
</Switch>
</ConnectedRouter>
</Provider>
);
}
Root.propTypes = {
/* eslint-disable react/forbid-prop-types */

View file

@ -9,7 +9,7 @@ import BoardWrapperContainer from '../../containers/BoardWrapperContainer';
import styles from './Static.module.scss';
const Static = ({ cardId, boardId, projectId }) => {
function Static({ cardId, boardId, projectId }) {
const [t] = useTranslation();
if (projectId === undefined) {
@ -85,7 +85,7 @@ const Static = ({ cardId, boardId, projectId }) => {
<BoardWrapperContainer />
</div>
);
};
}
Static.propTypes = {
cardId: PropTypes.string,

File diff suppressed because one or more lines are too long

View file

@ -6,6 +6,7 @@ const initialState = {
userId: null,
};
// eslint-disable-next-line default-param-last
export default (state = initialState, { type, payload }) => {
switch (type) {
case ActionTypes.AUTHENTICATE__SUCCESS:

View file

@ -8,6 +8,7 @@ const initialState = {
currentModal: null,
};
// eslint-disable-next-line default-param-last
export default (state = initialState, { type, payload }) => {
switch (type) {
case LOCATION_CHANGE:

View file

@ -4,6 +4,7 @@ const initialState = {
isDisconnected: false,
};
// eslint-disable-next-line default-param-last
export default (state = initialState, { type }) => {
switch (type) {
case ActionTypes.SOCKET_DISCONNECT_HANDLE:

View file

@ -9,6 +9,7 @@ const initialState = {
error: null,
};
// eslint-disable-next-line default-param-last
export default (state = initialState, { type, payload }) => {
switch (type) {
case ActionTypes.AUTHENTICATE:

View file

@ -7,6 +7,7 @@ const initialState = {
isSubmitting: false,
};
// eslint-disable-next-line default-param-last
export default (state = initialState, { type, payload }) => {
switch (type) {
case ActionTypes.PROJECT_CREATE:

View file

@ -10,6 +10,7 @@ const initialState = {
error: null,
};
// eslint-disable-next-line default-param-last
export default (state = initialState, { type, payload }) => {
switch (type) {
case ActionTypes.USER_CREATE: