summaryrefslogtreecommitdiffhomepage
path: root/gui/src/renderer
diff options
context:
space:
mode:
Diffstat (limited to 'gui/src/renderer')
-rw-r--r--gui/src/renderer/app.tsx12
-rw-r--r--gui/src/renderer/components/ErrorBoundary.tsx4
-rw-r--r--gui/src/renderer/components/Support.tsx18
-rw-r--r--gui/src/renderer/containers/SupportPage.tsx4
4 files changed, 19 insertions, 19 deletions
diff --git a/gui/src/renderer/app.tsx b/gui/src/renderer/app.tsx
index 1277db2e63..6f656c5dfe 100644
--- a/gui/src/renderer/app.tsx
+++ b/gui/src/renderer/app.tsx
@@ -460,9 +460,13 @@ export default class AppRenderer {
public async sendProblemReport(
email: string,
message: string,
- savedReport: string,
+ savedReportId: string,
): Promise<void> {
- await IpcRendererEventChannel.problemReport.sendReport({ email, message, savedReport });
+ await IpcRendererEventChannel.problemReport.sendReport({ email, message, savedReportId });
+ }
+
+ public viewLog(id: string): Promise<string> {
+ return IpcRendererEventChannel.problemReport.viewLog(id);
}
public quit(): void {
@@ -473,10 +477,6 @@ export default class AppRenderer {
return IpcRendererEventChannel.app.openUrl(url);
}
- public openPath(path: string): Promise<string> {
- return IpcRendererEventChannel.app.openPath(path);
- }
-
public showOpenDialog(
options: Electron.OpenDialogOptions,
): Promise<Electron.OpenDialogReturnValue> {
diff --git a/gui/src/renderer/components/ErrorBoundary.tsx b/gui/src/renderer/components/ErrorBoundary.tsx
index 040ff71826..82e2910cc0 100644
--- a/gui/src/renderer/components/ErrorBoundary.tsx
+++ b/gui/src/renderer/components/ErrorBoundary.tsx
@@ -1,6 +1,6 @@
import React from 'react';
import styled from 'styled-components';
-import { colors, links } from '../../config.json';
+import { colors, supportEmail } from '../../config.json';
import { messages } from '../../shared/gettext';
import log from '../../shared/logging';
import PlatformWindowContainer from '../containers/PlatformWindowContainer';
@@ -71,7 +71,7 @@ export default class ErrorBoundary extends React.Component<IProps, IState> {
messages
.pgettext('error-boundary-view', 'Something went wrong. Please contact us at %(email)s')
.split('%(email)s', 2);
- reachBackMessage.splice(1, 0, <Email>{links.supportEmail}</Email>);
+ reachBackMessage.splice(1, 0, <Email>{supportEmail}</Email>);
return (
<PlatformWindowContainer>
diff --git a/gui/src/renderer/components/Support.tsx b/gui/src/renderer/components/Support.tsx
index d6657d4c44..e7960a30c7 100644
--- a/gui/src/renderer/components/Support.tsx
+++ b/gui/src/renderer/components/Support.tsx
@@ -40,7 +40,7 @@ enum SendState {
interface ISupportState {
email: string;
message: string;
- savedReport?: string;
+ savedReportId?: string;
sendState: SendState;
disableActions: boolean;
showOutdatedVersionWarning: boolean;
@@ -56,7 +56,7 @@ interface ISupportProps {
saveReportForm: (form: ISupportReportForm) => void;
clearReportForm: () => void;
collectProblemReport: (accountsToRedact: string[]) => Promise<string>;
- sendProblemReport: (email: string, message: string, savedReport: string) => Promise<void>;
+ sendProblemReport: (email: string, message: string, savedReportId: string) => Promise<void>;
outdatedVersion: boolean;
suggestedIsBeta: boolean;
onExternalLink: (url: string) => void;
@@ -66,7 +66,7 @@ export default class Support extends React.Component<ISupportProps, ISupportStat
public state = {
email: '',
message: '',
- savedReport: undefined,
+ savedReportId: undefined,
sendState: SendState.initial,
disableActions: false,
showOutdatedVersionWarning: false,
@@ -102,8 +102,8 @@ export default class Support extends React.Component<ISupportProps, ISupportStat
public onViewLog = () => {
this.performWithActionsDisabled(async () => {
try {
- const reportPath = await this.collectLog();
- this.props.viewLog(reportPath);
+ const reportId = await this.collectLog();
+ this.props.viewLog(reportId);
} catch (error) {
// TODO: handle error
}
@@ -199,9 +199,9 @@ export default class Support extends React.Component<ISupportProps, ISupportStat
this.collectLogPromise = collectPromise;
try {
- const reportPath = await collectPromise;
+ const reportId = await collectPromise;
return new Promise((resolve) => {
- this.setState({ savedReport: reportPath }, () => resolve(reportPath));
+ this.setState({ savedReportId: reportId }, () => resolve(reportId));
});
} catch (error) {
this.collectLogPromise = undefined;
@@ -216,8 +216,8 @@ export default class Support extends React.Component<ISupportProps, ISupportStat
this.setState({ sendState: SendState.sending }, async () => {
try {
const { email, message } = this.state;
- const reportPath = await this.collectLog();
- await this.props.sendProblemReport(email, message, reportPath);
+ const reportId = await this.collectLog();
+ await this.props.sendProblemReport(email, message, reportId);
this.props.clearReportForm();
this.setState({ sendState: SendState.success }, () => {
resolve();
diff --git a/gui/src/renderer/containers/SupportPage.tsx b/gui/src/renderer/containers/SupportPage.tsx
index 94053f1ccd..1df4827223 100644
--- a/gui/src/renderer/containers/SupportPage.tsx
+++ b/gui/src/renderer/containers/SupportPage.tsx
@@ -23,8 +23,8 @@ const mapDispatchToProps = (dispatch: ReduxDispatch, props: IAppContext & RouteC
onClose() {
props.history.goBack();
},
- viewLog(path: string) {
- consumePromise(props.app.openPath(path));
+ viewLog(id: string) {
+ consumePromise(props.app.viewLog(id));
},
saveReportForm,
clearReportForm,