From a54c160d83b1af7785167ef14eb917e59a2f957e Mon Sep 17 00:00:00 2001 From: jialin Date: Wed, 22 Jan 2025 17:34:07 +0800 Subject: [PATCH] fix: remove the constant deps for watch logs --- src/components/highlight-code/styles/index.less | 14 ++++++++++++++ src/components/logs-viewer/virtual-log-list.tsx | 2 +- src/global.less | 2 +- 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/src/components/highlight-code/styles/index.less b/src/components/highlight-code/styles/index.less index 5cc48d50..5d21a02f 100644 --- a/src/components/highlight-code/styles/index.less +++ b/src/components/highlight-code/styles/index.less @@ -60,10 +60,24 @@ &.dark { background-color: #282c34; + + &:hover { + &::-webkit-scrollbar-thumb { + background-color: var(--scrollbar-handle-light-bg); + border-radius: 4px; + } + } } &.light { background-color: rgb(250, 250, 250); + + &:hover { + &::-webkit-scrollbar-thumb { + background-color: var(--color-scrollbar-thumb); + border-radius: 4px; + } + } } } } diff --git a/src/components/logs-viewer/virtual-log-list.tsx b/src/components/logs-viewer/virtual-log-list.tsx index 31bf80da..d5414a32 100644 --- a/src/components/logs-viewer/virtual-log-list.tsx +++ b/src/components/logs-viewer/virtual-log-list.tsx @@ -231,7 +231,7 @@ const LogsViewer: React.FC = forwardRef((props, ref) => { return () => { chunkRequedtRef.current?.current?.abort?.(); }; - }, [url, props.params]); + }, [url]); useEffect(() => { debouncedScroll(); diff --git a/src/global.less b/src/global.less index 4d20d6a8..a4df9873 100644 --- a/src/global.less +++ b/src/global.less @@ -16,7 +16,7 @@ html { --color-scrollbar-thumb: rgba(193, 193, 193, 80%); --scrollbar-size: 6px; --scrollbar-handle-bg: rgba(0, 0, 0, 44%); - --scrollbar-handle-light-bg: rgba(255, 255, 255, 44%); + --scrollbar-handle-light-bg: rgba(255, 255, 255, 25%); --scrollbar-handle-hover-bg: rgba(0, 0, 0, 55%); --color-editor-dark: #282c34; --color-editor-light: #fafafa;