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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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