]> git.r.bdr.sh - rbdr/sorting-hat-renderer/blame_incremental - lib/components/status.js
Merge branch 'release/1.0.0'
[rbdr/sorting-hat-renderer] / lib / components / status.js
... / ...
CommitLineData
1import Vue from 'vue';
2import DataService from '../services/data';
3
4const internals = {};
5
6/**
7 * The status class, renders the winner during the poll stage, and a
8 * message while waiting
9 *
10 * @class StatusComponent
11 */
12export default Vue.component('status', {
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});