mirror of
https://github.com/Stefan-5422/-T5-Elektrifikatsiya.git
synced 2026-09-04 00:45:58 +02:00
yes
This commit is contained in:
@@ -82,15 +82,15 @@
|
|||||||
<ModalBody>
|
<ModalBody>
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>User Name</FieldLabel>
|
<FieldLabel>User Name</FieldLabel>
|
||||||
<TextEdit @ref="modalAddUserName" Placeholder="Enter user name..." />
|
<TextEdit @ref="modalAddUserName" @bind-Text="@UserCopy.Name" Placeholder="Enter user name..." />
|
||||||
</Field>
|
</Field>
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>User E-Mail</FieldLabel>
|
<FieldLabel>User E-Mail</FieldLabel>
|
||||||
<TextEdit @ref="modalAddUserEmail" Placeholder="Enter user E-mail..." />
|
<TextEdit @ref="modalAddUserEmail" @bind-Text="@UserCopy.Name" Placeholder="Enter user E-mail..." />
|
||||||
</Field>
|
</Field>
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel>User Password</FieldLabel>
|
<FieldLabel>User Password</FieldLabel>
|
||||||
<TextEdit @ref="modalAddUserPW" Placeholder="Enter user password..." />
|
<TextEdit @ref="modalAddUserPW" @bind-Text="@UserCopy.Name" Placeholder="Enter user password..." />
|
||||||
</Field>
|
</Field>
|
||||||
</ModalBody>
|
</ModalBody>
|
||||||
<ModalFooter>
|
<ModalFooter>
|
||||||
@@ -248,7 +248,7 @@
|
|||||||
|
|
||||||
private async Task RegisterUser()
|
private async Task RegisterUser()
|
||||||
{
|
{
|
||||||
Result<Device> result = await AuthenthicationService.RegisterUserAsync(modalAddUserName.Text.ToString(), modalAddUserEmail.Text.ToString(), modalAddUserPW.Text.ToString(), Role.User);
|
Result<Device> result = await AuthenthicationService.RegisterUserAsync(modalAddUserName.Text.ToString(), modalAddUserPW.Text.ToString(), modalAddUserEmail.Text.ToString(), Role.User);
|
||||||
|
|
||||||
if (result.IsSuccess)
|
if (result.IsSuccess)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -40,6 +40,11 @@ public class EnergyPriceService : IEnergyPriceService
|
|||||||
{
|
{
|
||||||
plugnames += $"shellyplug-s-{device.MacAddress}/relay/0|";
|
plugnames += $"shellyplug-s-{device.MacAddress}/relay/0|";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(plugnames.Length <= 0)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
plugnames = plugnames[0..^1];
|
plugnames = plugnames[0..^1];
|
||||||
|
|
||||||
if (startime < endTime)
|
if (startime < endTime)
|
||||||
|
|||||||
Reference in New Issue
Block a user