Moved add game class to computed prop

This commit is contained in:
Roman Cervantes 2019-09-30 20:50:36 -07:00
parent d5529de1f4
commit f52c9bfa56

View file

@ -1,9 +1,6 @@
<template lang="html">
<modal large :title="$t('list.addGame')">
<button
:class="['add-game-button small', { info: this.darkModeEnabled, accent: !this.darkModeEnabled, }]"
:title="$t('list.addGame')"
>
<button :class="buttonClass" :title="$t('list.addGame')">
<i class="fas fa-plus" />
</button>
@ -84,6 +81,16 @@ export default {
...mapState(['results', 'gameLists', 'platform']),
...mapGetters(['darkModeEnabled']),
buttonClass() {
return [
'add-game-button small',
{
info: this.darkModeEnabled,
accent: !this.darkModeEnabled,
},
];
},
noResults() {
return this.filteredResults.length === 0
&& !this.loading