diff --git a/packages/web/src/commands/CommandPalette.svelte b/packages/web/src/commands/CommandPalette.svelte index efecfcb38..b4148361f 100644 --- a/packages/web/src/commands/CommandPalette.svelte +++ b/packages/web/src/commands/CommandPalette.svelte @@ -23,7 +23,7 @@ testEnabled: () => getVisibleCommandPalette() != 'database', }); - function extractDbItems(db, dbConnectionInfo, connectionList) { + function extractDbItems(db, dbConnectionInfo, connectionList, $extensions) { const objectList = _.flatten( ['tables', 'collections', 'views', 'matviews', 'procedures', 'functions'].map(objectTypeField => _.sortBy( @@ -42,10 +42,14 @@ if (connection.singleDatabase) continue; if (getCurrentConfig()?.singleDbConnection) continue; const databases = getLocalStorage(`database_list_${conid}`) || []; + + const driver = findEngineDriver(connection, $extensions); + const connectionIcon = driver?.icon || 'img database'; + for (const db of databases) { databaseList.push({ text: `${db.name} on ${getConnectionLabel(connection)}`, - icon: 'img database', + icon: connectionIcon, onClick: () => switchCurrentDatabase({ connection, name: db.name }), }); } @@ -60,7 +64,7 @@