mirror of
https://github.com/billsonnn/nitro-react.git
synced 2025-01-19 05:46:27 +01:00
Changed requested changes
This commit is contained in:
parent
e03fa83bf7
commit
22696b93b9
@ -93,7 +93,7 @@ export const GuideToolOngoingView: FC<GuideToolOngoingViewProps> = props =>
|
|||||||
<Text bold>{ userName }</Text>
|
<Text bold>{ userName }</Text>
|
||||||
<Text>{ LocalizeText('guide.help.request.user.ongoing.guide.desc') }</Text>
|
<Text>{ LocalizeText('guide.help.request.user.ongoing.guide.desc') }</Text>
|
||||||
</Column> }
|
</Column> }
|
||||||
<Button variant="danger" disabled={ messageGroups.length === 0 } onClick={ () => report(ReportType.IM, { reportedUserId: userId }) }>{ LocalizeText('guide.help.common.report.link') }</Button>
|
<Button variant="danger" disabled={ messageGroups.length === 0 } onClick={ () => report(ReportType.GUIDE, { reportedUserId: userId }) }>{ LocalizeText('guide.help.common.report.link') }</Button>
|
||||||
</Flex>
|
</Flex>
|
||||||
<Column overflow="hidden" gap={ 1 } className="bg-muted rounded chat-messages p-2">
|
<Column overflow="hidden" gap={ 1 } className="bg-muted rounded chat-messages p-2">
|
||||||
<Column overflow="auto">
|
<Column overflow="auto">
|
||||||
|
@ -16,6 +16,7 @@ export const GuideToolUserFeedbackView: FC<GuideToolUserFeedbackViewProps> = pro
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Column>
|
<Column>
|
||||||
|
{ userName && (userName.length > 0) &&
|
||||||
<Flex justifyContent="between" gap={ 1 } className="bg-muted p-2 rounded">
|
<Flex justifyContent="between" gap={ 1 } className="bg-muted p-2 rounded">
|
||||||
<Column gap={ 0 }>
|
<Column gap={ 0 }>
|
||||||
<Text bold>{ userName }</Text>
|
<Text bold>{ userName }</Text>
|
||||||
@ -23,6 +24,7 @@ export const GuideToolUserFeedbackView: FC<GuideToolUserFeedbackViewProps> = pro
|
|||||||
</Column>
|
</Column>
|
||||||
<Button variant="danger" disabled>{ LocalizeText('guide.help.common.report.link') }</Button>
|
<Button variant="danger" disabled>{ LocalizeText('guide.help.common.report.link') }</Button>
|
||||||
</Flex>
|
</Flex>
|
||||||
|
}
|
||||||
<Column gap={ 1 }>
|
<Column gap={ 1 }>
|
||||||
<Text bold>{ LocalizeText('guide.help.request.user.feedback.closed.title') }</Text>
|
<Text bold>{ LocalizeText('guide.help.request.user.feedback.closed.title') }</Text>
|
||||||
<Text>{ LocalizeText('guide.help.request.user.feedback.closed.desc') }</Text>
|
<Text>{ LocalizeText('guide.help.request.user.feedback.closed.desc') }</Text>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { CallForHelpFromForumMessageMessageComposer, CallForHelpFromForumThreadMessageComposer, CallForHelpFromIMMessageComposer, CallForHelpFromPhotoMessageComposer, CallForHelpMessageComposer } from '@nitrots/nitro-renderer';
|
import { CallForHelpFromForumMessageMessageComposer, CallForHelpFromForumThreadMessageComposer, CallForHelpFromIMMessageComposer, CallForHelpFromPhotoMessageComposer, CallForHelpMessageComposer, GuideSessionReportMessageComposer } from '@nitrots/nitro-renderer';
|
||||||
import { FC } from 'react';
|
import { FC } from 'react';
|
||||||
import { GetSessionDataManager, LocalizeText, ReportType, SendMessageComposer } from '../../../api';
|
import { GetSessionDataManager, LocalizeText, ReportType, SendMessageComposer } from '../../../api';
|
||||||
import { Button, Column, Text } from '../../../common';
|
import { Button, Column, Text } from '../../../common';
|
||||||
@ -14,6 +14,7 @@ export const ReportSummaryView: FC<{}> = props =>
|
|||||||
|
|
||||||
switch(activeReport.reportType)
|
switch(activeReport.reportType)
|
||||||
{
|
{
|
||||||
|
|
||||||
case ReportType.BULLY:
|
case ReportType.BULLY:
|
||||||
case ReportType.EMERGENCY:
|
case ReportType.EMERGENCY:
|
||||||
case ReportType.ROOM: {
|
case ReportType.ROOM: {
|
||||||
@ -38,6 +39,11 @@ export const ReportSummaryView: FC<{}> = props =>
|
|||||||
case ReportType.PHOTO:
|
case ReportType.PHOTO:
|
||||||
SendMessageComposer(new CallForHelpFromPhotoMessageComposer(activeReport.extraData, activeReport.cfhTopic, activeReport.roomId, GetSessionDataManager().userId, activeReport.roomObjectId));
|
SendMessageComposer(new CallForHelpFromPhotoMessageComposer(activeReport.extraData, activeReport.cfhTopic, activeReport.roomId, GetSessionDataManager().userId, activeReport.roomObjectId));
|
||||||
break;
|
break;
|
||||||
|
case ReportType.GUIDE:
|
||||||
|
activeReport.reportedChats.forEach(entry => chats.push(entry.webId, entry.message));
|
||||||
|
|
||||||
|
SendMessageComposer(new GuideSessionReportMessageComposer(activeReport.message));
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
setActiveReport(null);
|
setActiveReport(null);
|
||||||
|
@ -18,6 +18,7 @@ export const SelectReportedChatsView: FC<{}> = props =>
|
|||||||
case ReportType.EMERGENCY:
|
case ReportType.EMERGENCY:
|
||||||
return chatHistory.filter(chat => (chat.type === ChatEntryType.TYPE_CHAT) && (chat.webId === activeReport.reportedUserId) && (chat.entityType === RoomObjectType.USER));
|
return chatHistory.filter(chat => (chat.type === ChatEntryType.TYPE_CHAT) && (chat.webId === activeReport.reportedUserId) && (chat.entityType === RoomObjectType.USER));
|
||||||
case ReportType.IM:
|
case ReportType.IM:
|
||||||
|
case ReportType.GUIDE:
|
||||||
return messengerHistory.filter(chat => (chat.webId === activeReport.reportedUserId) && (chat.type === ChatEntryType.TYPE_IM));
|
return messengerHistory.filter(chat => (chat.webId === activeReport.reportedUserId) && (chat.type === ChatEntryType.TYPE_IM));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -35,6 +35,7 @@ const useHelpState = () =>
|
|||||||
case ReportType.BULLY:
|
case ReportType.BULLY:
|
||||||
case ReportType.EMERGENCY:
|
case ReportType.EMERGENCY:
|
||||||
case ReportType.IM:
|
case ReportType.IM:
|
||||||
|
case ReportType.GUIDE:
|
||||||
newReport.reportedUserId = options.reportedUserId;
|
newReport.reportedUserId = options.reportedUserId;
|
||||||
newReport.currentStep = ReportState.SELECT_CHATS;
|
newReport.currentStep = ReportState.SELECT_CHATS;
|
||||||
break;
|
break;
|
||||||
@ -56,8 +57,6 @@ const useHelpState = () =>
|
|||||||
break;
|
break;
|
||||||
case ReportType.PHOTO:
|
case ReportType.PHOTO:
|
||||||
break;
|
break;
|
||||||
case ReportType.GUIDE:
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
setActiveReport(newReport);
|
setActiveReport(newReport);
|
||||||
|
Loading…
Reference in New Issue
Block a user