|
|
@ -6,6 +6,7 @@ const UserSettings = {
|
|
|
|
newname: this.$store.state.users.currentUser.name,
|
|
|
|
newname: this.$store.state.users.currentUser.name,
|
|
|
|
newbio: this.$store.state.users.currentUser.description,
|
|
|
|
newbio: this.$store.state.users.currentUser.description,
|
|
|
|
newlocked: this.$store.state.users.currentUser.locked,
|
|
|
|
newlocked: this.$store.state.users.currentUser.locked,
|
|
|
|
|
|
|
|
newdefaultScope: this.$store.state.users.currentUser.default_scope,
|
|
|
|
followList: null,
|
|
|
|
followList: null,
|
|
|
|
followImportError: false,
|
|
|
|
followImportError: false,
|
|
|
|
followsImported: false,
|
|
|
|
followsImported: false,
|
|
|
@ -29,20 +30,35 @@ const UserSettings = {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
pleromaBackend () {
|
|
|
|
pleromaBackend () {
|
|
|
|
return this.$store.state.config.pleromaBackend
|
|
|
|
return this.$store.state.config.pleromaBackend
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
scopeOptionsEnabled () {
|
|
|
|
|
|
|
|
return this.$store.state.config.scopeOptionsEnabled
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
vis () {
|
|
|
|
|
|
|
|
return {
|
|
|
|
|
|
|
|
public: { selected: this.newdefaultScope === 'public' },
|
|
|
|
|
|
|
|
unlisted: { selected: this.newdefaultScope === 'unlisted' },
|
|
|
|
|
|
|
|
private: { selected: this.newdefaultScope === 'private' },
|
|
|
|
|
|
|
|
direct: { selected: this.newdefaultScope === 'direct' }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
methods: {
|
|
|
|
updateProfile () {
|
|
|
|
updateProfile () {
|
|
|
|
const name = this.newname
|
|
|
|
const name = this.newname
|
|
|
|
const description = this.newbio
|
|
|
|
const description = this.newbio
|
|
|
|
const locked = this.newlocked
|
|
|
|
const locked = this.newlocked
|
|
|
|
this.$store.state.api.backendInteractor.updateProfile({params: {name, description, locked}}).then((user) => {
|
|
|
|
const default_scope = this.newdefaultScope
|
|
|
|
|
|
|
|
this.$store.state.api.backendInteractor.updateProfile({params: {name, description, locked, default_scope}}).then((user) => {
|
|
|
|
if (!user.error) {
|
|
|
|
if (!user.error) {
|
|
|
|
this.$store.commit('addNewUsers', [user])
|
|
|
|
this.$store.commit('addNewUsers', [user])
|
|
|
|
this.$store.commit('setCurrentUser', user)
|
|
|
|
this.$store.commit('setCurrentUser', user)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
})
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
changeVis (visibility) {
|
|
|
|
|
|
|
|
this.newdefaultScope = visibility
|
|
|
|
|
|
|
|
},
|
|
|
|
uploadFile (slot, e) {
|
|
|
|
uploadFile (slot, e) {
|
|
|
|
const file = e.target.files[0]
|
|
|
|
const file = e.target.files[0]
|
|
|
|
if (!file) { return }
|
|
|
|
if (!file) { return }
|
|
|
|