From 13d4d3445345b2e900f5ae27843208b7c519cdd2 Mon Sep 17 00:00:00 2001 From: Jan Prochazka Date: Sat, 8 Oct 2022 08:09:45 +0200 Subject: [PATCH] cond-disable ER diagram and query design #386 --- packages/web/src/commands/stdCommands.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/web/src/commands/stdCommands.ts b/packages/web/src/commands/stdCommands.ts index 951a6759..d5d7834f 100644 --- a/packages/web/src/commands/stdCommands.ts +++ b/packages/web/src/commands/stdCommands.ts @@ -127,6 +127,9 @@ registerCommand({ name: 'Query design', menuName: 'New query design', onClick: () => newQueryDesign(), + testEnabled: () => + getCurrentDatabase() && + findEngineDriver(getCurrentDatabase()?.connection, getExtensions())?.databaseEngineTypes?.includes('sql'), }); registerCommand({ @@ -144,6 +147,9 @@ registerCommand({ icon: 'img diagram', name: 'ER Diagram', menuName: 'New ER diagram', + testEnabled: () => + getCurrentDatabase() && + findEngineDriver(getCurrentDatabase()?.connection, getExtensions())?.databaseEngineTypes?.includes('sql'), onClick: () => newDiagram(), });