From 327b35324ea3a9ac2e80a403d8cb0e267ef1f8be Mon Sep 17 00:00:00 2001 From: ruoxijiang Date: Thu, 31 Dec 2020 09:54:20 +0800 Subject: [PATCH] DC-2647 UI user debugger window --- .../report-bug/lib/bug-report-root.jsx | 83 +++--- .../report-bug/lib/bug-report-sql-query.jsx | 95 +++++++ .../report-bug/lib/bug-report-store.es6 | 49 ++++ .../report-bug/styles/bug-report.less | 252 ++++++++++++------ app/src/flux/stores/database-store.es6 | 24 +- 5 files changed, 378 insertions(+), 125 deletions(-) create mode 100644 app/internal_packages/report-bug/lib/bug-report-sql-query.jsx create mode 100644 app/internal_packages/report-bug/lib/bug-report-store.es6 diff --git a/app/internal_packages/report-bug/lib/bug-report-root.jsx b/app/internal_packages/report-bug/lib/bug-report-root.jsx index 04a5353ca9..8e49d73214 100644 --- a/app/internal_packages/report-bug/lib/bug-report-root.jsx +++ b/app/internal_packages/report-bug/lib/bug-report-root.jsx @@ -3,6 +3,7 @@ import { ipcRenderer } from 'electron'; import uuid from 'uuid'; import { LottieImg } from 'mailspring-component-kit'; import { Actions } from 'mailspring-exports'; +import BugReportSqlQuery from './bug-report-sql-query'; export default class BugReportRoot extends React.PureComponent { static displayName = 'BugReportRoot'; static containerRequired = false; @@ -15,6 +16,7 @@ export default class BugReportRoot extends React.PureComponent { description: '', submitting: false, submitButtonText: 'Submit', + includeSqlQueryResults: false, }; this.logID = uuid(); this.mounted = false; @@ -106,6 +108,9 @@ export default class BugReportRoot extends React.PureComponent { onToggleUploadLogs = () => { this.setState({ uploadLogs: !this.state.uploadLogs }); }; + onToggleSQLQuery = () => { + this.setState({ includeSqlQueryResults: !this.state.includeSqlQueryResults }); + }; onToggleUploadScreenShots = () => { this.setState({ uploadScreenShots: !this.state.uploadScreenShots }); }; @@ -140,40 +145,58 @@ export default class BugReportRoot extends React.PureComponent { ); } + renderSqlQuery() { + if (this.state.includeSqlQueryResults) { + return ; + } + return null; + } render() { return ( -
-

Thank you for helping Edison Mail

-
- -