From 9b032ecae448b6ce8bcfecb5556e6053a4f09085 Mon Sep 17 00:00:00 2001 From: Laurent Nguyen Date: Wed, 18 Oct 2023 08:30:45 +0000 Subject: [PATCH] Turn off "New Database" for Fabric (#1663) * Turn off "New Database" for Fabric * Fix format --- .../CommandBarComponentButtonFactory.tsx | 2 +- src/Explorer/Panes/AddCollectionPanel.tsx | 63 ++++++++++--------- 2 files changed, 34 insertions(+), 31 deletions(-) diff --git a/src/Explorer/Menus/CommandBar/CommandBarComponentButtonFactory.tsx b/src/Explorer/Menus/CommandBar/CommandBarComponentButtonFactory.tsx index ca6411f71..a6ae0f2f2 100644 --- a/src/Explorer/Menus/CommandBar/CommandBarComponentButtonFactory.tsx +++ b/src/Explorer/Menus/CommandBar/CommandBarComponentButtonFactory.tsx @@ -67,7 +67,7 @@ export function createStaticCommandBarButtons( } } - if (userContext.apiType !== "Tables") { + if (userContext.apiType !== "Tables" && configContext.platform !== Platform.Fabric) { newCollectionBtn.children = [createNewCollectionGroup(container)]; const newDatabaseBtn = createNewDatabase(container); newCollectionBtn.children.push(newDatabaseBtn); diff --git a/src/Explorer/Panes/AddCollectionPanel.tsx b/src/Explorer/Panes/AddCollectionPanel.tsx index 33ce4bda3..2427c46d2 100644 --- a/src/Explorer/Panes/AddCollectionPanel.tsx +++ b/src/Explorer/Panes/AddCollectionPanel.tsx @@ -114,7 +114,8 @@ export class AddCollectionPanel extends React.Component - -
- - Create new + {configContext.platform !== Platform.Fabric && ( + +
+ + Create new - - Use existing -
-
+ + Use existing +
+
+ )} {this.state.createNewDatabase && (