add support for disabling rich text formatting

This commit is contained in:
William Pitcock 2018-09-22 03:54:05 +00:00
parent cd48268c85
commit 1af5c8fd39
5 changed files with 11 additions and 3 deletions

View file

@ -7,6 +7,7 @@ const UserSettings = {
newname: this.$store.state.users.currentUser.name,
newbio: this.$store.state.users.currentUser.description,
newlocked: this.$store.state.users.currentUser.locked,
newnorichtext: this.$store.state.users.currentUser.no_rich_text,
newdefaultScope: this.$store.state.users.currentUser.default_scope,
followList: null,
followImportError: false,
@ -53,7 +54,8 @@ const UserSettings = {
const locked = this.newlocked
/* eslint-disable camelcase */
const default_scope = this.newdefaultScope
this.$store.state.api.backendInteractor.updateProfile({params: {name, description, locked, default_scope}}).then((user) => {
const no_rich_text = this.newnorichtext
this.$store.state.api.backendInteractor.updateProfile({params: {name, description, locked, default_scope, no_rich_text}}).then((user) => {
if (!user.error) {
this.$store.commit('addNewUsers', [user])
this.$store.commit('setCurrentUser', user)