2018-02-02 14:50:16 +00:00
|
|
|
// @flow
|
|
|
|
|
2018-06-05 12:34:40 +00:00
|
|
|
import {
|
|
|
|
SET_SIDEBAR_VISIBLE,
|
2018-06-11 17:28:45 +00:00
|
|
|
SET_WELCOME_PAGE_LISTS_DEFAULT_PAGE
|
2018-06-05 12:34:40 +00:00
|
|
|
} from './actionTypes';
|
|
|
|
|
|
|
|
/**
|
2018-06-11 17:28:45 +00:00
|
|
|
* Sets the visibility of {@link WelcomePageSideBar}.
|
2018-06-05 12:34:40 +00:00
|
|
|
*
|
2018-06-11 17:28:45 +00:00
|
|
|
* @param {boolean} visible - If the {@code WelcomePageSideBar} is to be made
|
|
|
|
* visible, {@code true}; otherwise, {@code false}.
|
2018-06-05 12:34:40 +00:00
|
|
|
* @returns {{
|
2018-06-11 17:28:45 +00:00
|
|
|
* type: SET_SIDEBAR_VISIBLE,
|
|
|
|
* visible: boolean
|
2018-06-05 12:34:40 +00:00
|
|
|
* }}
|
|
|
|
*/
|
2018-06-11 17:28:45 +00:00
|
|
|
export function setSideBarVisible(visible: boolean) {
|
2018-06-05 12:34:40 +00:00
|
|
|
return {
|
2018-06-11 17:28:45 +00:00
|
|
|
type: SET_SIDEBAR_VISIBLE,
|
|
|
|
visible
|
2018-06-05 12:34:40 +00:00
|
|
|
};
|
|
|
|
}
|
2018-02-02 14:50:16 +00:00
|
|
|
|
|
|
|
/**
|
2018-06-11 17:28:45 +00:00
|
|
|
* Sets the default page index of {@link WelcomePageLists}.
|
2018-02-02 14:50:16 +00:00
|
|
|
*
|
2018-06-11 17:28:45 +00:00
|
|
|
* @param {number} pageIndex - The index of the default page.
|
2018-02-02 14:50:16 +00:00
|
|
|
* @returns {{
|
2018-06-11 17:28:45 +00:00
|
|
|
* type: SET_WELCOME_PAGE_LISTS_DEFAULT_PAGE,
|
|
|
|
* pageIndex: number
|
2018-02-02 14:50:16 +00:00
|
|
|
* }}
|
|
|
|
*/
|
2018-06-11 17:28:45 +00:00
|
|
|
export function setWelcomePageListsDefaultPage(pageIndex: number) {
|
2018-02-02 14:50:16 +00:00
|
|
|
return {
|
2018-06-11 17:28:45 +00:00
|
|
|
type: SET_WELCOME_PAGE_LISTS_DEFAULT_PAGE,
|
|
|
|
pageIndex
|
2018-02-02 14:50:16 +00:00
|
|
|
};
|
|
|
|
}
|