Skip to content

Commit

Permalink
Merge pull request #59 from UNICEFECAR/fix/issue_87
Browse files Browse the repository at this point in the history
fix/issue_87
  • Loading branch information
sebastian-7DIGIT authored Jan 12, 2024
2 parents c049e7b + 0d81296 commit 6181862
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 12 deletions.
30 changes: 21 additions & 9 deletions src/blocks/ActivityHistory/ActivityHistory.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import {
getDateView,
getTime,
systemMessageTypes,
getTimeAsString,
} from "@USupport-components-library/utils";

import {
Expand Down Expand Up @@ -326,6 +327,11 @@ const MyDocument = ({
<View style={styles.nameContainer}>
<Text style={styles.providerName}>{providerName}</Text>
</View>
<Text style={styles.dateText}>
{t("exported_at", {
time: getTimeAsString(new Date()) + ", " + getDateView(new Date()),
})}
</Text>
{messages.map((message, index) => {
const isSent = message.senderId !== providerId;
if (message.type === "system" && !showSystemMessages) return null;
Expand All @@ -334,7 +340,8 @@ const MyDocument = ({
<View
style={[
styles.message,
isSent ? styles.messageSent : styles.messageReceived,
message.type != "system" &&
(isSent ? styles.messageSent : styles.messageReceived),
message.type === "system" && styles.systemMessage,
]}
>
Expand Down Expand Up @@ -372,10 +379,15 @@ const styles = StyleSheet.create({
flexDirection: "row",
justifyContent: "center",
alignItems: "center",
marginBottom: "24px",
marginTop: "6px",
fontWeight: "normal",
},
dateText: {
alignSelf: "center",
marginTop: "6px",
fontWeight: "normal",
textAlign: "center",
},
image: {
width: "40px",
height: "40px",
Expand All @@ -393,11 +405,11 @@ const styles = StyleSheet.create({
flexDirection: "column",
},
message: {
borderRadius: "24px",
padding: "16px 24px",
borderRadius: "18px",
padding: "8px 14px",
textAlign: "left",
maxWidth: "35%",
marginTop: "16px",
marginTop: "8px",
},
systemMessage: {
alignSelf: "center",
Expand All @@ -409,19 +421,19 @@ const styles = StyleSheet.create({
},
messageText: {
color: "#20809e",
fontSize: "14px",
fontSize: "12px",
fontWeight: "bold",
},
messageSent: {
backgroundColor: "#54cfd9",
alignSelf: "flex-end",
marginRight: "5px",
marginRight: "16px",
},
messageReceived: {
backgroundColor: "#e6f1f4",
marginLeft: "5px",
marginLeft: "16px",
},
date: { color: "gray", marginTop: "6px", fontSize: "14" },
date: { color: "gray", marginTop: "6px", fontSize: "10" },
dateSent: {
color: "#66768d",
},
Expand Down
4 changes: 3 additions & 1 deletion src/blocks/ActivityHistory/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,7 @@
"provider_camera_off": "The provider has turned off the camera",
"provider_camera_on": "The provider has turned on the camera",
"provider_microphone_off": "The provider has turned off the microphone",
"provider_microphone_on": "The provider has turned on the microphone"
"provider_microphone_on": "The provider has turned on the microphone",

"exported_at": "Exported at: {{time}}"
}
4 changes: 3 additions & 1 deletion src/blocks/ActivityHistory/locales/kk.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,7 @@
"provider_camera_off": "Консультант камераны өшірді",
"provider_camera_on": "Консультант камераны қосты",
"provider_microphone_off": "Консультант микрофонды өшірді",
"provider_microphone_on": "Консультант микрофонды қосты"
"provider_microphone_on": "Консультант микрофонды қосты",

"exported_at": "Экспортталған уақыты: {{time}}"
}
4 changes: 3 additions & 1 deletion src/blocks/ActivityHistory/locales/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,7 @@
"provider_camera_off": "Консультант отключил камеру",
"provider_camera_on": "Консультант включил камеру",
"provider_microphone_off": "Консультант отключил микрофон",
"provider_microphone_on": "Консультант включил микрофон"
"provider_microphone_on": "Консультант включил микрофон",

"exported_at": "Экспортировано в: {{time}}"
}

0 comments on commit 6181862

Please sign in to comment.