mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2026-01-01 07:11:23 +00:00
Add Report Abuse dialog for public gallery notebooks (#265)

This commit is contained in:
@@ -88,6 +88,7 @@ import TabsBase from "./Tabs/TabsBase";
|
||||
import { CommandButtonComponentProps } from "./Controls/CommandButton/CommandButtonComponent";
|
||||
import { updateUserContext, userContext } from "../UserContext";
|
||||
import { stringToBlob } from "../Utils/BlobUtils";
|
||||
import { IChoiceGroupProps } from "office-ui-fabric-react";
|
||||
|
||||
BindingHandlersRegisterer.registerBindingHandlers();
|
||||
// Hold a reference to ComponentRegisterer to prevent transpiler to ignore import
|
||||
@@ -2385,42 +2386,16 @@ export default class Explorer {
|
||||
}
|
||||
|
||||
public showOkCancelModalDialog(
|
||||
title: string,
|
||||
msg: string,
|
||||
okLabel: string,
|
||||
onOk: () => void,
|
||||
cancelLabel: string,
|
||||
onCancel: () => void
|
||||
): void {
|
||||
this._dialogProps({
|
||||
isModal: true,
|
||||
visible: true,
|
||||
title,
|
||||
subText: msg,
|
||||
primaryButtonText: okLabel,
|
||||
secondaryButtonText: cancelLabel,
|
||||
onPrimaryButtonClick: () => {
|
||||
this._closeModalDialog();
|
||||
onOk && onOk();
|
||||
},
|
||||
onSecondaryButtonClick: () => {
|
||||
this._closeModalDialog();
|
||||
onCancel && onCancel();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public showOkCancelTextFieldModalDialog(
|
||||
title: string,
|
||||
msg: string,
|
||||
okLabel: string,
|
||||
onOk: () => void,
|
||||
cancelLabel: string,
|
||||
onCancel: () => void,
|
||||
textFieldProps: TextFieldProps,
|
||||
choiceGroupProps?: IChoiceGroupProps,
|
||||
textFieldProps?: TextFieldProps,
|
||||
isPrimaryButtonDisabled?: boolean
|
||||
): void {
|
||||
let textFieldValue: string = null;
|
||||
this._dialogProps({
|
||||
isModal: true,
|
||||
visible: true,
|
||||
@@ -2436,8 +2411,9 @@ export default class Explorer {
|
||||
this._closeModalDialog();
|
||||
onCancel && onCancel();
|
||||
},
|
||||
primaryButtonDisabled: isPrimaryButtonDisabled,
|
||||
textFieldProps
|
||||
choiceGroupProps,
|
||||
textFieldProps,
|
||||
primaryButtonDisabled: isPrimaryButtonDisabled
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user