profile tab cleanup

This commit is contained in:
Henry Jameson 2025-08-05 17:08:33 +03:00
commit d4c0ccf659
2 changed files with 4 additions and 61 deletions

View file

@ -1,18 +1,9 @@
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 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 SharedComputedObject from '../helpers/shared_computed_object.js'
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 {
faTimes,
@ -29,55 +20,23 @@ library.add(
const ProfileTab = {
data () {
return {
// Whether user is locked or not
locked: this.$store.state.users.currentUser.locked,
}
},
components: {
UserCard,
ScopeSelector,
ImageCropper,
EmojiInput,
ProgressButton,
Checkbox,
BooleanSetting,
InterfaceLanguageSwitcher,
ProfileSettingIndicator,
Select
ProfileSettingIndicator
},
computed: {
user () {
return this.$store.state.users.currentUser
},
...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
},
...SharedComputedObject()
},
methods: {
changeVis (visibility) {
this.newDefaultScope = visibility
},
updateProfile () {
const params = {
locked: this.locked
@ -92,9 +51,6 @@ const ProfileTab = {
.catch((error) => {
this.displayUploadError(error)
})
},
propsToNative (props) {
return propsToNative(props)
}
},
watch: {

View file

@ -1,6 +1,6 @@
.profile-tab {
// overriding global for better look
div.profile-edit {
.setting-item.profile-edit {
margin: 0;
h2 {
@ -12,17 +12,4 @@
overflow: hidden;
}
}
.bio {
margin: 0;
}
.uploading {
font-size: 1.5em;
margin: 0.25em;
}
.setting-subitem {
margin-left: 1.75em;
}
}