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 {
|
||||
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)
|
||||
|
||||
@ -46,8 +46,13 @@ export interface Hints {
|
||||
radio_problem: boolean;
|
||||
}
|
||||
|
||||
export interface Vedirect {
|
||||
enabled: boolean;
|
||||
}
|
||||
|
||||
export interface LiveData {
|
||||
inverters: Inverter[];
|
||||
total: Total;
|
||||
hints: Hints;
|
||||
vedirect: Vedirect;
|
||||
}
|
||||
@ -111,7 +111,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<VedirectView />
|
||||
<VedirectView v-show="liveData.vedirect.enabled" />
|
||||
</BasePage>
|
||||
|
||||
<div class="modal" id="eventView" tabindex="-1">
|
||||
|
||||
Loading…
Reference in New Issue
Block a user