mirror of
https://github.com/penpot/penpot.git
synced 2025-05-31 09:16:14 +02:00
🐛 Fix project files count not refreshing correctly after import
This commit is contained in:
parent
af10cf71db
commit
022d32cd44
5 changed files with 18 additions and 10 deletions
|
@ -27,6 +27,8 @@
|
||||||
- Remove change style on hover for options [Taiga #2172](https://tree.taiga.io/project/penpot/issue/2172)
|
- Remove change style on hover for options [Taiga #2172](https://tree.taiga.io/project/penpot/issue/2172)
|
||||||
- Fix problem in viewer with dropdowns when comments active [#1303](https://github.com/penpot/penpot/issues/1303)
|
- Fix problem in viewer with dropdowns when comments active [#1303](https://github.com/penpot/penpot/issues/1303)
|
||||||
- Add placeholder to create shareable link
|
- Add placeholder to create shareable link
|
||||||
|
- Fix project files count not refreshing correctly after import [Taiga #2216](https://tree.taiga.io/project/penpot/issue/2216)
|
||||||
|
- Remove button after import process finish [Taiga #2215](https://tree.taiga.io/project/penpot/issue/2215)
|
||||||
|
|
||||||
### :arrow_up: Deps updates
|
### :arrow_up: Deps updates
|
||||||
### :heart: Community contributions by (Thank you!)
|
### :heart: Community contributions by (Thank you!)
|
||||||
|
|
|
@ -187,10 +187,12 @@
|
||||||
(ptk/reify ::files-fetched
|
(ptk/reify ::files-fetched
|
||||||
ptk/UpdateEvent
|
ptk/UpdateEvent
|
||||||
(update [_ state]
|
(update [_ state]
|
||||||
(update state :dashboard-files
|
(-> state
|
||||||
|
(update :dashboard-files
|
||||||
(fn [state]
|
(fn [state]
|
||||||
(let [state (remove-project-files state)]
|
(let [state (remove-project-files state)]
|
||||||
(reduce #(assoc %1 (:id %2) %2) state files))))))))
|
(reduce #(assoc %1 (:id %2) %2) state files))))
|
||||||
|
(assoc-in [:dashboard-projects project-id :count] (count files)))))))
|
||||||
|
|
||||||
(defn fetch-files
|
(defn fetch-files
|
||||||
[{:keys [project-id] :as params}]
|
[{:keys [project-id] :as params}]
|
||||||
|
|
|
@ -331,10 +331,11 @@
|
||||||
|
|
||||||
[:div.modal-footer
|
[:div.modal-footer
|
||||||
[:div.action-buttons
|
[:div.action-buttons
|
||||||
|
(when (or (= :analyzing (:status @state)) pending-import?)
|
||||||
[:input.cancel-button
|
[:input.cancel-button
|
||||||
{:type "button"
|
{:type "button"
|
||||||
:value (tr "labels.cancel")
|
:value (tr "labels.cancel")
|
||||||
:on-click handle-cancel}]
|
:on-click handle-cancel}])
|
||||||
|
|
||||||
(when (= :analyzing (:status @state))
|
(when (= :analyzing (:status @state))
|
||||||
[:input.accept-button
|
[:input.accept-button
|
||||||
|
|
|
@ -98,7 +98,8 @@
|
||||||
on-import
|
on-import
|
||||||
(mf/use-callback
|
(mf/use-callback
|
||||||
(fn []
|
(fn []
|
||||||
(st/emit! (dd/fetch-recent-files)
|
(st/emit! (dd/fetch-files {:project-id (:id project)})
|
||||||
|
(dd/fetch-recent-files)
|
||||||
(dd/clear-selected-files))))]
|
(dd/clear-selected-files))))]
|
||||||
|
|
||||||
[:div.dashboard-project-row {:class (when first? "first")}
|
[:div.dashboard-project-row {:class (when first? "first")}
|
||||||
|
|
|
@ -356,7 +356,9 @@
|
||||||
|
|
||||||
on-finish-import
|
on-finish-import
|
||||||
(fn []
|
(fn []
|
||||||
(st/emit! (dd/fetch-recent-files)))
|
(st/emit! (dd/fetch-files {:project-id project-id})
|
||||||
|
(dd/fetch-recent-files)
|
||||||
|
(dd/clear-selected-files)))
|
||||||
|
|
||||||
open-import-modal
|
open-import-modal
|
||||||
(fn [file]
|
(fn [file]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue