diff --git a/debug_log.html b/debug_log.html index 0b2869fd612a..fb5d01cfb622 100644 --- a/debug_log.html +++ b/debug_log.html @@ -30,7 +30,7 @@
{{ debugLogExplanation }}
- + diff --git a/js/views/debug_log_view.js b/js/views/debug_log_view.js index 80defbb6e1b6..c4b737679ad7 100644 --- a/js/views/debug_log_view.js +++ b/js/views/debug_log_view.js @@ -8,6 +8,22 @@ (function () { window.Whisper = window.Whisper || {}; + // This enum-like object describes the load state of `DebugLogView`. It's designed to be + // unidirectional; `NotStarted` → `Started` → `LogsFetchedButNotInTextarea`, etc. + const LoadState = { + NotStarted: 0, + Started: 1, + LogsFetchedButNotInTextarea: 2, + PuttingLogsInTextarea: 3, + LogsInTextarea: 4, + }; + + Whisper.LoadingFullLogsToast = Whisper.ToastView.extend({ + render_attributes() { + return { toastMessage: i18n('loading') }; + }, + }); + Whisper.LinkedCopiedToast = Whisper.ToastView.extend({ render_attributes() { return { toastMessage: i18n('debugLogLinkCopied') }; @@ -36,19 +52,40 @@ Whisper.ToastView.show(Whisper.LinkedCopiedToast, document.body); }, }); + + /** + * The bulk of the logic in this view involves grabbing the logs from disk and putting + * them in a `