From f07749588ef81d1b4cb7e60e68ff80e6c1653399 Mon Sep 17 00:00:00 2001 From: pypy Date: Mon, 13 Jul 2020 01:32:11 +0900 Subject: [PATCH] show left/right controller indicator (closes #51) --- html/src/vr.pug | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/html/src/vr.pug b/html/src/vr.pug index a9e17740..a8c5de9c 100644 --- a/html/src/vr.pug +++ b/html/src/vr.pug @@ -59,28 +59,38 @@ html img(v-if="device[1] !== 'connected'" src="images/tracker_status_off.png" style="width:32px;height:32px") img(v-else-if="device[2] < 20" src="images/tracker_status_ready_low.png" style="width:32px;height:32px") img(v-else src="images/tracker_status_ready.png" style="width:32px;height:32px") + br + span {{ device[2] }}% template(v-else-if="device[0] === 'leftController'") img(v-if="device[1] !== 'connected'" src="images/controller_status_off.png" style="width:32px;height:32px") img(v-else-if="device[2] < 20" src="images/controller_status_ready_low.png" style="width:32px;height:32px") img(v-else src="images/controller_status_ready.png" style="width:32px;height:32px") + br + span L:{{ device[2] }}% template(v-else-if="device[0] === 'rightController'") img(v-if="device[1] !== 'connected'" src="images/controller_status_off.png" style="width:32px;height:32px") img(v-else-if="device[2] < 20" src="images/controller_status_ready_low.png" style="width:32px;height:32px") img(v-else src="images/controller_status_ready.png" style="width:32px;height:32px") + br + span R:{{ device[2] }}% template(v-else-if="device[0] === 'controller'") img(v-if="device[1] !== 'connected'" src="images/controller_status_off.png" style="width:32px;height:32px") img(v-else-if="device[2] < 20" src="images/controller_status_ready_low.png" style="width:32px;height:32px") img(v-else src="images/controller_status_ready.png" style="width:32px;height:32px") + br + span {{ device[2] }}% template(v-else-if="device[0] === 'base'") img(v-if="device[1] !== 'connected'" src="images/base_status_off.png" style="width:32px;height:32px") img(v-else-if="device[2] < 20" src="images/base_status_ready_low.png" style="width:32px;height:32px") img(v-else src="images/base_status_ready.png" style="width:32px;height:32px") + br + span {{ device[2] }}% template(v-else) img(v-if="device[1] !== 'connected'" src="images/other_status_off.png" style="width:32px;height:32px") img(v-else-if="device[2] < 20" src="images/other_status_ready_low.png" style="width:32px;height:32px") img(v-else src="images/other_status_ready.png" style="width:32px;height:32px") - br - span {{ device[2] }}% + br + span {{ device[2] }}% div(v-else) span No SteamVR Devices .x-container