mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-22 06:21:27 +00:00
Update ComposeModal
This commit is contained in:
parent
b78a51890d
commit
e975372631
1 changed files with 16 additions and 1 deletions
|
@ -1024,7 +1024,6 @@ export default {
|
|||
},
|
||||
|
||||
beforeMount() {
|
||||
this.fetchProfile();
|
||||
this.filters = window.App.util.filters;
|
||||
axios.get('/api/compose/v0/settings')
|
||||
.then(res => {
|
||||
|
@ -1038,6 +1037,7 @@ export default {
|
|||
return l.title;
|
||||
})[0];
|
||||
}
|
||||
this.fetchProfile();
|
||||
});
|
||||
},
|
||||
|
||||
|
@ -1047,8 +1047,18 @@ export default {
|
|||
|
||||
methods: {
|
||||
fetchProfile() {
|
||||
let tags = {
|
||||
public: 'Public',
|
||||
private: 'Followers Only',
|
||||
unlisted: 'Unlisted'
|
||||
}
|
||||
if(window._sharedData.curUser.id) {
|
||||
this.profile = window._sharedData.curUser;
|
||||
if(this.composeSettings && this.composeSettings.hasOwnProperty('default_scope') && this.composeSettings.default_scope) {
|
||||
let ds = this.composeSettings.default_scope;
|
||||
this.visibility = ds;
|
||||
this.visibilityTag = tags[ds];
|
||||
}
|
||||
if(this.profile.locked == true) {
|
||||
this.visibility = 'private';
|
||||
this.visibilityTag = 'Followers Only';
|
||||
|
@ -1057,6 +1067,11 @@ export default {
|
|||
axios.get('/api/pixelfed/v1/accounts/verify_credentials').then(res => {
|
||||
window._sharedData.currentUser = res.data;
|
||||
this.profile = res.data;
|
||||
if(this.composeSettings && this.composeSettings.hasOwnProperty('default_scope') && this.composeSettings.default_scope) {
|
||||
let ds = this.composeSettings.default_scope;
|
||||
this.visibility = ds;
|
||||
this.visibilityTag = tags[ds];
|
||||
}
|
||||
if(this.profile.locked == true) {
|
||||
this.visibility = 'private';
|
||||
this.visibilityTag = 'Followers Only';
|
||||
|
|
Loading…
Reference in a new issue