vojo/src/client/action/navigation.js
Gero Gerke 191772e005 Implement Profile Viewer (#130)
* Implement Profile Viewer

Fixes #111

* Make user avatar in chat clickable

* design progress

* Refactored code

* progress

* Updated chip comp

Signed-off-by: Ajay Bura <ajbura@gmail.com>

* Refactored ProfileViewer comp

Signed-off-by: Ajay Bura <ajbura@gmail.com>

* Added msg functionality in ProfileViewer

Signed-off-by: Ajay Bura <ajbura@gmail.com>

* Added Ignore functionality in ProfileViewer

Signed-off-by: Ajay Bura <ajbura@gmail.com>

* Fixed Ignore btn bug

Signed-off-by: Ajay Bura <ajbura@gmail.com>

* Refectored ProfileViewer comp

Signed-off-by: Ajay Bura <ajbura@gmail.com>

Co-authored-by: Ajay Bura <ajbura@gmail.com>
2021-10-18 20:55:52 +05:30

110 lines
2.1 KiB
JavaScript

import appDispatcher from '../dispatcher';
import cons from '../state/cons';
function selectTab(tabId) {
appDispatcher.dispatch({
type: cons.actions.navigation.SELECT_TAB,
tabId,
});
}
function selectSpace(roomId) {
appDispatcher.dispatch({
type: cons.actions.navigation.SELECT_SPACE,
roomId,
});
}
function selectRoom(roomId) {
appDispatcher.dispatch({
type: cons.actions.navigation.SELECT_ROOM,
roomId,
});
}
function togglePeopleDrawer() {
appDispatcher.dispatch({
type: cons.actions.navigation.TOGGLE_PEOPLE_DRAWER,
});
}
function openInviteList() {
appDispatcher.dispatch({
type: cons.actions.navigation.OPEN_INVITE_LIST,
});
}
function openPublicRooms(searchTerm) {
appDispatcher.dispatch({
type: cons.actions.navigation.OPEN_PUBLIC_ROOMS,
searchTerm,
});
}
function openCreateRoom() {
appDispatcher.dispatch({
type: cons.actions.navigation.OPEN_CREATE_ROOM,
});
}
function openInviteUser(roomId, searchTerm) {
appDispatcher.dispatch({
type: cons.actions.navigation.OPEN_INVITE_USER,
roomId,
searchTerm,
});
}
function openProfileViewer(userId, roomId) {
appDispatcher.dispatch({
type: cons.actions.navigation.OPEN_PROFILE_VIEWER,
userId,
roomId,
});
}
function openSettings() {
appDispatcher.dispatch({
type: cons.actions.navigation.OPEN_SETTINGS,
});
}
function openEmojiBoard(cords, requestEmojiCallback) {
appDispatcher.dispatch({
type: cons.actions.navigation.OPEN_EMOJIBOARD,
cords,
requestEmojiCallback,
});
}
function openReadReceipts(roomId, eventId) {
appDispatcher.dispatch({
type: cons.actions.navigation.OPEN_READRECEIPTS,
roomId,
eventId,
});
}
function openRoomOptions(cords, roomId) {
appDispatcher.dispatch({
type: cons.actions.navigation.OPEN_ROOMOPTIONS,
cords,
roomId,
});
}
export {
selectTab,
selectSpace,
selectRoom,
togglePeopleDrawer,
openInviteList,
openPublicRooms,
openCreateRoom,
openInviteUser,
openProfileViewer,
openSettings,
openEmojiBoard,
openReadReceipts,
openRoomOptions,
};