AddPlug Progress

AddPlug first prototype done + responsive
This commit is contained in:
Friend2868
2023-03-02 16:42:13 +01:00
parent bb2bfe0145
commit 1410fbe5af
4 changed files with 75 additions and 56 deletions
@@ -2,17 +2,18 @@
@using Blazorise.Components; @using Blazorise.Components;
@using Elektrifikatsiya.Models; @using Elektrifikatsiya.Models;
@inject IVersionProvider VersionProvider @inject IVersionProvider VersionProvider
<Div >
<Row Height=Height.Is50 Padding="Padding.Is3.OnDesktop.Is0" style="border-bottom-style:solid; border-bottom-color:#1a237e"> <Row Style="height:50%; width:100%" Padding="Padding.Is3.OnDesktop.Is0">
<Row Style="height:90%; width:100%"> <Row Style="height:90%; width:100%">
<Column style="align-content:center" ColumnSize="ColumnSize.Is4.Is4.WithOffset"> <Column ColumnSize="ColumnSize.Is4.OnDesktop.Is1"></Column>
<Column ColumnSize="ColumnSize.Is4.OnDesktop.Is12">
<Bar Breakpoint="Breakpoint.Desktop" <Bar Breakpoint="Breakpoint.Desktop"
Background="Background.White" Background="Background.White"
ThemeContrast="ThemeContrast.None" ThemeContrast="ThemeContrast.None"
Shadow="Shadow.Remove" Shadow="Shadow.Remove"
Border="Border.Is1.RoundedTop"> Border="Border.Is1.RoundedTop">
<BarBrand> <BarBrand>
Add plug via wifi Add a plug via wifi
</BarBrand> </BarBrand>
</Bar> </Bar>
<ListView Class="w-100" <ListView Class="w-100"
@@ -26,11 +27,6 @@
<ListGroupItem> <ListGroupItem>
<Row> <Row>
<Column ColumnSize="ColumnSize.Is7"> <Column ColumnSize="ColumnSize.Is7">
<Row>
<Column>
<Heading Size="HeadingSize.Is6" Margin="Margin.Is1.FromBottom">@context.Item.Name</Heading>
</Column>
</Row>
<Row Width="Width.Is100"> <Row Width="Width.Is100">
<Column> <Column>
<Small>IP: @context.Item.Address</Small> <Small>IP: @context.Item.Address</Small>
@@ -49,16 +45,39 @@
</Column> </Column>
</Row> </Row>
</Row> </Row>
<Row Height="Height.Is50"> <Row Style="height:50%; width:100%; border-top-style:solid; border-top-color:#1a237e">
<Column ColumnSize="ColumnSize.Is4.OnDesktop.Is1"></Column>
<Column ColumnSize="ColumnSize.Is4.OnDesktop.Is12">
<Row Style="height:15%; width:100%"></Row>
<Row Style="height:10%; width:100%">
<Bar Breakpoint="Breakpoint.Desktop"
Background="Background.White"
ThemeContrast="ThemeContrast.None"
Shadow="Shadow.Remove"
Border="Border.Is1.RoundedTop"
Style="width:100%">
<BarBrand>
Add a plug via IP
</BarBrand>
</Bar>
<ListGroup Style="width:100%; border-radius: 0px 0px">
<ListGroupItem Color="Color.Default">
<Form> <Form>
<Field Horizontal> <Field Horizontal>
<FieldBody ColumnSize="ColumnSize.Is12"> <FieldBody ColumnSize="ColumnSize.Is12">
<TextEdit Placeholder="Enter the Device IP here" /> <TextEdit Placeholder="Enter the Device IP here" />
<Button style="background-color:#1a237e; color:white" Type="ButtonType.Submit" PreventDefaultOnSubmit>Submit</Button> <br>
<Button style="background-color:#1a237e; color:white" Type="ButtonType.Submit" PreventDefaultOnSubmit>CONNECT</Button>
</FieldBody> </FieldBody>
</Field> </Field>
</Form> </Form>
</ListGroupItem>
</ListGroup>
</Row> </Row>
<Row Style="height:75%; width:100%"></Row>
</Column>
</Row>
</Div>
@code { @code {
List<Device> plugs = new List<Device>() { new Device("Placeholder", "Plug", System.Net.IPAddress.Broadcast, 60, "Oldin", "4AHINF"), new Device("Placeholder", "Plug", System.Net.IPAddress.Broadcast, 60, "Oldin", "4AHINF"), new Device("Placeholder", "Plug", System.Net.IPAddress.Broadcast, 60, "Oldin", "4AHINF") }; List<Device> plugs = new List<Device>() { new Device("Placeholder", "Plug", System.Net.IPAddress.Broadcast, 60, "Oldin", "4AHINF"), new Device("Placeholder", "Plug", System.Net.IPAddress.Broadcast, 60, "Oldin", "4AHINF"), new Device("Placeholder", "Plug", System.Net.IPAddress.Broadcast, 60, "Oldin", "4AHINF") };
@@ -12,7 +12,7 @@
ValueField="@((_)=>(""))" ValueField="@((_)=>(""))"
Mode="ListGroupMode.Static"> Mode="ListGroupMode.Static">
<ItemTemplate> <ItemTemplate>
<ListGroupItem> <ListGroupItem Border="Border.OnBottom">
<Row> <Row>
<Column ColumnSize="ColumnSize.Is8"> <Column ColumnSize="ColumnSize.Is8">
<Row> <Row>
@@ -52,7 +52,7 @@
<Heading Size="HeadingSize.Is6" Margin="Margin.Is2.FromBottom">@context.Item.EventName</Heading> <Heading Size="HeadingSize.Is6" Margin="Margin.Is2.FromBottom">@context.Item.EventName</Heading>
<Small>@context.Item.Date</Small> <Small>@context.Item.Date</Small>
</Div> </Div>
<Paragraph Margin="Margin.Is2.FromBottom">@context.Item.Description</Paragraph> <Paragraph Border="Border.OnBottom" Margin="Margin.Is2.FromBottom">@context.Item.Description</Paragraph>
</ItemTemplate> </ItemTemplate>
</ListView> </ListView>
</Column> </Column>