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."
|
"description": "Shown in conversation banner when more than one group member's safety number has changed, but they were previously verified."
|
||||||
},
|
},
|
||||||
"debugLogExplanation": {
|
"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": {
|
"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": {
|
"debugLogSuccess": {
|
||||||
"message": "Debug log submitted",
|
"message": "Debug log submitted",
|
||||||
"description": "Title of the success page for submitting a debug log"
|
"description": "Title of the success page for submitting a debug log"
|
||||||
},
|
},
|
||||||
"debugLogSuccessNextSteps": {
|
"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"
|
"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": {
|
"debugLogCopy": {
|
||||||
"message": "Copy Link",
|
"message": "Copy Link",
|
||||||
"description": "Shown as the text for the copy button on the debug log screen"
|
"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 linesToShow = Math.ceil(Math.min(window.innerHeight, 2000) / 5);
|
||||||
const value = fetchedLogText.split(/\n/g, linesToShow).join('\n');
|
const value = fetchedLogText.split(/\n/g, linesToShow).join('\n');
|
||||||
|
|
||||||
setTextAreaValue(value);
|
setTextAreaValue(`${value}\n\n\n${i18n('debugLogLogIsIncomplete')}`);
|
||||||
setToastType(undefined);
|
setToastType(undefined);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -80,7 +80,7 @@ export const DebugLogWindow = ({
|
||||||
return () => {
|
return () => {
|
||||||
shouldCancel = true;
|
shouldCancel = true;
|
||||||
};
|
};
|
||||||
}, [fetchLogs]);
|
}, [fetchLogs, i18n]);
|
||||||
|
|
||||||
const handleSubmit = async (ev: MouseEvent) => {
|
const handleSubmit = async (ev: MouseEvent) => {
|
||||||
ev.preventDefault();
|
ev.preventDefault();
|
||||||
|
|
|
@ -86,11 +86,11 @@ export const ContactModal = ({
|
||||||
);
|
);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (conversation?.id) {
|
if (contact?.id) {
|
||||||
// Kick off the expensive hydration of the current sharedGroupNames
|
// Kick off the expensive hydration of the current sharedGroupNames
|
||||||
updateConversationModelSharedGroups(conversation.id);
|
updateConversationModelSharedGroups(contact.id);
|
||||||
}
|
}
|
||||||
}, [conversation?.id, updateConversationModelSharedGroups]);
|
}, [contact?.id, updateConversationModelSharedGroups]);
|
||||||
|
|
||||||
let modalNode: ReactNode;
|
let modalNode: ReactNode;
|
||||||
switch (subModalState) {
|
switch (subModalState) {
|
||||||
|
|
|
@ -31,7 +31,7 @@ type PropsType = {
|
||||||
onBlockAndReportSpam: (conversationId: string) => unknown;
|
onBlockAndReportSpam: (conversationId: string) => unknown;
|
||||||
onClose: () => void;
|
onClose: () => void;
|
||||||
onDelete: (conversationId: string) => unknown;
|
onDelete: (conversationId: string) => unknown;
|
||||||
onShowContactModal: (contactId: string) => unknown;
|
onShowContactModal: (contactId: string, conversationId?: string) => unknown;
|
||||||
onUnblock: (conversationId: string) => unknown;
|
onUnblock: (conversationId: string) => unknown;
|
||||||
removeMember: (conversationId: string) => unknown;
|
removeMember: (conversationId: string) => unknown;
|
||||||
theme: ThemeType;
|
theme: ThemeType;
|
||||||
|
|
|
@ -294,7 +294,7 @@ export type PropsActions = {
|
||||||
contact: EmbeddedContactType;
|
contact: EmbeddedContactType;
|
||||||
signalAccount?: string;
|
signalAccount?: string;
|
||||||
}) => void;
|
}) => void;
|
||||||
showContactModal: (contactId: string) => void;
|
showContactModal: (contactId: string, conversationId?: string) => void;
|
||||||
|
|
||||||
kickOffAttachmentDownload: (options: {
|
kickOffAttachmentDownload: (options: {
|
||||||
attachment: AttachmentType;
|
attachment: AttachmentType;
|
||||||
|
@ -1380,12 +1380,13 @@ export class Message extends React.PureComponent<Props, State> {
|
||||||
private renderAvatar(): ReactNode {
|
private renderAvatar(): ReactNode {
|
||||||
const {
|
const {
|
||||||
author,
|
author,
|
||||||
|
conversationId,
|
||||||
|
conversationType,
|
||||||
|
direction,
|
||||||
getPreferredBadge,
|
getPreferredBadge,
|
||||||
i18n,
|
i18n,
|
||||||
showContactModal,
|
showContactModal,
|
||||||
theme,
|
theme,
|
||||||
conversationType,
|
|
||||||
direction,
|
|
||||||
} = this.props;
|
} = this.props;
|
||||||
|
|
||||||
if (conversationType !== 'group' || direction !== 'incoming') {
|
if (conversationType !== 'group' || direction !== 'incoming') {
|
||||||
|
@ -1415,7 +1416,7 @@ export class Message extends React.PureComponent<Props, State> {
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
|
||||||
showContactModal(author.id);
|
showContactModal(author.id, conversationId);
|
||||||
}}
|
}}
|
||||||
phoneNumber={author.phoneNumber}
|
phoneNumber={author.phoneNumber}
|
||||||
profileName={author.profileName}
|
profileName={author.profileName}
|
||||||
|
|
|
@ -103,7 +103,7 @@ type ActionProps = {
|
||||||
deleteAvatarFromDisk: DeleteAvatarFromDiskActionType;
|
deleteAvatarFromDisk: DeleteAvatarFromDiskActionType;
|
||||||
replaceAvatar: ReplaceAvatarActionType;
|
replaceAvatar: ReplaceAvatarActionType;
|
||||||
saveAvatarToDisk: SaveAvatarToDiskActionType;
|
saveAvatarToDisk: SaveAvatarToDiskActionType;
|
||||||
showContactModal: (contactId: string, conversationId: string) => void;
|
showContactModal: (contactId: string, conversationId?: string) => void;
|
||||||
toggleSafetyNumberModal: (conversationId: string) => unknown;
|
toggleSafetyNumberModal: (conversationId: string) => unknown;
|
||||||
searchInConversation: (id: string) => unknown;
|
searchInConversation: (id: string) => unknown;
|
||||||
};
|
};
|
||||||
|
|
|
@ -26,7 +26,7 @@ export type Props = {
|
||||||
i18n: LocalizerType;
|
i18n: LocalizerType;
|
||||||
maxShownMemberCount?: number;
|
maxShownMemberCount?: number;
|
||||||
memberships: Array<GroupV2Membership>;
|
memberships: Array<GroupV2Membership>;
|
||||||
showContactModal: (contactId: string, conversationId: string) => void;
|
showContactModal: (contactId: string, conversationId?: string) => void;
|
||||||
startAddingNewMembers?: () => void;
|
startAddingNewMembers?: () => void;
|
||||||
theme: ThemeType;
|
theme: ThemeType;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Reference in a new issue