diff --git a/src/components/user_settings/user_settings.js b/src/components/user_settings/user_settings.js
index b6026e18..443e63dd 100644
--- a/src/components/user_settings/user_settings.js
+++ b/src/components/user_settings/user_settings.js
@@ -5,6 +5,7 @@ const UserSettings = {
return {
newname: this.$store.state.users.currentUser.name,
newbio: this.$store.state.users.currentUser.description,
+ newlocked: this.$store.state.users.currentUser.locked,
followList: null,
followImportError: false,
followsImported: false,
@@ -34,7 +35,8 @@ const UserSettings = {
updateProfile () {
const name = this.newname
const description = this.newbio
- this.$store.state.api.backendInteractor.updateProfile({params: {name, description}}).then((user) => {
+ const locked = this.newlocked
+ this.$store.state.api.backendInteractor.updateProfile({params: {name, description, locked}}).then((user) => {
if (!user.error) {
this.$store.commit('addNewUsers', [user])
this.$store.commit('setCurrentUser', user)
diff --git a/src/components/user_settings/user_settings.vue b/src/components/user_settings/user_settings.vue
index fbf3f651..4abdfc8e 100644
--- a/src/components/user_settings/user_settings.vue
+++ b/src/components/user_settings/user_settings.vue
@@ -10,6 +10,10 @@
{{$t('settings.bio')}}
+
+
+
+
diff --git a/src/i18n/messages.js b/src/i18n/messages.js
index 54a99b5a..3e842af8 100644
--- a/src/i18n/messages.js
+++ b/src/i18n/messages.js
@@ -302,7 +302,8 @@ const en = {
new_password: 'New password',
confirm_new_password: 'Confirm new password',
changed_password: 'Password changed successfully!',
- change_password_error: 'There was an issue changing your password.'
+ change_password_error: 'There was an issue changing your password.',
+ lock_account_description: 'Restrict your account to approved followers only'
},
notifications: {
notifications: 'Notifications',
diff --git a/src/services/api/api.service.js b/src/services/api/api.service.js
index 65761aee..b50038b3 100644
--- a/src/services/api/api.service.js
+++ b/src/services/api/api.service.js
@@ -127,11 +127,13 @@ const updateBanner = ({credentials, params}) => {
const updateProfile = ({credentials, params}) => {
let url = PROFILE_UPDATE_URL
+ console.log(params)
+
const form = new FormData()
each(params, (value, key) => {
- if (key === 'description' || /* Always include description, because it might be empty */
- value) {
+ /* Always include description and locked, because it might be empty or false */
+ if (key === 'description' || key === 'locked' || value) {
form.append(key, value)
}
})