0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-08 16:00:19 -05:00

Merge pull request #2327 from penpot/superalex-hotfixes

🐛 Hotfixes
This commit is contained in:
Eva Marco 2022-09-23 12:09:41 +02:00 committed by GitHub
commit 38468d7584
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 44 additions and 22 deletions

View file

@ -17,6 +17,11 @@
- Fix change opacity in colorpicker cause bugged color [Taiga #4154](https://tree.taiga.io/project/penpot/issue/4154)
- Fix gradient colors don't arrive in recent colors palette (https://tree.taiga.io/project/penpot/issue/4155)
- Fix selected colors allow gradients in shadows [Taiga #4156](https://tree.taiga.io/project/penpot/issue/4156)
- Fix import files with unexpected format or invalid content [Taiga #4136](https://tree.taiga.io/project/penpot/issue/4136)
- Fix wrong shortcut button tip of "Delete" function [Taiga #4162](https://tree.taiga.io/project/penpot/issue/4162)
- Fix error after user drags any layer in search functionality [Taiga #4161](https://tree.taiga.io/project/penpot/issue/4161)
- Fix font search works only with lowercase letters [Taiga #4140](https://tree.taiga.io/project/penpot/issue/4140)
- Fix Terms and Privacy links overlapping [Taiga #4137](https://tree.taiga.io/project/penpot/issue/4137)
## 1.15.3-beta

View file

@ -11,6 +11,8 @@
display: grid;
grid-template-rows: auto;
grid-template-columns: 33% auto;
height: 100vh;
overflow-y: scroll;
}
.auth-sidebar {
@ -53,6 +55,7 @@
height: 100vh;
justify-content: center;
position: relative;
min-height: 48rem;
input {
margin-bottom: 0px;

View file

@ -93,7 +93,7 @@
[]
(if (cf/check-platform? :macos)
mac-delete
"Supr"))
"Del"))
(defn esc
[]

View file

@ -292,7 +292,7 @@
(mf/use-callback
(fn [event]
(let [val (dom/get-target-val event)]
(reset! sterm val))))]
(reset! sterm (str/lower val)))))]
[:div.dashboard-installed-fonts
[:h3 (tr "labels.installed-fonts")]

View file

@ -304,7 +304,8 @@
success-files (->> @state :files (filter #(and (= (:status %) :import-finish) (empty? (:errors %)))) count)
pending-analysis? (> (->> @state :files (filter #(= (:status %) :analyzing)) count) 0)
pending-import? (> (->> @state :files (filter #(= (:status %) :importing)) count) 0)
files (->> (:files @state) (filterv (comp not :deleted?)))]
files (->> (:files @state) (filterv (comp not :deleted?)))
valid-files? (> (->> files (filterv (fn [x] (not= (:status x) :analyze-error))) count) 0)]
(mf/use-effect
(fn []
@ -359,7 +360,7 @@
{:class "primary"
:type "button"
:value (tr "labels.continue")
:disabled pending-analysis?
:disabled (or pending-analysis? (not valid-files?))
:on-click handle-continue}])
(when (= :importing (:status @state))
@ -367,5 +368,5 @@
{:class "primary"
:type "button"
:value (tr "labels.accept")
:disabled pending-import?
:disabled (or pending-import? (not valid-files?))
:on-click handle-accept}])]]]]))

View file

@ -90,7 +90,7 @@
(l/derived refs/workspace-local)))
(mf/defc layer-item
[{:keys [index item selected objects] :as props}]
[{:keys [index item selected objects sortable?] :as props}]
(let [id (:id item)
selected? (contains? selected id)
container? (or (cph/frame-shape? item)
@ -170,16 +170,17 @@
(when-not expanded?
(st/emit! (dwc/toggle-collapse (:id item)))))
[dprops dref] (hooks/use-sortable
:data-type "penpot/layer"
:on-drop on-drop
:on-drag on-drag
:on-hold on-hold
:disabled @disable-drag
:detect-center? container?
:data {:id (:id item)
:index index
:name (:name item)})
[dprops dref] (when sortable?
(hooks/use-sortable
:data-type "penpot/layer"
:on-drop on-drop
:on-drag on-drag
:on-hold on-hold
:disabled @disable-drag
:detect-center? container?
:data {:id (:id item)
:index index
:name (:name item)}))
ref (mf/use-ref)]
@ -276,13 +277,15 @@
:selected selected
:index index
:objects objects
:key id}]
:key id
:sortable? true}]
[:& layer-item
{:item obj
:selected selected
:index index
:objects objects
:key id}])))]]))
:key id
:sortable? true}])))]]))
(mf/defc filters-tree
{::mf/wrap [#(mf/memo % =)
@ -299,7 +302,8 @@
:selected selected
:index index
:objects objects
:key id}]))]))
:key id
:sortable? false}]))]))
(defn calc-reparented-objects

View file

@ -19,6 +19,7 @@
[app.common.uuid :as uuid]
[app.main.repo :as rp]
[app.util.http :as http]
[app.util.i18n :as i18n :refer [tr]]
[app.util.import.parser :as cip]
[app.util.json :as json]
[app.util.webapi :as wapi]
@ -526,7 +527,8 @@
sg (areduce u8 i ret "" (str ret (if (zero? i) "" " ") (.toString (aget u8 i) 8)))]
(case sg
"120 113 3 4" "application/zip"
"application/octet-stream")))
"1 13 32 206" "application/octet-stream"
"other")))
(defmethod impl/handler :analyze-import
[{:keys [files]}]
@ -560,8 +562,15 @@
:file-id file-id
:files {file-id {:name (:name file)}}
:status :ready}
:type "application/octet-stream"})))))
(rx/catch #(rx/of {:uri (:uri file) :error (.-message %)}))))))))
:type "application/octet-stream"}))))
(->> st
(rx/filter (fn [data] (= "other" (:type data))))
(rx/map (fn [_]
{:uri (:uri file)
:error (tr "dashboard.import.analyze-error")}))))
(rx/catch (fn [data]
(let [error (or (.-message data) (tr "dashboard.import.analyze-error"))]
(rx/of {:uri (:uri file) :error error}))))))))))
(defmethod impl/handler :import-files
[{:keys [project-id files]}]