mirror of
https://github.com/Stefan-5422/-T5-Elektrifikatsiya.git
synced 2026-09-04 00:45:58 +02:00
Settings fix
This commit is contained in:
Binary file not shown.
@@ -2,60 +2,157 @@
|
||||
@using Blazorise.Components;
|
||||
@using Elektrifikatsiya.Models;
|
||||
@using System.Net
|
||||
<Row Style="width: 100%; height: 100%">
|
||||
<Column ColumnSize="ColumnSize.Is4">
|
||||
<Bar Breakpoint="Breakpoint.Desktop"
|
||||
Background="Background.White"
|
||||
ThemeContrast="ThemeContrast.None"
|
||||
Shadow="Shadow.Remove"
|
||||
Border="Border.Is1.RoundedTop">
|
||||
<BarBrand>
|
||||
Plugs
|
||||
</BarBrand>
|
||||
</Bar>
|
||||
<ListView TItem="Device"
|
||||
Data="@plugs"
|
||||
TextField="@(()=>(""))"
|
||||
ValueField="@(()=>(""))"
|
||||
Style="border-radius: 0px 0px"
|
||||
Height="100%"
|
||||
MaxHeight="90%">
|
||||
<ItemTemplate>
|
||||
<ListGroupItem Border="Border.OnBottom">
|
||||
<Row>
|
||||
<Column ColumnSize="ColumnSize.Is8">
|
||||
<Row>
|
||||
<Column ColumnSize="ColumnSize.Is7">
|
||||
<Heading Size="HeadingSize.Is6" Margin="Margin.Is1.FromBottom">@context.Item.Name</Heading>
|
||||
</Column>
|
||||
</Row>
|
||||
<Row>
|
||||
<Column>
|
||||
<Small>User: @context.Item.User</Small>
|
||||
<br />
|
||||
<Small>Room: @context.Item.Room</Small>
|
||||
</Column>
|
||||
<Column ColumnSize="ColumnSize.Is5">
|
||||
<Paragraph Margin="Margin.Is1.OnY">@context.Item.PowerUsage W</Paragraph>
|
||||
</Column>
|
||||
</Row>
|
||||
</Column>
|
||||
<Column ColumnSize="ColumnSize.Is4">
|
||||
<Button Position="Position.Absolute.Top.Is50.Start.Is50.Translate.Middle" Color="Color.Dark" Outline>
|
||||
<BarIcon IconName="IconName.Bolt" />
|
||||
</Button>
|
||||
</Column>
|
||||
</Row>
|
||||
</ListGroupItem>
|
||||
</ItemTemplate>
|
||||
</ListView>
|
||||
</Column>
|
||||
</Row>
|
||||
<Div>
|
||||
<Row Style="width: 100%; height: 100%" Margin="Margin.Is3.FromTop.OnMobile" Padding="Padding.Is4.FromStart.OnMobile">
|
||||
<Div Display="Display.Flex.Row.OnDesktop" Margin=" Margin.Is3.FromBottom" Width="Width.Is100">
|
||||
<Column ColumnSize="ColumnSize.Is5.OnDesktop.Is12.OnMobile">
|
||||
<Bar Breakpoint="Breakpoint.Desktop"
|
||||
Background="Background.White"
|
||||
ThemeContrast="ThemeContrast.None"
|
||||
Shadow="Shadow.Remove"
|
||||
Border="Border.Is1.RoundedTop">
|
||||
<BarBrand>
|
||||
Plugs
|
||||
</BarBrand>
|
||||
</Bar>
|
||||
<ListView TItem="Device"
|
||||
Data="@plugs"
|
||||
TextField="@((_)=>(""))"
|
||||
ValueField="@((_)=>(""))"
|
||||
Style="border-radius: 0px 0px"
|
||||
Height="100%"
|
||||
MaxHeight="90%">
|
||||
<ItemTemplate>
|
||||
<ListGroupItem Border="Border.OnBottom">
|
||||
<Row>
|
||||
|
||||
<Column ColumnSize="ColumnSize.Is6">
|
||||
<Row>
|
||||
<Column ColumnSize="ColumnSize.Is7">
|
||||
<Heading Size="HeadingSize.Is6" Margin="Margin.Is1.FromBottom">@context.Item.Name</Heading>
|
||||
</Column>
|
||||
</Row>
|
||||
<Row>
|
||||
<Column>
|
||||
<Small>User: @context.Item.User</Small>
|
||||
<br />
|
||||
<Small>Room: @context.Item.Room</Small>
|
||||
</Column>
|
||||
</Row>
|
||||
</Column>
|
||||
|
||||
<Column ColumnSize="ColumnSize.Is4.OnDesktop.Is7.OnMobile">
|
||||
<Button Position="Position.Absolute.Top.Is50.Start.Is50.Translate.Middle" Color="Color.Dark" Outline>
|
||||
<BarIcon IconName="IconName.Delete" />
|
||||
</Button>
|
||||
</Column>
|
||||
<br />
|
||||
<br />
|
||||
<Row>
|
||||
<Column ColumnSize="ColumnSize.Is1.OnDesktop">
|
||||
<Button @onclick="Toggle" Position="Position.Absolute.Top.Is50.Start.Is100.Translate.Middle" Color="Color.Dark" Outline>
|
||||
<BarIcon IconName="IconName.Pen" />
|
||||
</Button>
|
||||
</Column>
|
||||
</Row>
|
||||
|
||||
</Row>
|
||||
</ListGroupItem>
|
||||
</ItemTemplate>
|
||||
</ListView>
|
||||
</Column>
|
||||
<Column ColumnSize="ColumnSize.Is6.OnDesktop.Is12.OnMobile" Margin="Margin.Is3.FromTop.OnMobile" Padding="Padding.Is4.FromStart.OnMobile">
|
||||
<Div hidden="@hideButtonSettings">
|
||||
<Field>
|
||||
<FieldLabel>
|
||||
<h2>
|
||||
Plug Settings
|
||||
</h2>
|
||||
</FieldLabel>
|
||||
</Field>
|
||||
<Field>
|
||||
<FieldLabel>
|
||||
<h5>
|
||||
Plug Name
|
||||
</h5>
|
||||
<Paragraph>
|
||||
Here you can change the name of your plug
|
||||
</Paragraph>
|
||||
</FieldLabel>
|
||||
<TextEdit Placeholder="Enter Name" />
|
||||
</Field>
|
||||
<br />
|
||||
<br />
|
||||
<Field>
|
||||
<FieldLabel>
|
||||
<h5>
|
||||
Change Max Output
|
||||
</h5>
|
||||
<Paragraph>
|
||||
Here you can limit how much power your plug uses
|
||||
</Paragraph>
|
||||
</FieldLabel>
|
||||
<TextEdit Placeholder="Enter Max Output" />
|
||||
</Field>
|
||||
<br />
|
||||
<br />
|
||||
<Field>
|
||||
<FieldLabel>
|
||||
<h5>
|
||||
Select Room
|
||||
</h5>
|
||||
<Paragraph>
|
||||
Here you select or change the room the plug belongs to.
|
||||
</Paragraph>
|
||||
</FieldLabel>
|
||||
<br />
|
||||
<Dropdown Display="Display.InlineBlock">
|
||||
<DropdownToggle Color="Color.Primary" Width="Width.Is100">Rooms</DropdownToggle>
|
||||
<DropdownMenu>
|
||||
<DropdownItem>Room 1</DropdownItem>
|
||||
<DropdownDivider />
|
||||
<DropdownItem>Room 2</DropdownItem>
|
||||
<DropdownDivider />
|
||||
<DropdownItem>Room 3</DropdownItem>
|
||||
</DropdownMenu>
|
||||
</Dropdown>
|
||||
</Field>
|
||||
</Div>
|
||||
<Div hidden="@(!hideButtonSettings)">
|
||||
<Field>
|
||||
<FieldLabel>
|
||||
<h2>
|
||||
General Settings
|
||||
</h2>
|
||||
</FieldLabel>
|
||||
</Field>
|
||||
<Field>
|
||||
<FieldLabel>
|
||||
<h5>
|
||||
Electricity Price
|
||||
</h5>
|
||||
<Paragraph>
|
||||
Here you enter your electricity price. This is gonna calculate the overall Price of your System
|
||||
</Paragraph>
|
||||
</FieldLabel>
|
||||
<TextEdit Placeholder="Enter Electricity Price" />
|
||||
</Field>
|
||||
</Div>
|
||||
<Column ColumnSize="ColumnSize.IsFull" TextAlignment="TextAlignment.End">
|
||||
<Button Color="Color.Primary">Save</Button>
|
||||
</Column>
|
||||
</Column>
|
||||
</Div>
|
||||
</Row>
|
||||
</Div>
|
||||
|
||||
@code {
|
||||
|
||||
|
||||
List<Device> plugs = new List<Device>() { new Device("ffff:ffff:ffff:ffff", "Josne", IPAddress.Broadcast, new User("Joe", "qiowruioewjfopa", Role.Admin), "Raum"), new Device("ffff:ffff:ffff:ffff", "Josne", IPAddress.Broadcast, new User("Joe", "Josne", Role.Admin), "Raum"), new Device("ffff:ffff:ffff:ffff", "Josne", IPAddress.Broadcast, new User("Joe", "qiowruioewjfopa", Role.Admin), "Raum"), };
|
||||
|
||||
private bool hideButtonSettings = true;
|
||||
|
||||
private void Toggle()
|
||||
{
|
||||
hideButtonSettings = !hideButtonSettings;
|
||||
}
|
||||
}
|
||||
Binary file not shown.
Reference in New Issue
Block a user