Merge branch 'developing' of github.com:chat2db/Chat2DB into developing

This commit is contained in:
Jerry Fan
2023-08-06 18:07:12 +08:00
3 changed files with 44 additions and 31 deletions

View File

@ -3,27 +3,18 @@
## 🐞 Bug Fixes
- Activate the console for the latest operation when you create or start a console
- Records the last console used
- The replication function of the browser, such as edge, is unavailable
- table Indicates an error when ddl is exported after the search
- Activate the console for the latest operation when you create or start a console、Records the last console used
- The replication function of the browser, such as edge, is unavailable
- table Indicates an error when ddl is exported after the search
- Adds table comments and column field types and comments
## 🐞 问题修复
- 新建、开打console时激活最新操作的console
- 记录最后一次使用的console
- 新建、开打console时激活最新操作的console、记录最后一次使用的console
- edge等浏览器复制功能无法正常使用
- table搜索后导出ddl报错
- 增加表注释以及列字段类型和注释
- 当数据源添加了database默认选择第一个database
# 2.0.9

View File

@ -15,16 +15,16 @@ import styles from './index.less';
const { Option } = Select;
const themeList = [
{
code: ThemeType.Dark,
name: i18n('setting.text.dark'),
img: themeDarkImg,
},
{
code: ThemeType.Light,
name: i18n('setting.text.light'),
img: themeLightImg,
},
{
code: ThemeType.Dark,
name: i18n('setting.text.dark'),
img: themeDarkImg,
},
{
code: ThemeType.FollowOs,
name: i18n('setting.text.followOS'),
@ -38,26 +38,26 @@ const themeList = [
];
const colorList = [
{
code: 'polar-blue',
name: i18n('setting.label.blue'),
color: '#1a90ff',
},
{
code: 'polar-green',
name: i18n('setting.label.green'),
color: '#039e74',
},
{
code: 'golden-purple',
name: i18n('setting.label.violet'),
color: '#9373ee',
},
{
code: 'polar-blue',
name: i18n('setting.label.blue'),
color: '#1a90ff',
},
{
code: 'blue2',
name: i18n('setting.label.violet'),
color: '#00c3ee',
},
{
code: 'polar-green',
name: i18n('setting.label.green'),
color: '#039e74',
},
{
code: 'gold',
name: i18n('setting.label.violet'),
@ -152,6 +152,16 @@ export default function BaseSetting() {
</div>
);
})}
{/* <ColorPicker placement='bottomLeft' onChange={setCustomColor}>
<div className={classnames(styles.themeColorItem, styles.customColorItem) }>
<div
className={styles.colorLump}
onClick={()=>{}}
>
自定义
</div>
</div>
</ColorPicker> */}
</ul>
</>
);

View File

@ -10,7 +10,13 @@ export function setLang(lang: LangType) {
}
export function getTheme(): ThemeType {
return (localStorage.getItem('theme') as ThemeType) || ThemeType.Light;
const themeColor:any = localStorage.getItem('theme') as ThemeType
if(themeColor){
return themeColor
}
localStorage.setItem('theme', ThemeType.Light)
// 默认主题色
return ThemeType.Light
}
export function setTheme(theme: ThemeType) {
@ -18,7 +24,13 @@ export function setTheme(theme: ThemeType) {
}
export function getPrimaryColor(): PrimaryColorType {
return (localStorage.getItem('primary-color') as PrimaryColorType) || PrimaryColorType.Polar_Blue;
const primaryColor = localStorage.getItem('primary-color') as PrimaryColorType
if(primaryColor){
return primaryColor
}
localStorage.setItem('primary-color', PrimaryColorType.Golden_Purple)
// 默认主题色
return PrimaryColorType.Golden_Purple
}
export function setPrimaryColor(primaryColor: PrimaryColorType) {