fix: code block bottom space

This commit is contained in:
Tienson Qin
2025-04-09 19:02:21 +08:00
parent a74c99af0f
commit 25ba3e6b7d
5 changed files with 6 additions and 11 deletions

View File

@@ -3954,10 +3954,10 @@
[:div.ui-fenced-code-editor.flex.w-full
{:ref (fn [el]
(set-inside-portal? (and el (whiteboard-handler/inside-portal? el))))
:on-mouse-over #(dom/add-class! (hooks/deref *actions-ref) "opacity-100")
:on-mouse-over #(dom/add-class! (hooks/deref *actions-ref) "!opacity-100")
:on-mouse-leave (fn [e]
(when (dom/has-class? (.-target e) "code-editor")
(dom/remove-class! (hooks/deref *actions-ref) "opacity-100")))}
(dom/remove-class! (hooks/deref *actions-ref) "!opacity-100")))}
(cond
(nil? inside-portal?) nil
@@ -3969,7 +3969,7 @@
:else
[:div.ls-code-editor-wrap
[:div.code-block-actions.flex.flex-row.gap-1.opacity-0.transition-opacity.ease-in.duration-300
[:div.code-block-actions
{:ref *actions-ref}
(shui/button
{:variant :text

View File

@@ -1036,7 +1036,7 @@ html.is-mac {
}
> .code-block-actions {
@apply absolute right-1 top-1 select-none z-[1] text-xs bg-gray-01;
@apply flex flex-row gap-1 opacity-0 transition-opacity ease-in duration-300 absolute right-1 top-1 select-none z-[1] text-xs bg-gray-01;
button {
@apply !py-0 h-4 text-muted-foreground hover:text-foreground text-xs px-1;

View File

@@ -549,7 +549,7 @@
(fn [e]
(.stopPropagation e)))
(.save editor)
(.setSize editor "100%" 600)
(.setSize editor "100%" 1024)
(.refresh editor)))
editor))

View File

@@ -45,11 +45,6 @@
border-radius: 2px;
line-height: 1.45em;
&-scroll {
padding-top: 14px;
padding-bottom: 62px;
}
&:not(.CodeMirror-focused) {
.CodeMirror-activeline-background {
background: unset !important;