Add bright yellow text when tracing is not enabled.

This commit is contained in:
Daniel Compton 2017-11-22 15:02:52 +13:00
parent 629406291f
commit 39d29f6252
2 changed files with 7 additions and 0 deletions

View File

@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. This change
## [Unreleased] ## [Unreleased]
### Added
* Bright yellow text when re-frame trace is preloaded, but tracing is not enabled.
## [0.1.12] - 2017-11-16 ## [0.1.12] - 2017-11-16
### Added ### Added

View File

@ -5,6 +5,7 @@
[day8.re-frame.trace.panels.subvis :as subvis] [day8.re-frame.trace.panels.subvis :as subvis]
[day8.re-frame.trace.panels.traces :as traces] [day8.re-frame.trace.panels.traces :as traces]
[day8.re-frame.trace.panels.subs :as subs] [day8.re-frame.trace.panels.subs :as subs]
[re-frame.trace]
[reagent.core :as r])) [reagent.core :as r]))
(defn tab-button [panel-id title] (defn tab-button [panel-id title]
@ -21,6 +22,8 @@
{:style {:width "100%" :display "flex" :flex-direction "column"}} {:style {:width "100%" :display "flex" :flex-direction "column"}}
(when (and external-window? @unloading?) (when (and external-window? @unloading?)
[:h1.host-closed "Host window has closed. Reopen external window to continue tracing."]) [:h1.host-closed "Host window has closed. Reopen external window to continue tracing."])
(when-not (re-frame.trace/is-trace-enabled?)
[:h1.host-closed {:style {:word-wrap "break-word"}} "Tracing is not enabled. Please set " [:pre "{\"re_frame.trace.trace_enabled_QMARK_\" true}"] " in " [:pre ":closure-defines"]])
[:div.panel-content-top [:div.panel-content-top
[:div.nav [:div.nav
(tab-button :traces "Traces") (tab-button :traces "Traces")