mirror of
https://github.com/penpot/penpot.git
synced 2025-04-10 14:01:29 -05:00
Merge pull request #3434 from penpot/superalex-bugfixing-18
🐛 Superalex bugfixing
This commit is contained in:
commit
9a60ac477f
6 changed files with 45 additions and 23 deletions
|
@ -86,6 +86,9 @@
|
|||
- Fix problem with precision in resizes [Taiga #5623](https://tree.taiga.io/project/penpot/issue/5623)
|
||||
- Fix absolute positioned layouts not showing flex properties [Taiga #5630](https://tree.taiga.io/project/penpot/issue/5630)
|
||||
- Fix text gradient handlers [Taiga #4047](https://tree.taiga.io/project/penpot/issue/4047)
|
||||
- Fix when user deletes one file during import it is impossible to finish importing of second file [Taiga #5656](https://tree.taiga.io/project/penpot/issue/5656)
|
||||
- Fix export multiple images when only one of them has export settings [Taiga #5649](https://tree.taiga.io/project/penpot/issue/5649)
|
||||
- Fix error when a user different than the thread creator edits a comment [Taiga #5647](https://tree.taiga.io/project/penpot/issue/5647)
|
||||
|
||||
### :arrow_up: Deps updates
|
||||
|
||||
|
|
|
@ -468,8 +468,8 @@
|
|||
{::doc/added "1.15"}
|
||||
[{:keys [::db/pool] :as cfg} {:keys [::rpc/profile-id ::rpc/request-at id share-id content] :as params}]
|
||||
(db/with-atomic [conn pool]
|
||||
(let [{:keys [thread-id] :as comment} (get-comment conn id ::db/for-update? true)
|
||||
{:keys [file-id page-id owner-id] :as thread} (get-comment-thread conn thread-id ::db/for-update? true)]
|
||||
(let [{:keys [thread-id owner-id] :as comment} (get-comment conn id ::db/for-update? true)
|
||||
{:keys [file-id page-id] :as thread} (get-comment-thread conn thread-id ::db/for-update? true)]
|
||||
|
||||
(files/check-comment-permissions! conn profile-id file-id share-id)
|
||||
|
||||
|
|
|
@ -133,7 +133,8 @@
|
|||
(def schema:update-profile-password
|
||||
[:map {:title "update-profile-password"}
|
||||
[:password [::sm/word-string {:max 500}]]
|
||||
[:old-password [::sm/word-string {:max 500}]]])
|
||||
;; Social registered users don't have old-password
|
||||
[:old-password {:optional true} [:maybe [::sm/word-string {:max 500}]]]])
|
||||
|
||||
(sv/defmethod ::update-profile-password
|
||||
{:doc/added "1.0"
|
||||
|
|
|
@ -337,7 +337,8 @@
|
|||
[:map {:closed true}
|
||||
[:password-1 :string]
|
||||
[:password-2 :string]
|
||||
[:password-old :string]])
|
||||
;; Social registered users don't have old-password
|
||||
[:password-old {:optional true} [:maybe :string]]])
|
||||
|
||||
(defn update-password
|
||||
[data]
|
||||
|
|
|
@ -337,18 +337,18 @@
|
|||
(st/emit! (modal/hide))
|
||||
(when on-finish-import (on-finish-import))))
|
||||
|
||||
files (->> (:files @state) (filterv (comp not :deleted?)))
|
||||
|
||||
num-importing (+
|
||||
(->> @state :files (filter #(= (:status %) :importing)) count)
|
||||
(->> files (filter #(= (:status %) :importing)) count)
|
||||
(:importing-templates @state))
|
||||
|
||||
|
||||
warning-files (->> @state :files (filter #(and (= (:status %) :import-finish) (d/not-empty? (:errors %)))) count)
|
||||
success-files (->> @state :files (filter #(and (= (:status %) :import-finish) (empty? (:errors %)))) count)
|
||||
pending-analysis? (> (->> @state :files (filter #(= (:status %) :analyzing)) count) 0)
|
||||
warning-files (->> files (filter #(and (= (:status %) :import-finish) (d/not-empty? (:errors %)))) count)
|
||||
success-files (->> files (filter #(and (= (:status %) :import-finish) (empty? (:errors %)))) count)
|
||||
pending-analysis? (> (->> files (filter #(= (:status %) :analyzing)) count) 0)
|
||||
pending-import? (> num-importing 0)
|
||||
files (->> (:files @state) (filterv (comp not :deleted?)))
|
||||
;; pending-import? (> (->> @state :files (filter #(= (:status %) :importing)) count) 0)
|
||||
;; files (->> (:files @state) (filterv (comp not :deleted?)))
|
||||
|
||||
valid-files? (or (some? template)
|
||||
(> (+ (->> files (filterv (fn [x] (not= (:status x) :analyze-error))) count)) 0))]
|
||||
|
||||
|
|
|
@ -26,18 +26,20 @@
|
|||
(mf/defc exports-menu
|
||||
{::mf/wrap [#(mf/memo' % (mf/check-props ["ids" "values" "type" "page-id" "file-id"]))]}
|
||||
[{:keys [ids type values page-id file-id] :as props}]
|
||||
(let [exports (:exports values [])
|
||||
(let [exports (:exports values [])
|
||||
|
||||
state (mf/deref refs/export)
|
||||
in-progress? (:in-progress state)
|
||||
state (mf/deref refs/export)
|
||||
in-progress? (:in-progress state)
|
||||
|
||||
sname (when (seqable? exports)
|
||||
(let [shapes (wsh/lookup-shapes @st/state ids)
|
||||
sname (-> shapes first :name)
|
||||
suffix (-> exports first :suffix)]
|
||||
(cond-> sname
|
||||
(and (= 1 (count exports)) (some? suffix))
|
||||
(str suffix))))
|
||||
shapes-with-exports (->> (wsh/lookup-shapes @st/state ids)
|
||||
(filter #(pos? (count (:exports %)))))
|
||||
|
||||
sname (when (seqable? exports)
|
||||
(let [sname (-> shapes-with-exports first :name)
|
||||
suffix (-> exports first :suffix)]
|
||||
(cond-> sname
|
||||
(and (= 1 (count exports)) (some? suffix))
|
||||
(str suffix))))
|
||||
|
||||
scale-enabled?
|
||||
(mf/use-callback
|
||||
|
@ -50,7 +52,22 @@
|
|||
(fn [event]
|
||||
(dom/prevent-default event)
|
||||
(if (= :multiple type)
|
||||
(st/emit! (de/show-workspace-export-dialog {:selected (reverse ids)}))
|
||||
;; I can select multiple shapes all of them with no export settings and one of them with only one
|
||||
;; In that situation we must export it directly
|
||||
(if (and (= 1 (count shapes-with-exports)) (= 1 (-> shapes-with-exports first :exports count)))
|
||||
(let [shape (-> shapes-with-exports first)
|
||||
export (-> shape :exports first)
|
||||
sname (:name shape)
|
||||
suffix (:suffix export)
|
||||
defaults {:page-id page-id
|
||||
:file-id file-id
|
||||
:name sname
|
||||
:object-id (:id (first shapes-with-exports))}]
|
||||
(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)})))
|
||||
|
||||
;; In other all cases we only allowed to have a single
|
||||
;; shape-id because multiple shape-ids are handled
|
||||
|
@ -182,4 +199,4 @@
|
|||
:disabled in-progress?}
|
||||
(if in-progress?
|
||||
(tr "workspace.options.exporting-object")
|
||||
(tr "workspace.options.export-object" (c (count ids))))])]))
|
||||
(tr "workspace.options.export-object" (c (count shapes-with-exports))))])]))
|
||||
|
|
Loading…
Add table
Reference in a new issue