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 {
data: () => ({
feeds: [],
loading: false,
}
},
}),
computed: {
...mapState(useSubscriptions, ['subs']),
},

View File

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

View File

@ -158,14 +158,12 @@ export default {
PlaylistRemoveIcon,
StopIcon,
},
data() {
return {
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 {
data: () => ({
modal: false,
}
},
}),
computed: {
...mapState(usePlayer, ['episode', 'podcastUrl']),
hash() {

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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