mirror of
https://github.com/penpot/penpot.git
synced 2025-07-19 12:17:20 +02:00
Merge remote-tracking branch 'origin/staging' into develop
This commit is contained in:
commit
d2250274f2
4 changed files with 29 additions and 20 deletions
|
@ -284,8 +284,7 @@
|
|||
"Adjust modifiers so they adjust to the pixel grid"
|
||||
[modifiers shape]
|
||||
|
||||
(if (or (some? (:resize-transform modifiers))
|
||||
(some? (:resize-transform-2 modifiers)))
|
||||
(if (some? (:resize-transform modifiers))
|
||||
;; If we're working with a rotation we don't handle pixel precision because
|
||||
;; the transformation won't have the precision anyway
|
||||
modifiers
|
||||
|
@ -298,7 +297,8 @@
|
|||
(gsh/points->rect))
|
||||
|
||||
flip-x? (neg? (get-in modifiers [:resize-vector :x]))
|
||||
flip-y? (neg? (get-in modifiers [:resize-vector :y]))
|
||||
flip-y? (or (neg? (get-in modifiers [:resize-vector :y]))
|
||||
(neg? (get-in modifiers [:resize-vector-2 :y])))
|
||||
|
||||
path? (= :path (:type shape))
|
||||
vertical-line? (and path? (<= (:width raw-bounds) 0.01))
|
||||
|
|
|
@ -92,17 +92,23 @@
|
|||
|
||||
(defn on-navigate
|
||||
[router path]
|
||||
(let [match (match-path router path)
|
||||
profile (:profile @storage)
|
||||
nopath? (or (= path "") (= path "/"))
|
||||
authed? (and (not (nil? profile))
|
||||
(not= (:id profile) uuid/zero))]
|
||||
(let [match (match-path router path)
|
||||
profile (:profile @storage)
|
||||
nopath? (or (= path "") (= path "/"))
|
||||
path-name (-> match :data :name)
|
||||
authpath? (some #(= path-name %) '(:auth-login
|
||||
:auth-register
|
||||
:auth-register-validate
|
||||
:auth-register-success
|
||||
:auth-recovery-request
|
||||
:auth-recovery))
|
||||
authed? (and (not (nil? profile))
|
||||
(not= (:id profile) uuid/zero))]
|
||||
|
||||
(cond
|
||||
(and nopath? authed? (nil? match))
|
||||
(if (not= uuid/zero profile)
|
||||
(st/emit! (rt/nav :dashboard-projects {:team-id (du/get-current-team-id profile)}))
|
||||
(st/emit! (rt/nav :auth-login)))
|
||||
(or (and nopath? authed? (nil? match))
|
||||
(and authpath? authed?))
|
||||
(st/emit! (rt/nav :dashboard-projects {:team-id (du/get-current-team-id profile)}))
|
||||
|
||||
(and (not authed?) (nil? match))
|
||||
(st/emit! (rt/nav :auth-login))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue