fix(sql-files): distinguish files with duplicate names

This commit is contained in:
t8y2 committed 2026-07-11 18:32:17 +08:00
1 parent e4563f9659
commit 1dd4623919
13 files changed
+151 -12

No files matched your search

+6 -3
View File
@@ -26,9 +26,12 @@ export function useFileDrop() {
const connectionId = connectionStore.activeConnectionId || connectionStore.connections[0]?.id || "";
const connection = connectionId ? connectionStore.getConfig(connectionId) : undefined;
const database = connection?.database || "";
const tabId = queryStore.createTab(connectionId, database, name, "query");
queryStore.updateSql(tabId, content);
if (path) queryStore.linkExternalSqlPath(tabId, path, name);
if (path) {
queryStore.openExternalSqlFile(connectionId, database, path, content);
} else {
const tabId = queryStore.createTab(connectionId, database, name, "query");
queryStore.updateSql(tabId, content);
}
toast(t("welcome.fileOpened", { name }));
}