mirror of
https://github.com/dbeaver/cloudbeaver.git
synced 2026-09-24 16:04:36 +08:00
CB-2904 select shared connection by default (#1373)
This commit is contained in:
+4
-2
@@ -33,8 +33,10 @@ export const CustomConnection = observer(function CustomConnection() {
|
||||
useMapResource(CustomConnection, ProjectInfoResource, CachedMapAllKey);
|
||||
|
||||
function select(driverId: string) {
|
||||
if (projectsService.activeProjects.length > 0) {
|
||||
connectionManualService.select(projectsService.activeProjects[0].id, driverId);
|
||||
const shared = projectsService.activeProjects.filter(project => project.shared);
|
||||
|
||||
if (shared.length > 0) {
|
||||
connectionManualService.select(shared[0].id, driverId);
|
||||
} else {
|
||||
notificationService.logError({
|
||||
title: 'core_projects_no_default_project',
|
||||
|
||||
Reference in New Issue
Block a user