🎉 Add metrics to new multi file import (#6610)

This commit is contained in:
Eva Marco 2025-06-03 15:48:22 +02:00 committed by GitHub
parent e9bd44b819
commit ddae0026fe
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -29,11 +29,11 @@
[rumext.v2 :as mf]))
(defn- on-stream-imported
[tokens-lib-stream]
[type tokens-lib-stream]
(rx/sub!
tokens-lib-stream
(fn [lib]
(st/emit! (ptk/data-event ::ev/event {::ev/name "import-tokens"})
(st/emit! (ptk/data-event ::ev/event {::ev/name "import-tokens" :type type})
(dwtl/import-tokens-lib lib))
(modal/hide!))
(fn [err]
@ -72,7 +72,7 @@
[(.-webkitRelativePath file)
file-text])))))
(dwti/import-directory-stream)
(on-stream-imported))
(on-stream-imported "multiple"))
(-> (mf/ref-val dir-input-ref)
(dom/set-value! "")))))
@ -85,7 +85,7 @@
(first))]
(->> (wapi/read-file-as-text file)
(dwti/import-file-stream (.-name file))
(on-stream-imported))
(on-stream-imported "single"))
(-> (mf/ref-val file-input-ref)
(dom/set-value! "")))))]