Hide Save/Open query buttons and New Document/Save/Update buttons for Fabric read-only (#1755)

* Remove save query button and new document buttons for Fabric. Introduce a isReadOnly flag in Fabric context

* Fix user context init
This commit is contained in:
Laurent Nguyen
2024-02-22 17:34:30 +00:00
committed by GitHub
parent 5a64fc2582
commit a36f3f7922
6 changed files with 15 additions and 3 deletions

View File

@@ -1,6 +1,7 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
/* eslint-disable no-console */
import { FeedOptions, QueryOperationOptions } from "@azure/cosmos";
import { Platform, configContext } from "ConfigContext";
import { useDialog } from "Explorer/Controls/Dialog";
import { QueryCopilotFeedbackModal } from "Explorer/QueryCopilot/Modal/QueryCopilotFeedbackModal";
import { useCopilotStore } from "Explorer/QueryCopilot/QueryCopilotContext";
@@ -402,7 +403,7 @@ export default class QueryTabComponent extends React.Component<IQueryTabComponen
});
}
if (this.saveQueryButton.visible) {
if (this.saveQueryButton.visible && configContext.platform !== Platform.Fabric) {
const label = "Save Query";
buttons.push({
iconSrc: SaveQueryIcon,