mirror of
https://github.com/Stefan-5422/-T5-Elektrifikatsiya.git
synced 2026-09-10 07:36:02 +02:00
Merge pull request #35 from Stefan-5422/feature-Dashboard
Feature dashboard
This commit is contained in:
@@ -26,7 +26,6 @@
|
|||||||
ActiveColor = "#1a237e",
|
ActiveColor = "#1a237e",
|
||||||
HoverColor = "#1a237e",
|
HoverColor = "#1a237e",
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
ColorOptions = new()
|
ColorOptions = new()
|
||||||
@@ -61,4 +60,4 @@
|
|||||||
Primary = "#1a237e"
|
Primary = "#1a237e"
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
@using System.Diagnostics;
|
@using System.Diagnostics;
|
||||||
@inherits LayoutComponentBase
|
@inherits LayoutComponentBase
|
||||||
<Image Source="/Pictures/logo.png"> </Image>
|
<Image Source="logo.png" Width="Width.Is50" Height="Height.Is50"> </Image>
|
||||||
<Card Width="Width.Is50" Position="Position.Absolute.Top.Is50.Start.Is50.Translate.Middle" Padding="Padding.Is5">
|
<Card Width="Width.Is50" Position="Position.Absolute.Top.Is50.Start.Is50.Translate.Middle" Padding="Padding.Is5">
|
||||||
<Field Width="Width.Is25" Position="Position.Relative.Top.Is50.Start.Is50.Translate.Middle">
|
<Field Width="Width.Is25" Position="Position.Relative.Top.Is50.Start.Is50.Translate.Middle">
|
||||||
<TextEdit Placeholder="Username" />
|
<TextEdit Placeholder="Username" />
|
||||||
|
|||||||
@@ -2,81 +2,82 @@
|
|||||||
@using Blazorise.Components;
|
@using Blazorise.Components;
|
||||||
@using Elektrifikatsiya.Models;
|
@using Elektrifikatsiya.Models;
|
||||||
@inject IVersionProvider VersionProvider
|
@inject IVersionProvider VersionProvider
|
||||||
|
<Div >
|
||||||
<Row Style="height:50%; width:100%" Padding="Padding.Is3.OnDesktop.Is0">
|
<Row Style="height:50%; width:100%" Padding="Padding.Is3.OnDesktop.Is0">
|
||||||
<Row Style="height:90%; width:100%">
|
<Row Style="height:90%; width:100%">
|
||||||
|
<Column ColumnSize="ColumnSize.Is4.OnDesktop.Is1"></Column>
|
||||||
|
<Column ColumnSize="ColumnSize.Is4.OnDesktop.Is12">
|
||||||
|
<Bar Breakpoint="Breakpoint.Desktop"
|
||||||
|
Background="Background.White"
|
||||||
|
ThemeContrast="ThemeContrast.None"
|
||||||
|
Shadow="Shadow.Remove"
|
||||||
|
Border="Border.Is1.RoundedTop">
|
||||||
|
<BarBrand>
|
||||||
|
Add a plug via wifi
|
||||||
|
</BarBrand>
|
||||||
|
</Bar>
|
||||||
|
<ListView Class="w-100"
|
||||||
|
TItem="Device"
|
||||||
|
Data="@plugs"
|
||||||
|
TextField="@((_)=>(""))"
|
||||||
|
ValueField="@((_)=>(""))"
|
||||||
|
Mode="ListGroupMode.Static"
|
||||||
|
Style="border-radius: 0px 0px">
|
||||||
|
<ItemTemplate>
|
||||||
|
<ListGroupItem>
|
||||||
|
<Row>
|
||||||
|
<Column ColumnSize="ColumnSize.Is7">
|
||||||
|
<Row Width="Width.Is100">
|
||||||
|
<Column>
|
||||||
|
<Small>IP: @context.Item.Address</Small>
|
||||||
|
</Column>
|
||||||
|
</Row>
|
||||||
|
</Column>
|
||||||
|
<Column ColumnSize="ColumnSize.Is4.Is1.WithOffset">
|
||||||
|
<Button Position="Position.Absolute.Top.Is50.Start.Is50.Translate.Middle" Color="Color.Dark" Outline>
|
||||||
|
<BarIcon IconName="IconName.Add" />
|
||||||
|
</Button>
|
||||||
|
</Column>
|
||||||
|
</Row>
|
||||||
|
</ListGroupItem>
|
||||||
|
</ItemTemplate>
|
||||||
|
</ListView>
|
||||||
|
</Column>
|
||||||
|
</Row>
|
||||||
|
</Row>
|
||||||
|
<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.Is1"></Column>
|
||||||
<Column ColumnSize="ColumnSize.Is4.OnDesktop.Is12">
|
<Column ColumnSize="ColumnSize.Is4.OnDesktop.Is12">
|
||||||
<Bar Breakpoint="Breakpoint.Desktop"
|
<Row Style="height:15%; width:100%"></Row>
|
||||||
Background="Background.White"
|
<Row Style="height:10%; width:100%">
|
||||||
ThemeContrast="ThemeContrast.None"
|
<Bar Breakpoint="Breakpoint.Desktop"
|
||||||
Shadow="Shadow.Remove"
|
Background="Background.White"
|
||||||
Border="Border.Is1.RoundedTop">
|
ThemeContrast="ThemeContrast.None"
|
||||||
<BarBrand>
|
Shadow="Shadow.Remove"
|
||||||
Add a plug via wifi
|
Border="Border.Is1.RoundedTop"
|
||||||
</BarBrand>
|
Style="width:100%">
|
||||||
</Bar>
|
<BarBrand>
|
||||||
<ListView Class="w-100"
|
Add a plug via IP
|
||||||
TItem="Device"
|
</BarBrand>
|
||||||
Data="@plugs"
|
</Bar>
|
||||||
TextField="@((_)=>(""))"
|
<ListGroup Style="width:100%; border-radius: 0px 0px">
|
||||||
ValueField="@((_)=>(""))"
|
<ListGroupItem Color="Color.Default">
|
||||||
Mode="ListGroupMode.Static"
|
<Form>
|
||||||
Style="border-radius: 0px 0px">
|
<Field Horizontal>
|
||||||
<ItemTemplate>
|
<FieldBody ColumnSize="ColumnSize.Is12">
|
||||||
<ListGroupItem>
|
<TextEdit Placeholder="Enter the Device IP here" />
|
||||||
<Row>
|
<br>
|
||||||
<Column ColumnSize="ColumnSize.Is7">
|
<Button style="background-color:#1a237e; color:white" Type="ButtonType.Submit" PreventDefaultOnSubmit>CONNECT</Button>
|
||||||
<Row Width="Width.Is100">
|
</FieldBody>
|
||||||
<Column>
|
</Field>
|
||||||
<Small>IP: @context.Item.Address</Small>
|
</Form>
|
||||||
</Column>
|
|
||||||
</Row>
|
|
||||||
</Column>
|
|
||||||
<Column ColumnSize="ColumnSize.Is4.Is1.WithOffset">
|
|
||||||
<Button Position="Position.Absolute.Top.Is50.Start.Is50.Translate.Middle" Color="Color.Dark" Outline>
|
|
||||||
<BarIcon IconName="IconName.Add" />
|
|
||||||
</Button>
|
|
||||||
</Column>
|
|
||||||
</Row>
|
|
||||||
</ListGroupItem>
|
</ListGroupItem>
|
||||||
</ItemTemplate>
|
</ListGroup>
|
||||||
</ListView>
|
</Row>
|
||||||
|
<Row Style="height:75%; width:100%"></Row>
|
||||||
</Column>
|
</Column>
|
||||||
</Row>
|
</Row>
|
||||||
</Row>
|
</Div>
|
||||||
<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>
|
|
||||||
<Field Horizontal>
|
|
||||||
<FieldBody ColumnSize="ColumnSize.Is12">
|
|
||||||
<TextEdit Placeholder="Enter the Device IP here" />
|
|
||||||
<br>
|
|
||||||
<Button style="background-color:#1a237e; color:white" Type="ButtonType.Submit" PreventDefaultOnSubmit>CONNECT</Button>
|
|
||||||
</FieldBody>
|
|
||||||
</Field>
|
|
||||||
</Form>
|
|
||||||
</ListGroupItem>
|
|
||||||
</ListGroup>
|
|
||||||
</Row>
|
|
||||||
<Row Style="height:75%; width:100%"></Row>
|
|
||||||
</Column>
|
|
||||||
</Row>
|
|
||||||
|
|
||||||
@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") };
|
||||||
|
|||||||
@@ -3,16 +3,26 @@
|
|||||||
@using Elektrifikatsiya.Models;
|
@using Elektrifikatsiya.Models;
|
||||||
@inject IVersionProvider VersionProvider
|
@inject IVersionProvider VersionProvider
|
||||||
|
|
||||||
<Row Padding="Padding.Is3.OnDesktop.Is0">
|
<Row Padding="Padding.Is3">
|
||||||
<Div Display="Display.Flex.Row.OnDesktop" Margin="Margin.Is3.FromBottom" Width="Width.Is100">
|
<Div Display="Display.Flex.Row.OnDesktop" Margin="Margin.Is3.FromBottom" Width="Width.Is100">
|
||||||
<Column ColumnSize="ColumnSize.Is6.OnDesktop.Is12">
|
<Column ColumnSize="ColumnSize.Is6.OnDesktop.Is12">
|
||||||
|
<Bar Breakpoint="Breakpoint.Desktop"
|
||||||
|
Background="Background.White"
|
||||||
|
ThemeContrast="ThemeContrast.None"
|
||||||
|
Shadow="Shadow.Remove"
|
||||||
|
Border="Border.Is1.RoundedTop">
|
||||||
|
<BarBrand>
|
||||||
|
Plugs
|
||||||
|
</BarBrand>
|
||||||
|
</Bar>
|
||||||
<ListView TItem="Device"
|
<ListView TItem="Device"
|
||||||
Data="@plugs"
|
Data="@plugs"
|
||||||
TextField="@((_)=>(""))"
|
TextField="@((_)=>(""))"
|
||||||
ValueField="@((_)=>(""))"
|
ValueField="@((_)=>(""))"
|
||||||
Mode="ListGroupMode.Static">
|
Mode="ListGroupMode.Static"
|
||||||
|
Style="border-radius: 0px 0px">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<ListGroupItem>
|
<ListGroupItem Border="Border.OnBottom">
|
||||||
<Row>
|
<Row>
|
||||||
<Column ColumnSize="ColumnSize.Is8">
|
<Column ColumnSize="ColumnSize.Is8">
|
||||||
<Row>
|
<Row>
|
||||||
@@ -41,18 +51,29 @@
|
|||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</ListView>
|
</ListView>
|
||||||
</Column>
|
</Column>
|
||||||
<Column ColumnSize="ColumnSize.Is6.OnDesktop.Is12">
|
<Column ColumnSize="ColumnSize.Is6">
|
||||||
|
<Bar Breakpoint="Breakpoint.Desktop"
|
||||||
|
Background="Background.White"
|
||||||
|
ThemeContrast="ThemeContrast.None"
|
||||||
|
Shadow="Shadow.Remove"
|
||||||
|
Border="Border.Is1.Rounded.RoundedTop">
|
||||||
|
<BarBrand>
|
||||||
|
Plugs
|
||||||
|
</BarBrand>
|
||||||
|
</Bar>
|
||||||
<ListView TItem="Event"
|
<ListView TItem="Event"
|
||||||
Data="@events"
|
Data="@events"
|
||||||
TextField="@((_)=>(""))"
|
TextField="@((_)=>(""))"
|
||||||
ValueField="@((_)=>(""))"
|
ValueField="@((_)=>(""))"
|
||||||
Mode="ListGroupMode.Static">
|
Mode="ListGroupMode.Static"
|
||||||
|
Style="border-radius: 0px 0px">
|
||||||
|
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<Div Flex="Flex.InlineFlex.JustifyContent.Between" Width="Width.Is100">
|
<Div Flex="Flex.InlineFlex.JustifyContent.Between" Width="Width.Is100">
|
||||||
<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>
|
||||||
|
|||||||
@@ -0,0 +1,61 @@
|
|||||||
|
@page "/Settings"
|
||||||
|
@using Blazorise.Components;
|
||||||
|
@using Elektrifikatsiya.Models;
|
||||||
|
<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>
|
||||||
|
|
||||||
|
|
||||||
|
@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") };
|
||||||
|
|
||||||
|
}
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 119 KiB After Width: | Height: | Size: 82 KiB |
Reference in New Issue
Block a user