Skip to content

Commit e3b6f52

Browse files
committed
Merge branch 'main' into dev
2 parents 75517c7 + 49df07f commit e3b6f52

4 files changed

Lines changed: 31 additions & 29 deletions

File tree

chat2db-client/src/blocks/Tree/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@ const TreeNode = memo((props: TreeNodeIProps) => {
394394
zIndex: 1080,
395395
}}
396396
>
397-
<Tooltip placement="right" color={window._AppThemePack.colorPrimary} title={treeNodeData.comment}>
397+
<Tooltip placement="right" color={window._AppThemePack?.colorPrimary} title={treeNodeData.comment}>
398398
<div
399399
className={classnames(styles.treeNode, { [styles.treeNodeFocus]: isFocus })}
400400
onClick={handelClickTreeNode}

chat2db-client/src/components/MonacoEditor/useMonacoTheme.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ function useMonacoTheme() {
88
const [appTheme] = useTheme();
99
// 监听主题色变化切换编辑器主题色
1010
useEffect(() => {
11-
const { colorPrimary, colorBgBase, colorTextBase } = window._AppThemePack;
11+
const { colorPrimary, colorBgBase, colorTextBase } = window._AppThemePack || {};
1212

1313
const colors = {
1414
'editor.lineHighlightBackground': colorPrimary + '14', // 当前行背景色

chat2db-client/src/pages/login/index.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import Iconfont from '@/components/Iconfont';
88
import i18n from '@/i18n';
99
// import { useNavigate } from 'react-router-dom';
1010
import { logoutClearSomeLocalStorage, navigate } from '@/utils';
11-
import { queryCurUser } from '@/store/user'
11+
import { queryCurUser } from '@/store/user';
1212

1313
interface IFormData {
1414
userName: string;
@@ -38,8 +38,9 @@ const Login: React.FC = () => {
3838
<div className={styles.loginWelcome}>{i18n('login.text.welcome')}</div>
3939
<Tooltip
4040
placement="right"
41+
color={window._AppThemePack?.colorBgBase}
4142
title={
42-
<div>
43+
<div style={{ color: window._AppThemePack?.colorText, opacity: 0.8, padding: '8px 4px' }}>
4344
{i18n('login.text.tips')}
4445
</div>
4546
}

chat2db-client/src/styles/global.less

Lines changed: 26 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -26,35 +26,36 @@ input:-webkit-autofill {
2626
caret-color: var(--color-text) !important; // 光标的颜色
2727
}
2828

29-
::-webkit-scrollbar {
30-
width: 6px;
31-
height: 6px;
32-
}
33-
34-
::-webkit-scrollbar-thumb {
35-
background-color: var(--color-fill);
36-
border-radius: 2px;
37-
}
29+
* {
30+
::-webkit-scrollbar {
31+
cursor: pointer;
32+
width: 4px;
33+
height: 4px;
34+
background-color: transparent;
35+
}
3836

39-
::-webkit-scrollbar-button {
40-
width: 0;
41-
height: 0;
42-
background: transparent;
43-
}
37+
::-webkit-scrollbar-thumb {
38+
cursor: pointer;
39+
background-color: transparent;
40+
border-radius: 2px;
41+
// transition: background-color 500ms ${token.motionEaseOut};
4442

45-
::-webkit-scrollbar-track {
46-
background: transparent;
47-
width: 0px;
48-
cursor: pointer;
49-
}
43+
&:hover {
44+
background-color: var(--color-text);
45+
}
46+
}
5047

51-
::-webkit-scrollbar-corner {
52-
background: transparent;
53-
}
48+
::-webkit-scrollbar-corner {
49+
display: none;
50+
width: 0;
51+
height: 0;
52+
}
5453

55-
* {
56-
scrollbar-width: 4px; // 宽度:auto(默认),thin(窄),none(隐藏)
57-
scrollbar-color: var(--color-fill) transparent; // 颜色:第一个颜色是滑块颜色,第二个颜色是轨道颜色
54+
&:hover {
55+
::-webkit-scrollbar-thumb {
56+
background-color: var(--color-fill);
57+
}
58+
}
5859
}
5960

6061
html,

0 commit comments

Comments
 (0)