Skip to content

Commit 38e4e8e

Browse files
committed
fix conflict
2 parents 0a90ab9 + a68ea74 commit 38e4e8e

File tree

4 files changed

+10
-6
lines changed

4 files changed

+10
-6
lines changed
-283 KB
Loading

chat2db-client/src/components/Console/index.tsx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -171,9 +171,12 @@ function Console(props: IProps, ref: ForwardedRef<IConsoleRef>) {
171171
};
172172
}, [isActive]);
173173

174-
function timingAutoSave() {
174+
function timingAutoSave(status?: ConsoleStatus) {
175+
if (timerRef.current) {
176+
clearInterval(timerRef.current);
177+
}
175178
timerRef.current = setInterval(() => {
176-
if (executeParams.status === ConsoleStatus.RELEASE) {
179+
if (executeParams.status === ConsoleStatus.RELEASE || status === ConsoleStatus.RELEASE) {
177180
const p: any = {
178181
id: executeParams.consoleId,
179182
ddl: editorRef?.current?.getAllContent(),
@@ -186,7 +189,7 @@ function Console(props: IProps, ref: ForwardedRef<IConsoleRef>) {
186189
userId: getCookie('CHAT2DB.USER_ID'),
187190
});
188191
}
189-
}, 2000);
192+
}, 5000);
190193
}
191194

192195
const tableListName = useMemo(() => {
@@ -386,6 +389,7 @@ function Console(props: IProps, ref: ForwardedRef<IConsoleRef>) {
386389
indexedDB.deleteData('chat2db', 'workspaceConsoleDDL', executeParams.consoleId!);
387390
message.success(i18n('common.tips.saveSuccessfully'));
388391
props.onConsoleSave && props.onConsoleSave();
392+
timingAutoSave(ConsoleStatus.RELEASE);
389393
});
390394
};
391395

chat2db-client/src/utils/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -244,9 +244,9 @@ export function formatSql(sql: string, dbType: DatabaseTypeCode) {
244244
// 桌面端用hash模式,web端用history模式,路由跳转
245245
export function navigate(path: string) {
246246
if (__ENV__ === 'desktop') {
247-
window.location.href = `#${path}`;
247+
window.location.replace(`#${path}`)
248248
} else {
249-
window.location.href = path;
249+
window.location.replace(path)
250250
}
251251
}
252252

chat2db-server/chat2db-server-web/chat2db-server-web-api/src/main/java/ai/chat2db/server/web/api/controller/rdb/doc/DatabaseExportService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ public void generate(String databaseName, OutputStream outputStream, ExportOptio
108108
try {
109109
export(outputStream, exportOptions);
110110
} catch (Exception e) {
111-
throw new RuntimeException("导出失败!请联系开发者,邮箱:[email protected]" + e);
111+
throw new RuntimeException("导出失败!请联系开发者" + e);
112112
}
113113
init();
114114
}

0 commit comments

Comments
 (0)