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 @@ - - - - - - - - + +
+ + + diff --git a/debug_log_preload.js b/debug_log_preload.js deleted file mode 100644 index d4caee2dd..000000000 --- a/debug_log_preload.js +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2018-2021 Signal Messenger, LLC -// SPDX-License-Identifier: AGPL-3.0-only - -/* global window */ - -const { ipcRenderer } = require('electron'); -const url = require('url'); - -// It is important to call this as early as possible -require('./ts/windows/context'); - -const { setupI18n } = require('./ts/util/setupI18n'); -const { createSetting } = require('./ts/util/preload'); -const { - getEnvironment, - setEnvironment, - parseEnvironment, -} = require('./ts/environment'); - -const config = url.parse(window.location.toString(), true).query; -const { locale } = config; -const localeMessages = ipcRenderer.sendSync('locale-data'); -setEnvironment(parseEnvironment(config.environment)); - -window.getVersion = () => config.version; -window.themeSetting = createSetting('themeSetting', { setter: false }); -window.i18n = setupI18n(locale, localeMessages); - -// got.js appears to need this to successfully submit debug logs to the cloud -window.nodeSetImmediate = setImmediate; - -window.getNodeVersion = () => config.node_version; -window.getEnvironment = getEnvironment; - -window.Backbone = require('backbone'); -require('./ts/backbone/views/whisper_view'); -require('./ts/logging/set_up_renderer_logging').initialize(); -require('./ts/views/debug_log_view'); - -window.closeDebugLog = () => ipcRenderer.send('close-debug-log'); -window.Backbone = require('backbone'); diff --git a/index.html b/index.html deleted file mode 100644 index 71b6e377f..000000000 --- a/index.html +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - Signal - - - - - - -
-
- -
- - - -
-
-
-
- - - diff --git a/js/debug_log_start.js b/js/debug_log_start.js deleted file mode 100644 index 35692ece2..000000000 --- a/js/debug_log_start.js +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright 2018-2020 Signal Messenger, LLC -// SPDX-License-Identifier: AGPL-3.0-only - -/* global $: false */ - -$(document).on('keydown', e => { - if (e.keyCode === 27) { - window.closeDebugLog(); - } -}); - -const $body = $(document.body); - -async function applyTheme() { - const theme = await window.themeSetting.getValue(); - document.body.classList.remove('light-theme'); - document.body.classList.remove('dark-theme'); - document.body.classList.add( - `${ - theme === 'system' - ? window.SignalContext.nativeThemeListener.getSystemTheme() - : theme - }-theme` - ); -} - -applyTheme(); - -window.SignalContext.nativeThemeListener.subscribe(() => { - applyTheme(); -}); - -// got.js appears to need this to successfully submit debug logs to the cloud -window.setImmediate = window.nodeSetImmediate; - -window.view = new window.Whisper.DebugLogView(); -window.view.$el.appendTo($body); diff --git a/loading.html b/loading.html index 67762c5f5..9c5273425 100644 --- a/loading.html +++ b/loading.html @@ -4,6 +4,18 @@ + +
+
{i18n('debugLogSuccess')}
+

+ {i18n('debugLogSuccessNextSteps')} +

+
+
+ +
+
+ + +
+ {toastElement} + + ); + } + + const canSubmit = Boolean(logText) && loadState !== LoadState.Submitting; + const canSave = Boolean(logText); + const isLoading = + loadState === LoadState.Started || loadState === LoadState.Submitting; + + return ( +
+
+
{i18n('submitDebugLog')}
+

+ {i18n('debugLogExplanation')} +

+
+
+ {isLoading ? ( + + ) : ( +