mirror of
https://github.com/penpot/penpot.git
synced 2025-05-21 11:36:11 +02:00
Merge remote-tracking branch 'origin/staging' into develop
This commit is contained in:
commit
56cf7064f5
16 changed files with 69 additions and 122 deletions
|
@ -426,8 +426,8 @@
|
|||
(rx/ignore)))))
|
||||
|
||||
(defn update-team-photo
|
||||
[{:keys [file] :as params}]
|
||||
(us/assert! ::di/file file)
|
||||
[file]
|
||||
(us/assert! ::di/blob file)
|
||||
(ptk/reify ::update-team-photo
|
||||
ptk/WatchEvent
|
||||
(watch [_ state _]
|
||||
|
|
|
@ -56,14 +56,17 @@
|
|||
{:layout :grid})
|
||||
|
||||
(defn get-layout-initializer
|
||||
[type]
|
||||
[type from-frame?]
|
||||
(let [initial-layout-data (if (= type :flex) initial-flex-layout initial-grid-layout)]
|
||||
(fn [shape]
|
||||
(-> shape
|
||||
(merge shape initial-layout-data)))))
|
||||
(merge initial-layout-data)
|
||||
;; If the original shape is not a frame we set clip content and show-viewer to false
|
||||
(cond-> (not from-frame?)
|
||||
(assoc :show-content true :hide-in-viewer true))))))
|
||||
|
||||
(defn create-layout-from-id
|
||||
[ids type]
|
||||
[ids type from-frame?]
|
||||
(ptk/reify ::create-layout-from-id
|
||||
ptk/WatchEvent
|
||||
(watch [_ state _]
|
||||
|
@ -71,7 +74,7 @@
|
|||
children-ids (into [] (mapcat #(get-in objects [% :shapes])) ids)
|
||||
undo-id (js/Symbol)]
|
||||
(rx/of (dwu/start-undo-transaction undo-id)
|
||||
(dwc/update-shapes ids (get-layout-initializer type))
|
||||
(dwc/update-shapes ids (get-layout-initializer type from-frame?))
|
||||
(ptk/data-event :layout/update ids)
|
||||
(dwc/update-shapes children-ids #(dissoc % :constraints-h :constraints-v))
|
||||
(dwu/commit-undo-transaction undo-id))))))
|
||||
|
@ -173,7 +176,7 @@
|
|||
(dws/create-artboard-from-selection new-shape-id parent-id group-index)
|
||||
(cl/remove-all-fills [new-shape-id] {:color clr/black
|
||||
:opacity 1})
|
||||
(create-layout-from-id [new-shape-id] type)
|
||||
(create-layout-from-id [new-shape-id] type false)
|
||||
(dwc/update-shapes
|
||||
[new-shape-id]
|
||||
(fn [shape]
|
||||
|
@ -193,7 +196,7 @@
|
|||
(dws/create-artboard-from-selection new-shape-id)
|
||||
(cl/remove-all-fills [new-shape-id] {:color clr/black
|
||||
:opacity 1})
|
||||
(create-layout-from-id [new-shape-id] type)
|
||||
(create-layout-from-id [new-shape-id] type false)
|
||||
(dwc/update-shapes
|
||||
[new-shape-id]
|
||||
(fn [shape]
|
||||
|
@ -233,7 +236,7 @@
|
|||
(if (and single? is-frame?)
|
||||
(rx/of
|
||||
(dwu/start-undo-transaction undo-id)
|
||||
(create-layout-from-id [(first selected)] :flex)
|
||||
(create-layout-from-id [(first selected)] :flex true)
|
||||
(dwu/commit-undo-transaction undo-id))
|
||||
(rx/of
|
||||
(dwu/start-undo-transaction undo-id)
|
||||
|
|
|
@ -252,9 +252,9 @@
|
|||
[:span
|
||||
(tr "auth.terms-privacy-agreement")
|
||||
[:div
|
||||
[:a {:href "https://penpot.app/terms.html" :target "_blank"} (tr "auth.terms-of-service")]
|
||||
[:a {:href "https://penpot.app/terms" :target "_blank"} (tr "auth.terms-of-service")]
|
||||
[:span ",\u00A0"]
|
||||
[:a {:href "https://penpot.app/privacy.html" :target "_blank"} (tr "auth.privacy-policy")]]]]])
|
||||
[:a {:href "https://penpot.app/privacy" :target "_blank"} (tr "auth.privacy-policy")]]]]])
|
||||
|
||||
[:& fm/submit-button
|
||||
{:label (tr "auth.register-submit")
|
||||
|
|
|
@ -169,7 +169,7 @@
|
|||
[:div.template-card
|
||||
[:div.img-container
|
||||
[:a {:tab-index "0"
|
||||
:href "https://penpot.app/libraries-templates.html" :target "_blank" :on-click handle-template-link}
|
||||
:href "https://penpot.app/libraries-templates" :target "_blank" :on-click handle-template-link}
|
||||
[:div.template-link
|
||||
[:div.template-link-title (tr "dashboard.libraries-and-templates")]
|
||||
[:div.template-link-text (tr "dashboard.libraries-and-templates.explore")]]]]]]]
|
||||
|
|
|
@ -746,10 +746,10 @@
|
|||
[:li.separator {:tab-index (if show
|
||||
"0"
|
||||
"-1")
|
||||
:on-click #(dom/open-new-window "https://penpot.app/libraries-templates.html")
|
||||
:on-click #(dom/open-new-window "https://penpot.app/libraries-templates")
|
||||
:on-key-down (fn [event]
|
||||
(when (kbd/enter? event)
|
||||
(dom/open-new-window "https://penpot.app/libraries-templates.html")))
|
||||
(dom/open-new-window "https://penpot.app/libraries-templates")))
|
||||
:data-test "libraries-templates-profile-opt"}
|
||||
[:span.text (tr "labels.libraries-and-templates")]]
|
||||
[:li {:tab-index (if show
|
||||
|
@ -763,10 +763,10 @@
|
|||
[:li {:tab-index (if show
|
||||
"0"
|
||||
"-1")
|
||||
:on-click #(dom/open-new-window "https://penpot.app/terms.html")
|
||||
:on-click #(dom/open-new-window "https://penpot.app/terms")
|
||||
:on-key-down (fn [event]
|
||||
(when (kbd/enter? event)
|
||||
(dom/open-new-window "https://penpot.app/terms.html")))}
|
||||
(dom/open-new-window "https://penpot.app/terms")))}
|
||||
[:span (tr "auth.terms-of-service")]]
|
||||
|
||||
(when (contains? @cf/flags :user-feedback)
|
||||
|
|
|
@ -888,7 +888,7 @@
|
|||
|
||||
on-file-selected
|
||||
(fn [file]
|
||||
(st/emit! (dd/update-team-photo {:file file})))]
|
||||
(st/emit! (dd/update-team-photo file)))]
|
||||
|
||||
|
||||
(mf/use-effect
|
||||
|
|
|
@ -52,7 +52,7 @@
|
|||
:id "newsletter-news"
|
||||
:on-change #(toggle newsletter-news)}]
|
||||
[:label {:for "newsletter-news"} (tr "onboarding-v2.newsletter.news")]]]
|
||||
[:p (tr "onboarding-v2.newsletter.privacy1") [:a {:target "_blank" :href "https://penpot.app/privacy.html"} (tr "onboarding.newsletter.policy")]]
|
||||
[:p (tr "onboarding-v2.newsletter.privacy1") [:a {:target "_blank" :href "https://penpot.app/privacy"} (tr "onboarding.newsletter.policy")]]
|
||||
[:p (tr "onboarding-v2.newsletter.privacy2")]]
|
||||
[:div.modal-footer
|
||||
[:button.btn-primary {:on-click accept} (tr "labels.continue")]]
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
[:div.modal-content
|
||||
[:p "Penpot’s officially beta!"]
|
||||
[:p "We carefully analyzed everything important to us before taking this step. And now we’re ready to move forward onto the beta version. Have a play around if you haven’t yet."]
|
||||
[:a {:href "https://penpot.app/why-beta.html" :target "_blank"} "Learn why we made this decision."]]
|
||||
[:a {:href "https://penpot.app/why-beta" :target "_blank"} "Learn why we made this decision."]]
|
||||
[:div.modal-navigation
|
||||
[:button.btn-secondary {:on-click finish} "Explore Penpot Beta 1.10"]]]
|
||||
[:img.deco {:src "images/deco-left.png" :border "0"}]
|
||||
|
|
|
@ -375,7 +375,7 @@
|
|||
is-flex-container? (and is-frame? (= :flex (:layout (first shapes))))
|
||||
ids (->> shapes (map :id))
|
||||
add-flex #(st/emit! (if is-frame?
|
||||
(dwsl/create-layout-from-id ids :flex)
|
||||
(dwsl/create-layout-from-id ids :flex true)
|
||||
(dwsl/create-layout-from-selection :flex)))
|
||||
remove-flex #(st/emit! (dwsl/remove-layout ids))]
|
||||
|
||||
|
|
|
@ -416,11 +416,11 @@
|
|||
[:span (tr "labels.tutorials")]]
|
||||
[:li {:on-click show-release-notes}
|
||||
[:span (tr "labels.release-notes")]]
|
||||
[:li.separator {:on-click #(dom/open-new-window "https://penpot.app/libraries-templates.html")}
|
||||
[:li.separator {:on-click #(dom/open-new-window "https://penpot.app/libraries-templates")}
|
||||
[:span (tr "labels.libraries-and-templates")]]
|
||||
[:li {:on-click #(dom/open-new-window "https://github.com/penpot/penpot")}
|
||||
[:span (tr "labels.github-repo")]]
|
||||
[:li {:on-click #(dom/open-new-window "https://penpot.app/terms.html")}
|
||||
[:li {:on-click #(dom/open-new-window "https://penpot.app/terms")}
|
||||
[:span (tr "auth.terms-of-service")]]
|
||||
[:li.separator {:on-click #(st/emit! (when (contains? layout :collapse-left-sidebar) (dw/toggle-layout-flag :collapse-left-sidebar))
|
||||
(-> (dw/toggle-layout-flag :shortcuts)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue