live view: remove disabled -OnBattery-specifc views from DOM (#372)
instead of hiding views, we can also avoid adding them to the DOM. this has a couple of advantages: * no HTTP request for data is sent and no websocket connection is established for disabled features. * JavaScript that causes errors due to incomplete or incompatible data of features that are disabled anyways do not trigger the browser debugger.
This commit is contained in:
parent
1100f10c99
commit
b7214161b8
@ -114,13 +114,9 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<VedirectView v-show="liveData.vedirect.enabled" />
|
<VedirectView v-if="liveData.vedirect.enabled" />
|
||||||
<div v-show="liveData.battery.enabled" >
|
<BatteryView v-if="liveData.battery.enabled" />
|
||||||
<BatteryView/>
|
<HuaweiView v-if="liveData.huawei.enabled" />
|
||||||
</div>
|
|
||||||
<div v-show="liveData.huawei.enabled" >
|
|
||||||
<HuaweiView/>
|
|
||||||
</div>
|
|
||||||
</BasePage>
|
</BasePage>
|
||||||
|
|
||||||
<div class="modal" id="eventView" tabindex="-1">
|
<div class="modal" id="eventView" tabindex="-1">
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user