2020-06-24 20:54:36 +00:00
|
|
|
<template>
|
|
|
|
<div id="errors_tab" class="main_tabcontent">
|
2020-09-06 10:17:35 +00:00
|
|
|
<h1>{{ $t('errors.title', {name: title}) }}</h1>
|
2020-07-23 14:18:28 +00:00
|
|
|
<table class="table table--tracklist">
|
2020-06-24 20:54:36 +00:00
|
|
|
<tr>
|
|
|
|
<th>ID</th>
|
2020-07-18 16:06:07 +00:00
|
|
|
<th>{{ $tc('globals.listTabs.artist', 1) }}</th>
|
|
|
|
<th>{{ $tc('globals.listTabs.title', 1) }}</th>
|
|
|
|
<th>{{ $tc('globals.listTabs.error', 1) }}</th>
|
2020-06-24 20:54:36 +00:00
|
|
|
</tr>
|
2020-07-18 16:06:07 +00:00
|
|
|
<tr v-for="error in errors" :key="error.data.id">
|
2020-06-24 20:54:36 +00:00
|
|
|
<td>{{ error.data.id }}</td>
|
|
|
|
<td>{{ error.data.artist }}</td>
|
|
|
|
<td>{{ error.data.title }}</td>
|
2020-07-23 14:18:28 +00:00
|
|
|
<td>{{ error.errid ? $t(`errors.ids.${error.errid}`) : error.message }}</td>
|
2020-06-24 20:54:36 +00:00
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
2020-07-16 22:11:28 +00:00
|
|
|
import { changeTab } from '@js/tabs.js'
|
2020-07-14 20:27:48 +00:00
|
|
|
|
2020-07-16 22:11:28 +00:00
|
|
|
import EventBus from '@/utils/EventBus'
|
2020-06-24 20:54:36 +00:00
|
|
|
|
|
|
|
export default {
|
|
|
|
name: 'the-errors-tab',
|
|
|
|
data: () => ({
|
|
|
|
title: '',
|
|
|
|
errors: []
|
|
|
|
}),
|
|
|
|
methods: {
|
|
|
|
reset() {
|
|
|
|
this.title = ''
|
|
|
|
this.errors = []
|
|
|
|
},
|
2020-07-14 20:27:48 +00:00
|
|
|
showErrors(data, eventTarget) {
|
2020-06-24 20:54:36 +00:00
|
|
|
this.title = data.artist + ' - ' + data.title
|
|
|
|
this.errors = data.errors
|
2020-07-14 20:27:48 +00:00
|
|
|
|
|
|
|
changeTab(eventTarget, 'main', 'errors_tab')
|
2020-06-24 20:54:36 +00:00
|
|
|
}
|
|
|
|
},
|
|
|
|
mounted() {
|
2020-07-14 20:27:48 +00:00
|
|
|
EventBus.$on('showTabErrors', this.showErrors)
|
2020-07-16 20:20:13 +00:00
|
|
|
this.$root.$on('showTabErrors', this.showErrors)
|
2020-06-24 20:54:36 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style>
|
2020-07-23 14:18:28 +00:00
|
|
|
</style>
|