fix(related items): convert console error to snackbar message

This commit is contained in:
cameron clark 2020-11-28 11:06:16 +00:00 committed by Julien Machiels
parent 7d48590700
commit f87b332bb5
2 changed files with 7 additions and 1 deletions

View File

@ -78,6 +78,7 @@
<script lang="ts">
import Vue from 'vue';
import { mapActions } from 'vuex';
import { BaseItemDto } from '~/api';
import imageHelper from '~/mixins/imageHelper';
@ -133,10 +134,14 @@ export default Vue.extend({
try {
this.refreshItems();
} catch (error) {
console.error('Unable to get related items:', error);
this.pushSnackbarMessage({
message: this.$t('unableGetRelated'),
color: 'error'
});
}
},
methods: {
...mapActions('snackbar', ['pushSnackbarMessage']),
async refreshItems() {
this.loading = true;

View File

@ -75,6 +75,7 @@
"themeVideo": "Theme Video",
"trailer": "Trailer",
"unexpectedError": "Unexpected error",
"unableGetRelated": "Unable to get related items",
"unhandledException": "Unhandled exception",
"unliked": "Unliked",
"unplayed": "Unplayed",