diff --git a/resources/assets/js/components/ComposeModal.vue b/resources/assets/js/components/ComposeModal.vue index 729cc03aa..f700f0373 100644 --- a/resources/assets/js/components/ComposeModal.vue +++ b/resources/assets/js/components/ComposeModal.vue @@ -479,9 +479,26 @@
-
Public
-
Unlisted
-
Followers Only
+
+ Public +
+
+ Unlisted +
+
+ Followers Only +
@@ -641,7 +658,7 @@ export default { return { config: window.App.config, pageLoading: false, - profile: {}, + profile: window._sharedData.curUser, composeText: '', composeTextLength: 0, nsfw: false, @@ -708,20 +725,19 @@ export default { methods: { fetchProfile() { - let self = this; - if(window._sharedData.curUser) { - self.profile = window._sharedData.curUser; - if(self.profile.locked == true) { - self.visibility = 'private'; - self.visibilityTag = 'Followers Only'; + if(window._sharedData.curUser.id) { + this.profile = window._sharedData.curUser; + if(this.profile.locked == true) { + this.visibility = 'private'; + this.visibilityTag = 'Followers Only'; } } else { axios.get('/api/pixelfed/v1/accounts/verify_credentials').then(res => { - self.profile = res.data; - window.pixelfed.currentUser = res.data; - if(res.data.locked == true) { - self.visibility = 'private'; - self.visibilityTag = 'Followers Only'; + window._sharedData.currentUser = res.data; + this.profile = res.data; + if(this.profile.locked == true) { + this.visibility = 'private'; + this.visibilityTag = 'Followers Only'; } }).catch(err => { });