This commit is contained in:
Thomas Nordquist
2019-01-11 18:52:12 +01:00
parent 1586d0121c
commit b52b2d7696
11 changed files with 143 additions and 64 deletions

View File

@@ -1,19 +1,19 @@
import { ActionTypes, NodeOrder } from '../reducers'
import { ActionTypes, NodeOrder, CustomAction } from '../reducers'
export const setAutoExpandLimit = (autoExpandLimit: number = 0) => {
export const setAutoExpandLimit = (autoExpandLimit: number = 0): CustomAction => {
return {
autoExpandLimit,
type: ActionTypes.setAutoExpandLimit,
}
}
export const toggleSettingsVisibility = () => {
export const toggleSettingsVisibility = (): CustomAction => {
return {
type: ActionTypes.toggleSettingsVisibility,
}
}
export const setNodeOrder = (nodeOrder: NodeOrder = NodeOrder.none) => {
export const setNodeOrder = (nodeOrder: NodeOrder = NodeOrder.none): CustomAction => {
return {
nodeOrder,
type: ActionTypes.setNodeOrder,

View File

@@ -0,0 +1,15 @@
import { ActionTypes, CustomAction } from '../reducers'
export const setPublishTopic = (topic: string): CustomAction => {
return {
publishTopic: topic,
type: ActionTypes.setPublishTopic,
}
}
export const setPublishPayload = (payload: string): CustomAction => {
return {
publishPayload: payload,
type: ActionTypes.setPublishPayload,
}
}

View File

@@ -1,7 +1,7 @@
import { ActionTypes } from '../reducers'
import { ActionTypes, CustomAction } from '../reducers'
import * as q from '../../../backend/src/Model'
export const selectTopic = (topic: q.TreeNode) => {
export const selectTopic = (topic: q.TreeNode): CustomAction => {
return {
selectedTopic: topic,
type: ActionTypes.selectTopic,

View File

@@ -1,4 +1,5 @@
import * as settingsActions from './Settings'
import * as treeActions from './Tree'
import * as sidebarActions from './Sidebar'
export { settingsActions, treeActions }
export { settingsActions, treeActions, sidebarActions }