make sidebar right menu Global actions and toggle that on leaving team (#6900)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
d307162d16
Коммит
39154d22ae
@@ -497,6 +497,23 @@ export function toggleSideBarAction(visible) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function toggleSideBarRightMenuAction() {
|
||||||
|
AppDispatcher.handleServerAction({
|
||||||
|
type: ActionTypes.RECEIVED_SEARCH,
|
||||||
|
results: null
|
||||||
|
});
|
||||||
|
|
||||||
|
AppDispatcher.handleServerAction({
|
||||||
|
type: ActionTypes.RECEIVED_POST_SELECTED,
|
||||||
|
postId: null
|
||||||
|
});
|
||||||
|
|
||||||
|
document.querySelector('.app__body .inner-wrap').classList.remove('move--right', 'move--left', 'move--left-small');
|
||||||
|
document.querySelector('.app__body .sidebar--left').classList.remove('move--right');
|
||||||
|
document.querySelector('.app__body .sidebar--right').classList.remove('move--left');
|
||||||
|
document.querySelector('.app__body .sidebar--menu').classList.remove('move--left');
|
||||||
|
}
|
||||||
|
|
||||||
export function emitBrowserFocus(focus) {
|
export function emitBrowserFocus(focus) {
|
||||||
AppDispatcher.handleViewAction({
|
AppDispatcher.handleViewAction({
|
||||||
type: ActionTypes.BROWSER_CHANGE_FOCUS,
|
type: ActionTypes.BROWSER_CHANGE_FOCUS,
|
||||||
|
|||||||
@@ -61,6 +61,7 @@ class LeaveTeamModal extends React.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
GlobalActions.emitLeaveTeam();
|
GlobalActions.emitLeaveTeam();
|
||||||
|
GlobalActions.toggleSideBarRightMenuAction();
|
||||||
}
|
}
|
||||||
|
|
||||||
handleHide() {
|
handleHide() {
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
||||||
// See License.txt for license information.
|
// See License.txt for license information.
|
||||||
|
|
||||||
import AppDispatcher from 'dispatcher/app_dispatcher.jsx';
|
|
||||||
import TeamMembersModal from './team_members_modal.jsx';
|
import TeamMembersModal from './team_members_modal.jsx';
|
||||||
import ToggleModalButton from './toggle_modal_button.jsx';
|
import ToggleModalButton from './toggle_modal_button.jsx';
|
||||||
import AboutBuildModal from './about_build_modal.jsx';
|
import AboutBuildModal from './about_build_modal.jsx';
|
||||||
@@ -19,7 +18,6 @@ import * as UserAgent from 'utils/user_agent.jsx';
|
|||||||
import * as Utils from 'utils/utils.jsx';
|
import * as Utils from 'utils/utils.jsx';
|
||||||
import {Constants, WebrtcActionTypes} from 'utils/constants.jsx';
|
import {Constants, WebrtcActionTypes} from 'utils/constants.jsx';
|
||||||
|
|
||||||
const ActionTypes = Constants.ActionTypes;
|
|
||||||
const Preferences = Constants.Preferences;
|
const Preferences = Constants.Preferences;
|
||||||
const TutorialSteps = Constants.TutorialSteps;
|
const TutorialSteps = Constants.TutorialSteps;
|
||||||
|
|
||||||
@@ -143,20 +141,7 @@ export default class SidebarRightMenu extends React.Component {
|
|||||||
|
|
||||||
hideSidebars() {
|
hideSidebars() {
|
||||||
if (Utils.isMobile()) {
|
if (Utils.isMobile()) {
|
||||||
AppDispatcher.handleServerAction({
|
GlobalActions.toggleSideBarRightMenuAction();
|
||||||
type: ActionTypes.RECEIVED_SEARCH,
|
|
||||||
results: null
|
|
||||||
});
|
|
||||||
|
|
||||||
AppDispatcher.handleServerAction({
|
|
||||||
type: ActionTypes.RECEIVED_POST_SELECTED,
|
|
||||||
postId: null
|
|
||||||
});
|
|
||||||
|
|
||||||
document.querySelector('.app__body .inner-wrap').classList.remove('move--right', 'move--left', 'move--left-small');
|
|
||||||
document.querySelector('.app__body .sidebar--left').classList.remove('move--right');
|
|
||||||
document.querySelector('.app__body .sidebar--right').classList.remove('move--left');
|
|
||||||
document.querySelector('.app__body .sidebar--menu').classList.remove('move--left');
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user