refactor: ♻️ rewrite data to arrow function

This commit is contained in:
Michel Roux 2024-08-22 13:30:52 +02:00
parent 46b30f1ebb
commit f205d3243f
10 changed files with 40 additions and 60 deletions

View File

@ -62,12 +62,10 @@ export default {
required: true,
},
},
data() {
return {
feeds: [],
loading: false,
}
},
data: () => ({
feeds: [],
loading: false,
}),
computed: {
...mapState(useSubscriptions, ['subs']),
},

View File

@ -30,12 +30,10 @@ export default {
required: true,
},
},
data() {
return {
loading: true,
tops: [],
}
},
data: () => ({
loading: true,
tops: [],
}),
computed: {
title() {
switch (this.type) {

View File

@ -158,14 +158,12 @@ export default {
PlaylistRemoveIcon,
StopIcon,
},
data() {
return {
episodes: [],
loading: true,
loadingAction: false,
modalEpisode: null,
}
},
data: () => ({
episodes: [],
loading: true,
loadingAction: false,
modalEpisode: null,
}),
computed: {
...mapState(usePlayer, ['episode']),
...mapState(useSettings, ['filters']),

View File

@ -32,11 +32,9 @@ export default {
Modal,
NcModal,
},
data() {
return {
modal: false,
}
},
data: () => ({
modal: false,
}),
computed: {
...mapState(usePlayer, ['episode', 'podcastUrl']),
hash() {

View File

@ -46,11 +46,9 @@ export default {
VolumeMediumIcon,
VolumeMuteIcon,
},
data() {
return {
volumeMuted: 0,
}
},
data: () => ({
volumeMuted: 0,
}),
computed: {
...mapState(usePlayer, ['volume']),
},

View File

@ -44,12 +44,10 @@ export default {
NcAppNavigationItem,
NcModal,
},
data() {
return {
loading: false,
modal: false,
}
},
data: () => ({
loading: false,
modal: false,
}),
methods: {
generateUrl,
async importOpml(event) {

View File

@ -69,13 +69,11 @@ export default {
required: true,
},
},
data() {
return {
failed: false,
loading: true,
feed: null,
}
},
data: () => ({
failed: false,
loading: true,
feed: null,
}),
computed: {
...mapState(useSubscriptions, ['favorites']),
hash() {

View File

@ -48,11 +48,9 @@ export default {
PlusIcon,
Settings,
},
data() {
return {
loading: true,
}
},
data: () => ({
loading: true,
}),
computed: {
...mapState(useSubscriptions, ['subs']),
},

View File

@ -30,11 +30,9 @@ export default {
Search,
Toplist,
},
data() {
return {
search: '',
}
},
data: () => ({
search: '',
}),
}
</script>

View File

@ -41,13 +41,11 @@ export default {
Loading,
NcEmptyContent,
},
data() {
return {
failed: false,
loading: true,
feed: null,
}
},
data: () => ({
failed: false,
loading: true,
feed: null,
}),
computed: {
url() {
return decodeUrl(this.$route.params.url)