profile tab cleanup
This commit is contained in:
parent
6e44a3afa9
commit
d4c0ccf659
2 changed files with 4 additions and 61 deletions
|
|
@ -1,18 +1,9 @@
|
||||||
import UserCard from 'src/components/user_card/user_card.vue'
|
import UserCard from 'src/components/user_card/user_card.vue'
|
||||||
import ImageCropper from 'src/components/image_cropper/image_cropper.vue'
|
|
||||||
import ScopeSelector from 'src/components/scope_selector/scope_selector.vue'
|
|
||||||
import ProgressButton from 'src/components/progress_button/progress_button.vue'
|
|
||||||
import EmojiInput from 'src/components/emoji_input/emoji_input.vue'
|
|
||||||
import suggestor from 'src/components/emoji_input/suggestor.js'
|
|
||||||
import Checkbox from 'src/components/checkbox/checkbox.vue'
|
import Checkbox from 'src/components/checkbox/checkbox.vue'
|
||||||
import InterfaceLanguageSwitcher from 'src/components/interface_language_switcher/interface_language_switcher.vue'
|
|
||||||
import Select from 'src/components/select/select.vue'
|
|
||||||
import BooleanSetting from '../helpers/boolean_setting.vue'
|
import BooleanSetting from '../helpers/boolean_setting.vue'
|
||||||
import SharedComputedObject from '../helpers/shared_computed_object.js'
|
import SharedComputedObject from '../helpers/shared_computed_object.js'
|
||||||
import ProfileSettingIndicator from '../helpers/profile_setting_indicator.vue'
|
import ProfileSettingIndicator from '../helpers/profile_setting_indicator.vue'
|
||||||
|
|
||||||
import { propsToNative } from 'src/services/attributes_helper/attributes_helper.service.js'
|
|
||||||
|
|
||||||
import { library } from '@fortawesome/fontawesome-svg-core'
|
import { library } from '@fortawesome/fontawesome-svg-core'
|
||||||
import {
|
import {
|
||||||
faTimes,
|
faTimes,
|
||||||
|
|
@ -29,55 +20,23 @@ library.add(
|
||||||
const ProfileTab = {
|
const ProfileTab = {
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
|
// Whether user is locked or not
|
||||||
locked: this.$store.state.users.currentUser.locked,
|
locked: this.$store.state.users.currentUser.locked,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
UserCard,
|
UserCard,
|
||||||
ScopeSelector,
|
|
||||||
ImageCropper,
|
|
||||||
EmojiInput,
|
|
||||||
ProgressButton,
|
|
||||||
Checkbox,
|
Checkbox,
|
||||||
BooleanSetting,
|
BooleanSetting,
|
||||||
InterfaceLanguageSwitcher,
|
ProfileSettingIndicator
|
||||||
ProfileSettingIndicator,
|
|
||||||
Select
|
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
user () {
|
user () {
|
||||||
return this.$store.state.users.currentUser
|
return this.$store.state.users.currentUser
|
||||||
},
|
},
|
||||||
...SharedComputedObject(),
|
...SharedComputedObject()
|
||||||
emojiUserSuggestor () {
|
|
||||||
return suggestor({
|
|
||||||
emoji: [
|
|
||||||
...this.$store.getters.standardEmojiList,
|
|
||||||
...this.$store.state.instance.customEmoji
|
|
||||||
],
|
|
||||||
store: this.$store
|
|
||||||
})
|
|
||||||
},
|
|
||||||
emojiSuggestor () {
|
|
||||||
return suggestor({
|
|
||||||
emoji: [
|
|
||||||
...this.$store.getters.standardEmojiList,
|
|
||||||
...this.$store.state.instance.customEmoji
|
|
||||||
]
|
|
||||||
})
|
|
||||||
},
|
|
||||||
userSuggestor () {
|
|
||||||
return suggestor({ store: this.$store })
|
|
||||||
},
|
|
||||||
bannerImgSrc () {
|
|
||||||
const src = this.$store.state.users.currentUser.cover_photo
|
|
||||||
return (!src) ? this.defaultBanner : src
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
changeVis (visibility) {
|
|
||||||
this.newDefaultScope = visibility
|
|
||||||
},
|
|
||||||
updateProfile () {
|
updateProfile () {
|
||||||
const params = {
|
const params = {
|
||||||
locked: this.locked
|
locked: this.locked
|
||||||
|
|
@ -92,9 +51,6 @@ const ProfileTab = {
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
this.displayUploadError(error)
|
this.displayUploadError(error)
|
||||||
})
|
})
|
||||||
},
|
|
||||||
propsToNative (props) {
|
|
||||||
return propsToNative(props)
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
.profile-tab {
|
.profile-tab {
|
||||||
// overriding global for better look
|
// overriding global for better look
|
||||||
div.profile-edit {
|
.setting-item.profile-edit {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
|
|
||||||
h2 {
|
h2 {
|
||||||
|
|
@ -12,17 +12,4 @@
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.bio {
|
|
||||||
margin: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.uploading {
|
|
||||||
font-size: 1.5em;
|
|
||||||
margin: 0.25em;
|
|
||||||
}
|
|
||||||
|
|
||||||
.setting-subitem {
|
|
||||||
margin-left: 1.75em;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue