mirror of
https://github.com/penpot/penpot.git
synced 2025-03-11 07:11:32 -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 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)
|
- 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
|
## 2.1.3
|
||||||
|
|
||||||
|
@ -85,12 +92,6 @@
|
||||||
|
|
||||||
### :bug: Bugs fixed
|
### :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)
|
- 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)
|
- 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)
|
- Ability to let users to authenticate with a private oidc provider only [Github #4963](https://github.com/penpot/penpot/issues/4963)
|
||||||
|
|
|
@ -49,8 +49,7 @@
|
||||||
|
|
||||||
|
|
||||||
(defn show-workspace-export-dialog
|
(defn show-workspace-export-dialog
|
||||||
([] (show-workspace-export-dialog nil))
|
[{:keys [selected origin]}]
|
||||||
([{:keys [selected]}]
|
|
||||||
(ptk/reify ::show-workspace-export-dialog
|
(ptk/reify ::show-workspace-export-dialog
|
||||||
ptk/WatchEvent
|
ptk/WatchEvent
|
||||||
(watch [_ state _]
|
(watch [_ state _]
|
||||||
|
@ -73,7 +72,7 @@
|
||||||
(assoc :name (:name shape))))]
|
(assoc :name (:name shape))))]
|
||||||
|
|
||||||
(rx/of (modal/show :export-shapes
|
(rx/of (modal/show :export-shapes
|
||||||
{:exports (vec exports)})))))))
|
{:exports (vec exports) :origin origin}))))))
|
||||||
|
|
||||||
(defn show-viewer-export-dialog
|
(defn show-viewer-export-dialog
|
||||||
[{:keys [shapes page-id file-id share-id exports]}]
|
[{:keys [shapes page-id file-id share-id exports]}]
|
||||||
|
@ -90,7 +89,7 @@
|
||||||
(assoc :shape (dissoc shape :exports))
|
(assoc :shape (dissoc shape :exports))
|
||||||
(assoc :name (:name shape))
|
(assoc :name (:name shape))
|
||||||
(cond-> share-id (assoc :share-id share-id))))]
|
(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
|
(defn show-workspace-export-frames-dialog
|
||||||
[frames]
|
[frames]
|
||||||
|
@ -108,7 +107,7 @@
|
||||||
:name (:name frame)})]
|
:name (:name frame)})]
|
||||||
|
|
||||||
(rx/of (modal/show :export-frames
|
(rx/of (modal/show :export-frames
|
||||||
{:exports (vec exports)}))))))
|
{:exports (vec exports) :origin "workspace:menu"}))))))
|
||||||
|
|
||||||
(defn- initialize-export-status
|
(defn- initialize-export-status
|
||||||
[exports cmd resource]
|
[exports cmd resource]
|
||||||
|
|
|
@ -397,7 +397,7 @@
|
||||||
:command (ds/c-mod "shift+e")
|
:command (ds/c-mod "shift+e")
|
||||||
:subsections [:basics :main-menu]
|
:subsections [:basics :main-menu]
|
||||||
:fn #(st/emit!
|
: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")
|
:toggle-snap-ruler-guide {:tooltip (ds/meta-shift "G")
|
||||||
:command (ds/c-mod "shift+g")
|
:command (ds/c-mod "shift+g")
|
||||||
|
|
|
@ -11,6 +11,7 @@
|
||||||
[app.common.colors :as clr]
|
[app.common.colors :as clr]
|
||||||
[app.common.data :as d]
|
[app.common.data :as d]
|
||||||
[app.common.data.macros :as dm]
|
[app.common.data.macros :as dm]
|
||||||
|
[app.main.data.events :as ev]
|
||||||
[app.main.data.exports :as de]
|
[app.main.data.exports :as de]
|
||||||
[app.main.data.modal :as modal]
|
[app.main.data.modal :as modal]
|
||||||
[app.main.refs :as refs]
|
[app.main.refs :as refs]
|
||||||
|
@ -24,6 +25,7 @@
|
||||||
[app.util.strings :as ust]
|
[app.util.strings :as ust]
|
||||||
[beicon.v2.core :as rx]
|
[beicon.v2.core :as rx]
|
||||||
[cuerdas.core :as str]
|
[cuerdas.core :as str]
|
||||||
|
[potok.v2.core :as ptk]
|
||||||
[rumext.v2 :as mf]))
|
[rumext.v2 :as mf]))
|
||||||
|
|
||||||
(def ^:private neutral-icon
|
(def ^:private neutral-icon
|
||||||
|
@ -36,10 +38,9 @@
|
||||||
(i/icon-xref :close (stl/css :close-icon)))
|
(i/icon-xref :close (stl/css :close-icon)))
|
||||||
|
|
||||||
(mf/defc export-multiple-dialog
|
(mf/defc export-multiple-dialog
|
||||||
[{:keys [exports title cmd no-selection]}]
|
[{:keys [exports title cmd no-selection origin]}]
|
||||||
(let [lstate (mf/deref refs/export)
|
(let [lstate (mf/deref refs/export)
|
||||||
in-progress? (:in-progress lstate)
|
in-progress? (:in-progress lstate)
|
||||||
|
|
||||||
exports (mf/use-state exports)
|
exports (mf/use-state exports)
|
||||||
|
|
||||||
all-exports (deref exports)
|
all-exports (deref exports)
|
||||||
|
@ -62,7 +63,11 @@
|
||||||
(st/emit! (modal/hide)
|
(st/emit! (modal/hide)
|
||||||
(de/request-multiple-export
|
(de/request-multiple-export
|
||||||
{:exports enabled-exports
|
{: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
|
on-toggle-enabled
|
||||||
(mf/use-fn
|
(mf/use-fn
|
||||||
|
@ -187,23 +192,25 @@
|
||||||
(mf/defc export-shapes-dialog
|
(mf/defc export-shapes-dialog
|
||||||
{::mf/register modal/components
|
{::mf/register modal/components
|
||||||
::mf/register-as :export-shapes}
|
::mf/register-as :export-shapes}
|
||||||
[{:keys [exports]}]
|
[{:keys [exports origin]}]
|
||||||
(let [title (tr "dashboard.export-shapes.title")]
|
(let [title (tr "dashboard.export-shapes.title")]
|
||||||
[:& export-multiple-dialog
|
[:& export-multiple-dialog
|
||||||
{:exports exports
|
{:exports exports
|
||||||
:title title
|
:title title
|
||||||
:cmd :export-shapes
|
:cmd :export-shapes
|
||||||
:no-selection shapes-no-selection}]))
|
:no-selection shapes-no-selection
|
||||||
|
:origin origin}]))
|
||||||
|
|
||||||
(mf/defc export-frames
|
(mf/defc export-frames
|
||||||
{::mf/register modal/components
|
{::mf/register modal/components
|
||||||
::mf/register-as :export-frames}
|
::mf/register-as :export-frames}
|
||||||
[{:keys [exports]}]
|
[{:keys [exports origin]}]
|
||||||
(let [title (tr "dashboard.export-frames.title")]
|
(let [title (tr "dashboard.export-frames.title")]
|
||||||
[:& export-multiple-dialog
|
[:& export-multiple-dialog
|
||||||
{:exports exports
|
{:exports exports
|
||||||
:title title
|
:title title
|
||||||
:cmd :export-frames}]))
|
:cmd :export-frames
|
||||||
|
:origin origin}]))
|
||||||
|
|
||||||
(mf/defc export-progress-widget
|
(mf/defc export-progress-widget
|
||||||
{::mf/wrap [mf/memo]}
|
{::mf/wrap [mf/memo]}
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
(:require-macros [app.main.style :as stl])
|
(:require-macros [app.main.style :as stl])
|
||||||
(:require
|
(:require
|
||||||
[app.common.data :as d]
|
[app.common.data :as d]
|
||||||
|
[app.main.data.events :as ev]
|
||||||
[app.main.data.exports :as de]
|
[app.main.data.exports :as de]
|
||||||
[app.main.refs :as refs]
|
[app.main.refs :as refs]
|
||||||
[app.main.store :as st]
|
[app.main.store :as st]
|
||||||
|
@ -17,6 +18,7 @@
|
||||||
[app.util.dom :as dom]
|
[app.util.dom :as dom]
|
||||||
[app.util.i18n :refer [tr c]]
|
[app.util.i18n :refer [tr c]]
|
||||||
[app.util.keyboard :as kbd]
|
[app.util.keyboard :as kbd]
|
||||||
|
[potok.v2.core :as ptk]
|
||||||
[rumext.v2 :as mf]))
|
[rumext.v2 :as mf]))
|
||||||
|
|
||||||
(mf/defc exports
|
(mf/defc exports
|
||||||
|
@ -62,8 +64,14 @@
|
||||||
(cond-> share-id (assoc :share-id share-id)))
|
(cond-> share-id (assoc :share-id share-id)))
|
||||||
exports (mapv #(merge % defaults) @exports)]
|
exports (mapv #(merge % defaults) @exports)]
|
||||||
(if (= 1 (count exports))
|
(if (= 1 (count exports))
|
||||||
(st/emit! (de/request-simple-export {:export (first exports)}))
|
(st/emit!
|
||||||
(st/emit! (de/request-multiple-export {:exports exports :filename filename}))))))
|
(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
|
add-export
|
||||||
(mf/use-callback
|
(mf/use-callback
|
||||||
|
|
|
@ -509,7 +509,7 @@
|
||||||
(on-add-shared event))))
|
(on-add-shared event))))
|
||||||
|
|
||||||
on-export-shapes
|
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
|
on-export-shapes-key-down
|
||||||
(mf/use-fn
|
(mf/use-fn
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
(:require-macros [app.main.style :as stl])
|
(:require-macros [app.main.style :as stl])
|
||||||
(:require
|
(:require
|
||||||
[app.common.data :as d]
|
[app.common.data :as d]
|
||||||
|
[app.main.data.events :as ev]
|
||||||
[app.main.data.exports :as de]
|
[app.main.data.exports :as de]
|
||||||
[app.main.data.workspace.shapes :as dwsh]
|
[app.main.data.workspace.shapes :as dwsh]
|
||||||
[app.main.data.workspace.state-helpers :as wsh]
|
[app.main.data.workspace.state-helpers :as wsh]
|
||||||
|
@ -20,6 +21,7 @@
|
||||||
[app.util.dom :as dom]
|
[app.util.dom :as dom]
|
||||||
[app.util.i18n :refer [tr c]]
|
[app.util.i18n :refer [tr c]]
|
||||||
[app.util.keyboard :as kbd]
|
[app.util.keyboard :as kbd]
|
||||||
|
[potok.v2.core :as ptk]
|
||||||
[rumext.v2 :as mf]))
|
[rumext.v2 :as mf]))
|
||||||
|
|
||||||
(def exports-attrs
|
(def exports-attrs
|
||||||
|
@ -75,8 +77,12 @@
|
||||||
(cond-> sname
|
(cond-> sname
|
||||||
(some? suffix)
|
(some? suffix)
|
||||||
(str suffix))
|
(str suffix))
|
||||||
(st/emit! (de/request-simple-export {:export (merge export defaults)})))
|
(st/emit!
|
||||||
(st/emit! (de/show-workspace-export-dialog {:selected (reverse ids)})))
|
(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
|
;; In other all cases we only allowed to have a single
|
||||||
;; shape-id because multiple shape-ids are handled
|
;; shape-id because multiple shape-ids are handled
|
||||||
|
@ -88,8 +94,14 @@
|
||||||
exports (mapv #(merge % defaults) exports)]
|
exports (mapv #(merge % defaults) exports)]
|
||||||
(if (= 1 (count exports))
|
(if (= 1 (count exports))
|
||||||
(let [export (first exports)]
|
(let [export (first exports)]
|
||||||
(st/emit! (de/request-simple-export {:export export})))
|
(st/emit!
|
||||||
(st/emit! (de/request-multiple-export {:exports exports})))))))
|
(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?
|
;; TODO: maybe move to specific events for avoid to have this logic here?
|
||||||
add-export
|
add-export
|
||||||
|
|
Loading…
Add table
Reference in a new issue