Theoretical handling of system task updates; stdout straight to logger
This commit is contained in:
@ -32,7 +32,7 @@ export function setSelectedTracks(keys = []) {
|
||||
};
|
||||
}
|
||||
|
||||
export function showContextMenu(data) {
|
||||
export function showContextMenu(data) {
|
||||
// Touchend
|
||||
if (data.e.changedTouches) {
|
||||
data.position_x = data.e.changedTouches[0].clientX;
|
||||
@ -165,7 +165,7 @@ export function createBrowserNotification(data) {
|
||||
};
|
||||
}
|
||||
|
||||
export function createNotification(data) {
|
||||
export function createNotification(data) {
|
||||
// Allow 'message' as an alias of our content
|
||||
if (data.message) {
|
||||
data.content = data.message;
|
||||
@ -228,12 +228,13 @@ export function stopLoading(key) {
|
||||
};
|
||||
}
|
||||
|
||||
export function startProcess(key, message, data = {}) {
|
||||
export function startProcess(key, message, data = {}, description = null) {
|
||||
return {
|
||||
type: 'START_PROCESS',
|
||||
key,
|
||||
message,
|
||||
data,
|
||||
description,
|
||||
};
|
||||
}
|
||||
|
||||
@ -244,12 +245,13 @@ export function resumeProcess(key, message, data = {}) {
|
||||
};
|
||||
}
|
||||
|
||||
export function updateProcess(key, message, data = {}) {
|
||||
export function updateProcess(key, message, data = {}, description = null) {
|
||||
return {
|
||||
type: 'UPDATE_PROCESS',
|
||||
key,
|
||||
message,
|
||||
data,
|
||||
description,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
import * as helpers from '../../helpers';
|
||||
|
||||
export default function reducer(ui = {}, action) {
|
||||
switch (action.type) {
|
||||
switch (action.type) {
|
||||
case 'LAZY_LOADING':
|
||||
return { ...ui, lazy_loading: action.start };
|
||||
|
||||
@ -81,8 +81,8 @@ export default function reducer(ui = {}, action) {
|
||||
* */
|
||||
|
||||
case 'DRAG_START':
|
||||
return {
|
||||
...ui,
|
||||
return {
|
||||
...ui,
|
||||
dragger: {
|
||||
dragging: true,
|
||||
active: false,
|
||||
@ -92,7 +92,7 @@ export default function reducer(ui = {}, action) {
|
||||
victims_indexes: action.victims_indexes,
|
||||
start_x: action.start_x,
|
||||
start_y: action.start_y,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
case 'DRAG_ACTIVE':
|
||||
@ -163,6 +163,7 @@ export default function reducer(ui = {}, action) {
|
||||
processes[action.key] = {
|
||||
key: action.key,
|
||||
message: action.message,
|
||||
description: action.description,
|
||||
status: 'running',
|
||||
data,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user