2018-01-24 20:24:49 +01:00
|
|
|
import * as actions from 'constants/publish_action_types';
|
2018-01-09 02:06:31 +01:00
|
|
|
|
|
|
|
// export action creators
|
|
|
|
export function selectFile (file) {
|
|
|
|
return {
|
2018-01-16 20:38:37 +01:00
|
|
|
type: actions.FILE_SELECTED,
|
2018-01-09 02:46:17 +01:00
|
|
|
file: file,
|
2018-01-09 02:06:31 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
export function clearFile () {
|
|
|
|
return {
|
2018-01-16 20:38:37 +01:00
|
|
|
type: actions.FILE_CLEAR,
|
2018-01-09 02:06:31 +01:00
|
|
|
};
|
|
|
|
};
|
2018-01-09 02:46:17 +01:00
|
|
|
|
|
|
|
export function updateMetadata (name, value) {
|
|
|
|
return {
|
2018-01-16 20:38:37 +01:00
|
|
|
type: actions.METADATA_UPDATE,
|
2018-01-09 02:46:17 +01:00
|
|
|
name,
|
|
|
|
value,
|
|
|
|
};
|
|
|
|
};
|
2018-01-10 03:25:38 +01:00
|
|
|
|
|
|
|
export function updateClaim (value) {
|
|
|
|
return {
|
2018-01-16 20:38:37 +01:00
|
|
|
type: actions.CLAIM_UPDATE,
|
2018-01-10 03:25:38 +01:00
|
|
|
value,
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2018-01-11 21:51:38 +01:00
|
|
|
export function setPublishInChannel (channel) {
|
2018-01-10 03:25:38 +01:00
|
|
|
return {
|
2018-01-16 20:38:37 +01:00
|
|
|
type: actions.SET_PUBLISH_IN_CHANNEL,
|
2018-01-11 21:51:38 +01:00
|
|
|
channel,
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2018-01-12 00:37:32 +01:00
|
|
|
export function updatePublishStatus (status, message) {
|
2018-01-11 21:51:38 +01:00
|
|
|
return {
|
2018-01-16 20:38:37 +01:00
|
|
|
type: actions.PUBLISH_STATUS_UPDATE,
|
2018-01-11 21:51:38 +01:00
|
|
|
status,
|
2018-01-12 00:37:32 +01:00
|
|
|
message,
|
2018-01-10 03:25:38 +01:00
|
|
|
};
|
2018-01-11 21:51:38 +01:00
|
|
|
};
|
2018-01-12 23:27:34 +01:00
|
|
|
|
|
|
|
export function updateError (name, value) {
|
|
|
|
return {
|
2018-01-16 20:38:37 +01:00
|
|
|
type: actions.ERROR_UPDATE,
|
2018-01-12 23:27:34 +01:00
|
|
|
name,
|
|
|
|
value,
|
|
|
|
};
|
|
|
|
};
|
2018-01-19 19:16:55 +01:00
|
|
|
|
|
|
|
export function updateSelectedChannel (value) {
|
|
|
|
return {
|
|
|
|
type: actions.SELECTED_CHANNEL_UPDATE,
|
|
|
|
value,
|
|
|
|
};
|
|
|
|
};
|
2018-01-20 01:03:49 +01:00
|
|
|
|
|
|
|
export function toggleMetadataInputs (value) {
|
|
|
|
return {
|
|
|
|
type: actions.TOGGLE_METADATA_INPUTS,
|
|
|
|
value,
|
|
|
|
};
|
|
|
|
};
|
2018-02-06 03:14:12 +01:00
|
|
|
|
|
|
|
export function updateThumbnailClaim (claim, url) {
|
|
|
|
return {
|
|
|
|
type: actions.THUMBNAIL_CLAIM_UPDATE,
|
|
|
|
claim,
|
|
|
|
url,
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
export function updateThumbnailFileOptions (fileOne, fileTwo, fileThree) {
|
|
|
|
return {
|
|
|
|
type: actions.THUMBNAIL_FILES_UPDATE,
|
|
|
|
fileOne,
|
|
|
|
fileTwo,
|
|
|
|
fileThree,
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
export function updateThumbnailSelectedFile (file) {
|
|
|
|
return {
|
|
|
|
type: actions.THUMBNAIL_FILE_SELECT,
|
|
|
|
file,
|
|
|
|
};
|
|
|
|
};
|