Fix Contact Modal and improve Debug Log window
This commit is contained in:
parent
5d051ae16a
commit
c369e44d8e
7 changed files with 22 additions and 15 deletions
|
@ -460,19 +460,25 @@
|
|||
"description": "Shown in conversation banner when more than one group member's safety number has changed, but they were previously verified."
|
||||
},
|
||||
"debugLogExplanation": {
|
||||
"message": "This log will be posted publicly online for contributors to view. You may download the full log before submitting."
|
||||
"message": "When you click Submit, your log will be posted online for 30 days at a unique, unpublished URL. You may Save it locally first.",
|
||||
"description": "Description of what will happen with your debug log"
|
||||
},
|
||||
"debugLogError": {
|
||||
"message": "Something went wrong with the upload! Please email support@signal.org and attach your log as a text file."
|
||||
"message": "Something went wrong with the upload! Please email support@signal.org and attach your log as a text file.",
|
||||
"description": "Error message a recommendations if debug log upload fails"
|
||||
},
|
||||
"debugLogSuccess": {
|
||||
"message": "Debug log submitted",
|
||||
"description": "Title of the success page for submitting a debug log"
|
||||
},
|
||||
"debugLogSuccessNextSteps": {
|
||||
"message": "Debug log uploaded. When you contact support, copy the link below and attach it along with a description of the problem you saw and steps to reproduce it.",
|
||||
"message": "Debug log uploaded. When you contact support, copy the URL below and attach it along with a description of the problem you saw and steps to reproduce it.",
|
||||
"description": "Explanation of next steps to take when submitting debug log"
|
||||
},
|
||||
"debugLogLogIsIncomplete": {
|
||||
"message": "... to see the full log, click Save",
|
||||
"description": "Shown as the text for the copy button on the debug log screen"
|
||||
},
|
||||
"debugLogCopy": {
|
||||
"message": "Copy Link",
|
||||
"description": "Shown as the text for the copy button on the debug log screen"
|
||||
|
|
|
@ -71,7 +71,7 @@ export const DebugLogWindow = ({
|
|||
const linesToShow = Math.ceil(Math.min(window.innerHeight, 2000) / 5);
|
||||
const value = fetchedLogText.split(/\n/g, linesToShow).join('\n');
|
||||
|
||||
setTextAreaValue(value);
|
||||
setTextAreaValue(`${value}\n\n\n${i18n('debugLogLogIsIncomplete')}`);
|
||||
setToastType(undefined);
|
||||
}
|
||||
|
||||
|
@ -80,7 +80,7 @@ export const DebugLogWindow = ({
|
|||
return () => {
|
||||
shouldCancel = true;
|
||||
};
|
||||
}, [fetchLogs]);
|
||||
}, [fetchLogs, i18n]);
|
||||
|
||||
const handleSubmit = async (ev: MouseEvent) => {
|
||||
ev.preventDefault();
|
||||
|
|
|
@ -86,11 +86,11 @@ export const ContactModal = ({
|
|||
);
|
||||
|
||||
useEffect(() => {
|
||||
if (conversation?.id) {
|
||||
if (contact?.id) {
|
||||
// Kick off the expensive hydration of the current sharedGroupNames
|
||||
updateConversationModelSharedGroups(conversation.id);
|
||||
updateConversationModelSharedGroups(contact.id);
|
||||
}
|
||||
}, [conversation?.id, updateConversationModelSharedGroups]);
|
||||
}, [contact?.id, updateConversationModelSharedGroups]);
|
||||
|
||||
let modalNode: ReactNode;
|
||||
switch (subModalState) {
|
||||
|
|
|
@ -31,7 +31,7 @@ type PropsType = {
|
|||
onBlockAndReportSpam: (conversationId: string) => unknown;
|
||||
onClose: () => void;
|
||||
onDelete: (conversationId: string) => unknown;
|
||||
onShowContactModal: (contactId: string) => unknown;
|
||||
onShowContactModal: (contactId: string, conversationId?: string) => unknown;
|
||||
onUnblock: (conversationId: string) => unknown;
|
||||
removeMember: (conversationId: string) => unknown;
|
||||
theme: ThemeType;
|
||||
|
|
|
@ -294,7 +294,7 @@ export type PropsActions = {
|
|||
contact: EmbeddedContactType;
|
||||
signalAccount?: string;
|
||||
}) => void;
|
||||
showContactModal: (contactId: string) => void;
|
||||
showContactModal: (contactId: string, conversationId?: string) => void;
|
||||
|
||||
kickOffAttachmentDownload: (options: {
|
||||
attachment: AttachmentType;
|
||||
|
@ -1380,12 +1380,13 @@ export class Message extends React.PureComponent<Props, State> {
|
|||
private renderAvatar(): ReactNode {
|
||||
const {
|
||||
author,
|
||||
conversationId,
|
||||
conversationType,
|
||||
direction,
|
||||
getPreferredBadge,
|
||||
i18n,
|
||||
showContactModal,
|
||||
theme,
|
||||
conversationType,
|
||||
direction,
|
||||
} = this.props;
|
||||
|
||||
if (conversationType !== 'group' || direction !== 'incoming') {
|
||||
|
@ -1415,7 +1416,7 @@ export class Message extends React.PureComponent<Props, State> {
|
|||
event.stopPropagation();
|
||||
event.preventDefault();
|
||||
|
||||
showContactModal(author.id);
|
||||
showContactModal(author.id, conversationId);
|
||||
}}
|
||||
phoneNumber={author.phoneNumber}
|
||||
profileName={author.profileName}
|
||||
|
|
|
@ -103,7 +103,7 @@ type ActionProps = {
|
|||
deleteAvatarFromDisk: DeleteAvatarFromDiskActionType;
|
||||
replaceAvatar: ReplaceAvatarActionType;
|
||||
saveAvatarToDisk: SaveAvatarToDiskActionType;
|
||||
showContactModal: (contactId: string, conversationId: string) => void;
|
||||
showContactModal: (contactId: string, conversationId?: string) => void;
|
||||
toggleSafetyNumberModal: (conversationId: string) => unknown;
|
||||
searchInConversation: (id: string) => unknown;
|
||||
};
|
||||
|
|
|
@ -26,7 +26,7 @@ export type Props = {
|
|||
i18n: LocalizerType;
|
||||
maxShownMemberCount?: number;
|
||||
memberships: Array<GroupV2Membership>;
|
||||
showContactModal: (contactId: string, conversationId: string) => void;
|
||||
showContactModal: (contactId: string, conversationId?: string) => void;
|
||||
startAddingNewMembers?: () => void;
|
||||
theme: ThemeType;
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue