Add project backgrounds

This commit is contained in:
Maksim Eltyshev
2020-05-26 00:46:04 +05:00
parent af4297ac62
commit 3bb68b0d4f
67 changed files with 774 additions and 210 deletions

View File

@@ -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: {},

View File

@@ -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: {

View File

@@ -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,
},
});