mirror of
https://github.com/cinnyapp/cinny.git
synced 2025-11-05 23:10:28 +03:00
Add hotkey ctrl+k for search
Signed-off-by: Ajay Bura <ajbura@gmail.com>
This commit is contained in:
parent
413188c995
commit
fbeecc0479
5 changed files with 52 additions and 32 deletions
|
|
@ -1,21 +1,21 @@
|
|||
import appDispatcher from '../dispatcher';
|
||||
import cons from '../state/cons';
|
||||
|
||||
function selectTab(tabId) {
|
||||
export function selectTab(tabId) {
|
||||
appDispatcher.dispatch({
|
||||
type: cons.actions.navigation.SELECT_TAB,
|
||||
tabId,
|
||||
});
|
||||
}
|
||||
|
||||
function selectSpace(roomId) {
|
||||
export function selectSpace(roomId) {
|
||||
appDispatcher.dispatch({
|
||||
type: cons.actions.navigation.SELECT_SPACE,
|
||||
roomId,
|
||||
});
|
||||
}
|
||||
|
||||
function selectRoom(roomId, eventId) {
|
||||
export function selectRoom(roomId, eventId) {
|
||||
appDispatcher.dispatch({
|
||||
type: cons.actions.navigation.SELECT_ROOM,
|
||||
roomId,
|
||||
|
|
@ -23,26 +23,26 @@ function selectRoom(roomId, eventId) {
|
|||
});
|
||||
}
|
||||
|
||||
function openInviteList() {
|
||||
export function openInviteList() {
|
||||
appDispatcher.dispatch({
|
||||
type: cons.actions.navigation.OPEN_INVITE_LIST,
|
||||
});
|
||||
}
|
||||
|
||||
function openPublicRooms(searchTerm) {
|
||||
export function openPublicRooms(searchTerm) {
|
||||
appDispatcher.dispatch({
|
||||
type: cons.actions.navigation.OPEN_PUBLIC_ROOMS,
|
||||
searchTerm,
|
||||
});
|
||||
}
|
||||
|
||||
function openCreateRoom() {
|
||||
export function openCreateRoom() {
|
||||
appDispatcher.dispatch({
|
||||
type: cons.actions.navigation.OPEN_CREATE_ROOM,
|
||||
});
|
||||
}
|
||||
|
||||
function openInviteUser(roomId, searchTerm) {
|
||||
export function openInviteUser(roomId, searchTerm) {
|
||||
appDispatcher.dispatch({
|
||||
type: cons.actions.navigation.OPEN_INVITE_USER,
|
||||
roomId,
|
||||
|
|
@ -50,7 +50,7 @@ function openInviteUser(roomId, searchTerm) {
|
|||
});
|
||||
}
|
||||
|
||||
function openProfileViewer(userId, roomId) {
|
||||
export function openProfileViewer(userId, roomId) {
|
||||
appDispatcher.dispatch({
|
||||
type: cons.actions.navigation.OPEN_PROFILE_VIEWER,
|
||||
userId,
|
||||
|
|
@ -58,13 +58,13 @@ function openProfileViewer(userId, roomId) {
|
|||
});
|
||||
}
|
||||
|
||||
function openSettings() {
|
||||
export function openSettings() {
|
||||
appDispatcher.dispatch({
|
||||
type: cons.actions.navigation.OPEN_SETTINGS,
|
||||
});
|
||||
}
|
||||
|
||||
function openEmojiBoard(cords, requestEmojiCallback) {
|
||||
export function openEmojiBoard(cords, requestEmojiCallback) {
|
||||
appDispatcher.dispatch({
|
||||
type: cons.actions.navigation.OPEN_EMOJIBOARD,
|
||||
cords,
|
||||
|
|
@ -72,7 +72,7 @@ function openEmojiBoard(cords, requestEmojiCallback) {
|
|||
});
|
||||
}
|
||||
|
||||
function openReadReceipts(roomId, userIds) {
|
||||
export function openReadReceipts(roomId, userIds) {
|
||||
appDispatcher.dispatch({
|
||||
type: cons.actions.navigation.OPEN_READRECEIPTS,
|
||||
roomId,
|
||||
|
|
@ -80,7 +80,7 @@ function openReadReceipts(roomId, userIds) {
|
|||
});
|
||||
}
|
||||
|
||||
function openRoomOptions(cords, roomId) {
|
||||
export function openRoomOptions(cords, roomId) {
|
||||
appDispatcher.dispatch({
|
||||
type: cons.actions.navigation.OPEN_ROOMOPTIONS,
|
||||
cords,
|
||||
|
|
@ -88,7 +88,7 @@ function openRoomOptions(cords, roomId) {
|
|||
});
|
||||
}
|
||||
|
||||
function replyTo(userId, eventId, body) {
|
||||
export function replyTo(userId, eventId, body) {
|
||||
appDispatcher.dispatch({
|
||||
type: cons.actions.navigation.CLICK_REPLY_TO,
|
||||
userId,
|
||||
|
|
@ -97,26 +97,9 @@ function replyTo(userId, eventId, body) {
|
|||
});
|
||||
}
|
||||
|
||||
function openSearch(term) {
|
||||
export function openSearch(term) {
|
||||
appDispatcher.dispatch({
|
||||
type: cons.actions.navigation.OPEN_SEARCH,
|
||||
term,
|
||||
});
|
||||
}
|
||||
|
||||
export {
|
||||
selectTab,
|
||||
selectSpace,
|
||||
selectRoom,
|
||||
openInviteList,
|
||||
openPublicRooms,
|
||||
openCreateRoom,
|
||||
openInviteUser,
|
||||
openProfileViewer,
|
||||
openSettings,
|
||||
openEmojiBoard,
|
||||
openReadReceipts,
|
||||
openRoomOptions,
|
||||
replyTo,
|
||||
openSearch,
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue