From fa66ddde0f479393f95c6a7f47cfd9121609582f Mon Sep 17 00:00:00 2001 From: Josh Perez <60019601+josh-signal@users.noreply.github.com> Date: Wed, 6 Oct 2021 12:16:51 -0400 Subject: [PATCH] Context isolation for the debug log window --- _locales/en/messages.json | 22 +- about.html | 2 + app/main.ts | 21 +- debug_log.html | 49 +---- debug_log_preload.js | 41 ---- index.html | 33 --- js/debug_log_start.js | 37 ---- loading.html | 12 + package.json | 2 - permissions_popup.html | 2 + preload.js | 1 - screenShare.html | 2 + settings.html | 2 + stylesheets/_debugLog.scss | 90 -------- stylesheets/components/DebugLogWindow.scss | 74 +++++++ stylesheets/components/Lightbox.scss | 2 +- stylesheets/manifest.scss | 2 +- test/i18n_test.js | 2 +- ts/components/DebugLogWindow.stories.tsx | 32 +++ ts/components/DebugLogWindow.tsx | 207 +++++++++++++++++ ts/components/ToastDebugLogError.stories.tsx | 21 ++ ts/components/ToastDebugLogError.tsx | 18 ++ ts/logging/debuglogs.ts | 27 ++- ts/util/lint/exceptions.json | 220 ------------------- ts/views/debug_log_view.ts | 192 ---------------- ts/window.d.ts | 5 +- ts/windows/configure.ts | 1 + ts/windows/debuglog/preload.ts | 44 ++++ 28 files changed, 477 insertions(+), 686 deletions(-) delete mode 100644 debug_log_preload.js delete mode 100644 index.html delete mode 100644 js/debug_log_start.js delete mode 100644 stylesheets/_debugLog.scss create mode 100644 stylesheets/components/DebugLogWindow.scss create mode 100644 ts/components/DebugLogWindow.stories.tsx create mode 100644 ts/components/DebugLogWindow.tsx create mode 100644 ts/components/ToastDebugLogError.stories.tsx create mode 100644 ts/components/ToastDebugLogError.tsx delete mode 100644 ts/views/debug_log_view.ts create mode 100644 ts/windows/debuglog/preload.ts diff --git a/_locales/en/messages.json b/_locales/en/messages.json index 898e53955..2002fb526 100644 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -470,25 +470,33 @@ "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 examine and edit it before submitting." + "message": "This log will be posted publicly online for contributors to view. You may download the full log before submitting." }, "debugLogError": { - "message": "Something went wrong with the upload! Please consider manually adding your log to the bug you file." + "message": "Something went wrong with the upload! Please email support@signal.org and attach your log as a text file." + }, + "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.", + "description": "Explanation of next steps to take when submitting debug log" }, "debugLogCopy": { - "message": "Copy", + "message": "Copy Link", "description": "Shown as the text for the copy button on the debug log screen" }, - "debugLogCopyAlt": { - "message": "Copy link to your clipboard", - "description": "Shown as the alt text for the copy button on the debug log screen" + "debugLogSave": { + "message": "Download", + "description": "Shown as the text for the download button on the debug log screen" }, "debugLogLinkCopied": { "message": "Link Copied to Your Clipboard", "description": "Shown in a toast to let the user know that the link to the debug log has been copied to their clipboard" }, "reportIssue": { - "message": "Report an issue", + "message": "Contact Support", "description": "Link to open the issue tracker" }, "gotIt": { diff --git a/about.html b/about.html index 6e62b3d11..0b5a5f3a5 100644 --- a/about.html +++ b/about.html @@ -6,6 +6,8 @@ - -
- - - - - - + + + + +