闭社主体 forked from https://github.com/tootsuite/mastodon
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

40 lines
699 B

  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. };