mirror of
https://github.com/penpot/penpot.git
synced 2025-02-09 16:48:16 -05:00
commit
d679001955
6 changed files with 44 additions and 16 deletions
|
@ -9,12 +9,14 @@
|
||||||
### :heart: Community contributions (Thank you!)
|
### :heart: Community contributions (Thank you!)
|
||||||
|
|
||||||
### :sparkles: New features
|
### :sparkles: New features
|
||||||
- Improve auth process [Taiga #7094](https://tree.taiga.io/project/penpot/us/7094)
|
- Improve auth process [Taiga #Change Auth Process](https://tree.taiga.io/project/penpot/us/7094)
|
||||||
- Add locking degrees increment (hold shift) on path edition [Taiga #7761](https://tree.taiga.io/project/penpot/issue/7761)
|
- Add locking degrees increment (hold shift) on path edition [Taiga #7761](https://tree.taiga.io/project/penpot/issue/7761)
|
||||||
|
- Allow library colors as recent colors [Taiga issue #7640](https://tree.taiga.io/project/penpot/issue/7640)
|
||||||
|
|
||||||
### :bug: Bugs fixed
|
### :bug: Bugs fixed
|
||||||
|
|
||||||
- Layout and scrollign fixes for the bottom palette [Taiga Issue #7559](https://tree.taiga.io/project/penpot/issue/7559)
|
- Layout and scrollign fixes for the bottom palette [Taiga Issue #7559](https://tree.taiga.io/project/penpot/issue/7559)
|
||||||
|
- Fix expand libraries when search results are present [Taiga issue #7876](https://tree.taiga.io/project/penpot/issue/7876)
|
||||||
|
|
||||||
## 2.0.3
|
## 2.0.3
|
||||||
|
|
||||||
|
|
|
@ -300,13 +300,4 @@
|
||||||
[:& lk/link {:action go-register
|
[:& lk/link {:action go-register
|
||||||
:class (stl/css :register-link)
|
:class (stl/css :register-link)
|
||||||
:data-test "register-submit"}
|
:data-test "register-submit"}
|
||||||
(tr "auth.register-submit")]])
|
(tr "auth.register-submit")]])]]))
|
||||||
|
|
||||||
(when (contains? cf/flags :demo-users)
|
|
||||||
[:div {:class (stl/css :demo-account)}
|
|
||||||
[:span {:class (stl/css :demo-account-text)}
|
|
||||||
(tr "auth.create-demo-profile") " "]
|
|
||||||
[:& lk/link {:action create-demo-profile
|
|
||||||
:class (stl/css :demo-account-link)
|
|
||||||
:data-test "demo-account-link"}
|
|
||||||
(tr "auth.create-demo-account")]])]]))
|
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
(:require
|
(:require
|
||||||
[app.common.data.macros :as dm]
|
[app.common.data.macros :as dm]
|
||||||
[app.main.data.workspace.colors :as mdc]
|
[app.main.data.workspace.colors :as mdc]
|
||||||
|
[app.main.data.workspace.libraries :as dwl]
|
||||||
[app.main.refs :as refs]
|
[app.main.refs :as refs]
|
||||||
[app.main.store :as st]
|
[app.main.store :as st]
|
||||||
[app.main.ui.components.color-bullet :as cb]
|
[app.main.ui.components.color-bullet :as cb]
|
||||||
|
@ -24,7 +25,9 @@
|
||||||
{::mf/wrap [mf/memo]}
|
{::mf/wrap [mf/memo]}
|
||||||
[{:keys [color size]}]
|
[{:keys [color size]}]
|
||||||
(letfn [(select-color [event]
|
(letfn [(select-color [event]
|
||||||
(st/emit! (mdc/apply-color-from-palette color (kbd/alt? event))))]
|
(st/emit!
|
||||||
|
(dwl/add-recent-color color)
|
||||||
|
(mdc/apply-color-from-palette color (kbd/alt? event))))]
|
||||||
[:div {:class (stl/css-case :color-cell true
|
[:div {:class (stl/css-case :color-cell true
|
||||||
:is-not-library-color (nil? (:id color))
|
:is-not-library-color (nil? (:id color))
|
||||||
:no-text (<= size 64))
|
:no-text (<= size 64))
|
||||||
|
|
|
@ -168,7 +168,9 @@
|
||||||
(if (and (some? (:color color)) (some? (:gradient data)))
|
(if (and (some? (:color color)) (some? (:gradient data)))
|
||||||
(handle-change-color {:hex (:color color) :alpha (:opacity color)})
|
(handle-change-color {:hex (:color color) :alpha (:opacity color)})
|
||||||
(do
|
(do
|
||||||
(st/emit! (dc/apply-color-from-colorpicker color))
|
(st/emit!
|
||||||
|
(dwl/add-recent-color color)
|
||||||
|
(dc/apply-color-from-colorpicker color))
|
||||||
(on-change color)))))
|
(on-change color)))))
|
||||||
|
|
||||||
on-add-library-color
|
on-add-library-color
|
||||||
|
|
|
@ -68,7 +68,9 @@
|
||||||
(mf/use-fn
|
(mf/use-fn
|
||||||
(mf/deps color)
|
(mf/deps color)
|
||||||
(fn [event]
|
(fn [event]
|
||||||
(st/emit! (dc/apply-color-from-palette (merge uc/empty-color color) (kbd/alt? event)))))
|
(st/emit!
|
||||||
|
(dwl/add-recent-color color)
|
||||||
|
(dc/apply-color-from-palette (merge uc/empty-color color) (kbd/alt? event)))))
|
||||||
|
|
||||||
rename-color
|
rename-color
|
||||||
(mf/use-fn
|
(mf/use-fn
|
||||||
|
@ -183,7 +185,9 @@
|
||||||
on-click
|
on-click
|
||||||
(mf/use-fn
|
(mf/use-fn
|
||||||
(mf/deps color-id apply-color on-asset-click)
|
(mf/deps color-id apply-color on-asset-click)
|
||||||
(partial on-asset-click color-id apply-color))]
|
(do
|
||||||
|
(dwl/add-recent-color color)
|
||||||
|
(partial on-asset-click color-id apply-color)))]
|
||||||
|
|
||||||
(mf/with-effect [editing?]
|
(mf/with-effect [editing?]
|
||||||
(when editing?
|
(when editing?
|
||||||
|
|
|
@ -294,7 +294,30 @@
|
||||||
[:span {:class (stl/css :no-found-text)}
|
[:span {:class (stl/css :no-found-text)}
|
||||||
(tr "workspace.assets.not-found")]])]))
|
(tr "workspace.assets.not-found")]])]))
|
||||||
|
|
||||||
|
(defn- force-lib-open? [file-id filters]
|
||||||
|
(let [library-ref (mf/with-memo [file-id]
|
||||||
|
(create-file-library-ref file-id))
|
||||||
|
library (mf/deref library-ref)
|
||||||
|
|
||||||
|
colors (:colors library)
|
||||||
|
components (:components library)
|
||||||
|
media (:media library)
|
||||||
|
typographies (:typographies library)
|
||||||
|
|
||||||
|
filtered-colors (mf/with-memo [filters colors]
|
||||||
|
(cmm/apply-filters colors filters))
|
||||||
|
filtered-components (mf/with-memo [filters components]
|
||||||
|
(cmm/apply-filters components filters))
|
||||||
|
filtered-media (mf/with-memo [filters media]
|
||||||
|
(cmm/apply-filters media filters))
|
||||||
|
filtered-typographies (mf/with-memo [filters typographies]
|
||||||
|
(cmm/apply-filters typographies filters))
|
||||||
|
|
||||||
|
filters-term (:term filters)
|
||||||
|
has-term? (not (str/blank? filters-term))]
|
||||||
|
(and has-term?
|
||||||
|
(some pos? (map count [filtered-components filtered-colors filtered-media filtered-typographies]))
|
||||||
|
(some #(> 60 (count %)) [filtered-components filtered-colors filtered-media filtered-typographies]))))
|
||||||
(mf/defc file-library
|
(mf/defc file-library
|
||||||
{::mf/wrap-props false}
|
{::mf/wrap-props false}
|
||||||
[{:keys [file local? default-open? filters]}]
|
[{:keys [file local? default-open? filters]}]
|
||||||
|
@ -308,7 +331,10 @@
|
||||||
(-> (l/key file-id)
|
(-> (l/key file-id)
|
||||||
(l/derived lens:open-status)))
|
(l/derived lens:open-status)))
|
||||||
open-status (mf/deref open-status-ref)
|
open-status (mf/deref open-status-ref)
|
||||||
open? (d/nilv (:library open-status) default-open?)
|
force-open-lib? (force-lib-open? file-id filters)
|
||||||
|
|
||||||
|
open? (or force-open-lib?
|
||||||
|
(d/nilv (:library open-status) default-open?))
|
||||||
|
|
||||||
unselect-all
|
unselect-all
|
||||||
(mf/use-fn
|
(mf/use-fn
|
||||||
|
|
Loading…
Add table
Reference in a new issue