feat(phone/messages): minor changes for nui

This commit is contained in:
Christopher committed 2021-02-28 01:39:26 +01:00
1 parent 09d397b6cf
commit 4d82c8e69a
3 files changed
+4 -5

No files matched your search

@@ -3,7 +3,6 @@ import { AppWrapper } from '../../../ui/components';
import { AppTitle } from '../../../ui/components/AppTitle';
import { AppContent } from '../../../ui/components/AppContent';
import { useApp } from '../../../os/apps/hooks/useApps';
import AlertBar from './AlertBar';
import MessageGroupModal from './modal/MessageGroupModal';
import MessagesList from './list/MessagesList';
import { Route, Switch, useHistory } from 'react-router-dom';
@@ -50,7 +49,6 @@ export const MessagesApp = () => {
</Switch>
</AppContent>
<NewMessageGroupButton onClick={() => history.push('/messages/new')} />
<AlertBar />
</AppWrapper>
</MessagesThemeProvider>
);
@@ -9,7 +9,7 @@ export const useMessagesService = () => {
const setCreateMessageGroupResult = useSetRecoilState(
messageState.createMessageGroupResult
);
const { addAlert } = useSnackbar()
const { addAlert } = useSnackbar();
useNuiEvent('MESSAGES', 'phone:fetchMessageGroupsSuccess', setMessageGroups);
useNuiEvent('MESSAGES', 'phone:fetchMessagesSuccess', setMessages);
@@ -23,5 +23,5 @@ export const useMessagesService = () => {
'phone:createMessageGroupFailed',
setCreateMessageGroupResult
);
useNuiEvent('MESSAGES', 'setAlert', addAlert);
useNuiEvent('MESSAGES', 'phone:setMessagesAlert', addAlert);
};
+2 -1
View File
@@ -65,10 +65,11 @@
"APPS_MESSAGES_SEARCH_PLACEHOLDER": "Search messages...",
"APPS_MESSAGES_NEW_MESSAGE": "Message...",
"APPS_MESSAGES_NEW_MESSAGE_FAILED:": "Failed to send message",
"APPS_MESSAGES_NEW_MESSAGE_GROUP": "Phone numbers...",
"APPS_MESSAGES_GROUP_CHAT_LABEL": "Group chat label...",
"APPS_MESSAGES_NEW_MESSAGE_GROUP_SUBMIT": "Send",
"APPS_MESSAGES_INVALID_PHONE_NUMBER": "Invalid phone number: ",
"APPS_MESSAGES_INVALID_PHONE_NUMBER": "Invalid phone number",
"APPS_MESSAGES_MESSAGE_GROUP_DUPLICATE": "This message group already exists",
"APPS_MESSAGES_MESSAGE_GROUP_CREATE_FAILED": "Failed to create message group",
"APPS_MESSAGES_MESSAGE_GROUP_CREATE_MINE": "You cannot add yourself!",