mirror of
https://github.com/cinnyapp/cinny.git
synced 2025-11-13 10:40:28 +03:00
Add ability to explore and join space rooms
Signed-off-by: ajbura <ajbura@gmail.com>
This commit is contained in:
parent
a55f1df17f
commit
1f6e5e71ef
8 changed files with 538 additions and 7 deletions
|
|
@ -23,14 +23,21 @@ export function selectRoom(roomId, eventId) {
|
|||
});
|
||||
}
|
||||
|
||||
export function openSpaceSettings(spaceId, tabText) {
|
||||
export function openSpaceSettings(roomId, tabText) {
|
||||
appDispatcher.dispatch({
|
||||
type: cons.actions.navigation.OPEN_SPACE_SETTINGS,
|
||||
spaceId,
|
||||
roomId,
|
||||
tabText,
|
||||
});
|
||||
}
|
||||
|
||||
export function openSpaceManage(roomId) {
|
||||
appDispatcher.dispatch({
|
||||
type: cons.actions.navigation.OPEN_SPACE_MANAGE,
|
||||
roomId,
|
||||
});
|
||||
}
|
||||
|
||||
export function toggleRoomSettings(tabText) {
|
||||
appDispatcher.dispatch({
|
||||
type: cons.actions.navigation.TOGGLE_ROOM_SETTINGS,
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@ const cons = {
|
|||
SELECT_SPACE: 'SELECT_SPACE',
|
||||
SELECT_ROOM: 'SELECT_ROOM',
|
||||
OPEN_SPACE_SETTINGS: 'OPEN_SPACE_SETTINGS',
|
||||
OPEN_SPACE_MANAGE: 'OPEN_SPACE_MANAGE',
|
||||
TOGGLE_ROOM_SETTINGS: 'TOGGLE_ROOM_SETTINGS',
|
||||
OPEN_INVITE_LIST: 'OPEN_INVITE_LIST',
|
||||
OPEN_PUBLIC_ROOMS: 'OPEN_PUBLIC_ROOMS',
|
||||
|
|
@ -69,6 +70,7 @@ const cons = {
|
|||
SPACE_SELECTED: 'SPACE_SELECTED',
|
||||
ROOM_SELECTED: 'ROOM_SELECTED',
|
||||
SPACE_SETTINGS_OPENED: 'SPACE_SETTINGS_OPENED',
|
||||
SPACE_MANAGE_OPENED: 'SPACE_MANAGE_OPENED',
|
||||
ROOM_SETTINGS_TOGGLED: 'ROOM_SETTINGS_TOGGLED',
|
||||
INVITE_LIST_OPENED: 'INVITE_LIST_OPENED',
|
||||
PUBLIC_ROOMS_OPENED: 'PUBLIC_ROOMS_OPENED',
|
||||
|
|
|
|||
|
|
@ -90,7 +90,10 @@ class Navigation extends EventEmitter {
|
|||
);
|
||||
},
|
||||
[cons.actions.navigation.OPEN_SPACE_SETTINGS]: () => {
|
||||
this.emit(cons.events.navigation.SPACE_SETTINGS_OPENED, action.spaceId, action.tabText);
|
||||
this.emit(cons.events.navigation.SPACE_SETTINGS_OPENED, action.roomId, action.tabText);
|
||||
},
|
||||
[cons.actions.navigation.OPEN_SPACE_MANAGE]: () => {
|
||||
this.emit(cons.events.navigation.SPACE_MANAGE_OPENED, action.roomId);
|
||||
},
|
||||
[cons.actions.navigation.TOGGLE_ROOM_SETTINGS]: () => {
|
||||
this.isRoomSettings = !this.isRoomSettings;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue