diff --git a/frontend/resources/styles/main/partials/sidebar-document-history.scss b/frontend/resources/styles/main/partials/sidebar-document-history.scss index f7fc042886..02d786450b 100644 --- a/frontend/resources/styles/main/partials/sidebar-document-history.scss +++ b/frontend/resources/styles/main/partials/sidebar-document-history.scss @@ -4,6 +4,16 @@ // // Copyright (c) KALEIDOS INC +.history-debug-overlay { + background: $color-gray-50; + bottom: 0; + max-height: 500px; + overflow-y: auto; + position: absolute; + width: 500px; + z-index: 1000; +} + .history-toolbox { display: flex; flex-direction: column; diff --git a/frontend/src/app/main/data/workspace.cljs b/frontend/src/app/main/data/workspace.cljs index 6ce0e0e0be..2dca29d370 100644 --- a/frontend/src/app/main/data/workspace.cljs +++ b/frontend/src/app/main/data/workspace.cljs @@ -1969,3 +1969,6 @@ (dm/export dwv/update-viewport-size) (dm/export dwv/start-panning) (dm/export dwv/finish-panning) + +;; Undo +(dm/export dwu/reinitialize-undo) diff --git a/frontend/src/app/main/ui/workspace.cljs b/frontend/src/app/main/ui/workspace.cljs index 93193089c6..8aba4efbb1 100644 --- a/frontend/src/app/main/ui/workspace.cljs +++ b/frontend/src/app/main/ui/workspace.cljs @@ -27,6 +27,7 @@ [app.main.ui.workspace.libraries] [app.main.ui.workspace.nudge] [app.main.ui.workspace.sidebar :refer [left-sidebar right-sidebar]] + [app.main.ui.workspace.sidebar.history :refer [history-toolbox]] [app.main.ui.workspace.textpalette :refer [textpalette]] [app.main.ui.workspace.viewport :refer [viewport]] [app.util.dom :as dom] @@ -72,6 +73,10 @@ (when (debug? :coordinates) [:& coordinates/coordinates {:colorpalette? colorpalette?}]) + (when (debug? :history-overlay) + [:div.history-debug-overlay + [:button {:on-click #(st/emit! dw/reinitialize-undo)} "CLEAR"] + [:& history-toolbox]]) [:& viewport {:file file :wlocal wlocal :wglobal wglobal