set filename to save compiled blocks

This commit is contained in:
Delucse
2020-09-17 10:06:29 +02:00
parent 71e881283d
commit ba84bc512c
5 changed files with 63 additions and 23 deletions
+1
View File
@@ -5,6 +5,7 @@ export const MOVE_BLOCK = 'MOVE_BLOCK';
export const CHANGE_BLOCK = 'CHANGE_BLOCK';
export const DELETE_BLOCK = 'DELETE_BLOCK';
export const CLEAR_STATS = 'CLEAR_STATS';
export const NAME = 'NAME';
export const TUTORIAL_SUCCESS = 'TUTORIAL_SUCCESS';
+8 -1
View File
@@ -1,4 +1,4 @@
import { NEW_CODE, CHANGE_WORKSPACE, CREATE_BLOCK, MOVE_BLOCK, CHANGE_BLOCK, DELETE_BLOCK, CLEAR_STATS } from './types';
import { NEW_CODE, CHANGE_WORKSPACE, CREATE_BLOCK, MOVE_BLOCK, CHANGE_BLOCK, DELETE_BLOCK, CLEAR_STATS, NAME } from './types';
import * as Blockly from 'blockly/core';
@@ -72,3 +72,10 @@ export const clearStats = () => (dispatch) => {
payload: stats
});
};
export const workspaceName = (name) => (dispatch) => {
dispatch({
type: NAME,
payload: name
})
}