|
|
@@ -243,7 +243,13 @@ extension Home {
|
|
|
""
|
|
|
)
|
|
|
|
|
|
- let smbToggleString = (fetchedPercent.first?.smbIsOff ?? false) ? " \u{20e0}" : ""
|
|
|
+ let smbToggleString = (
|
|
|
+ (fetchedPercent.first?.smbIsOff ?? false) || fetchedPercent.first?.smbIsScheduledOff ?? false
|
|
|
+ ) ?
|
|
|
+ " \u{20e0}" : ""
|
|
|
+ let smbScheduleString = (fetchedPercent.first?.smbIsScheduledOff ?? false) &&
|
|
|
+ !(fetchedPercent.first?.smbIsOff ?? false) ?
|
|
|
+ " \(fetchedPercent.first?.start ?? 0)-\(fetchedPercent.first?.end ?? 0)" : ""
|
|
|
var comma1 = ", "
|
|
|
var comma2 = comma1
|
|
|
var comma3 = comma1
|
|
|
@@ -271,7 +277,7 @@ extension Home {
|
|
|
if durationString == "", !indefinite {
|
|
|
return nil
|
|
|
}
|
|
|
- return percentString + comma1 + targetString + comma2 + durationString + comma3 + smbToggleString
|
|
|
+ return percentString + comma1 + targetString + comma2 + durationString + comma3 + smbToggleString + smbScheduleString
|
|
|
}
|
|
|
|
|
|
var infoPanel: some View {
|