From d492475eec5865a0013fc3c745541ce6fb612a66 Mon Sep 17 00:00:00 2001 From: Reckless_Satoshi Date: Tue, 24 May 2022 05:52:33 -0700 Subject: [PATCH] Add show signature verification on chat messages --- frontend/src/components/Dialogs/AuditPGP.tsx | 4 +-- frontend/src/components/EncryptedChat.js | 27 +++++++++++++++----- 2 files changed, 22 insertions(+), 9 deletions(-) diff --git a/frontend/src/components/Dialogs/AuditPGP.tsx b/frontend/src/components/Dialogs/AuditPGP.tsx index 51b43d9b..6c7a3448 100644 --- a/frontend/src/components/Dialogs/AuditPGP.tsx +++ b/frontend/src/components/Dialogs/AuditPGP.tsx @@ -158,7 +158,7 @@ const AuditPGPDialog = ({
- {t("Export Keys")} + {t("Keys")}
@@ -177,7 +177,7 @@ const AuditPGPDialog = ({
- {t("Export Chat")} + {t("Messages")}
diff --git a/frontend/src/components/EncryptedChat.js b/frontend/src/components/EncryptedChat.js index 4b4e43e8..1c139c44 100644 --- a/frontend/src/components/EncryptedChat.js +++ b/frontend/src/components/EncryptedChat.js @@ -1,6 +1,6 @@ import React, { Component } from 'react'; import { withTranslation } from "react-i18next"; -import {Button, Badge, ToolTip, TextField, Grid, Container, Card, CardHeader, Paper, Avatar, Typography} from "@mui/material"; +import {Button, Badge, Tooltip, TextField, Grid, Container, Card, CardHeader, Paper, Avatar, Typography} from "@mui/material"; import ReconnectingWebSocket from 'reconnecting-websocket'; import { encryptMessage , decryptMessage} from "../utils/pgp"; import { getCookie } from "../utils/cookies"; @@ -193,7 +193,7 @@ class Chat extends Component { } style={{backgroundColor: '#eeeeee'}} - title={message.userNick} + title={
{message.userNick}{message.validSignature ? : }
} subheader={this.state.audit ? message.encryptedMessage : message.plainTextMessage} subheaderTypographyProps={{sx: {wordWrap: "break-word", width: '200px', color: '#444444'}}} /> @@ -208,7 +208,17 @@ class Chat extends Component { } style={{backgroundColor: '#fafafa'}} - title={message.userNick} + title={ + +
+ {message.userNick} + {message.validSignature ? + + : + + } +
+
} subheader={this.state.audit ? message.encryptedMessage : message.plainTextMessage} subheaderTypographyProps={{sx: {wordWrap: "break-word", width: '200px', color: '#444444'}}} />} @@ -250,14 +260,17 @@ class Chat extends Component { passphrase={this.state.token} onClickBack={() => this.setState({audit:false})} /> + - + + + - {/* */} - - {/* */} + + +