mirror of
https://github.com/penpot/penpot.git
synced 2026-08-14 00:38:42 +00:00
Merge remote-tracking branch 'origin/staging' into develop
This commit is contained in:
commit
201b51e8c5
@ -480,7 +480,8 @@
|
||||
[:li {:class (stl/css-case :grid-item true
|
||||
:project-thumbnail true
|
||||
:library-item library-view?)}
|
||||
[:div {:class (stl/css-case :is-selected selected?)
|
||||
[:div {:class (stl/css-case :is-selected selected?
|
||||
:grid-item-button true)
|
||||
:ref node-ref
|
||||
:role "button"
|
||||
:title (:name file)
|
||||
|
||||
@ -180,6 +180,12 @@ $thumbnail-default-height: px2rem(168);
|
||||
}
|
||||
}
|
||||
|
||||
.grid-item-button {
|
||||
inline-size: 100%;
|
||||
block-size: 100%;
|
||||
padding: 0 px2rem(6);
|
||||
}
|
||||
|
||||
.project-thumbnail-actions {
|
||||
align-items: center;
|
||||
display: flex;
|
||||
@ -328,7 +334,7 @@ $thumbnail-default-height: px2rem(168);
|
||||
// ─── LIBRARY ───────────────────────────────────
|
||||
|
||||
.library-thumbnail {
|
||||
border-radius: $br-4;
|
||||
border-radius: $br-8;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
background-color: var(--color-background-tertiary);
|
||||
|
||||
@ -19,6 +19,7 @@
|
||||
[app.main.data.team :as dtm]
|
||||
[app.main.refs :as refs]
|
||||
[app.main.repo :as rp]
|
||||
[app.main.router :as rt]
|
||||
[app.main.store :as st]
|
||||
[app.main.ui.alert]
|
||||
[app.main.ui.components.dropdown :refer [dropdown]]
|
||||
@ -87,6 +88,7 @@
|
||||
|
||||
route (mf/deref refs/route)
|
||||
invite-email (-> route :query-params :invite-email)
|
||||
team-id (:id team)
|
||||
|
||||
members-section? (= section :dashboard-team-members)
|
||||
settings-section? (= section :dashboard-team-settings)
|
||||
@ -101,15 +103,20 @@
|
||||
|
||||
on-invite-member
|
||||
(mf/use-fn
|
||||
(mf/deps team invite-email)
|
||||
(mf/deps team-id invite-email)
|
||||
(fn []
|
||||
(st/emit! (dtm/check-and-invite-members {:team-id (:id team)
|
||||
(st/emit! (dtm/check-and-invite-members {:team-id team-id
|
||||
:origin :team
|
||||
:invite-email invite-email}))))]
|
||||
|
||||
(mf/with-effect [team invite-email]
|
||||
(when invite-email
|
||||
(on-invite-member)))
|
||||
;; Depend on `team-id` (stable) rather than `team` (a map whose
|
||||
;; reference changes on every teams/members fetch) and clear
|
||||
;; `invite-email` from the URL once consumed, so this can't
|
||||
;; keep re-triggering `check-and-invite-members` in a loop.
|
||||
(mf/with-effect [team-id invite-email]
|
||||
(when (and team-id invite-email)
|
||||
(on-invite-member)
|
||||
(st/emit! (rt/nav (get-in route [:data :name]) {:team-id team-id} {::rt/replace true}))))
|
||||
|
||||
[:header {:class (stl/css :dashboard-header :team) :data-testid "dashboard-header"}
|
||||
[:div {:class (stl/css :dashboard-title)}
|
||||
|
||||
@ -353,10 +353,15 @@
|
||||
:text-direction (sr/untranslate-text-direction (text-editor-get-style-property text-direction-state text-direction-value))
|
||||
:text-decoration (sr/untranslate-text-decoration (text-editor-get-style-property text-decoration-state text-decoration-value))
|
||||
:text-transform (sr/untranslate-text-transform (text-editor-get-style-property text-transform-state text-transform-value))
|
||||
:line-height (text-editor-get-style-property line-height-state line-height-value)
|
||||
:letter-spacing (text-editor-get-style-property letter-spacing-state letter-spacing-value)
|
||||
:font-size (text-editor-get-style-property font-size-state font-size-value)
|
||||
:font-weight (text-editor-get-style-property font-weight-state font-weight-value)
|
||||
;; WASM reports size/weight as numbers, but the rest of Penpot (and the backend schema) expects strings.
|
||||
:line-height (let [height (text-editor-get-style-property line-height-state line-height-value)]
|
||||
(if (= height :multiple) height (str height)))
|
||||
:letter-spacing (let [spacing (text-editor-get-style-property letter-spacing-state letter-spacing-value)]
|
||||
(if (= spacing :multiple) spacing (str spacing)))
|
||||
:font-size (let [size (text-editor-get-style-property font-size-state font-size-value)]
|
||||
(if (= size :multiple) size (str size)))
|
||||
:font-weight (let [weight (text-editor-get-style-property font-weight-state font-weight-value)]
|
||||
(if (= weight :multiple) weight (str weight)))
|
||||
:font-style font-style-value
|
||||
:font-family (text-editor-get-style-property font-family-id-state font-id)
|
||||
:font-id (text-editor-get-style-property font-family-id-state font-id)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user