jiti-meet/react/features/welcome/actions.js

40 lines
899 B
JavaScript
Raw Normal View History

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