@if (WebReport.EnableModalDialog)
{
@*CONTENT*@
}
@if (NeedPopup)
{
}
@code {
private string LocalizedCancel;
private PopupNotification _popup;
private const string PopupCssClass = "hide";
#if !WASM
private const bool NeedPopup = true;
private string LocalizedFailure;
private string LocalizedSuccess;
private async Task ShowPopup(string message, string cssClass)
{
await _popup.ShowPopup(message, cssClass);
}
private async Task ShowPositivePopup()
{
await ShowPopup(LocalizedSuccess, "positive");
}
private async Task ShowNegativePopup()
{
await ShowPopup(LocalizedFailure, "negative");
}
#else
private const bool NeedPopup = false;
#endif
[Parameter]
public WebReport WebReport { get; set; }
internal void Update()
{
StateHasChanged();
}
protected override void OnParametersSet()
{
var res = WebReport.Res;
res.Root("Buttons");
LocalizedCancel = res.Get("Cancel");
#if !WASM
res.Root("Export,Email");
LocalizedFailure = res.Get("ErrorEmailSending");
LocalizedSuccess = res.Get("SuccessfulEmailSending");
#endif
}
}