mirror of
https://github.com/penpot/penpot.git
synced 2025-07-17 14:27:14 +02:00
commit
04d8a64f63
22 changed files with 60 additions and 38 deletions
|
@ -1054,8 +1054,7 @@
|
|||
ignore-until (dm/get-in state [:workspace-file :ignore-sync-until])
|
||||
libraries-need-sync (filter #(seq (assets-need-sync % file-data ignore-until))
|
||||
(vals (get state :workspace-libraries)))
|
||||
do-more-info #(do (modal/show! :libraries-dialog {:starting-tab :updates})
|
||||
(st/emit! msg/hide))
|
||||
do-more-info #(modal/show! :libraries-dialog {:starting-tab :updates})
|
||||
do-update #(do (apply st/emit! (map (fn [library]
|
||||
(sync-file (:current-file-id state)
|
||||
(:id library)))
|
||||
|
|
|
@ -26,7 +26,9 @@
|
|||
(^function on-click color event))))]
|
||||
|
||||
(if (uc/multiple? color)
|
||||
[:div {:on-click on-click :class (stl/css :color-bullet :multiple)}]
|
||||
[:div {:class (stl/css :color-bullet :multiple)
|
||||
:on-click on-click
|
||||
:title (:color color)}]
|
||||
;; No multiple selection
|
||||
(let [color (if (string? color) {:color color :opacity 1} color)
|
||||
id (:id color)
|
||||
|
@ -44,7 +46,8 @@
|
|||
:grid-area area
|
||||
:read-only read-only?)
|
||||
:data-readonly (str read-only?)
|
||||
:on-click on-click}
|
||||
:on-click on-click
|
||||
:title (:color color)}
|
||||
|
||||
(cond
|
||||
(some? gradient)
|
||||
|
@ -72,6 +75,7 @@
|
|||
:color-text (< size 72)
|
||||
:small-text (and (>= size 64) (< size 72))
|
||||
:big-text (>= size 72))
|
||||
:title name
|
||||
:on-click on-click
|
||||
:on-double-click on-double-click}
|
||||
(if (some? image)
|
||||
|
|
|
@ -85,8 +85,9 @@
|
|||
|
||||
.big-text {
|
||||
@include inspectValue;
|
||||
@include twoLineTextEllipsis;
|
||||
color: var(--palette-text-color);
|
||||
height: $s-16;
|
||||
height: $s-28;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
|
|
|
@ -28,7 +28,6 @@
|
|||
|
||||
.current-icon {
|
||||
@include flexCenter;
|
||||
height: $s-24;
|
||||
width: $s-24;
|
||||
padding-right: $s-4;
|
||||
svg {
|
||||
|
|
|
@ -542,12 +542,11 @@
|
|||
:index index
|
||||
:thumbnail-data (:thumbnails file)}]
|
||||
|
||||
[:section {:id "viewer-section"
|
||||
:ref viewer-section-ref
|
||||
:data-viewer-section true
|
||||
:class (stl/css-case :viewer-section true
|
||||
:fulscreen fullscreen?)
|
||||
:on-click click-on-screen}
|
||||
[:section#viewer-section {:ref viewer-section-ref
|
||||
:data-viewer-section true
|
||||
:class (stl/css-case :viewer-section true
|
||||
:fulscreen fullscreen?)
|
||||
:on-click click-on-screen}
|
||||
(cond
|
||||
(empty? frames)
|
||||
[:section {:class (stl/css :empty-state)}
|
||||
|
|
|
@ -62,6 +62,7 @@
|
|||
flex-wrap: nowrap;
|
||||
margin-top: 0;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.viewer-go-prev,
|
||||
|
|
|
@ -28,7 +28,6 @@
|
|||
flex-direction: column;
|
||||
height: 100%;
|
||||
min-height: 0;
|
||||
overflow: hidden;
|
||||
padding: 0 $s-4 $s-8 0;
|
||||
|
||||
pre {
|
||||
|
|
|
@ -378,17 +378,21 @@
|
|||
[{vh :height} position x y]
|
||||
(let [;; picker height in pixels
|
||||
h 510
|
||||
|
||||
;; Checks for overflow outside the viewport height
|
||||
overflow-fix (max 0 (+ y (- 50) h (- vh)))
|
||||
max-y (- vh h)
|
||||
|
||||
x-pos 325]
|
||||
(cond
|
||||
(or (nil? x) (nil? y)) {:left "auto" :right "16rem" :top "4rem"}
|
||||
(= position :left) {:left (str (- x x-pos) "px")
|
||||
:top (str (- y 50 overflow-fix) "px")}
|
||||
(= position :left)
|
||||
(if (> y max-y)
|
||||
{:left (str (- x x-pos) "px")
|
||||
:bottom "1rem"}
|
||||
{:left (str (- x x-pos) "px")
|
||||
:top (str (- y 70) "px")})
|
||||
:else {:left (str (+ x 80) "px")
|
||||
:top (str (- y 70 overflow-fix) "px")})))
|
||||
|
||||
:top (str (- y 70) "px")})))
|
||||
|
||||
(mf/defc colorpicker-modal
|
||||
{::mf/register modal/components
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
|
||||
.colorpicker-tooltip {
|
||||
@extend .modal-background;
|
||||
top: $s-100;
|
||||
left: calc(10 * $s-140);
|
||||
width: auto;
|
||||
}
|
||||
|
|
|
@ -626,7 +626,9 @@
|
|||
(keyword))]
|
||||
(st/emit!
|
||||
(-> (dw/toggle-layout-flag flag)
|
||||
(vary-meta assoc ::ev/origin "workspace-menu"))))))]
|
||||
(vary-meta assoc ::ev/origin "workspace-menu")))
|
||||
(reset! show-menu* false)
|
||||
(reset! sub-menu* nil))))]
|
||||
|
||||
|
||||
[:*
|
||||
|
|
|
@ -481,6 +481,11 @@
|
|||
on-tab-change
|
||||
(mf/use-fn #(reset! selected-tab* %))
|
||||
|
||||
close-dialog-outside
|
||||
(mf/use-fn (fn [event]
|
||||
(when (= (dom/get-target event) (dom/get-current-target event))
|
||||
(modal/hide!))))
|
||||
|
||||
close-dialog
|
||||
(mf/use-fn (fn [_]
|
||||
(modal/hide!)
|
||||
|
@ -490,7 +495,7 @@
|
|||
(when team-id
|
||||
(st/emit! (dwl/fetch-shared-files {:team-id team-id}))))
|
||||
|
||||
[:div {:class (stl/css :modal-overlay)}
|
||||
[:div {:class (stl/css :modal-overlay) :on-click close-dialog-outside}
|
||||
[:div {:class (stl/css :modal-dialog)}
|
||||
[:button {:class (stl/css :close)
|
||||
:on-click close-dialog}
|
||||
|
|
|
@ -15,7 +15,6 @@
|
|||
width: 100%;
|
||||
z-index: $z-index-modal;
|
||||
background-color: var(--overlay-color);
|
||||
pointer-events: none; // This is to allow outside click that closes modal.
|
||||
|
||||
.modal-dialog {
|
||||
position: relative;
|
||||
|
@ -25,7 +24,6 @@
|
|||
padding: $s-32;
|
||||
border-radius: $br-10;
|
||||
background-color: var(--modal-background-color);
|
||||
pointer-events: all;
|
||||
.close {
|
||||
@extend .button-tertiary;
|
||||
position: absolute;
|
||||
|
@ -146,8 +144,10 @@
|
|||
|
||||
.section-title {
|
||||
@include titleTipography;
|
||||
color: var(--modal-title-foreground-color);
|
||||
margin-bottom: $s-12;
|
||||
}
|
||||
|
||||
.libraries-search {
|
||||
margin: $s-12 0;
|
||||
.search-icon {
|
||||
|
|
|
@ -49,13 +49,9 @@
|
|||
}
|
||||
.color-name {
|
||||
@include titleTipography;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
height: $s-28;
|
||||
padding-left: $s-6;
|
||||
@include textEllipsis;
|
||||
padding-inline: $s-6;
|
||||
border-radius: $br-8;
|
||||
width: 100%;
|
||||
flex-grow: 1;
|
||||
color: var(--input-foreground-color-active);
|
||||
}
|
||||
.detach-btn {
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
height: $s-56;
|
||||
padding: $s-8 $s-16;
|
||||
border-radius: $s-8;
|
||||
z-index: $z-index-2;
|
||||
z-index: $z-index-10;
|
||||
background-color: var(--color-background-primary);
|
||||
transition:
|
||||
top 0.3s,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue