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 Blazorise.Components;
|
||||||
@using Elektrifikatsiya.Models;
|
@using Elektrifikatsiya.Models;
|
||||||
@using System.Net
|
@using System.Net
|
||||||
<Row Style="width: 100%; height: 100%">
|
<Div>
|
||||||
<Column ColumnSize="ColumnSize.Is4">
|
<Row Style="width: 100%; height: 100%" Margin="Margin.Is3.FromTop.OnMobile" Padding="Padding.Is4.FromStart.OnMobile">
|
||||||
<Bar Breakpoint="Breakpoint.Desktop"
|
<Div Display="Display.Flex.Row.OnDesktop" Margin=" Margin.Is3.FromBottom" Width="Width.Is100">
|
||||||
Background="Background.White"
|
<Column ColumnSize="ColumnSize.Is5.OnDesktop.Is12.OnMobile">
|
||||||
ThemeContrast="ThemeContrast.None"
|
<Bar Breakpoint="Breakpoint.Desktop"
|
||||||
Shadow="Shadow.Remove"
|
Background="Background.White"
|
||||||
Border="Border.Is1.RoundedTop">
|
ThemeContrast="ThemeContrast.None"
|
||||||
<BarBrand>
|
Shadow="Shadow.Remove"
|
||||||
Plugs
|
Border="Border.Is1.RoundedTop">
|
||||||
</BarBrand>
|
<BarBrand>
|
||||||
</Bar>
|
Plugs
|
||||||
<ListView TItem="Device"
|
</BarBrand>
|
||||||
Data="@plugs"
|
</Bar>
|
||||||
TextField="@(()=>(""))"
|
<ListView TItem="Device"
|
||||||
ValueField="@(()=>(""))"
|
Data="@plugs"
|
||||||
Style="border-radius: 0px 0px"
|
TextField="@((_)=>(""))"
|
||||||
Height="100%"
|
ValueField="@((_)=>(""))"
|
||||||
MaxHeight="90%">
|
Style="border-radius: 0px 0px"
|
||||||
<ItemTemplate>
|
Height="100%"
|
||||||
<ListGroupItem Border="Border.OnBottom">
|
MaxHeight="90%">
|
||||||
<Row>
|
<ItemTemplate>
|
||||||
<Column ColumnSize="ColumnSize.Is8">
|
<ListGroupItem Border="Border.OnBottom">
|
||||||
<Row>
|
<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>
|
|
||||||
|
|
||||||
|
<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 {
|
@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"), };
|
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