Hide Victron Ve.direct UI elements from Live page when disabled
Resolves #91
This commit is contained in:
parent
1e6e40a3ab
commit
a66f818e75
@ -180,6 +180,9 @@ void WebApiWsLiveClass::generateJsonResponse(JsonVariant& root)
|
|||||||
} else {
|
} else {
|
||||||
hintObj[F("default_password")] = false;
|
hintObj[F("default_password")] = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
JsonObject vedirectObj = root.createNestedObject("vedirect");
|
||||||
|
vedirectObj[F("enabled")] = Configuration.get().Vedirect_Enabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
void WebApiWsLiveClass::addField(JsonObject& root, uint8_t idx, std::shared_ptr<InverterAbstract> inv, ChannelType_t type, ChannelNum_t channel, FieldId_t fieldId, String topic)
|
void WebApiWsLiveClass::addField(JsonObject& root, uint8_t idx, std::shared_ptr<InverterAbstract> inv, ChannelType_t type, ChannelNum_t channel, FieldId_t fieldId, String topic)
|
||||||
|
|||||||
@ -46,8 +46,13 @@ export interface Hints {
|
|||||||
radio_problem: boolean;
|
radio_problem: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface Vedirect {
|
||||||
|
enabled: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
export interface LiveData {
|
export interface LiveData {
|
||||||
inverters: Inverter[];
|
inverters: Inverter[];
|
||||||
total: Total;
|
total: Total;
|
||||||
hints: Hints;
|
hints: Hints;
|
||||||
}
|
vedirect: Vedirect;
|
||||||
|
}
|
||||||
|
|||||||
@ -111,7 +111,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<VedirectView />
|
<VedirectView v-show="liveData.vedirect.enabled" />
|
||||||
</BasePage>
|
</BasePage>
|
||||||
|
|
||||||
<div class="modal" id="eventView" tabindex="-1">
|
<div class="modal" id="eventView" tabindex="-1">
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user