Skip to content

Commit 4e7a7c6

Browse files
committed
fix: fix some bug
1 parent 64d2bec commit 4e7a7c6

6 files changed

Lines changed: 24 additions & 7 deletions

File tree

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
2+
3+
4+
export default {
5+
namespace: 'connection',
6+
state: {
7+
connectionList: [],
8+
},
9+
10+
reducers: {
11+
// 获取连接池列表
12+
}
13+
}

chat2db-client/src/pages/main/connections/index.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,6 @@ export default memo<IProps>(function Connections(props) {
9494
onClick: async ({ domEvent }) => {
9595
domEvent.preventDefault();
9696
await connectionService.remove({ id: key });
97-
// if (key === curConnection.id) {
98-
// }
9997
setCurConnection({});
10098
getConnectionList();
10199
},

chat2db-client/src/pages/main/workspace/components/WorkspaceRight/index.less

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
bottom: 0;
99
:global {
1010
.ant-tabs-tab.ant-tabs-tab-active .ant-tabs-tab-btn {
11-
color: #000 !important;
12-
font-weight: bold;
11+
color: var(--color-text) !important;
12+
font-weight: 400;
1313
}
1414
}
1515
}

chat2db-client/src/theme/dark.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ const antDarkTheme = {
2525
antdPrimaryColor,
2626
token: {
2727
...commonToken,
28+
colorText: "rgb(241, 241, 244)",
2829
colorBgBase: '#0a0b0c',
2930
colorHoverBg: 'hsla(0, 0%, 100%, 0.03)',
3031
colorBgContainer: '#0a0b0c',

chat2db-client/src/theme/light.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ const antdLightTheme = {
2525
antdPrimaryColor,
2626
token: {
2727
...commonToken,
28+
colorText: "#232429",
2829
colorBgBase: '#fff',
2930
colorHoverBg: '#eee',
3031
colorBgContainer: '#fff',

chat2db-client/src/utils/eventSource.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,15 @@ const connectToEventSource = (params: {
1212
throw new Error('url, onMessage, and onError are required');
1313
}
1414

15-
const eventSource = new EventSourcePolyfill(`${window._BaseURL}${url}`, {
15+
const DBHUB = localStorage.getItem('DBHUB');
16+
const p = {
1617
headers: {
1718
uid,
18-
DBHUB: localStorage.getItem('DBHUB') || ''
19-
},
19+
DBHUB,
20+
}
21+
}
22+
const eventSource = new EventSourcePolyfill(`${window._BaseURL}${url}`, {
23+
p
2024
});
2125

2226
eventSource.onmessage = (event) => {

0 commit comments

Comments
 (0)