0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-02-13 10:38:13 -05:00

🐛 Fix problems in inspect tab

This commit is contained in:
alonso.torres 2023-12-13 12:42:19 +01:00
parent 9834195f0e
commit e2446fcc62
8 changed files with 65 additions and 48 deletions

View file

@ -17,7 +17,9 @@
{::mf/wrap [mf/memo] {::mf/wrap [mf/memo]
::mf/wrap-props false} ::mf/wrap-props false}
[{:keys [color on-click mini? area]}] [{:keys [color on-click mini? area]}]
(let [on-click (mf/use-fn (let [read-only? (nil? on-click)
on-click
(mf/use-fn
(mf/deps color on-click) (mf/deps color on-click)
(fn [event] (fn [event]
(when (fn? on-click) (when (fn? on-click)
@ -39,7 +41,9 @@
:is-not-library-color (nil? id) :is-not-library-color (nil? id)
:is-gradient (some? gradient) :is-gradient (some? gradient)
:is-transparent (and opacity (> 1 opacity)) :is-transparent (and opacity (> 1 opacity))
:grid-area area) :grid-area area
:read-only read-only?)
:data-readonly (str read-only?)
:on-click on-click} :on-click on-click}
(cond (cond

View file

@ -64,7 +64,7 @@
height: 100%; height: 100%;
background-color: var(--color-bullet-background-color); background-color: var(--color-bullet-background-color);
} }
&:hover { &:hover:not(.read-only) {
border: $s-2 solid var(--color-bullet-border-color-selected); border: $s-2 solid var(--color-bullet-border-color-selected);
} }
} }

View file

@ -261,7 +261,10 @@
:collapsabled-icon true :collapsabled-icon true
:rotated collapsed-css?)} :rotated collapsed-css?)}
i/arrow-refactor]] i/arrow-refactor]]
[:span {:class (stl/css :code-lang)} "CSS"]
[:& select {:default-value style-type
:class (stl/css :code-lang-select)
:options [{:label "CSS" :value "css"}]}]
[:div {:class (stl/css :action-btns)} [:div {:class (stl/css :action-btns)}
[:button {:class (stl/css :expand-button) [:button {:class (stl/css :expand-button)

View file

@ -17,12 +17,22 @@
} }
} }
.code-block { .code-block {
font-size: $fs-14;
padding: 0 $s-4 $s-8 0; padding: 0 $s-4 $s-8 0;
pre {
border-radius: $br-8;
border: $s-1 solid $db-secondary;
padding: $s-16;
}
}
.code-row-lang { .code-row-lang {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
gap: $s-4; gap: $s-4;
width: 100%; width: 100%;
}
.code-lang { .code-lang {
@include tabTitleTipography; @include tabTitleTipography;
display: flex; display: flex;
@ -43,21 +53,17 @@
} }
} }
} }
.code-lang-select { .code-lang-select {
@include tabTitleTipography; @include tabTitleTipography;
width: $s-92; width: $s-72;
border: $s-1 solid transparent; border: $s-1 solid transparent;
background-color: transparent; background-color: transparent;
color: var(--menu-foreground-color-disabled); color: var(--menu-foreground-color-disabled);
} }
}
.code-row-display { .code-row-display {
margin-bottom: $s-8; margin-bottom: $s-8;
} }
} }
}
.toggle-btn { .toggle-btn {
@include buttonStyle; @include buttonStyle;

View file

@ -203,6 +203,8 @@
[:& persistence-state-widget] [:& persistence-state-widget]
[:div {:class (stl/css :separator)}]
[:div {:class (stl/css :zoom-section)} [:div {:class (stl/css :zoom-section)}
[:& zoom-widget-workspace [:& zoom-widget-workspace

View file

@ -11,7 +11,7 @@
align-items: center; align-items: center;
min-width: $s-256; min-width: $s-256;
padding: $s-8; padding: $s-8;
gap: $s-2; gap: $s-8;
background-color: var(--panel-background-color); background-color: var(--panel-background-color);
.users-section { .users-section {
position: relative; position: relative;
@ -19,6 +19,9 @@
max-width: $s-72; max-width: $s-72;
padding: $s-4 $s-6; padding: $s-4 $s-6;
} }
.separator {
flex: 1;
}
.zoom-section { .zoom-section {
.zoom-widget { .zoom-widget {
@include buttonStyle; @include buttonStyle;
@ -27,6 +30,7 @@
justify-content: center; justify-content: center;
height: $s-28; height: $s-28;
max-width: $s-48; max-width: $s-48;
width: $s-48;
border-radius: $br-8; border-radius: $br-8;
.label { .label {
@include titleTipography; @include titleTipography;

View file

@ -35,9 +35,7 @@
[:& i18n/tr-html {:tag-name "span" [:& i18n/tr-html {:tag-name "span"
:label "workspace.top-bar.read-only"}]] :label "workspace.top-bar.read-only"}]]
[:button {:class (stl/css :done-btn) [:button {:class (stl/css :done-btn)
:on-click handle-close-view-mode} (tr "workspace.top-bar.read-only.done")] :on-click handle-close-view-mode} (tr "workspace.top-bar.read-only.done")]]]
[:button {:class (stl/css :close-btn)
:on-click handle-close-view-mode} i/close-refactor]]]
;; OLD ;; OLD
[:div.viewport-actions [:div.viewport-actions

View file

@ -22,7 +22,7 @@
margin-left: -50%; margin-left: -50%;
padding: $s-8; padding: $s-8;
pointer-events: initial; pointer-events: initial;
width: $s-512; width: $s-400;
} }
.viewport-actions-title { .viewport-actions-title {