logo

mastofe

My custom branche(s) on git.pleroma.social/pleroma/mastofe git clone https://hacktivis.me/git/mastofe.git

columns.js (699B)


  1. import { saveSettings } from './settings';
  2. export const COLUMN_ADD = 'COLUMN_ADD';
  3. export const COLUMN_REMOVE = 'COLUMN_REMOVE';
  4. export const COLUMN_MOVE = 'COLUMN_MOVE';
  5. export function addColumn(id, params) {
  6. return dispatch => {
  7. dispatch({
  8. type: COLUMN_ADD,
  9. id,
  10. params,
  11. });
  12. dispatch(saveSettings());
  13. };
  14. };
  15. export function removeColumn(uuid) {
  16. return dispatch => {
  17. dispatch({
  18. type: COLUMN_REMOVE,
  19. uuid,
  20. });
  21. dispatch(saveSettings());
  22. };
  23. };
  24. export function moveColumn(uuid, direction) {
  25. return dispatch => {
  26. dispatch({
  27. type: COLUMN_MOVE,
  28. uuid,
  29. direction,
  30. });
  31. dispatch(saveSettings());
  32. };
  33. };