]>
Commit | Line | Data |
---|---|---|
4b3d8120 BB |
1 | import Vue from 'vue'; |
2 | import DataService from '../services/data'; | |
3 | ||
4 | const internals = {}; | |
5 | ||
c6425032 BB |
6 | /** |
7 | * The status class, renders the winner during the poll stage, and a | |
8 | * message while waiting | |
9 | * | |
10 | * @class StatusComponent | |
11 | */ | |
12 | export default Vue.component('status', { | |
4b3d8120 BB |
13 | template: '<div class="status-widget">' + |
14 | '<transition name="fade">' + | |
15 | '<div v-if="state === 0" class="waiting-message">Waiting</div>' + | |
16 | '<div v-if="state === 2 && !winner" class="no-winner">Could not read you</div>' + | |
17 | '<div v-if="state === 2 && winner" class="winner" v-bind:class="[winner]">{{winner}}</div>' + | |
18 | '</transition>' + | |
19 | '</div>', | |
20 | ||
21 | data: DataService.data | |
22 | }); |