Skip to content

Commit

Permalink
Merge branch 'main' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
JerryFan626 committed Apr 8, 2024
2 parents 75517c7 + 49df07f commit e3b6f52
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 29 deletions.
2 changes: 1 addition & 1 deletion chat2db-client/src/blocks/Tree/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ const TreeNode = memo((props: TreeNodeIProps) => {
zIndex: 1080,
}}
>
<Tooltip placement="right" color={window._AppThemePack.colorPrimary} title={treeNodeData.comment}>
<Tooltip placement="right" color={window._AppThemePack?.colorPrimary} title={treeNodeData.comment}>
<div
className={classnames(styles.treeNode, { [styles.treeNodeFocus]: isFocus })}
onClick={handelClickTreeNode}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ function useMonacoTheme() {
const [appTheme] = useTheme();
// 监听主题色变化切换编辑器主题色
useEffect(() => {
const { colorPrimary, colorBgBase, colorTextBase } = window._AppThemePack;
const { colorPrimary, colorBgBase, colorTextBase } = window._AppThemePack || {};

const colors = {
'editor.lineHighlightBackground': colorPrimary + '14', // 当前行背景色
Expand Down
5 changes: 3 additions & 2 deletions chat2db-client/src/pages/login/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import Iconfont from '@/components/Iconfont';
import i18n from '@/i18n';
// import { useNavigate } from 'react-router-dom';
import { logoutClearSomeLocalStorage, navigate } from '@/utils';
import { queryCurUser } from '@/store/user'
import { queryCurUser } from '@/store/user';

interface IFormData {
userName: string;
Expand Down Expand Up @@ -38,8 +38,9 @@ const Login: React.FC = () => {
<div className={styles.loginWelcome}>{i18n('login.text.welcome')}</div>
<Tooltip
placement="right"
color={window._AppThemePack?.colorBgBase}
title={
<div>
<div style={{ color: window._AppThemePack?.colorText, opacity: 0.8, padding: '8px 4px' }}>
{i18n('login.text.tips')}
</div>
}
Expand Down
51 changes: 26 additions & 25 deletions chat2db-client/src/styles/global.less
Original file line number Diff line number Diff line change
Expand Up @@ -26,35 +26,36 @@ input:-webkit-autofill {
caret-color: var(--color-text) !important; // 光标的颜色
}

::-webkit-scrollbar {
width: 6px;
height: 6px;
}

::-webkit-scrollbar-thumb {
background-color: var(--color-fill);
border-radius: 2px;
}
* {
::-webkit-scrollbar {
cursor: pointer;
width: 4px;
height: 4px;
background-color: transparent;
}

::-webkit-scrollbar-button {
width: 0;
height: 0;
background: transparent;
}
::-webkit-scrollbar-thumb {
cursor: pointer;
background-color: transparent;
border-radius: 2px;
// transition: background-color 500ms ${token.motionEaseOut};

::-webkit-scrollbar-track {
background: transparent;
width: 0px;
cursor: pointer;
}
&:hover {
background-color: var(--color-text);
}
}

::-webkit-scrollbar-corner {
background: transparent;
}
::-webkit-scrollbar-corner {
display: none;
width: 0;
height: 0;
}

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

html,
Expand Down

0 comments on commit e3b6f52

Please sign in to comment.