diff options
| author | Georgios Andreadis <info@gandreadis.com> | 2020-07-29 17:45:18 +0200 |
|---|---|---|
| committer | Fabian Mastenbroek <mail.fabianm@gmail.com> | 2020-08-24 19:48:47 +0200 |
| commit | 780e81c5ea7bc5c7988ae2c49bc8e6808337ff25 (patch) | |
| tree | 92de51eae02e26fdbf0a703320626c13115e7a58 /frontend/src/actions | |
| parent | ceaddeb0f6927e0f99f7b140aba6a85dac0106fb (diff) | |
| parent | ac5b33c83f38f9b2799c0f2a871b86052121e8ac (diff) | |
Merge pull request #18 from atlarge-research/prefabs_wip
Add support for prefabs
Diffstat (limited to 'frontend/src/actions')
| -rw-r--r-- | frontend/src/actions/modals/prefabs.js | 14 | ||||
| -rw-r--r-- | frontend/src/actions/prefabs.js | 32 |
2 files changed, 46 insertions, 0 deletions
diff --git a/frontend/src/actions/modals/prefabs.js b/frontend/src/actions/modals/prefabs.js new file mode 100644 index 00000000..826565d2 --- /dev/null +++ b/frontend/src/actions/modals/prefabs.js @@ -0,0 +1,14 @@ +export const OPEN_NEW_PREFAB_MODAL = 'OPEN_NEW_PREFAB_MODAL' +export const CLOSE_NEW_PREFAB_MODAL = 'CLOSE_PREFAB_MODAL' + +export function openNewPrefabModal() { + return { + type: OPEN_NEW_PREFAB_MODAL, + } +} + +export function closeNewPrefabModal() { + return { + type: CLOSE_NEW_PREFAB_MODAL, + } +} diff --git a/frontend/src/actions/prefabs.js b/frontend/src/actions/prefabs.js new file mode 100644 index 00000000..c112feed --- /dev/null +++ b/frontend/src/actions/prefabs.js @@ -0,0 +1,32 @@ +export const ADD_PREFAB = 'ADD_PREFAB' +export const DELETE_PREFAB = 'DELETE_PREFAB' +export const DELETE_PREFAB_SUCCEEDED = 'DELETE_PREFAB_SUCCEEDED' +export const OPEN_PREFAB_SUCCEEDED = 'OPEN_PREFAB_SUCCEEDED' + +export function addPrefab(name) { + return { + type: ADD_PREFAB, + name, + } +} + +export function deletePrefab(id) { + return { + type: DELETE_PREFAB, + id, + } +} + +export function deletePrefabSucceeded(id) { + return { + type: DELETE_PREFAB_SUCCEEDED, + id, + } +} + +export function openPrefabSucceeded(id) { + return { + type: OPEN_PREFAB_SUCCEEDED, + id, + } +} |
