From 262760d2586cac48da27cf7eb5389116d4023dfe Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Wed, 10 Apr 2019 21:48:42 +0300 Subject: revert unnecessary changes --- src/components/user_settings/user_settings.js | 26 +- src/components/user_settings/user_settings.vue | 389 +++++++------------------ 2 files changed, 112 insertions(+), 303 deletions(-) (limited to 'src/components/user_settings') 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 } diff --git a/src/components/user_settings/user_settings.vue b/src/components/user_settings/user_settings.vue index ee5d368b..c08698dc 100644 --- a/src/components/user_settings/user_settings.vue +++ b/src/components/user_settings/user_settings.vue @@ -2,23 +2,15 @@
- {{ $t('settings.user_settings') }} + {{$t('settings.user_settings')}}
@@ -27,258 +19,132 @@
-
-

{{ $t('settings.name_bio') }}

-

{{ $t('settings.name') }}

- +

{{$t('settings.name_bio')}}

+

{{$t('settings.name')}}

+ -

{{ $t('settings.bio') }}

+

{{$t('settings.bio')}}

- - + +

- -
+ +
+ :showAll="true" + :userDefault="newDefaultScope" + :onScopeChange="changeVis"/>

- - + +

- - + +

- - + +

- - - + + +

- +
-

{{ $t('settings.avatar') }}

-

- {{ $t('settings.avatar_size_instruction') }} -

-

{{ $t('settings.current_avatar') }}

- -

{{ $t('settings.set_new_avatar') }}

- - +

{{$t('settings.avatar')}}

+

{{$t('settings.avatar_size_instruction')}}

+

{{$t('settings.current_avatar')}}

+ +

{{$t('settings.set_new_avatar')}}

+ +
-

{{ $t('settings.profile_banner') }}

-

{{ $t('settings.current_profile_banner') }}

- -

{{ $t('settings.set_new_profile_banner') }}

- +

{{$t('settings.profile_banner')}}

+

{{$t('settings.current_profile_banner')}}

+ +

{{$t('settings.set_new_profile_banner')}}

+
- +
- - -
+ + +
Error: {{ bannerUploadError }} - +
-

{{ $t('settings.profile_background') }}

-

{{ $t('settings.set_new_profile_background') }}

- +

{{$t('settings.profile_background')}}

+

{{$t('settings.set_new_profile_background')}}

+
- +
- - -
+ + +
Error: {{ backgroundUploadError }} - +
-

{{ $t('settings.change_password') }}

+

{{$t('settings.change_password')}}

-

{{ $t('settings.current_password') }}

- +

{{$t('settings.current_password')}}

+
-

{{ $t('settings.new_password') }}

- +

{{$t('settings.new_password')}}

+
-

{{ $t('settings.confirm_new_password') }}

- +

{{$t('settings.confirm_new_password')}}

+
- -

- {{ $t('settings.changed_password') }} -

-

- {{ $t('settings.change_password_error') }} -

-

- {{ changePasswordError }} -

+ +

{{$t('settings.changed_password')}}

+

{{$t('settings.change_password_error')}}

+

{{changePasswordError}}

-

{{ $t('settings.oauth_tokens') }}

+

{{$t('settings.oauth_tokens')}}

- - - + + - - - + + + @@ -287,113 +153,56 @@
-

{{ $t('settings.delete_account') }}

-

- {{ $t('settings.delete_account_description') }} -

+

{{$t('settings.delete_account')}}

+

{{$t('settings.delete_account_description')}}

-

{{ $t('settings.delete_account_instructions') }}

-

{{ $t('login.password') }}

- - +

{{$t('settings.delete_account_instructions')}}

+

{{$t('login.password')}}

+ +
-

- {{ $t('settings.delete_account_error') }} -

-

- {{ deleteAccountError }} -

- +

{{$t('settings.delete_account_error')}}

+

{{deleteAccountError}}

+
-
+
-

{{ $t('settings.follow_import') }}

-

{{ $t('settings.import_followers_from_a_csv_file') }}

+

{{$t('settings.follow_import')}}

+

{{$t('settings.import_followers_from_a_csv_file')}}

- + - - + +
- -

{{ $t('settings.follows_imported') }}

+ +

{{$t('settings.follows_imported')}}

- -

{{ $t('settings.follow_import_error') }}

+ +

{{$t('settings.follow_import_error')}}

-
-

{{ $t('settings.follow_export') }}

- +
+

{{$t('settings.follow_export')}}

+
-
-

{{ $t('settings.follow_export_processing') }}

+
+

{{$t('settings.follow_export_processing')}}

- +
- +
-- cgit v1.2.3-70-g09d2
{{ $t('settings.app_name') }}{{ $t('settings.valid_until') }} + {{$t('settings.app_name')}}{{$t('settings.valid_until')}}
{{ oauthToken.appName }}{{ oauthToken.validUntil }}
{{oauthToken.appName}}{{oauthToken.validUntil}} -