mirror of
https://github.com/penpot/penpot.git
synced 2025-01-23 23:18:48 -05:00
Merge remote-tracking branch 'origin/develop' into develop
This commit is contained in:
commit
1709f84a14
5 changed files with 52 additions and 15 deletions
|
@ -39,6 +39,7 @@
|
|||
goolge and reduces the amount of request sent to google)
|
||||
- Set smooth/instant autoscroll depending on distance [GitHub #3377](https://github.com/penpot/penpot/issues/3377)
|
||||
- New component icon [Taiga #5290](https://tree.taiga.io/project/penpot/us/5290)
|
||||
- Show a confirmation dialog when an user tries to publish an empty library [Taiga #5294](https://tree.taiga.io/project/penpot/us/5294)
|
||||
|
||||
### :bug: Bugs fixed
|
||||
|
||||
|
|
|
@ -444,7 +444,8 @@
|
|||
library-data
|
||||
position
|
||||
(dm/get-in file-data [:options :components-v2])
|
||||
{:main-instance true})
|
||||
{:main-instance? true
|
||||
:keep-ids? true})
|
||||
|
||||
main-instance-shapes
|
||||
(map #(cond-> %
|
||||
|
|
|
@ -46,21 +46,22 @@
|
|||
|
||||
(defn- describe-library
|
||||
[components-count graphics-count colors-count typography-count]
|
||||
(str
|
||||
(str/join " · "
|
||||
(cond-> []
|
||||
(pos? components-count)
|
||||
(conj (tr "workspace.libraries.components" components-count))
|
||||
(let [all-zero? (and (zero? components-count) (zero? graphics-count) (zero? colors-count) (zero? typography-count))]
|
||||
(str
|
||||
(str/join " · "
|
||||
(cond-> []
|
||||
(or all-zero? (pos? components-count))
|
||||
(conj (tr "workspace.libraries.components" components-count))
|
||||
|
||||
(pos? graphics-count)
|
||||
(conj (tr "workspace.libraries.graphics" graphics-count))
|
||||
(or all-zero? (pos? graphics-count))
|
||||
(conj (tr "workspace.libraries.graphics" graphics-count))
|
||||
|
||||
(pos? colors-count)
|
||||
(conj (tr "workspace.libraries.colors" colors-count))
|
||||
(or all-zero? (pos? colors-count))
|
||||
(conj (tr "workspace.libraries.colors" colors-count))
|
||||
|
||||
(pos? typography-count)
|
||||
(conj (tr "workspace.libraries.typography" typography-count))))
|
||||
"\u00A0"))
|
||||
(or all-zero? (pos? typography-count))
|
||||
(conj (tr "workspace.libraries.typography" typography-count))))
|
||||
"\u00A0")))
|
||||
|
||||
(mf/defc describe-library-blocks
|
||||
[{:keys [components-count graphics-count colors-count typography-count] :as props}]
|
||||
|
@ -125,6 +126,12 @@
|
|||
media (:media library)
|
||||
typographies (:typographies library)
|
||||
|
||||
empty-library? (and
|
||||
(zero? (count colors))
|
||||
(zero? (count components))
|
||||
(zero? (count media))
|
||||
(zero? (count typographies)))
|
||||
|
||||
shared-libraries
|
||||
(mf/with-memo [shared-libraries linked-libraries file-id search-term]
|
||||
(->> shared-libraries
|
||||
|
@ -191,8 +198,18 @@
|
|||
(mf/use-fn
|
||||
(mf/deps file-id)
|
||||
(fn [event]
|
||||
(let [input-node (dom/event->target event)]
|
||||
(st/emit! (dwl/set-file-shared file-id true))
|
||||
(let [input-node (dom/event->target event)
|
||||
publish-library #(st/emit! (dwl/set-file-shared file-id true))
|
||||
cancel-publish #(st/emit! (modal/show :libraries-dialog {}))]
|
||||
(if empty-library?
|
||||
(st/emit! (modal/show
|
||||
{:type :confirm
|
||||
:title (tr "modals.publish-empty-library.title")
|
||||
:message (tr "modals.publish-empty-library.message")
|
||||
:accept-label (tr "modals.publish-empty-library.accept")
|
||||
:on-accept publish-library
|
||||
:on-cancel cancel-publish}))
|
||||
(publish-library))
|
||||
(dom/blur! input-node))))
|
||||
|
||||
unpublish
|
||||
|
|
|
@ -2142,6 +2142,15 @@ msgstr "Are you sure you want to delete this annotation?"
|
|||
msgid "modals.delete-component-annotation.title"
|
||||
msgstr "Delete annotation"
|
||||
|
||||
msgid "modals.publish-empty-library.title"
|
||||
msgstr "Publish empty library"
|
||||
|
||||
msgid "modals.publish-empty-library.message"
|
||||
msgstr "Your library is empty. Are you sure you want to publish it?"
|
||||
|
||||
msgid "modals.publish-empty-library.accept"
|
||||
msgstr "Publish"
|
||||
|
||||
#: src/app/main/ui/dashboard/team.cljs
|
||||
msgid "notifications.invitation-email-sent"
|
||||
msgstr "Invitation sent successfully"
|
||||
|
|
|
@ -2208,6 +2208,15 @@ msgstr "¿Seguro que quieres borrar esta nota?"
|
|||
msgid "modals.delete-component-annotation.title"
|
||||
msgstr "Borrar nota"
|
||||
|
||||
msgid "modals.publish-empty-library.title"
|
||||
msgstr "Publicar biblioteca vacía"
|
||||
|
||||
msgid "modals.publish-empty-library.message"
|
||||
msgstr "Tu biblioteca está vacía. ¿Seguro que quieres publicarla?"
|
||||
|
||||
msgid "modals.publish-empty-library.accept"
|
||||
msgstr "Publicar"
|
||||
|
||||
#: src/app/main/ui/dashboard/team.cljs
|
||||
msgid "notifications.invitation-email-sent"
|
||||
msgstr "Invitación enviada con éxito"
|
||||
|
|
Loading…
Add table
Reference in a new issue