diff --git a/client/src/actions/entry/project.js b/client/src/actions/entry/project.js index f019caaa..d0affde8 100755 --- a/client/src/actions/entry/project.js +++ b/client/src/actions/entry/project.js @@ -14,6 +14,13 @@ export const updateCurrentProject = (data) => ({ }, }); +export const updateCurrentProjectBackgroundImage = (data) => ({ + type: EntryActionTypes.CURRENT_PROJECT_BACKGROUND_IMAGE_UPDATE, + payload: { + data, + }, +}); + export const deleteCurrentProject = () => ({ type: EntryActionTypes.CURRENT_PROJECT_DELETE, payload: {}, diff --git a/client/src/actions/project.js b/client/src/actions/project.js index 7bbf7308..18bd1a6e 100644 --- a/client/src/actions/project.js +++ b/client/src/actions/project.js @@ -90,6 +90,28 @@ export const updateProjectReceived = (project) => ({ }, }); +export const updateProjectBackgroundImageRequested = (id) => ({ + type: ActionTypes.PROJECT_BACKGROUND_IMAGE_UPDATE_REQUESTED, + payload: { + id, + }, +}); + +export const updateProjectBackgroundImageSucceeded = (project) => ({ + type: ActionTypes.PROJECT_BACKGROUND_IMAGE_UPDATE_SUCCEEDED, + payload: { + project, + }, +}); + +export const updateProjectBackgroundImageFailed = (id, error) => ({ + type: ActionTypes.PROJECT_BACKGROUND_IMAGE_UPDATE_FAILED, + payload: { + id, + error, + }, +}); + export const deleteProjectRequested = (id) => ({ type: ActionTypes.PROJECT_DELETE_REQUESTED, payload: { diff --git a/client/src/actions/user.js b/client/src/actions/user.js index 1ae875fd..7dafb26c 100644 --- a/client/src/actions/user.js +++ b/client/src/actions/user.js @@ -170,11 +170,10 @@ export const updateUserEmailRequested = (id, data) => ({ }, }); -export const updateUserEmailSucceeded = (id, email) => ({ +export const updateUserEmailSucceeded = (user) => ({ type: ActionTypes.USER_EMAIL_UPDATE_SUCCEEDED, payload: { - id, - email, + user, }, }); @@ -194,10 +193,10 @@ export const updateUserPasswordRequested = (id, data) => ({ }, }); -export const updateUserPasswordSucceeded = (id) => ({ +export const updateUserPasswordSucceeded = (user) => ({ type: ActionTypes.USER_PASSWORD_UPDATE_SUCCEEDED, payload: { - id, + user, }, }); @@ -217,11 +216,10 @@ export const updateUserUsernameRequested = (id, data) => ({ }, }); -export const updateUserUsernameSucceeded = (id, username) => ({ +export const updateUserUsernameSucceeded = (user) => ({ type: ActionTypes.USER_USERNAME_UPDATE_SUCCEEDED, payload: { - id, - username, + user, }, }); @@ -240,11 +238,10 @@ export const updateUserAvatarRequested = (id) => ({ }, }); -export const updateUserAvatarSucceeded = (id, avatarUrl) => ({ +export const updateUserAvatarSucceeded = (user) => ({ type: ActionTypes.USER_AVATAR_UPDATE_SUCCEEDED, payload: { - id, - avatarUrl, + user, }, }); diff --git a/client/src/api/projects.js b/client/src/api/projects.js index d9477214..c3ffc066 100755 --- a/client/src/api/projects.js +++ b/client/src/api/projects.js @@ -1,3 +1,4 @@ +import http from './http'; import socket from './socket'; /* Actions */ @@ -8,11 +9,15 @@ const createProject = (data, headers) => socket.post('/projects', data, headers) const updateProject = (id, data, headers) => socket.patch(`/projects/${id}`, data, headers); +const updateProjectBackgroundImage = (id, data, headers) => + http.post(`/projects/${id}/background-image`, data, headers); + const deleteProject = (id, headers) => socket.delete(`/projects/${id}`, undefined, headers); export default { getProjects, createProject, updateProject, + updateProjectBackgroundImage, deleteProject, }; diff --git a/client/src/api/users.js b/client/src/api/users.js index 272ce30f..b936f872 100755 --- a/client/src/api/users.js +++ b/client/src/api/users.js @@ -19,8 +19,7 @@ const updateUserPassword = (id, data, headers) => const updateUserUsername = (id, data, headers) => socket.patch(`/users/${id}/username`, data, headers); -const updateUserAvatar = (id, data, headers) => - http.post(`/users/${id}/update-avatar`, data, headers); +const updateUserAvatar = (id, data, headers) => http.post(`/users/${id}/avatar`, data, headers); const deleteUser = (id, headers) => socket.delete(`/users/${id}`, undefined, headers); diff --git a/client/src/components/Board/AddList.module.css b/client/src/components/Board/AddList.module.css index 1f5ee6ef..fdd4caa9 100644 --- a/client/src/components/Board/AddList.module.css +++ b/client/src/components/Board/AddList.module.css @@ -23,7 +23,7 @@ } .wrapper { - background-color: #e2e4e6; + background: #e2e4e6; border-radius: 3px; padding: 4px; transition: opacity 40ms ease-in; diff --git a/client/src/components/Board/Board.jsx b/client/src/components/Board/Board.jsx index be936b89..4342d191 100755 --- a/client/src/components/Board/Board.jsx +++ b/client/src/components/Board/Board.jsx @@ -110,6 +110,14 @@ const Board = React.memo( prevPosition.current = null; }, [prevPosition]); + useEffect(() => { + document.body.style.overflowX = 'auto'; + + return () => { + document.body.style.overflowX = null; + }; + }, []); + useEffect(() => { if (isAddListOpened) { window.scroll(document.body.scrollWidth, 0); diff --git a/client/src/components/Board/Board.module.css b/client/src/components/Board/Board.module.css index e6bb0293..fe0fffea 100644 --- a/client/src/components/Board/Board.module.css +++ b/client/src/components/Board/Board.module.css @@ -1,11 +1,11 @@ .addListButton { - background: hsla(0, 0%, 0%, 0.24); + background: rgba(0, 0, 0, 0.24); border: none; border-radius: 3px; - color: hsla(0, 0%, 100%, 0.72); + color: rgba(255, 255, 255, 0.72); cursor: pointer; display: block; - fill: hsla(0, 0%, 100%, 0.72); + fill: rgba(255, 255, 255, 0.72); font-weight: normal; height: 42px; padding: 11px; @@ -20,7 +20,7 @@ } .addListButton:hover { - background: hsla(0, 0%, 0%, 0.32); + background: rgba(0, 0, 0, 0.32); } .addListButtonIcon { diff --git a/client/src/components/Board/Filter.module.css b/client/src/components/Board/Filter.module.css index c66691a3..529824bf 100644 --- a/client/src/components/Board/Filter.module.css +++ b/client/src/components/Board/Filter.module.css @@ -23,7 +23,7 @@ } .filterLabel { - background: hsla(0, 0%, 0%, 0.24); + background: rgba(0, 0, 0, 0.24); border-radius: 3px; color: #fff; display: inline-block; @@ -33,7 +33,7 @@ } .filterLabel:hover { - background: hsla(0, 0%, 0%, 0.32); + background: rgba(0, 0, 0, 0.32); } .filterTitle { diff --git a/client/src/components/Boards/Boards.module.css b/client/src/components/Boards/Boards.module.css index 7471751d..474ed840 100644 --- a/client/src/components/Boards/Boards.module.css +++ b/client/src/components/Boards/Boards.module.css @@ -24,7 +24,7 @@ } .editButton:hover { - background: hsla(0, 0%, 100%, 0.08) !important; + background: rgba(255, 255, 255, 0.08) !important; } .link { @@ -45,7 +45,7 @@ } .tab:hover { - background: hsla(0, 0%, 0%, 0.24) !important; + background: rgba(0, 0, 0, 0.24) !important; } .tab:hover .target { @@ -53,11 +53,11 @@ } .tabActive { - background: hsla(0, 0%, 0%, 0.24) !important; + background: rgba(0, 0, 0, 0.24) !important; } .tabActive:hover { - background: hsla(0, 0%, 0%, 0.32) !important; + background: rgba(0, 0, 0, 0.32) !important; } .tabWrapper { @@ -66,7 +66,7 @@ } .tabs { - border-bottom: 2px solid hsla(0, 0%, 0%, 0.24); + border-bottom: 2px solid rgba(0, 0, 0, 0.24);; display: flex; height: 38px; flex: 0 0 auto; diff --git a/client/src/components/Card/Card.module.css b/client/src/components/Card/Card.module.css index 9776fb63..076bb407 100644 --- a/client/src/components/Card/Card.module.css +++ b/client/src/components/Card/Card.module.css @@ -49,7 +49,7 @@ } .card { - background-color: #fff; + background: #fff; border-radius: 3px; box-shadow: 0 1px 0 #ccc; position: relative; @@ -57,7 +57,7 @@ } .card:hover { - background-color: #f5f6f7; + background: #f5f6f7; border-bottom-color: rgba(9, 30, 66, 0.25); } diff --git a/client/src/components/Card/EditName.module.css b/client/src/components/Card/EditName.module.css index f774035a..f84b9399 100644 --- a/client/src/components/Card/EditName.module.css +++ b/client/src/components/Card/EditName.module.css @@ -10,7 +10,7 @@ } .fieldWrapper { - background-color: #fff !important; + background: #fff !important; border-radius: 3px !important; box-shadow: 0 1px 0 #ccc !important; margin-bottom: 8px !important; diff --git a/client/src/components/CardModal/Actions/ItemComment.module.css b/client/src/components/CardModal/Actions/ItemComment.module.css index e2ec035d..3e3a5568 100644 --- a/client/src/components/CardModal/Actions/ItemComment.module.css +++ b/client/src/components/CardModal/Actions/ItemComment.module.css @@ -22,7 +22,7 @@ } .text { - background-color: #fff; + background: #fff; border-radius: 0px 8px 8px; box-shadow: 0 1px 2px -1px rgba(9, 30, 66, 0.25), 0 0 0 1px rgba(9, 30, 66, 0.08); diff --git a/client/src/components/CardModal/AddAttachmentPopup.module.css b/client/src/components/CardModal/AddAttachmentPopup.module.css index 8f831bab..727afae9 100644 --- a/client/src/components/CardModal/AddAttachmentPopup.module.css +++ b/client/src/components/CardModal/AddAttachmentPopup.module.css @@ -1,5 +1,5 @@ .divider { - background-color: #eee; + background: #eee; border: 0; height: 1px; margin-bottom: 8px; diff --git a/client/src/components/CardModal/Attachments/Item.jsx b/client/src/components/CardModal/Attachments/Item.jsx index 90bedd3d..9ce4a7d9 100644 --- a/client/src/components/CardModal/Attachments/Item.jsx +++ b/client/src/components/CardModal/Attachments/Item.jsx @@ -60,7 +60,7 @@ const Item = React.memo(