Skip to content

Commit

Permalink
style and prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
dangrous committed May 26, 2023
1 parent 15e4aef commit 48f1be5
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 25 deletions.
5 changes: 3 additions & 2 deletions src/languages/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -1402,7 +1402,8 @@ export default {
copied: 'Copied!',
},
moderation: {
flagDescription: 'All flagged messages will be sent to a moderator for review. If a message is flagged at a level above Spam or Inconsiderate, it will immediately be hidden. Users may, however, choose to reveal the message while it is being reviewed if they choose. Dependent on the decision of the moderator, the message may or may not be permanently hidden or deleted, and the sender may be banned from posting temporarily or permanently.',
flagDescription:
'All flagged messages will be sent to a moderator for review. If a message is flagged at a level above Spam or Inconsiderate, it will immediately be hidden. Users may, however, choose to reveal the message while it is being reviewed if they choose. Dependent on the decision of the moderator, the message may or may not be permanently hidden or deleted, and the sender may be banned from posting temporarily or permanently.',
chooseAReason: 'Choose a reason below:',
spam: 'Spam',
spamDescription: 'Unsolicited off-topic promotion',
Expand All @@ -1416,5 +1417,5 @@ export default {
harassmentDescription: 'Racist, misogynistic, or other broadly discriminatory behavior',
assault: 'Assault',
assaultDescription: 'Specifically targeted emotional attack with the intention of harm',
}
},
};
5 changes: 3 additions & 2 deletions src/languages/es.js
Original file line number Diff line number Diff line change
Expand Up @@ -1868,7 +1868,8 @@ export default {
copied: '¡Copiado!',
},
moderation: {
flagDescription: 'Todos los mensajes marcados se enviarán a un moderador para su revisión. Si un mensaje se marca en un nivel superior a Spam o Desconsiderado, se ocultará de inmediato. Sin embargo, los usuarios pueden optar por revelar el mensaje mientras se revisa si así lo desean. Dependiendo de la decisión del moderador, el mensaje puede ocultarse o eliminarse permanentemente o no, y el remitente puede tener prohibido enviar mensajes de forma temporal o permanente.',
flagDescription:
'Todos los mensajes marcados se enviarán a un moderador para su revisión. Si un mensaje se marca en un nivel superior a Spam o Desconsiderado, se ocultará de inmediato. Sin embargo, los usuarios pueden optar por revelar el mensaje mientras se revisa si así lo desean. Dependiendo de la decisión del moderador, el mensaje puede ocultarse o eliminarse permanentemente o no, y el remitente puede tener prohibido enviar mensajes de forma temporal o permanente.',
chooseAReason: 'Elige un motivo de abajo',
spam: 'Spam',
spamDescription: 'Promoción fuera de tema no solicitada',
Expand All @@ -1882,5 +1883,5 @@ export default {
harassmentDescription: 'Comportamiento racista, misógino u otro comportamiento ampliamente discriminatorio',
assault: 'Agresion',
assaultDescription: 'Ataque emocional específicamente dirigido con la intención de hacer daño',
}
},
};
4 changes: 2 additions & 2 deletions src/libs/Navigation/AppNavigator/ModalStackNavigators.js
Original file line number Diff line number Diff line change
Expand Up @@ -703,13 +703,13 @@ const YearPickerStackNavigator = createModalStackNavigator([
]);

const FlagCommentStackNavigator = createModalStackNavigator([
{
{
getComponent: () => {
const FlagCommentPage = require('../../../pages/FlagCommentPage').default;
return FlagCommentPage;
},
name: 'FlagComment_Root',
}
},
]);

export {
Expand Down
21 changes: 8 additions & 13 deletions src/pages/FlagCommentPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@ const propTypes = {
reportActionID: PropTypes.string,
}),
}).isRequired,

...withLocalizePropTypes,
};

const defaultProps = {
reportActions: {},
}
};

/**
* Get the reportID for the associated chatReport
Expand Down Expand Up @@ -95,16 +95,17 @@ function FlagCommentPage(props) {
Report.flagComment(props.route.params.reportID, reportAction, severity);
};

const severityMenuItems = _.map(severities, (item, index) => (<MenuItem
const severityMenuItems = _.map(severities, (item, index) => (
<MenuItem
key={`${item.severity}_${index}`}
icon={item.icon}
shouldShowRightIcon
title={item.name}
description={item.description}
onPress={() => flagComment(item.severity)}
wrapperStyle={[styles.borderBottom]}
/>)
)
/>
));

return (
<ScreenWrapper includeSafeAreaPaddingBottom={false}>
Expand All @@ -120,20 +121,15 @@ function FlagCommentPage(props) {
>
<View style={styles.pageWrapper}>
<View style={[styles.settingsPageBody, styles.alignItemsCenter]}>
<Text style={[styles.baseFontStyle]}>
{props.translate('moderation.flagDescription')}
</Text>
<Text style={[styles.baseFontStyle]}>{props.translate('moderation.flagDescription')}</Text>
</View>
</View>
<Text style={[styles.ph5, styles.textLabelSupporting, styles.mb1]}>
{props.translate('moderation.chooseAReason')}
</Text>
<Text style={[styles.ph5, styles.textLabelSupporting, styles.mb1]}>{props.translate('moderation.chooseAReason')}</Text>
{severityMenuItems}
</ScrollView>
</>
)}
</ScreenWrapper>

);
}

Expand All @@ -150,4 +146,3 @@ export default compose(
},
}),
)(FlagCommentPage);

13 changes: 7 additions & 6 deletions src/pages/home/report/ContextMenu/ContextMenuActions.js
Original file line number Diff line number Diff line change
Expand Up @@ -270,16 +270,17 @@ export default [
textTranslateKey: 'reportActionContextMenu.flagAsOffensive',
icon: Expensicons.Flag,
shouldShow: (type, reportAction, isArchivedRoom, betas, menuTarget, isChronosReport, reportID) =>
type === CONTEXT_MENU_TYPES.REPORT_ACTION && ReportUtils.canFlagReportAction(reportAction, reportID) && !isArchivedRoom && !isChronosReport && !ReportUtils.isConciergeChatReport(reportID),
type === CONTEXT_MENU_TYPES.REPORT_ACTION &&
ReportUtils.canFlagReportAction(reportAction, reportID) &&
!isArchivedRoom &&
!isChronosReport &&
!ReportUtils.isConciergeChatReport(reportID),
onPress: (closePopover, {reportID, reportAction}) => {
if (closePopover) {
hideContextMenu(
false,
() => Navigation.navigate(ROUTES.getFlagCommentRoute(reportID, reportAction.reportActionID))
);
hideContextMenu(false, () => Navigation.navigate(ROUTES.getFlagCommentRoute(reportID, reportAction.reportActionID)));
}

Navigation.navigate(ROUTES.getFlagCommentRoute(reportID, reportAction.reportActionID))
Navigation.navigate(ROUTES.getFlagCommentRoute(reportID, reportAction.reportActionID));
},
getDescription: () => {},
},
Expand Down

0 comments on commit 48f1be5

Please sign in to comment.