Commit cefa3ec9 authored by Georg Krause's avatar Georg Krause
Browse files

Fix post lint issues

parent 9f30e4ec
......@@ -136,7 +136,7 @@ eslint:
- cd front
- yarn install
script:
- yarn lint
- yarn lint --max-warnings 0
cache:
key: "$CI_PROJECT_ID__eslint_npm_cache"
paths:
......
......@@ -133,20 +133,20 @@ export default {
mixins: [ReportMixin, PlayOptionsMixin],
props: {
// we can either have a single or multiple tracks to play when clicked
tracks: { type: Array, required: false, default: () => { return [] } },
track: { type: Object, required: false, default: () => { return {} } },
account: { type: Object, required: false, default: () => { return {} } },
tracks: { type: Array, required: false, default: () => { return null } },
track: { type: Object, required: false, default: () => { return null } },
account: { type: Object, required: false, default: () => { return null } },
dropdownIconClasses: { type: Array, required: false, default: () => { return ['dropdown'] } },
playIconClass: { type: String, required: false, default: 'play icon' },
buttonClasses: { type: Array, required: false, default: () => { return ['button'] } },
playlist: { type: Object, required: false, default: () => { return {} } },
playlist: { type: Object, required: false, default: () => { return null } },
discrete: { type: Boolean, default: false },
dropdownOnly: { type: Boolean, default: false },
iconOnly: { type: Boolean, default: false },
artist: { type: Object, required: false, default: () => { return {} } },
album: { type: Object, required: false, default: () => { return {} } },
library: { type: Object, required: false, default: () => { return {} } },
channel: { type: Object, required: false, default: () => { return {} } },
artist: { type: Object, required: false, default: () => { return null } },
album: { type: Object, required: false, default: () => { return null } },
library: { type: Object, required: false, default: () => { return null } },
channel: { type: Object, required: false, default: () => { return null } },
isPlayable: { type: Boolean, required: false, default: null },
playing: { type: Boolean, required: false, default: false },
paused: { type: Boolean, required: false, default: false }
......
......@@ -50,7 +50,7 @@
</button>
</template>
<script>
import mapActions from 'vuex'
import { mapActions } from 'vuex'
export default {
data () {
......
......@@ -105,7 +105,7 @@ export default {
showDuration: { type: Boolean, required: false, default: true },
index: { type: Number, required: true },
track: { type: Object, required: true },
defaultCover: { type: Object, required: false, default: () => { return {} } }
defaultCover: { type: Object, required: false, default: null }
},
data () {
......
......@@ -91,7 +91,7 @@ import axios from 'axios'
export default {
props: {
value: { type: String, required: true },
value: { type: String, default: null },
imageClass: { type: String, default: '', required: false }
},
data () {
......
......@@ -16,7 +16,7 @@
import { secondsToObject } from '@/filters'
export default {
props: { seconds: { type: Number, required: true } },
props: { seconds: { type: Number, default: null } },
computed: {
durationData () {
return secondsToObject(this.seconds)
......
......@@ -89,7 +89,7 @@ import clip from 'text-clipper'
export default {
props: {
content: { type: String, default: '' },
content: { type: Object, required: false, default: null },
fieldName: { type: String, required: false, default: 'description' },
updateUrl: { required: false, type: String, default: '' },
canUpdate: { required: false, default: true, type: Boolean },
......
......@@ -33,7 +33,7 @@
:key="library.uuid"
:display-scan="false"
:display-follow="$store.state.auth.authenticated && library.actor.full_username != $store.state.auth.fullUsername"
:library="library"
:initial-library="library"
:display-copy-fid="true"
/>
</div>
......
......@@ -33,7 +33,7 @@ export default {
value: { type: String, required: true },
defaultShow: { type: Boolean, default: false },
copyButton: { type: Boolean, default: false },
fieldId: { type: Number, default: 0 }
fieldId: { type: String, required: true }
},
data () {
return {
......
......@@ -273,7 +273,7 @@ export default {
ArtistLabel,
AlbumDropdown
},
props: { id: { type: Number, required: true } },
props: { id: { type: [String, Number], required: true } },
data () {
return {
isLoading: true,
......
......@@ -42,7 +42,7 @@
<div class="ui buttons">
<radio-button
type="artist"
:object-id="object.id"
:object-id="String(object.id)"
/>
</div>
<div class="ui buttons">
......@@ -234,7 +234,7 @@ export default {
TagsList
},
mixins: [ReportMixin],
props: { id: { type: Number, required: true } },
props: { id: { type: [String, Number], required: true } },
data () {
return {
isLoading: true,
......
......@@ -120,8 +120,8 @@ export default {
tracks: { type: Array, required: true },
albums: { type: Array, required: true },
isLoadingAlbums: { type: Boolean, required: true },
nextTracksUrl: { type: String, required: true },
nextAlbumsUrl: { type: String, required: true }
nextTracksUrl: { type: String, default: null },
nextAlbumsUrl: { type: String, default: null }
},
data () {
return {
......
......@@ -182,11 +182,11 @@
</translate>
</button>
</template>
<div v-if="!lodash.isEqual(values[fieldConfig.id], initialValues[fieldConfig.id])">
<div v-if="fieldValuesChanged(fieldConfig.id)">
<button
class="ui tiny basic right floated reset button"
form="noop"
@click.prevent="values[fieldConfig.id] = lodash.clone(initialValues[fieldConfig.id])"
@click.prevent="resetField(fieldConfig.id)"
>
<i class="undo icon" />
<translate translate-context="Content/Library/Button.Label">
......@@ -361,7 +361,14 @@ export default {
self.isLoading = false
}
)
},
fieldValuesChanged (fieldId) {
return !_.isEqual(this.values[fieldId], this.initialValues[fieldId])
},
resetField (fieldId) {
this.values[fieldId] = _.clone(this.initialValues[fieldId])
}
}
}
</script>
......@@ -252,7 +252,7 @@ export default {
EmbedWizard
},
mixins: [ReportMixin],
props: { id: { type: Number, required: true } },
props: { id: { type: [String, Number], required: true } },
data () {
return {
time,
......
......@@ -301,7 +301,7 @@ export default {
},
props: {
track: { type: Object, required: true },
libraries: { type: Array, required: true }
libraries: { type: Array, default: null }
},
data () {
return {
......
......@@ -53,7 +53,7 @@ export default {
props: {
objectType: { type: String, required: true },
object: { type: Object, required: true },
libraries: { type: Array, required: true }
libraries: { type: Array, default: null }
},
data () {
return {
......
......@@ -30,11 +30,11 @@ import lodash from '@/lodash'
export default {
mixins: [TranslationsMixin],
props: {
value: { type: String, required: true },
all: { type: String, required: true },
label: { type: String, required: true },
empty: { type: String, required: true },
required: { type: String, required: true },
value: { type: String, default: null },
all: { type: String, default: null },
label: { type: Boolean },
empty: { type: Boolean },
required: { type: Boolean },
restrictTo: { type: Array, default: () => { return [] } }
},
computed: {
......
......@@ -107,7 +107,7 @@ export default {
let acceptFollow = null
let rejectFollow = null
let message = null
if (a.related_object.approved === null) {
if (a.related_object && a.related_object.approved === null) {
message = this.labels.libraryPendingFollowMessage
acceptFollow = {
buttonClass: 'success',
......@@ -121,7 +121,7 @@ export default {
label: this.$pgettext('Content/*/Button.Label/Verb', 'Reject'),
handler: () => { self.rejectLibraryFollow(a.related_object) }
}
} else if (a.related_object.approved) {
} else if (a.related_object && a.related_object.approved) {
message = this.labels.libraryFollowMessage
} else {
message = this.labels.libraryRejectMessage
......
......@@ -25,10 +25,10 @@
import lodash from '@/lodash'
export default {
props: {
customRadioId: { type: Number, default: 0, required: false },
customRadioId: { type: Number, required: false, default: null },
type: { type: String, required: false, default: '' },
clientOnly: { type: Boolean, default: false },
objectId: { type: String, default: null }
objectId: { type: [String, Number, Object], default: null }
},
computed: {
running () {
......
......@@ -53,11 +53,11 @@ export default {
props: {
type: { type: String, required: true, default: '' },
customRadio: { type: Object, required: false, default: () => { return {} } },
objectId: { type: String, required: false, default: '' }
objectId: { type: String, required: false, default: null }
},
computed: {
radio () {
if (this.customRadio) {
if (Object.keys(this.customRadio).length > 0) {
return this.customRadio
}
return this.$store.getters['radios/types'][this.type]
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment