~pistos/remoteku

fead3a5a408ea67a782900d6321d6f368f0f58c2 — Pistos 1 year, 5 months ago f39f4f8
UI for lack of Rokus
1 files changed, 15 insertions(+), 5 deletions(-)

M frontend/src/views/Home.vue
M frontend/src/views/Home.vue => frontend/src/views/Home.vue +15 -5
@@ 5,12 5,17 @@
      Finding Roku devices...
    </div>
    <div v-else>
      <div v-if="! rokuHost">
        Choose a Roku device:
      <div v-if="noRokus">
        No Roku devices found.
      </div>
      <div v-for="(host, index) in rokuHosts" :key="host">
        <input type="radio" :id="`roku-${index}`" :value="host" v-model="rokuHost" />
        <label for="`roku-${index}`">{{host}}</label>
      <div v-else>
        <div v-if="! rokuHost">
          Choose a Roku device:
        </div>
        <div v-for="(host, index) in rokuHosts" :key="host">
          <input type="radio" :id="`roku-${index}`" :value="host" v-model="rokuHost" />
          <label for="`roku-${index}`">{{host}}</label>
        </div>
      </div>
    </div>
  </div>


@@ 31,6 36,11 @@
const axios = require('axios')

export default {
  computed: {
    noRokus () {
      return this.rokuHosts.length == 0
    },
  },
  async created () {
    this.discoveringRokus = true
    const res = await axios.get('/api/discover')