web UI
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
using MudBlazor;
|
||||
using VisionBuilder.UI.Blazor.Dialogs;
|
||||
using VisionBuilder.UI.Common.Services;
|
||||
|
||||
namespace VisionBuilder.UI.Blazor.Services;
|
||||
|
||||
public class BlazorPasswordInputService : IPasswordInputService
|
||||
{
|
||||
private IDialogService? _dialogService;
|
||||
|
||||
public void SetDialogService(IDialogService dialogService)
|
||||
{
|
||||
_dialogService = dialogService;
|
||||
}
|
||||
|
||||
public async Task<string?> GetPasswordAsync()
|
||||
{
|
||||
if (_dialogService == null)
|
||||
return null;
|
||||
|
||||
var dialog = await _dialogService.ShowAsync<PasswordInputDialog>("Password Required");
|
||||
var result = await dialog.Result;
|
||||
if (result != null && !result.Canceled)
|
||||
return result.Data as string;
|
||||
return null;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user