From d8bd57901e33a7057e26e782e295099ffcc0da89 Mon Sep 17 00:00:00 2001 From: Christopher Speller Date: Wed, 6 Sep 2017 23:04:13 -0700 Subject: Removing webapp --- webapp/stores/modal_store.jsx | 56 ------------------------------------------- 1 file changed, 56 deletions(-) delete mode 100644 webapp/stores/modal_store.jsx (limited to 'webapp/stores/modal_store.jsx') diff --git a/webapp/stores/modal_store.jsx b/webapp/stores/modal_store.jsx deleted file mode 100644 index c47095d05..000000000 --- a/webapp/stores/modal_store.jsx +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved. -// See License.txt for license information. - -import AppDispatcher from '../dispatcher/app_dispatcher.jsx'; -import EventEmitter from 'events'; - -import Constants from 'utils/constants.jsx'; -const ActionTypes = Constants.ActionTypes; - -class ModalStoreClass extends EventEmitter { - constructor() { - super(); - - this.addModalListener = this.addModalListener.bind(this); - this.removeModalListener = this.removeModalListener.bind(this); - - this.handleEventPayload = this.handleEventPayload.bind(this); - this.dispatchToken = AppDispatcher.register(this.handleEventPayload); - } - - addModalListener(action, callback) { - this.on(action, callback); - } - - removeModalListener(action, callback) { - this.removeListener(action, callback); - } - - handleEventPayload(payload) { - // toggle event handlers should accept a boolean show/hide value and can accept a map of arguments - const {type, value, ...args} = payload.action; //eslint-disable-line no-use-before-define - - switch (type) { - case ActionTypes.TOGGLE_ACCOUNT_SETTINGS_MODAL: - case ActionTypes.TOGGLE_SHORTCUTS_MODAL: - case ActionTypes.TOGGLE_IMPORT_THEME_MODAL: - case ActionTypes.TOGGLE_INVITE_MEMBER_MODAL: - case ActionTypes.TOGGLE_LEAVE_TEAM_MODAL: - case ActionTypes.TOGGLE_DELETE_POST_MODAL: - case ActionTypes.TOGGLE_GET_POST_LINK_MODAL: - case ActionTypes.TOGGLE_GET_TEAM_INVITE_LINK_MODAL: - case ActionTypes.TOGGLE_GET_PUBLIC_LINK_MODAL: - case ActionTypes.TOGGLE_DM_MODAL: - case ActionTypes.TOGGLE_QUICK_SWITCH_MODAL: - case ActionTypes.TOGGLE_CHANNEL_HEADER_UPDATE_MODAL: - case ActionTypes.TOGGLE_CHANNEL_PURPOSE_UPDATE_MODAL: - case ActionTypes.TOGGLE_CHANNEL_NAME_UPDATE_MODAL: - case ActionTypes.TOGGLE_LEAVE_PRIVATE_CHANNEL_MODAL: - this.emit(type, value, args); - break; - } - } -} - -const ModalStore = new ModalStoreClass(); -export default ModalStore; -- cgit v1.2.3-1-g7c22