diff --git a/front/src/components/playlists/Form.vue b/front/src/components/playlists/Form.vue index 1fafe2d4a6588c254db7276ff16caee310dcb2f1..d19cd687668dca71fae2fabd8926426ae24986b4 100644 --- a/front/src/components/playlists/Form.vue +++ b/front/src/components/playlists/Form.vue @@ -57,8 +57,20 @@ export default { let d = { errors: [], success: false, - isLoading: false, - privacyLevelChoices: [ + isLoading: false + } + if (this.playlist) { + d.name = this.playlist.name + d.privacyLevel = this.playlist.privacy_level + } else { + d.privacyLevel = this.$store.state.auth.profile.privacy_level + d.name = '' + } + return d + }, + computed: { + privacyLevelChoices: function () { + return [ { value: 'me', label: this.$t('Nobody except me') @@ -73,14 +85,6 @@ export default { } ] } - if (this.playlist) { - d.name = this.playlist.name - d.privacyLevel = this.playlist.privacy_level - } else { - d.privacyLevel = this.$store.state.auth.profile.privacy_level - d.name = '' - } - return d }, methods: { submit () {