mirror of
https://github.com/Stefan-5422/-T5-Elektrifikatsiya.git
synced 2026-09-04 00:45:58 +02:00
Toggle Fix
This commit is contained in:
@@ -139,10 +139,13 @@
|
||||
|
||||
|
||||
@code {
|
||||
ListView<Device> deviceList = new ListView<Device>();
|
||||
List<Device> plugs = new List<Device>();
|
||||
|
||||
bool hideButtonSettings = true;
|
||||
|
||||
int clicks = 0;
|
||||
|
||||
double electricityPrice = 0;
|
||||
|
||||
Device? SelectedDevice = null;
|
||||
@@ -161,10 +164,19 @@
|
||||
}
|
||||
|
||||
private void Toggle(Device device)
|
||||
{
|
||||
if (device == SelectedDevice || clicks == 0)
|
||||
{
|
||||
hideButtonSettings = !hideButtonSettings;
|
||||
SelectedDevice = device;
|
||||
DeviceCopy = device.CopyDevice();
|
||||
clicks++;
|
||||
}
|
||||
else
|
||||
{
|
||||
SelectedDevice = device;
|
||||
DeviceCopy = device.CopyDevice();
|
||||
}
|
||||
}
|
||||
|
||||
private async void OnSave()
|
||||
|
||||
@@ -10,11 +10,10 @@
|
||||
"User": "<SMTP_USER>",
|
||||
"Key": "<SMTP_KEY>",
|
||||
"DefaultEmail": "SMTP_EMAIL_ADDRESS",
|
||||
"DefaultEmail": "<SMTP_EMAIL_ADDRESS>",
|
||||
"Templates": {
|
||||
"DailyNotification": "../assets/DailyNotif.html"
|
||||
},
|
||||
"SmtpServer": "<SMTP_SERVER>",
|
||||
"SmtpPort": <SMTP_PORT>
|
||||
"SmtpPort": 0
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user