mirror of
https://github.com/penpot/penpot.git
synced 2025-03-10 14:51:37 -05:00
Merge remote-tracking branch 'origin/staging' into develop
This commit is contained in:
commit
9fb91b3052
7 changed files with 72 additions and 45 deletions
13
CHANGES.md
13
CHANGES.md
|
@ -76,6 +76,13 @@
|
|||
- Fix scroll on color picker modal [Taiga #8353](https://tree.taiga.io/project/penpot/issue/8353)
|
||||
- Fix components are not dragged from the group to the assets tab [Taiga #8273](https://tree.taiga.io/project/penpot/issue/8273)
|
||||
|
||||
## 2.1.4
|
||||
|
||||
### :bug: Bugs fixed
|
||||
|
||||
- Fix json encoding on zip encoding decoding.
|
||||
- Add schema validation for color changes.
|
||||
- Fix render of some texts without position data.
|
||||
|
||||
## 2.1.3
|
||||
|
||||
|
@ -85,12 +92,6 @@
|
|||
|
||||
### :bug: Bugs fixed
|
||||
|
||||
- Don't allow registry with email and password, if password login is disabled (invitation workflow) [Github #4975](https://github.com/penpot/penpot/issues/4975)
|
||||
|
||||
## 2.1.2
|
||||
|
||||
### :bug: Bugs fixed
|
||||
|
||||
- User switch language to "zh_hant" will get 400 [Github #4884](https://github.com/penpot/penpot/issues/4884)
|
||||
- Smtp config ignoring port if ssl is set [Github #4872](https://github.com/penpot/penpot/issues/4872)
|
||||
- Ability to let users to authenticate with a private oidc provider only [Github #4963](https://github.com/penpot/penpot/issues/4963)
|
||||
|
|
|
@ -49,31 +49,30 @@
|
|||
|
||||
|
||||
(defn show-workspace-export-dialog
|
||||
([] (show-workspace-export-dialog nil))
|
||||
([{:keys [selected]}]
|
||||
(ptk/reify ::show-workspace-export-dialog
|
||||
ptk/WatchEvent
|
||||
(watch [_ state _]
|
||||
(let [file-id (:current-file-id state)
|
||||
page-id (:current-page-id state)
|
||||
selected (or selected (wsh/lookup-selected state page-id {}))
|
||||
[{:keys [selected origin]}]
|
||||
(ptk/reify ::show-workspace-export-dialog
|
||||
ptk/WatchEvent
|
||||
(watch [_ state _]
|
||||
(let [file-id (:current-file-id state)
|
||||
page-id (:current-page-id state)
|
||||
selected (or selected (wsh/lookup-selected state page-id {}))
|
||||
|
||||
shapes (if (seq selected)
|
||||
(wsh/lookup-shapes state selected)
|
||||
(reverse (wsh/filter-shapes state #(pos? (count (:exports %))))))
|
||||
shapes (if (seq selected)
|
||||
(wsh/lookup-shapes state selected)
|
||||
(reverse (wsh/filter-shapes state #(pos? (count (:exports %))))))
|
||||
|
||||
exports (for [shape shapes
|
||||
export (:exports shape)]
|
||||
(-> export
|
||||
(assoc :enabled true)
|
||||
(assoc :page-id page-id)
|
||||
(assoc :file-id file-id)
|
||||
(assoc :object-id (:id shape))
|
||||
(assoc :shape (dissoc shape :exports))
|
||||
(assoc :name (:name shape))))]
|
||||
exports (for [shape shapes
|
||||
export (:exports shape)]
|
||||
(-> export
|
||||
(assoc :enabled true)
|
||||
(assoc :page-id page-id)
|
||||
(assoc :file-id file-id)
|
||||
(assoc :object-id (:id shape))
|
||||
(assoc :shape (dissoc shape :exports))
|
||||
(assoc :name (:name shape))))]
|
||||
|
||||
(rx/of (modal/show :export-shapes
|
||||
{:exports (vec exports)})))))))
|
||||
(rx/of (modal/show :export-shapes
|
||||
{:exports (vec exports) :origin origin}))))))
|
||||
|
||||
(defn show-viewer-export-dialog
|
||||
[{:keys [shapes page-id file-id share-id exports]}]
|
||||
|
@ -90,7 +89,7 @@
|
|||
(assoc :shape (dissoc shape :exports))
|
||||
(assoc :name (:name shape))
|
||||
(cond-> share-id (assoc :share-id share-id))))]
|
||||
(rx/of (modal/show :export-shapes {:exports (vec exports)})))))) #_TODO
|
||||
(rx/of (modal/show :export-shapes {:exports (vec exports) :origin "viewer"})))))) #_TODO
|
||||
|
||||
(defn show-workspace-export-frames-dialog
|
||||
[frames]
|
||||
|
@ -108,7 +107,7 @@
|
|||
:name (:name frame)})]
|
||||
|
||||
(rx/of (modal/show :export-frames
|
||||
{:exports (vec exports)}))))))
|
||||
{:exports (vec exports) :origin "workspace:menu"}))))))
|
||||
|
||||
(defn- initialize-export-status
|
||||
[exports cmd resource]
|
||||
|
|
|
@ -397,7 +397,7 @@
|
|||
:command (ds/c-mod "shift+e")
|
||||
:subsections [:basics :main-menu]
|
||||
:fn #(st/emit!
|
||||
(de/show-workspace-export-dialog))}
|
||||
(de/show-workspace-export-dialog {:origin "workspace:shortcuts"}))}
|
||||
|
||||
:toggle-snap-ruler-guide {:tooltip (ds/meta-shift "G")
|
||||
:command (ds/c-mod "shift+g")
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
[app.common.colors :as clr]
|
||||
[app.common.data :as d]
|
||||
[app.common.data.macros :as dm]
|
||||
[app.main.data.events :as ev]
|
||||
[app.main.data.exports :as de]
|
||||
[app.main.data.modal :as modal]
|
||||
[app.main.refs :as refs]
|
||||
|
@ -24,6 +25,7 @@
|
|||
[app.util.strings :as ust]
|
||||
[beicon.v2.core :as rx]
|
||||
[cuerdas.core :as str]
|
||||
[potok.v2.core :as ptk]
|
||||
[rumext.v2 :as mf]))
|
||||
|
||||
(def ^:private neutral-icon
|
||||
|
@ -36,10 +38,9 @@
|
|||
(i/icon-xref :close (stl/css :close-icon)))
|
||||
|
||||
(mf/defc export-multiple-dialog
|
||||
[{:keys [exports title cmd no-selection]}]
|
||||
[{:keys [exports title cmd no-selection origin]}]
|
||||
(let [lstate (mf/deref refs/export)
|
||||
in-progress? (:in-progress lstate)
|
||||
|
||||
exports (mf/use-state exports)
|
||||
|
||||
all-exports (deref exports)
|
||||
|
@ -62,7 +63,11 @@
|
|||
(st/emit! (modal/hide)
|
||||
(de/request-multiple-export
|
||||
{:exports enabled-exports
|
||||
:cmd cmd})))
|
||||
:cmd cmd})
|
||||
(ptk/event
|
||||
::ev/event {::ev/name "export-shapes"
|
||||
::ev/origin origin
|
||||
:num-shapes (count enabled-exports)})))
|
||||
|
||||
on-toggle-enabled
|
||||
(mf/use-fn
|
||||
|
@ -187,23 +192,25 @@
|
|||
(mf/defc export-shapes-dialog
|
||||
{::mf/register modal/components
|
||||
::mf/register-as :export-shapes}
|
||||
[{:keys [exports]}]
|
||||
[{:keys [exports origin]}]
|
||||
(let [title (tr "dashboard.export-shapes.title")]
|
||||
[:& export-multiple-dialog
|
||||
{:exports exports
|
||||
:title title
|
||||
:cmd :export-shapes
|
||||
:no-selection shapes-no-selection}]))
|
||||
:no-selection shapes-no-selection
|
||||
:origin origin}]))
|
||||
|
||||
(mf/defc export-frames
|
||||
{::mf/register modal/components
|
||||
::mf/register-as :export-frames}
|
||||
[{:keys [exports]}]
|
||||
[{:keys [exports origin]}]
|
||||
(let [title (tr "dashboard.export-frames.title")]
|
||||
[:& export-multiple-dialog
|
||||
{:exports exports
|
||||
:title title
|
||||
:cmd :export-frames}]))
|
||||
:cmd :export-frames
|
||||
:origin origin}]))
|
||||
|
||||
(mf/defc export-progress-widget
|
||||
{::mf/wrap [mf/memo]}
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
(:require-macros [app.main.style :as stl])
|
||||
(:require
|
||||
[app.common.data :as d]
|
||||
[app.main.data.events :as ev]
|
||||
[app.main.data.exports :as de]
|
||||
[app.main.refs :as refs]
|
||||
[app.main.store :as st]
|
||||
|
@ -17,6 +18,7 @@
|
|||
[app.util.dom :as dom]
|
||||
[app.util.i18n :refer [tr c]]
|
||||
[app.util.keyboard :as kbd]
|
||||
[potok.v2.core :as ptk]
|
||||
[rumext.v2 :as mf]))
|
||||
|
||||
(mf/defc exports
|
||||
|
@ -62,8 +64,14 @@
|
|||
(cond-> share-id (assoc :share-id share-id)))
|
||||
exports (mapv #(merge % defaults) @exports)]
|
||||
(if (= 1 (count exports))
|
||||
(st/emit! (de/request-simple-export {:export (first exports)}))
|
||||
(st/emit! (de/request-multiple-export {:exports exports :filename filename}))))))
|
||||
(st/emit!
|
||||
(de/request-simple-export {:export (first exports)})
|
||||
(ptk/event
|
||||
::ev/event {::ev/name "export-shapes" ::ev/origin "viewer" :num-shapes 1}))
|
||||
(st/emit!
|
||||
(de/request-multiple-export {:exports exports})
|
||||
(ptk/event
|
||||
::ev/event {::ev/name "export-shapes" ::ev/origin "viewer" :num-shapes (count exports)}))))))
|
||||
|
||||
add-export
|
||||
(mf/use-callback
|
||||
|
|
|
@ -509,7 +509,7 @@
|
|||
(on-add-shared event))))
|
||||
|
||||
on-export-shapes
|
||||
(mf/use-fn #(st/emit! (de/show-workspace-export-dialog)))
|
||||
(mf/use-fn #(st/emit! (de/show-workspace-export-dialog {:origin "workspace:menu"})))
|
||||
|
||||
on-export-shapes-key-down
|
||||
(mf/use-fn
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
(:require-macros [app.main.style :as stl])
|
||||
(:require
|
||||
[app.common.data :as d]
|
||||
[app.main.data.events :as ev]
|
||||
[app.main.data.exports :as de]
|
||||
[app.main.data.workspace.shapes :as dwsh]
|
||||
[app.main.data.workspace.state-helpers :as wsh]
|
||||
|
@ -20,6 +21,7 @@
|
|||
[app.util.dom :as dom]
|
||||
[app.util.i18n :refer [tr c]]
|
||||
[app.util.keyboard :as kbd]
|
||||
[potok.v2.core :as ptk]
|
||||
[rumext.v2 :as mf]))
|
||||
|
||||
(def exports-attrs
|
||||
|
@ -75,8 +77,12 @@
|
|||
(cond-> sname
|
||||
(some? suffix)
|
||||
(str suffix))
|
||||
(st/emit! (de/request-simple-export {:export (merge export defaults)})))
|
||||
(st/emit! (de/show-workspace-export-dialog {:selected (reverse ids)})))
|
||||
(st/emit!
|
||||
(de/request-simple-export {:export (merge export defaults)})
|
||||
(ptk/event
|
||||
::ev/event {::ev/name "export-shapes" ::ev/origin "workspace:sidebar" :num-shapes 1})))
|
||||
(st/emit!
|
||||
(de/show-workspace-export-dialog {:selected (reverse ids) :origin "workspace:sidebar"})))
|
||||
|
||||
;; In other all cases we only allowed to have a single
|
||||
;; shape-id because multiple shape-ids are handled
|
||||
|
@ -88,8 +94,14 @@
|
|||
exports (mapv #(merge % defaults) exports)]
|
||||
(if (= 1 (count exports))
|
||||
(let [export (first exports)]
|
||||
(st/emit! (de/request-simple-export {:export export})))
|
||||
(st/emit! (de/request-multiple-export {:exports exports})))))))
|
||||
(st/emit!
|
||||
(de/request-simple-export {:export export})
|
||||
(ptk/event
|
||||
::ev/event {::ev/name "export-shapes" ::ev/origin "workspace:sidebar" :num-shapes 1})))
|
||||
(st/emit!
|
||||
(de/request-multiple-export {:exports exports})
|
||||
(ptk/event
|
||||
::ev/event {::ev/name "export-shapes" ::ev/origin "workspace:sidebar" :num-shapes (count exports)})))))))
|
||||
|
||||
;; TODO: maybe move to specific events for avoid to have this logic here?
|
||||
add-export
|
||||
|
|
Loading…
Add table
Reference in a new issue