* feat(settings): setting dialog - Move device selection, profile edit, language select, moderator options, and server auth into one modal with tabs. - Remove side panel profile and settings and logic used to update them. - Pipe server auth status into redux to display in the settings dialog. - Change filmstrip only device selection popup to use the new stateless settings dialog component. * squash: do not show profile tab if not guest * squash: profile button not clickable if no profile to show * squash: nits * ref: Settings dialog.
50 lines
1000 B
JavaScript
50 lines
1000 B
JavaScript
import {
|
|
CLOSE_PANEL,
|
|
SET_VISIBLE_PANEL,
|
|
TOGGLE_CHAT
|
|
} from './actionTypes';
|
|
|
|
/**
|
|
* Dispatches an action to close the currently displayed side panel.
|
|
*
|
|
* @returns {Function}
|
|
*/
|
|
export function closePanel() {
|
|
return (dispatch, getState) => {
|
|
dispatch({
|
|
type: CLOSE_PANEL,
|
|
current: getState()['features/side-panel'].current
|
|
});
|
|
};
|
|
}
|
|
|
|
/**
|
|
* Updates the redux store with the currently displayed side panel.
|
|
*
|
|
* @param {string|null} name - The name of the side panel being displayed. Null
|
|
* (or falsy) should be set if no side panel is being displayed.
|
|
* @returns {{
|
|
* type: SET_VISIBLE_PANEL,
|
|
* current: string
|
|
* }}
|
|
*/
|
|
export function setVisiblePanel(name = null) {
|
|
return {
|
|
type: SET_VISIBLE_PANEL,
|
|
current: name
|
|
};
|
|
}
|
|
|
|
/**
|
|
* Toggles display of the chat side panel.
|
|
*
|
|
* @returns {{
|
|
* type: TOGGLE_CHAT
|
|
* }}
|
|
*/
|
|
export function toggleChat() {
|
|
return {
|
|
type: TOGGLE_CHAT
|
|
};
|
|
}
|