diff --git a/src/aoWebWallet/Pages/ProcessPage.razor b/src/aoWebWallet/Pages/ProcessPage.razor index b332ff9..8f4033e 100644 --- a/src/aoWebWallet/Pages/ProcessPage.razor +++ b/src/aoWebWallet/Pages/ProcessPage.razor @@ -35,33 +35,7 @@ - - List of common actions for this process: - - @if(isLoading) - { - Loading... - } - else - { - if(actions.Any()) - { - - @foreach (var action in actions) - { - - @action.Name - - } - - } - else - { - No previous calls to process found - } - } - - + diff --git a/src/aoWebWallet/Pages/WalletDetail.razor b/src/aoWebWallet/Pages/WalletDetail.razor index 9c27bca..1ac54fa 100644 --- a/src/aoWebWallet/Pages/WalletDetail.razor +++ b/src/aoWebWallet/Pages/WalletDetail.razor @@ -61,17 +61,17 @@ } - + @if (BindingContext.SelectedWallet?.Wallet.Source == WalletTypes.Explorer) - { - - } - else if(BindingContext.SelectedWallet?.Wallet != null) - { - - } + { + + } + else if (BindingContext.SelectedWallet?.Wallet != null) + { + + } @@ -208,6 +208,17 @@ } + + + + + + @if (BindingContext.SelectedWallet?.Wallet.OwnerAddress != null) + { + + } + + diff --git a/src/aoWebWallet/Shared/Components/ActionList.razor b/src/aoWebWallet/Shared/Components/ActionList.razor new file mode 100644 index 0000000..64005a0 --- /dev/null +++ b/src/aoWebWallet/Shared/Components/ActionList.razor @@ -0,0 +1,51 @@ +@using aoww.Services +@inject GraphqlClient GraphqlClient +@inject NavigationManager NavigationManager + + + Actions + List of common actions for this process: + + @if (actions == null) + { + + } + else if (actions.Count == 0) + { + No actions found. + } + else + { + + @foreach (var action in actions) + { + + @action.Name + + } + + } + + +@code { + [Parameter] + public required string ProcessId { get; set; } + + private List? actions; + + protected override async Task OnParametersSetAsync() + { + actions = null; + actions = await GraphqlClient.GetActionsForProcess(ProcessId); + StateHasChanged(); + } + + private void NavigateToActionBuilder(string? actionName = null) + { + string? action = actionName; + if (!string.IsNullOrEmpty(action)) + { + NavigationManager.NavigateTo($"/action-builder?processId={ProcessId}&actionName={Uri.EscapeDataString(action)}"); + } + } +} \ No newline at end of file diff --git a/src/aoWebWallet/Shared/Components/HandlerList.razor b/src/aoWebWallet/Shared/Components/HandlerList.razor new file mode 100644 index 0000000..b81541a --- /dev/null +++ b/src/aoWebWallet/Shared/Components/HandlerList.razor @@ -0,0 +1,40 @@ +@using ArweaveAO.Models +@inject AODataClient aoDataClient + + + Handlers + @if (handlers == null) + { + + } + else if (handlers.Count == 0) + { + No handlers found. + } + else + { + + @foreach (var handler in handlers) + { + @handler + } + + } + + +@code { + [Parameter] + public required string ProcessId { get; set; } + + [Parameter] + public required string OwnerId { get; set; } + + private List? handlers; + + protected override async Task OnParametersSetAsync() + { + handlers = null; + handlers = await aoDataClient.GetHandlers(ProcessId, OwnerId); + StateHasChanged(); + } +} \ No newline at end of file diff --git a/src/aoWebWallet/aoWebWallet.csproj b/src/aoWebWallet/aoWebWallet.csproj index efdb06c..7d53dce 100644 --- a/src/aoWebWallet/aoWebWallet.csproj +++ b/src/aoWebWallet/aoWebWallet.csproj @@ -17,7 +17,7 @@ - + diff --git a/src/aoww.ProcesModels/aoww.ProcesModels.csproj b/src/aoww.ProcesModels/aoww.ProcesModels.csproj index 193b531..c551ce1 100644 --- a/src/aoww.ProcesModels/aoww.ProcesModels.csproj +++ b/src/aoww.ProcesModels/aoww.ProcesModels.csproj @@ -8,7 +8,7 @@ - +