Small UI fixes
This commit is contained in:
@@ -3,7 +3,7 @@
|
|||||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||||
xmlns:shared="clr-namespace:DiunaBI.UI.Shared.Components;assembly=DiunaBI.UI.Shared"
|
xmlns:shared="clr-namespace:DiunaBI.UI.Shared.Components;assembly=DiunaBI.UI.Shared"
|
||||||
x:Class="DiunaBI.UI.Mobile.MainPage"
|
x:Class="DiunaBI.UI.Mobile.MainPage"
|
||||||
Title="DiunaBI">
|
Title="DiunaBI App">
|
||||||
|
|
||||||
<BlazorWebView x:Name="BlazorWebView" HostPage="wwwroot/index.html">
|
<BlazorWebView x:Name="BlazorWebView" HostPage="wwwroot/index.html">
|
||||||
<BlazorWebView.RootComponents>
|
<BlazorWebView.RootComponents>
|
||||||
|
|||||||
@@ -34,7 +34,7 @@
|
|||||||
Dense="true"
|
Dense="true"
|
||||||
Hover="true"
|
Hover="true"
|
||||||
Loading="isLoading"
|
Loading="isLoading"
|
||||||
LoadingProgressColor="Color.Info"
|
LoadingProgressColor="Color.Primary"
|
||||||
OnRowClick="@((TableRowClickEventArgs<DataInboxDto> args) => OnRowClick(args.Item))"
|
OnRowClick="@((TableRowClickEventArgs<DataInboxDto> args) => OnRowClick(args.Item))"
|
||||||
T="DataInboxDto"
|
T="DataInboxDto"
|
||||||
Style="cursor: pointer;">
|
Style="cursor: pointer;">
|
||||||
@@ -43,10 +43,10 @@
|
|||||||
<MudTh>Source</MudTh>
|
<MudTh>Source</MudTh>
|
||||||
<MudTh>Created At</MudTh>
|
<MudTh>Created At</MudTh>
|
||||||
</HeaderContent>
|
</HeaderContent>
|
||||||
<RowTemplate>
|
<RowTemplate Context="row">
|
||||||
<MudTd DataLabel="Name">@context.Name</MudTd>
|
<MudTd DataLabel="Name"><div @oncontextmenu="@(async (e) => await OnRowRightClick(e, row))" @oncontextmenu:preventDefault="true">@row.Name</div></MudTd>
|
||||||
<MudTd DataLabel="Source">@context.Source</MudTd>
|
<MudTd DataLabel="Source"><div @oncontextmenu="@(async (e) => await OnRowRightClick(e, row))" @oncontextmenu:preventDefault="true">@row.Source</div></MudTd>
|
||||||
<MudTd DataLabel="Created At">@context.CreatedAt.ToString("yyyy-MM-dd HH:mm:ss")</MudTd>
|
<MudTd DataLabel="Created At"><div @oncontextmenu="@(async (e) => await OnRowRightClick(e, row))" @oncontextmenu:preventDefault="true">@row.CreatedAt.ToString("yyyy-MM-dd HH:mm:ss")</div></MudTd>
|
||||||
</RowTemplate>
|
</RowTemplate>
|
||||||
<NoRecordsContent>
|
<NoRecordsContent>
|
||||||
<MudText>No data inbox items to display</MudText>
|
<MudText>No data inbox items to display</MudText>
|
||||||
|
|||||||
@@ -1,8 +1,10 @@
|
|||||||
using DiunaBI.UI.Shared.Services;
|
using DiunaBI.UI.Shared.Services;
|
||||||
using Microsoft.AspNetCore.Components;
|
using Microsoft.AspNetCore.Components;
|
||||||
|
using Microsoft.AspNetCore.Components.Web;
|
||||||
using DiunaBI.Application.DTOModels;
|
using DiunaBI.Application.DTOModels;
|
||||||
using DiunaBI.Application.DTOModels.Common;
|
using DiunaBI.Application.DTOModels.Common;
|
||||||
using MudBlazor;
|
using MudBlazor;
|
||||||
|
using Microsoft.JSInterop;
|
||||||
|
|
||||||
namespace DiunaBI.UI.Shared.Components;
|
namespace DiunaBI.UI.Shared.Components;
|
||||||
|
|
||||||
@@ -12,6 +14,7 @@ public partial class DataInboxListComponent : ComponentBase
|
|||||||
[Inject] private ISnackbar Snackbar { get; set; } = default!;
|
[Inject] private ISnackbar Snackbar { get; set; } = default!;
|
||||||
[Inject] private NavigationManager NavigationManager { get; set; } = default!;
|
[Inject] private NavigationManager NavigationManager { get; set; } = default!;
|
||||||
[Inject] private DataInboxFilterStateService FilterStateService { get; set; } = default!;
|
[Inject] private DataInboxFilterStateService FilterStateService { get; set; } = default!;
|
||||||
|
[Inject] private IJSRuntime JSRuntime { get; set; } = default!;
|
||||||
|
|
||||||
|
|
||||||
private PagedResult<DataInboxDto> dataInbox = new();
|
private PagedResult<DataInboxDto> dataInbox = new();
|
||||||
@@ -66,4 +69,10 @@ public partial class DataInboxListComponent : ComponentBase
|
|||||||
{
|
{
|
||||||
NavigationManager.NavigateTo($"/datainbox/{dataInboxItem.Id}");
|
NavigationManager.NavigateTo($"/datainbox/{dataInboxItem.Id}");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private async Task OnRowRightClick(MouseEventArgs e, DataInboxDto dataInboxItem)
|
||||||
|
{
|
||||||
|
var url = NavigationManager.ToAbsoluteUri($"/datainbox/{dataInboxItem.Id}").ToString();
|
||||||
|
await JSRuntime.InvokeVoidAsync("open", url, "_blank");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -47,7 +47,7 @@
|
|||||||
Dense="true"
|
Dense="true"
|
||||||
Hover="true"
|
Hover="true"
|
||||||
Loading="isLoading"
|
Loading="isLoading"
|
||||||
LoadingProgressColor="Color.Info"
|
LoadingProgressColor="Color.Primary"
|
||||||
OnRowClick="@((TableRowClickEventArgs<LayerDto> args) => OnRowClick(args.Item))"
|
OnRowClick="@((TableRowClickEventArgs<LayerDto> args) => OnRowClick(args.Item))"
|
||||||
T="LayerDto"
|
T="LayerDto"
|
||||||
Style="cursor: pointer;">
|
Style="cursor: pointer;">
|
||||||
@@ -55,9 +55,9 @@
|
|||||||
<MudTh>Name</MudTh>
|
<MudTh>Name</MudTh>
|
||||||
<MudTh>Type</MudTh>
|
<MudTh>Type</MudTh>
|
||||||
</HeaderContent>
|
</HeaderContent>
|
||||||
<RowTemplate>
|
<RowTemplate Context="row">
|
||||||
<MudTd DataLabel="Name">@context.Name</MudTd>
|
<MudTd DataLabel="Name"><div @oncontextmenu="@(async (e) => await OnRowRightClick(e, row))" @oncontextmenu:preventDefault="true">@row.Name</div></MudTd>
|
||||||
<MudTd DataLabel="Type">@context.Type</MudTd>
|
<MudTd DataLabel="Type"><div @oncontextmenu="@(async (e) => await OnRowRightClick(e, row))" @oncontextmenu:preventDefault="true">@row.Type</div></MudTd>
|
||||||
</RowTemplate>
|
</RowTemplate>
|
||||||
<NoRecordsContent>
|
<NoRecordsContent>
|
||||||
<MudText>No layers to display</MudText>
|
<MudText>No layers to display</MudText>
|
||||||
|
|||||||
@@ -1,8 +1,10 @@
|
|||||||
using DiunaBI.UI.Shared.Services;
|
using DiunaBI.UI.Shared.Services;
|
||||||
using Microsoft.AspNetCore.Components;
|
using Microsoft.AspNetCore.Components;
|
||||||
|
using Microsoft.AspNetCore.Components.Web;
|
||||||
using DiunaBI.Application.DTOModels;
|
using DiunaBI.Application.DTOModels;
|
||||||
using DiunaBI.Application.DTOModels.Common;
|
using DiunaBI.Application.DTOModels.Common;
|
||||||
using MudBlazor;
|
using MudBlazor;
|
||||||
|
using Microsoft.JSInterop;
|
||||||
|
|
||||||
namespace DiunaBI.UI.Shared.Components;
|
namespace DiunaBI.UI.Shared.Components;
|
||||||
|
|
||||||
@@ -12,6 +14,7 @@ public partial class LayerListComponent : ComponentBase
|
|||||||
[Inject] private ISnackbar Snackbar { get; set; } = default!;
|
[Inject] private ISnackbar Snackbar { get; set; } = default!;
|
||||||
[Inject] private NavigationManager NavigationManager { get; set; } = default!;
|
[Inject] private NavigationManager NavigationManager { get; set; } = default!;
|
||||||
[Inject] private LayerFilterStateService FilterStateService { get; set; } = default!;
|
[Inject] private LayerFilterStateService FilterStateService { get; set; } = default!;
|
||||||
|
[Inject] private IJSRuntime JSRuntime { get; set; } = default!;
|
||||||
|
|
||||||
|
|
||||||
private PagedResult<LayerDto> layers = new();
|
private PagedResult<LayerDto> layers = new();
|
||||||
@@ -80,4 +83,10 @@ public partial class LayerListComponent : ComponentBase
|
|||||||
{
|
{
|
||||||
NavigationManager.NavigateTo($"/layers/{layer.Id}");
|
NavigationManager.NavigateTo($"/layers/{layer.Id}");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private async Task OnRowRightClick(MouseEventArgs e, LayerDto layer)
|
||||||
|
{
|
||||||
|
var url = NavigationManager.ToAbsoluteUri($"/layers/{layer.Id}").ToString();
|
||||||
|
await JSRuntime.InvokeVoidAsync("open", url, "_blank");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -11,6 +11,7 @@
|
|||||||
<MudText Typo="Typo.h5">Layer Details</MudText>
|
<MudText Typo="Typo.h5">Layer Details</MudText>
|
||||||
</CardHeaderContent>
|
</CardHeaderContent>
|
||||||
<CardHeaderActions>
|
<CardHeaderActions>
|
||||||
|
<!--
|
||||||
<MudButton Variant="Variant.Text" OnClick="Export">Export</MudButton>
|
<MudButton Variant="Variant.Text" OnClick="Export">Export</MudButton>
|
||||||
@if (layer != null && layer.Type == LayerType.Administration)
|
@if (layer != null && layer.Type == LayerType.Administration)
|
||||||
{
|
{
|
||||||
@@ -21,6 +22,7 @@
|
|||||||
{
|
{
|
||||||
<MudButton Variant="Variant.Text" OnClick="ProcessLayer">Process Layer</MudButton>
|
<MudButton Variant="Variant.Text" OnClick="ProcessLayer">Process Layer</MudButton>
|
||||||
}
|
}
|
||||||
|
-->
|
||||||
<MudButton Variant="Variant.Text" OnClick="GoBack" StartIcon="@Icons.Material.Filled.ArrowBack">Back to List</MudButton>
|
<MudButton Variant="Variant.Text" OnClick="GoBack" StartIcon="@Icons.Material.Filled.ArrowBack">Back to List</MudButton>
|
||||||
</CardHeaderActions>
|
</CardHeaderActions>
|
||||||
</MudCardHeader>
|
</MudCardHeader>
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<base href="/" />
|
<base href="/" />
|
||||||
|
<title>DiunaBI App</title>
|
||||||
<link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700&display=swap" rel="stylesheet" />
|
<link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700&display=swap" rel="stylesheet" />
|
||||||
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet" />
|
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet" />
|
||||||
<link href="_content/MudBlazor/MudBlazor.min.css" rel="stylesheet" />
|
<link href="_content/MudBlazor/MudBlazor.min.css" rel="stylesheet" />
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 4.1 KiB |
Reference in New Issue
Block a user