[web] Fix linting errors
This commit is contained in:
parent
c78f861f45
commit
6519b18aa0
|
@ -6,5 +6,9 @@ module.exports = {
|
|||
rules: {
|
||||
// override/add rules settings here, such as:
|
||||
// 'vue/no-unused-vars': 'error'
|
||||
'no-unused-vars': ['error', { args: 'none' }],
|
||||
'vue/require-prop-types': 'off',
|
||||
'vue/require-default-prop': 'off',
|
||||
'vue/prop-name-casing': ['warn', 'snake_case']
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
:show="show_update_dialog"
|
||||
@close="show_update_dialog = false"
|
||||
/>
|
||||
<notifications v-show="!show_burger_menu" />
|
||||
<notification-list v-show="!show_burger_menu" />
|
||||
<navbar-bottom />
|
||||
<div
|
||||
v-show="show_burger_menu || show_player_menu"
|
||||
|
@ -27,7 +27,7 @@
|
|||
<script>
|
||||
import NavbarTop from '@/components/NavbarTop.vue'
|
||||
import NavbarBottom from '@/components/NavbarBottom.vue'
|
||||
import Notifications from '@/components/Notifications.vue'
|
||||
import NotificationList from '@/components/NotificationList.vue'
|
||||
import ModalDialogRemotePairing from '@/components/ModalDialogRemotePairing.vue'
|
||||
import ModalDialogUpdate from '@/components/ModalDialogUpdate.vue'
|
||||
import webapi from '@/webapi'
|
||||
|
@ -40,7 +40,7 @@ export default {
|
|||
components: {
|
||||
NavbarTop,
|
||||
NavbarBottom,
|
||||
Notifications,
|
||||
NotificationList,
|
||||
ModalDialogRemotePairing,
|
||||
ModalDialogUpdate
|
||||
},
|
||||
|
|
|
@ -50,12 +50,18 @@ export default {
|
|||
stopAudio() {
|
||||
try {
|
||||
this._audio.pause()
|
||||
} catch (e) {}
|
||||
} catch (e) {
|
||||
// continue regardless of error
|
||||
}
|
||||
try {
|
||||
this._audio.stop()
|
||||
} catch (e) {}
|
||||
} catch (e) {
|
||||
// continue regardless of error
|
||||
}
|
||||
try {
|
||||
this._audio.close()
|
||||
} catch (e) {}
|
||||
} catch (e) {
|
||||
// continue regardless of error
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,6 +14,7 @@ import { renderSVG } from '@/lib/SVGRenderer'
|
|||
export default {
|
||||
name: 'CoverArtwork',
|
||||
props: ['artist', 'album', 'artwork_url', 'maxwidth', 'maxheight'],
|
||||
emits: ['click'],
|
||||
|
||||
data() {
|
||||
return {
|
||||
|
|
|
@ -37,6 +37,7 @@
|
|||
export default {
|
||||
name: 'DropdownMenu',
|
||||
|
||||
// eslint-disable-next-line vue/prop-name-casing
|
||||
props: ['modelValue', 'options'],
|
||||
emits: ['update:modelValue'],
|
||||
|
||||
|
|
|
@ -119,6 +119,7 @@ export default {
|
|||
components: { ListItemAlbum, ModalDialogAlbum, ModalDialog, CoverArtwork },
|
||||
|
||||
props: ['albums', 'media_kind'],
|
||||
emits: ['play-count-changed', 'podcast-deleted'],
|
||||
|
||||
data() {
|
||||
return {
|
||||
|
|
|
@ -50,7 +50,8 @@
|
|||
<script>
|
||||
export default {
|
||||
name: 'ModalDialog',
|
||||
props: ['show', 'title', 'ok_action', 'delete_action', 'close_action']
|
||||
props: ['show', 'title', 'ok_action', 'delete_action', 'close_action'],
|
||||
emits: ['delete', 'close', 'ok']
|
||||
}
|
||||
</script>
|
||||
|
||||
|
|
|
@ -69,6 +69,7 @@ import webapi from '@/webapi'
|
|||
export default {
|
||||
name: 'ModalDialogAddRss',
|
||||
props: ['show'],
|
||||
emits: ['close', 'podcast-added'],
|
||||
|
||||
data() {
|
||||
return {
|
||||
|
|
|
@ -69,6 +69,7 @@ import webapi from '@/webapi'
|
|||
export default {
|
||||
name: 'ModalDialogAddUrlStream',
|
||||
props: ['show'],
|
||||
emits: ['close'],
|
||||
|
||||
data() {
|
||||
return {
|
||||
|
|
|
@ -100,6 +100,7 @@ export default {
|
|||
name: 'ModalDialogAlbum',
|
||||
components: { CoverArtwork },
|
||||
props: ['show', 'album', 'media_kind', 'new_tracks'],
|
||||
emits: ['close', 'remove-podcast', 'play-count-changed'],
|
||||
|
||||
data() {
|
||||
return {
|
||||
|
|
|
@ -64,6 +64,7 @@ import webapi from '@/webapi'
|
|||
export default {
|
||||
name: 'ModalDialogArtist',
|
||||
props: ['show', 'artist'],
|
||||
emits: ['close'],
|
||||
|
||||
methods: {
|
||||
play: function () {
|
||||
|
|
|
@ -56,6 +56,7 @@ import webapi from '@/webapi'
|
|||
export default {
|
||||
name: 'ModalDialogComposer',
|
||||
props: ['show', 'composer'],
|
||||
emits: ['close'],
|
||||
|
||||
methods: {
|
||||
play: function () {
|
||||
|
|
|
@ -42,6 +42,7 @@ import webapi from '@/webapi'
|
|||
export default {
|
||||
name: 'ModalDialogDirectory',
|
||||
props: ['show', 'directory'],
|
||||
emits: ['close'],
|
||||
|
||||
methods: {
|
||||
play: function () {
|
||||
|
|
|
@ -44,6 +44,7 @@ import webapi from '@/webapi'
|
|||
export default {
|
||||
name: 'ModalDialogGenre',
|
||||
props: ['show', 'genre'],
|
||||
emits: ['close'],
|
||||
|
||||
methods: {
|
||||
play: function () {
|
||||
|
|
|
@ -54,6 +54,7 @@ import webapi from '@/webapi'
|
|||
export default {
|
||||
name: 'ModalDialogPlaylist',
|
||||
props: ['show', 'playlist', 'uris'],
|
||||
emits: ['close'],
|
||||
|
||||
methods: {
|
||||
play: function () {
|
||||
|
|
|
@ -65,6 +65,7 @@ import webapi from '@/webapi'
|
|||
export default {
|
||||
name: 'ModalDialogPlaylistSave',
|
||||
props: ['show'],
|
||||
emits: ['close'],
|
||||
|
||||
data() {
|
||||
return {
|
||||
|
|
|
@ -119,6 +119,7 @@ import SpotifyWebApi from 'spotify-web-api-js'
|
|||
export default {
|
||||
name: 'ModalDialogQueueItem',
|
||||
props: ['show', 'item'],
|
||||
emits: ['close'],
|
||||
|
||||
data() {
|
||||
return {
|
||||
|
|
|
@ -58,6 +58,7 @@ import webapi from '@/webapi'
|
|||
export default {
|
||||
name: 'ModalDialogRemotePairing',
|
||||
props: ['show'],
|
||||
emits: ['close'],
|
||||
|
||||
data() {
|
||||
return {
|
||||
|
|
|
@ -156,6 +156,7 @@ export default {
|
|||
name: 'ModalDialogTrack',
|
||||
|
||||
props: ['show', 'track'],
|
||||
emits: ['close', 'play-count-changed'],
|
||||
|
||||
data() {
|
||||
return {
|
||||
|
|
|
@ -49,6 +49,7 @@ export default {
|
|||
name: 'ModalDialogUpdate',
|
||||
components: { ModalDialog },
|
||||
props: ['show'],
|
||||
emits: ['close'],
|
||||
|
||||
data() {
|
||||
return {
|
||||
|
|
|
@ -102,14 +102,7 @@
|
|||
<navbar-item-link to="/settings/webinterface">
|
||||
Settings
|
||||
</navbar-item-link>
|
||||
<a
|
||||
class="navbar-item"
|
||||
@click.stop.prevent="
|
||||
show_update_dialog = true
|
||||
show_settings_menu = false
|
||||
show_burger_menu = false
|
||||
"
|
||||
>
|
||||
<a class="navbar-item" @click.stop.prevent="open_update_dialog()">
|
||||
Update Library
|
||||
</a>
|
||||
<navbar-item-link to="/about"> About </navbar-item-link>
|
||||
|
@ -253,6 +246,12 @@ export default {
|
|||
methods: {
|
||||
on_click_outside_settings() {
|
||||
this.show_settings_menu = !this.show_settings_menu
|
||||
},
|
||||
|
||||
open_update_dialog() {
|
||||
this.show_update_dialog = true
|
||||
this.show_settings_menu = false
|
||||
this.show_burger_menu = false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
import * as types from '@/store/mutation_types'
|
||||
|
||||
export default {
|
||||
name: 'Notifications',
|
||||
name: 'NotificationList',
|
||||
components: {},
|
||||
|
||||
data() {
|
|
@ -73,6 +73,7 @@ import webapi from '@/webapi'
|
|||
export default {
|
||||
name: 'SpotifyModalDialogAlbum',
|
||||
props: ['show', 'album'],
|
||||
emits: ['close'],
|
||||
|
||||
data() {
|
||||
return {
|
||||
|
|
|
@ -57,6 +57,7 @@ import webapi from '@/webapi'
|
|||
export default {
|
||||
name: 'SpotifyModalDialogArtist',
|
||||
props: ['show', 'artist'],
|
||||
emits: ['close'],
|
||||
|
||||
methods: {
|
||||
play: function () {
|
||||
|
|
|
@ -60,6 +60,7 @@ import webapi from '@/webapi'
|
|||
export default {
|
||||
name: 'SpotifyModalDialogPlaylist',
|
||||
props: ['show', 'playlist'],
|
||||
emits: ['close'],
|
||||
|
||||
methods: {
|
||||
play: function () {
|
||||
|
|
|
@ -81,6 +81,7 @@ import webapi from '@/webapi'
|
|||
export default {
|
||||
name: 'SpotifyModalDialogTrack',
|
||||
props: ['show', 'track', 'album'],
|
||||
emits: ['close'],
|
||||
|
||||
methods: {
|
||||
play: function () {
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
:album="album"
|
||||
@click="open_album(album)"
|
||||
>
|
||||
<template slot:actions>
|
||||
<template #actions>
|
||||
<a @click="open_dialog(album)">
|
||||
<span class="icon has-text-dark"
|
||||
><i class="mdi mdi-dots-vertical mdi-18px"
|
||||
|
|
|
@ -127,13 +127,13 @@
|
|||
|
||||
<!-- Composers -->
|
||||
<content-with-heading v-if="show_composers && composers.total">
|
||||
<template slot:heading-left>
|
||||
<template #heading-left>
|
||||
<p class="title is-4">Composers</p>
|
||||
</template>
|
||||
<template slot:content>
|
||||
<template #content>
|
||||
<list-composers :composers="composers.items" />
|
||||
</template>
|
||||
<template slot:footer>
|
||||
<template #footer>
|
||||
<nav v-if="show_all_composers_button" class="level">
|
||||
<p class="level-item">
|
||||
<a
|
||||
|
@ -146,7 +146,7 @@
|
|||
</template>
|
||||
</content-with-heading>
|
||||
<content-text v-if="show_composers && !composers.total">
|
||||
<template slot:content>
|
||||
<template #content>
|
||||
<p><i>No composers found</i></p>
|
||||
</template>
|
||||
</content-text>
|
||||
|
|
Loading…
Reference in New Issue