aboutsummaryrefslogtreecommitdiff
path: root/src/components/user_settings/user_settings.js
diff options
context:
space:
mode:
authorHenry Jameson <me@hjkos.com>2019-04-10 21:48:42 +0300
committerHenry Jameson <me@hjkos.com>2019-04-10 21:48:42 +0300
commit262760d2586cac48da27cf7eb5389116d4023dfe (patch)
treea4c9393df0da43409fcce9b1b41b4611f33cccb6 /src/components/user_settings/user_settings.js
parent6471bec0d962a13b272c2c55807492c86b859256 (diff)
revert unnecessary changes
Diffstat (limited to 'src/components/user_settings/user_settings.js')
-rw-r--r--src/components/user_settings/user_settings.js26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/components/user_settings/user_settings.js b/src/components/user_settings/user_settings.js
index a8d7b6b6..b6a0479d 100644
--- a/src/components/user_settings/user_settings.js
+++ b/src/components/user_settings/user_settings.js
@@ -134,12 +134,12 @@ const UserSettings = {
hide_followers,
show_role
/* eslint-enable camelcase */
- } }).then((user) => {
- if (!user.error) {
- this.$store.commit('addNewUsers', [user])
- this.$store.commit('setCurrentUser', user)
- }
- })
+ }}).then((user) => {
+ if (!user.error) {
+ this.$store.commit('addNewUsers', [user])
+ this.$store.commit('setCurrentUser', user)
+ }
+ })
},
changeVis (visibility) {
this.newDefaultScope = visibility
@@ -150,12 +150,12 @@ const UserSettings = {
if (file.size > this.$store.state.instance[slot + 'limit']) {
const filesize = fileSizeFormatService.fileSizeFormat(file.size)
const allowedsize = fileSizeFormatService.fileSizeFormat(this.$store.state.instance[slot + 'limit'])
- this[slot + 'UploadError'] = this.$t('upload.error.base') + ' ' + this.$t('upload.error.file_too_big', { filesize: filesize.num, filesizeunit: filesize.unit, allowedsize: allowedsize.num, allowedsizeunit: allowedsize.unit })
+ this[slot + 'UploadError'] = this.$t('upload.error.base') + ' ' + this.$t('upload.error.file_too_big', {filesize: filesize.num, filesizeunit: filesize.unit, allowedsize: allowedsize.num, allowedsizeunit: allowedsize.unit})
return
}
// eslint-disable-next-line no-undef
const reader = new FileReader()
- reader.onload = ({ target }) => {
+ reader.onload = ({target}) => {
const img = target.result
this[slot + 'Preview'] = img
}
@@ -195,7 +195,7 @@ const UserSettings = {
offset_top = 0
offset_left = 0
this.bannerUploading = true
- this.$store.state.api.backendInteractor.updateBanner({ params: { banner, offset_top, offset_left, width, height } }).then((data) => {
+ this.$store.state.api.backendInteractor.updateBanner({params: {banner, offset_top, offset_left, width, height}}).then((data) => {
if (!data.error) {
let clone = JSON.parse(JSON.stringify(this.$store.state.users.currentUser))
clone.cover_photo = data.url
@@ -221,7 +221,7 @@ const UserSettings = {
cropW = imginfo.width
cropH = imginfo.width
this.backgroundUploading = true
- this.$store.state.api.backendInteractor.updateBg({ params: { img, cropX, cropY, cropW, cropH } }).then((data) => {
+ this.$store.state.api.backendInteractor.updateBg({params: {img, cropX, cropY, cropW, cropH}}).then((data) => {
if (!data.error) {
let clone = JSON.parse(JSON.stringify(this.$store.state.users.currentUser))
clone.background_image = data.url
@@ -237,7 +237,7 @@ const UserSettings = {
importFollows () {
this.followListUploading = true
const followList = this.followList
- this.$store.state.api.backendInteractor.followImport({ params: followList })
+ this.$store.state.api.backendInteractor.followImport({params: followList})
.then((status) => {
if (status) {
this.followsImported = true
@@ -295,11 +295,11 @@ const UserSettings = {
this.deletingAccount = true
},
deleteAccount () {
- this.$store.state.api.backendInteractor.deleteAccount({ password: this.deleteAccountConfirmPasswordInput })
+ this.$store.state.api.backendInteractor.deleteAccount({password: this.deleteAccountConfirmPasswordInput})
.then((res) => {
if (res.status === 'success') {
this.$store.dispatch('logout')
- this.$router.push({ name: 'root' })
+ this.$router.push({name: 'root'})
} else {
this.deleteAccountError = res.error
}