Skip to content

Commit

Permalink
Merge branch 'developing' of github.com:chat2db/Chat2DB into developing
Browse files Browse the repository at this point in the history
  • Loading branch information
JerryFan626 committed Aug 6, 2023
2 parents 9c2cad5 + 5dbee47 commit 31b0b34
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 31 deletions.
19 changes: 5 additions & 14 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
40 changes: 25 additions & 15 deletions chat2db-client/src/blocks/Setting/BaseSetting/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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'),
Expand All @@ -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'),
Expand Down Expand Up @@ -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>
</>
);
Expand Down
16 changes: 14 additions & 2 deletions chat2db-client/src/utils/localStorage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,27 @@ 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) {
return localStorage.setItem('theme', theme);
}

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) {
Expand Down

0 comments on commit 31b0b34

Please sign in to comment.