Structure change (#4220)

* Structure change

* Remove duplicate folders from previous structure

* Cleanup websocket protocol

* Updating from based off PR

* Fixup - remove wrong files during conflict and get the websocket working

* renaming tsx to ts

Co-authored-by: Jeremy Letto <jeremy.letto@datasite.com>
This commit is contained in:
Joseph Chamish 2021-01-20 18:50:18 -05:00 committed by GitHub
parent a0deb73df6
commit 1ddc9cc929
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
123 changed files with 424 additions and 228 deletions

View file

@ -0,0 +1,68 @@
import { reset } from 'redux-form';
import { Actions } from "./server.actions";
import { store } from "store";
export const Dispatch = {
clearStore: () => {
store.dispatch(Actions.clearStore());
},
connectServer: () => {
store.dispatch(Actions.connectServer());
},
connectionClosed: reason => {
store.dispatch(Actions.connectionClosed(reason));
},
updateBuddyList: buddyList => {
store.dispatch(Actions.updateBuddyList(buddyList));
},
addToBuddyList: user => {
store.dispatch(reset('addToBuddies'));
store.dispatch(Actions.addToBuddyList(user));
},
removeFromBuddyList: userName => {
store.dispatch(Actions.removeFromBuddyList(userName));
},
updateIgnoreList: ignoreList => {
store.dispatch(Actions.updateIgnoreList(ignoreList));
},
addToIgnoreList: user => {
store.dispatch(reset('addToIgnore'));
store.dispatch(Actions.addToIgnoreList(user));
},
removeFromIgnoreList: userName => {
store.dispatch(Actions.removeFromIgnoreList(userName));
},
updateInfo: (name, version) => {
store.dispatch(Actions.updateInfo({
name,
version
}));
},
updateStatus: (state, description) => {
store.dispatch(Actions.updateStatus({
state,
description
}));
},
updateUser: user => {
store.dispatch(Actions.updateUser(user));
},
updateUsers: users => {
store.dispatch(Actions.updateUsers(users));
},
userJoined: user => {
store.dispatch(Actions.userJoined(user));
},
userLeft: name => {
store.dispatch(Actions.userLeft(name));
},
viewLogs: name => {
store.dispatch(Actions.viewLogs(name));
},
clearLogs: () => {
store.dispatch(Actions.clearLogs());
},
serverMessage: message => {
store.dispatch(Actions.serverMessage(message));
}
}