Skip to content
This repository has been archived by the owner on Oct 28, 2024. It is now read-only.

Commit

Permalink
doc:二维码
Browse files Browse the repository at this point in the history
  • Loading branch information
shanhexi committed Jun 16, 2023
2 parents 62b5879 + 86ddbb0 commit 362ba57
Show file tree
Hide file tree
Showing 10 changed files with 135 additions and 17 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# 1.0.11
* fixed: SQL有特殊字符时AI功能无法正常使用 [Issue #291](https://github.com/alibaba/Chat2DB/issues/291)
* 增减版本信息检测

# 1.0.10
* fixed: 格式化SQL异常[Issue #266](https://github.com/alibaba/Chat2DB/issues/266)
Expand Down
22 changes: 13 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ Languages: English | [中文](README_CN.md)

| Description | Download |
|-----------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Windows | [https://oss-chat2db.alibaba.com/release/1.0.10/Chat2DB%20Setup%201.0.10.exe](https://oss-chat2db.alibaba.com/release/1.0.10/Chat2DB%20Setup%201.0.10.exe) |
| MacOS ARM64 | [https://oss-chat2db.alibaba.com/release/1.0.10/Chat2DB-1.0.10-arm64.dmg](https://oss-chat2db.alibaba.com/release/1.0.10/Chat2DB-1.0.10-arm64.dmg) |
| MacOS X64 | [https://oss-chat2db.alibaba.com/release/1.0.10/Chat2DB-1.0.10.dmg](https://oss-chat2db.alibaba.com/release/1.0.10/Chat2DB-1.0.10.dmg) |
| Jar包 | [https://oss-chat2db.alibaba.com/release/1.0.10/ali-dbhub-server-start.jar](https://oss-chat2db.alibaba.com/release/1.0.10/ali-dbhub-server-start.jar) |
| Windows | [https://oss-chat2db.alibaba.com/release/1.0.11/Chat2DB%20Setup%201.0.11.exe](https://oss-chat2db.alibaba.com/release/1.0.11/Chat2DB%20Setup%201.0.11.exe) |
| MacOS ARM64 | [https://oss-chat2db.alibaba.com/release/1.0.11/Chat2DB-1.0.11-arm64.dmg](https://oss-chat2db.alibaba.com/release/1.0.11/Chat2DB-1.0.11-arm64.dmg) |
| MacOS X64 | [https://oss-chat2db.alibaba.com/release/1.0.11/Chat2DB-1.0.11.dmg](https://oss-chat2db.alibaba.com/release/1.0.11/Chat2DB-1.0.11.dmg) |
| Jar包 | [https://oss-chat2db.alibaba.com/release/1.0.11/ali-dbhub-server-start.jar](https://oss-chat2db.alibaba.com/release/1.0.11/ali-dbhub-server-start.jar) |

## 🚀 Supported databases
| Databases | Status |
Expand Down Expand Up @@ -191,17 +191,21 @@ But front debugging need mapping of resources, you can download [XSwitch](https:
## ☎️ Contact Us
Please star and fork on GitHub before joining the group.

<a><img src="https://chat2db.oss-accelerate.aliyuncs.com/static/weichat_3.PNG" width="38%"/></a>
<a><img src="https://chat2db.oss-accelerate.aliyuncs.com/static/dingding_1.PNG" width="40%"/></a>
<a><img src="./document/qrcode/weixinqun1" width="30%"/></a>
<a><img src="./document/qrcode/weixinqun2" width="30%"/></a>
<a><img src="./document/qrcode/weixinqun3" width="30%"/></a>

WeChat

WeiChat

<a><img src="./document/hexi-weixin.png" width="30%"/></a>
<a><img src="./document/qrcode/hexi-weixin.png" width="30%"/></a>
<a><img src="https://oss-chat2db.alibaba.com/static/WeChat3.jpg" width="30%"/></a>

Ding Talk:9135032392

qq

<a><img src="./document/qrcode/qqqun.png" width="30%"/></a>

## ❤️ Acknowledgements
Thanks to all the students who contributed to Chat2DB~

Expand Down
20 changes: 13 additions & 7 deletions README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ Languages: 中文 [English](README.md)
## ⏬ 下载安装
| 描述 | 下载地址 |
|-----------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Windows | [https://oss-chat2db.alibaba.com/release/1.0.10/Chat2DB%20Setup%201.0.10.exe](https://oss-chat2db.alibaba.com/release/1.0.10/Chat2DB%20Setup%201.0.10.exe) |
| MacOS ARM64 (Apple芯片) | [https://oss-chat2db.alibaba.com/release/1.0.10/Chat2DB-1.0.10-arm64.dmg](https://oss-chat2db.alibaba.com/release/1.0.10/Chat2DB-1.0.10-arm64.dmg) |
| MacOS X64 (Intel芯片) | [https://oss-chat2db.alibaba.com/release/1.0.10/Chat2DB-1.0.10.dmg](https://oss-chat2db.alibaba.com/release/1.0.10/Chat2DB-1.0.10.dmg) |
| Jar包 | [https://oss-chat2db.alibaba.com/release/1.0.10/ali-dbhub-server-start.jar](https://oss-chat2db.alibaba.com/release/1.0.10/ali-dbhub-server-start.jar) |
| Windows | [https://oss-chat2db.alibaba.com/release/1.0.11/Chat2DB%20Setup%201.0.11.exe](https://oss-chat2db.alibaba.com/release/1.0.11/Chat2DB%20Setup%201.0.11.exe) |
| MacOS ARM64 (Apple芯片) | [https://oss-chat2db.alibaba.com/release/1.0.11/Chat2DB-1.0.11-arm64.dmg](https://oss-chat2db.alibaba.com/release/1.0.11/Chat2DB-1.0.11-arm64.dmg) |
| MacOS X64 (Intel芯片) | [https://oss-chat2db.alibaba.com/release/1.0.11/Chat2DB-1.0.11.dmg](https://oss-chat2db.alibaba.com/release/1.0.11/Chat2DB-1.0.11.dmg) |
| Jar包 | [https://oss-chat2db.alibaba.com/release/1.0.11/ali-dbhub-server-start.jar](https://oss-chat2db.alibaba.com/release/1.0.11/ali-dbhub-server-start.jar) |

## 🚀 支持的数据库
| 数据库 | 支持计划 |
Expand Down Expand Up @@ -209,17 +209,23 @@ $ # 注:前端页面完全赖服务,所以前端同学调试也需要把后

加群前请先Star和Fork,谢谢~

<a><img src="https://chat2db.oss-accelerate.aliyuncs.com/static/weichat_3.PNG" width="38%"/></a>
<a><img src="https://chat2db.oss-accelerate.aliyuncs.com/static/dingding_1.PNG" width="40%"/></a>
<a><img src="./document/qrcode/weixinqun1" width="30%"/></a>
<a><img src="./document/qrcode/weixinqun2" width="30%"/></a>
<a><img src="./document/qrcode/weixinqun3" width="30%"/></a>

微信

<a><img src="./document/hexi-weixin.png" width="30%"/></a>
<a><img src="./document/qrcode/hexi-weixin.png" width="30%"/></a>
<a><img src="https://oss-chat2db.alibaba.com/static/WeChat3.jpg" width="30%"/></a>

钉钉:9135032392


qq

<a><img src="./document/qrcode/qqqun.png" width="30%"/></a>



## ❤️ 致谢
感谢所有为Chat2DB贡献力量的同学们~
Expand Down
30 changes: 30 additions & 0 deletions ali-dbhub-client/src/components/Setting/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -157,3 +157,33 @@
.aiSqlSourceTitle {
margin-right: 20px;
}

.updateHint{
display: flex;
justify-content: space-between;
}

.later{
cursor: pointer;

}

.go{
cursor: pointer;
margin-left: 20px;
color: var(--custom-primary-color);
&:hover{
text-decoration: underline;
}
}

:global{
.ant-notification-notice{
background-color: var(--color-bg-300);
border-radius: 10px;
color: var(--color-text);
}
.ant-notification-notice-message,.ant-notification-notice-close{
color: var(--color-text);
}
}
79 changes: 78 additions & 1 deletion ali-dbhub-client/src/components/Setting/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import styles from './index.less';
import classnames from 'classnames';
import Iconfont from '@/components/Iconfont';
import Button from '@/components/Button';
import { Modal, Radio, Input, message, Select, Tooltip } from 'antd';
import { Modal, Radio, Input, message, Select, Tooltip, notification } from 'antd';
import i18n from '@/i18n';
import { imghub } from '@/utils/imghub';
import configService, { IChatgptConfig } from '@/service/config';
Expand Down Expand Up @@ -135,6 +135,83 @@ export default memo<IProps>(function Setting({ className, text }) {
}
}, [])

useEffect(()=>{
getVersions();
},[])

const close = () => {};

function getVersions(){
try{
const time = +(localStorage.getItem('update-hint-time')||0);
const nowTime = new Date().getTime();
if(time < nowTime){
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.open('GET', `http://test.sqlgpt.cn/gateway/client/version/check`);
xhr.onload = function () {
if (xhr.readyState === 4) {
if (xhr.status === 200) {
var responseText = xhr.responseText;
openNotification(JSON.parse(responseText));
const time = new Date().getTime() + 2*60*60*1000;
localStorage.setItem('update-hint-time',time.toString())
// 处理返回值
} else {
// 请求失败的处理
}
}
};
xhr.send();
}
}
catch{

}
}

const openNotification = (responseText:any) => {
try{
if(responseText.version !== '1.0.11'){
const key = `open${Date.now()}`;

function updateHint(){
notification.close(key);
const time = new Date().getTime() + 24*60*60*1000;
localStorage.setItem('update-hint-time',time.toString());
}

function go(){
window.open('https://chat2db.opensource.alibaba.com/docs/guides/download');
notification.close(key);
}

const btn = (
<div className={styles.updateHint}>
<div className={styles.later} onClick={ updateHint }>
稍后提醒我
</div>
<a target="_blank" href={responseText.downloadLink} className={styles.go} >
前往更新
</a>
</div>

);

notification.open({
message: '更新提醒',
description: `监测到最新版本 v${responseText.version}`,
btn,
key,
onClose: close,
});
}
}
catch{

}
};

const showModal = () => {
setIsModalVisible(true);
};
Expand Down
File renamed without changes
Binary file added document/qrcode/qqqun.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added document/qrcode/weixinqun1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added document/qrcode/weixinqun2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added document/qrcode/weixinqun3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 362ba57

Please sign in to comment.