diff --git a/frontend/src/app/main/ui/dashboard/export.cljs b/frontend/src/app/main/ui/dashboard/export.cljs index 6b353dab9..5a1425ba6 100644 --- a/frontend/src/app/main/ui/dashboard/export.cljs +++ b/frontend/src/app/main/ui/dashboard/export.cljs @@ -7,7 +7,6 @@ (ns app.main.ui.dashboard.export (:require [app.common.data :as d] - [app.main.data.events :as ev] [app.main.data.modal :as modal] [app.main.store :as st] [app.main.ui.icons :as i] @@ -15,7 +14,6 @@ [app.util.dom :as dom] [app.util.i18n :as i18n :refer [tr]] [beicon.core :as rx] - [potok.core :as ptk] [rumext.alpha :as mf])) (def ^:const options [:all :merge :detach]) @@ -60,10 +58,6 @@ start-export (fn [] - (st/emit! (ptk/event ::ev/event {::ev/name "export-files" - :num-files (count (:files @state)) - :option @selected-option})) - (swap! state assoc :status :exporting) (->> (uw/ask-many! {:cmd :export-file diff --git a/frontend/src/app/main/ui/dashboard/file_menu.cljs b/frontend/src/app/main/ui/dashboard/file_menu.cljs index 28eff99bb..dba16d15b 100644 --- a/frontend/src/app/main/ui/dashboard/file_menu.cljs +++ b/frontend/src/app/main/ui/dashboard/file_menu.cljs @@ -162,6 +162,7 @@ (mf/deps files current-team-id) (fn [_] (st/emit! (ptk/event ::ev/event {::ev/name "export-files" + ::ev/origin "dashboard" :num-files (count files)})) (->> (rx/from files) (rx/flat-map diff --git a/frontend/src/app/main/ui/workspace/header.cljs b/frontend/src/app/main/ui/workspace/header.cljs index afbf84945..ca418b63f 100644 --- a/frontend/src/app/main/ui/workspace/header.cljs +++ b/frontend/src/app/main/ui/workspace/header.cljs @@ -9,6 +9,7 @@ [app.common.data :as d] [app.common.math :as mth] [app.config :as cf] + [app.main.data.events :as ev] [app.main.data.messages :as dm] [app.main.data.modal :as modal] [app.main.data.workspace :as dw] @@ -25,6 +26,7 @@ [app.util.router :as rt] [beicon.core :as rx] [okulary.core :as l] + [potok.core :as ptk] [rumext.alpha :as mf])) ;; --- Zoom Widget @@ -152,6 +154,10 @@ (mf/use-callback (mf/deps file team-id) (fn [_] + (st/emit! (ptk/event ::ev/event {::ev/name "export-files" + ::ev/origin "workspace" + :num-files 1})) + (->> (rx/of file) (rx/flat-map (fn [file] @@ -251,7 +257,7 @@ (tr "workspace.header.menu.hide-palette") (tr "workspace.header.menu.show-palette"))] [:span.shortcut (sc/get-tooltip :toggle-palette)]] - + [:li {:on-click #(st/emit! (dw/toggle-layout-flags :display-artboard-names))} [:span (if (contains? layout :display-artboard-names)