mirror of
https://github.com/Stefan-5422/-T5-Elektrifikatsiya.git
synced 2026-09-04 00:45:58 +02:00
Design Improvements
Addplug page new loading bar design, dashboard finetuning
This commit is contained in:
@@ -29,20 +29,24 @@
|
||||
Add Plug
|
||||
</BarLink>
|
||||
</BarItem>
|
||||
</BarStart>
|
||||
<BarEnd>
|
||||
<BarItem>
|
||||
<BarLink To="/settings" TextColor="TextColor.White">
|
||||
<BarIcon Style="color:white" IconName="IconName.Wrench" />
|
||||
Settings
|
||||
</BarLink>
|
||||
</BarItem>
|
||||
</BarStart>
|
||||
<BarEnd>
|
||||
<BarItem>
|
||||
<BarLink To="/login" TextColor="TextColor.White">
|
||||
<BarIcon Style="color:white" IconName="IconName.Running" />
|
||||
Logout
|
||||
</BarLink>
|
||||
</BarItem>
|
||||
</BarEnd>
|
||||
</BarMenu>
|
||||
</Bar>
|
||||
@code {
|
||||
private bool pagesBarVisible = true;
|
||||
|
||||
//TODO: replace logo png with transparent background one
|
||||
RenderFragment customIcon =@<img src="/logo.png" style="width:32px; height: 32px" />;
|
||||
}
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -37,6 +37,7 @@
|
||||
<PackageReference Include="Blazorise" Version="1.2.0" />
|
||||
<PackageReference Include="Blazorise.Charts" Version="1.2.0" />
|
||||
<PackageReference Include="Blazorise.Components" Version="1.2.0" />
|
||||
<PackageReference Include="Blazorise.LoadingIndicator" Version="1.2.0" />
|
||||
<PackageReference Include="Blazorise.Material" Version="1.2.0" />
|
||||
<PackageReference Include="Blazorise.Icons.Material" Version="1.2.0" />
|
||||
<PackageReference Include="BCrypt.Net-Next" Version="4.0.3" />
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
@inject IDeviceManagmentService DeviceManagmentService
|
||||
@inject IAuthenticationService AuthenticationService
|
||||
|
||||
<Div >
|
||||
<Div>
|
||||
<Row Style="height:50%; width:100%" Padding="Padding.Is3.OnDesktop.Is0">
|
||||
<Row Style="height:90%; width:100%">
|
||||
<Column ColumnSize="ColumnSize.Is4.OnDesktop.Is1"></Column>
|
||||
@@ -20,36 +20,42 @@
|
||||
Shadow="Shadow.Remove"
|
||||
Border="Border.Is1.RoundedTop">
|
||||
<BarBrand>
|
||||
Add a plug via wifi
|
||||
<Column ColumnSize="ColumnSize.Is9">
|
||||
Add a plug via wifi
|
||||
</Column>
|
||||
<Column ColumnSize="ColumnSize.Is3.Is1.WithOffset">
|
||||
<LoadingIndicator @bind-Visible="@visible">
|
||||
</LoadingIndicator>
|
||||
</Column>
|
||||
</BarBrand>
|
||||
</Bar>
|
||||
<ListView Class="w-100"
|
||||
TItem="IPAddress"
|
||||
Data="@ipAddresses"
|
||||
TextField="@((_)=>(""))"
|
||||
ValueField="@((_)=>(""))"
|
||||
Mode="ListGroupMode.Static">
|
||||
<ItemTemplate>
|
||||
<ListGroupItem>
|
||||
<Row>
|
||||
<Column ColumnSize="ColumnSize.Is6">
|
||||
<Row>
|
||||
</Row>
|
||||
<Row Width="Width.Is100">
|
||||
<Column>
|
||||
<Small>IP: @context.Item</Small>
|
||||
</Column>
|
||||
</Row>
|
||||
</Column>
|
||||
<Column ColumnSize="ColumnSize.Is4.Is2.WithOffset">
|
||||
<Button Position="Position.Absolute.Top.Is50.Start.Is50.Translate.Middle" Color="Color.Dark" Clicked="@(async () => await DeviceManagmentService.RegisterDevice(context.Item,(await AuthenticationService.GetUserAsync()).ValueOrDefault))" Outline>
|
||||
<BarIcon IconName="IconName.Add" />
|
||||
</Button>
|
||||
</Column>
|
||||
</Row>
|
||||
</ListGroupItem>
|
||||
</ItemTemplate>
|
||||
</ListView>
|
||||
<ListView Class="w-100"
|
||||
TItem="IPAddress"
|
||||
Data="@ipAddresses"
|
||||
TextField="@((_)=>(""))"
|
||||
ValueField="@((_)=>(""))"
|
||||
Mode="ListGroupMode.Static">
|
||||
<ItemTemplate>
|
||||
<ListGroupItem>
|
||||
<Row>
|
||||
<Column ColumnSize="ColumnSize.Is6">
|
||||
<Row>
|
||||
</Row>
|
||||
<Row Width="Width.Is100">
|
||||
<Column>
|
||||
<Small>IP: @context.Item</Small>
|
||||
</Column>
|
||||
</Row>
|
||||
</Column>
|
||||
<Column ColumnSize="ColumnSize.Is4.Is2.WithOffset">
|
||||
<Button Position="Position.Absolute.Top.Is50.Start.Is50.Translate.Middle" Color="Color.Dark" Clicked="@(async () => await DeviceManagmentService.RegisterDevice(context.Item,(await AuthenticationService.GetUserAsync()).ValueOrDefault))" Outline>
|
||||
<BarIcon IconName="IconName.Add" />
|
||||
</Button>
|
||||
</Column>
|
||||
</Row>
|
||||
</ListGroupItem>
|
||||
</ItemTemplate>
|
||||
</ListView>
|
||||
</Column>
|
||||
</Row>
|
||||
</Row>
|
||||
@@ -90,6 +96,8 @@
|
||||
@code {
|
||||
List<IPAddress> ipAddresses = new List<IPAddress>();
|
||||
|
||||
bool visible = true;
|
||||
|
||||
protected override void OnInitialized()
|
||||
{
|
||||
ipAddresses.AddRange(MdnsDiscovery.GetChachedDevices());
|
||||
@@ -97,6 +105,7 @@
|
||||
{
|
||||
ipAddresses.Add(address);
|
||||
InvokeAsync(StateHasChanged);
|
||||
visible = false;
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -83,7 +83,7 @@
|
||||
<Row Padding="Padding.Is3">
|
||||
<Column>
|
||||
<Button Color="Color.Primary" Style="border-radius: 0px" Clicked="@(async () => await HandleRedraw())">Aktualisieren</Button>
|
||||
<LineChart @ref="lineChart" TItem="double" />
|
||||
<LineChart Height="Height.Is100" Width="Width.Is100" @ref="lineChart" TItem="double" />
|
||||
</Column>
|
||||
</Row>
|
||||
</Div>
|
||||
|
||||
@@ -6,3 +6,4 @@
|
||||
}
|
||||
|
||||
<component type="typeof(App)" render-mode="Server" />
|
||||
<link href="_content/Blazorise.LoadingIndicator/blazorise.loadingindicator.css" rel="stylesheet" />
|
||||
@@ -10,3 +10,4 @@
|
||||
@using Elektrifikatsiya
|
||||
@using Blazorise
|
||||
@using Blazorise.Charts
|
||||
@using Blazorise.LoadingIndicator
|
||||
|
||||
Reference in New Issue
Block a user