mirror of
https://github.com/penpot/penpot.git
synced 2025-06-10 15:41:38 +02:00
Merge pull request #3459 from penpot/niwinz-staging-bugfixes
🐛 Bugfixes & Enhancements
This commit is contained in:
commit
17798dbf40
7 changed files with 31 additions and 24 deletions
|
@ -10,7 +10,6 @@
|
|||
[app.common.data.macros :as dm]
|
||||
[app.common.pages :as cp]
|
||||
[app.common.schema :as sm]
|
||||
[app.common.time :as dt]
|
||||
[app.common.uri :as u]
|
||||
[app.common.uuid :as uuid]
|
||||
[app.config :as cf]
|
||||
|
@ -23,6 +22,7 @@
|
|||
[app.util.dom :as dom]
|
||||
[app.util.i18n :as i18n :refer [tr]]
|
||||
[app.util.router :as rt]
|
||||
[app.util.time :as dt]
|
||||
[app.util.timers :as tm]
|
||||
[app.util.webapi :as wapi]
|
||||
[beicon.core :as rx]
|
||||
|
@ -863,6 +863,7 @@
|
|||
[{:keys [ids project-id] :as params}]
|
||||
(dm/assert! (sm/set-of-uuid? ids))
|
||||
(dm/assert! (uuid? project-id))
|
||||
|
||||
(ptk/reify ::move-files
|
||||
IDeref
|
||||
(-deref [_]
|
||||
|
@ -872,13 +873,13 @@
|
|||
ptk/UpdateEvent
|
||||
(update [_ state]
|
||||
(let [origin-project (get-in state [:dashboard-files (first ids) :project-id])
|
||||
update-project (fn [project]
|
||||
update-project (fn [project delta]
|
||||
(-> project
|
||||
(update :count #(+ % (count ids)))
|
||||
(assoc :modified-at (dt/now))))]
|
||||
(assoc :modified-at (dt/plus (dt/now) {:milliseconds delta}))))]
|
||||
(-> state
|
||||
(d/update-in-when [:dashboard-projects origin-project] update-project)
|
||||
(d/update-in-when [:dashboard-projects project-id] update-project))))
|
||||
(d/update-in-when [:dashboard-projects origin-project] update-project 0)
|
||||
(d/update-in-when [:dashboard-projects project-id] update-project 10))))
|
||||
|
||||
ptk/WatchEvent
|
||||
(watch [_ _ _]
|
||||
|
|
|
@ -296,10 +296,9 @@
|
|||
:on-import on-import}]
|
||||
|
||||
[:span.info (str (tr "labels.num-of-files" (i18n/c file-count)))]
|
||||
(when (> file-count 0)
|
||||
(let [time (-> (:modified-at project)
|
||||
(dt/timeago {:locale locale}))]
|
||||
[:span.recent-files-row-title-info (str ", " time)]))
|
||||
(let [time (-> (:modified-at project)
|
||||
(dt/timeago {:locale locale}))]
|
||||
[:span.recent-files-row-title-info (str ", " time)])
|
||||
[:div.project-actions
|
||||
(when-not (:is-default project)
|
||||
[:button.pin-icon.tooltip.tooltip-bottom
|
||||
|
|
|
@ -150,8 +150,9 @@
|
|||
(mf/defc templates-section
|
||||
{::mf/wrap-props false}
|
||||
[{:keys [default-project-id profile project-id team-id content-width]}]
|
||||
(let [templates (->> (mf/deref builtin-templates)
|
||||
(filter #(not= (:id %) "tutorial-for-beginners")))
|
||||
(let [templates (mf/deref builtin-templates)
|
||||
templates (mf/with-memo [templates]
|
||||
(filterv #(not= (:id %) "tutorial-for-beginners") templates))
|
||||
|
||||
route (mf/deref refs/route)
|
||||
route-name (get-in route [:data :name])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue