mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-10 00:34:50 +00:00
Update ComposeModal.vue component, reuse sharedData
This commit is contained in:
parent
f1ab44686b
commit
e28d022f62
1 changed files with 16 additions and 8 deletions
|
@ -635,6 +635,13 @@ export default {
|
||||||
methods: {
|
methods: {
|
||||||
fetchProfile() {
|
fetchProfile() {
|
||||||
let self = this;
|
let self = this;
|
||||||
|
if(window._sharedData.curUser) {
|
||||||
|
self.profile = window._sharedData.curUser;
|
||||||
|
if(self.profile.locked == true) {
|
||||||
|
self.visibility = 'private';
|
||||||
|
self.visibilityTag = 'Followers Only';
|
||||||
|
}
|
||||||
|
} else {
|
||||||
axios.get('/api/pixelfed/v1/accounts/verify_credentials').then(res => {
|
axios.get('/api/pixelfed/v1/accounts/verify_credentials').then(res => {
|
||||||
self.profile = res.data;
|
self.profile = res.data;
|
||||||
window.pixelfed.currentUser = res.data;
|
window.pixelfed.currentUser = res.data;
|
||||||
|
@ -644,6 +651,7 @@ export default {
|
||||||
}
|
}
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
});
|
});
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
addMedia(event) {
|
addMedia(event) {
|
||||||
|
|
Loading…
Reference in a new issue