From 81b84b486538885978fe1f27f9c06aece83e126b Mon Sep 17 00:00:00 2001 From: Bat Date: Wed, 18 Apr 2018 18:58:13 +0100 Subject: [PATCH] Fix $t bug --- front/src/components/playlists/Form.vue | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/front/src/components/playlists/Form.vue b/front/src/components/playlists/Form.vue index 1fafe2d4a..d19cd6876 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 () {