2018-01-09 02:06:31 +01:00
|
|
|
// export action types
|
|
|
|
export const FILE_SELECTED = 'FILE_SELECTED';
|
|
|
|
export const FILE_CLEAR = 'FILE_CLEAR';
|
2018-01-10 03:25:38 +01:00
|
|
|
export const METADATA_UPDATE = 'METADATA_UPDATE';
|
|
|
|
export const CLAIM_UPDATE = 'CLAIM_UPDATE';
|
|
|
|
export const CHANNEL_UPDATE = 'CHANNEL_UPDATE';
|
|
|
|
export const SET_PUBLISH_IN_CHANNEL = 'SET_PUBLISH_IN_CHANNEL';
|
2018-01-09 02:06:31 +01:00
|
|
|
|
|
|
|
// export action creators
|
|
|
|
export function selectFile (file) {
|
|
|
|
return {
|
2018-01-09 02:46:17 +01:00
|
|
|
type: FILE_SELECTED,
|
|
|
|
file: file,
|
2018-01-09 02:06:31 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
export function clearFile () {
|
|
|
|
return {
|
|
|
|
type: FILE_CLEAR,
|
|
|
|
};
|
|
|
|
};
|
2018-01-09 02:46:17 +01:00
|
|
|
|
|
|
|
export function updateMetadata (name, value) {
|
|
|
|
return {
|
|
|
|
type: METADATA_UPDATE,
|
|
|
|
name,
|
|
|
|
value,
|
|
|
|
};
|
|
|
|
};
|
2018-01-10 03:25:38 +01:00
|
|
|
|
|
|
|
export function updateClaim (value) {
|
|
|
|
return {
|
|
|
|
type: CLAIM_UPDATE,
|
|
|
|
value,
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
export function updateLoggedInChannel (name, shortId, longId) {
|
|
|
|
return {
|
|
|
|
type: CHANNEL_UPDATE,
|
|
|
|
name,
|
|
|
|
shortId,
|
|
|
|
longId,
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
export function setPublishInChannel (value) {
|
|
|
|
return {
|
|
|
|
type: SET_PUBLISH_IN_CHANNEL,
|
|
|
|
value,
|
|
|
|
};
|
|
|
|
}
|