Re-adding code that wasn't commited. Adding button for debug log in settings.

pull/1967/head
Warrick Corfe-Tan 4 years ago
parent ab6bccade6
commit 1fe6b61308

@ -73,6 +73,7 @@
"attemptingReconnection": "Attempting reconnect in $reconnect_duration_in_seconds$ seconds",
"submitDebugLog": "Debug log",
"debugLog": "Debug Log",
"showDebugLog": "Show Debug Log",
"goToReleaseNotes": "Go to Release Notes",
"goToSupportPage": "Go to Support Page",
"menuReportIssue": "Report an Issue",

@ -1,3 +1,4 @@
import { ipcRenderer } from 'electron/renderer';
import React from 'react';
import styled from 'styled-components';
import { MessageDeliveryStatus } from '../../../models/messageType';
@ -40,8 +41,12 @@ const MessageStatusRead = () => {
};
const MessageStatusError = () => {
const showDebugLog = () => {
ipcRenderer.send('show-debug-log');
};
return (
<MessageStatusSendingContainer title={window.i18n('sendFailed')}>
<MessageStatusSendingContainer onClick={showDebugLog} title={window.i18n('sendFailed')}>
<SessionIcon iconColor={'var(--color-destructive'} iconType="error" iconSize={'tiny'} />
</MessageStatusSendingContainer>
);

@ -14,7 +14,7 @@ import {
getPasswordHash,
hasLinkPreviewPopupBeenDisplayed,
} from '../../../../ts/data/data';
import { shell } from 'electron';
import { ipcRenderer, shell } from 'electron';
import { mapDispatchToProps } from '../../../state/actions';
import { unblockConvoById } from '../../../interactions/conversationInteractions';
import { toggleAudioAutoplay } from '../../../state/ducks/userConfig';
@ -497,6 +497,23 @@ class SettingsViewInner extends React.Component<SettingsViewProps, State> {
buttonColor: SessionButtonColor.Primary,
},
},
{
id: 'debug-log-setting',
title: window.i18n('showDebugLog'),
description: undefined,
hidden: false,
type: SessionSettingType.Button,
category: SessionSettingCategory.Appearance,
setFn: undefined,
comparisonValue: undefined,
onClick: () => {
ipcRenderer.send('show-debug-log');
},
content: {
buttonText: window.i18n('debugLog'),
buttonColor: SessionButtonColor.Primary,
},
},
{
id: 'media-permissions',
title: window.i18n('mediaPermissionsTitle'),

Loading…
Cancel
Save