From 1da6af11b597bbbd2abba2d99007a32ff520d954 Mon Sep 17 00:00:00 2001 From: CuriousMagpie Date: Thu, 10 Aug 2023 16:50:07 -0400 Subject: [PATCH] WIP(user profile): moved some CSS classes out of unscoped and into the scoped section, started on toggle buttons --- .../src/components/userMenu/profile.vue | 111 ++++++++++-------- 1 file changed, 60 insertions(+), 51 deletions(-) diff --git a/website/client/src/components/userMenu/profile.vue b/website/client/src/components/userMenu/profile.vue index 5f386a6f61..b1dd3dd793 100644 --- a/website/client/src/components/userMenu/profile.vue +++ b/website/client/src/components/userMenu/profile.vue @@ -9,6 +9,7 @@ v-else-if="userLoaded" class="profile" > +
@@ -229,6 +230,11 @@ {{ $t('shadowMute') }} +
+
@@ -488,6 +494,25 @@ @@ -626,34 +630,34 @@ color: $gray-50 !important; display: block; margin: 0 auto; + } + + .message-icon svg { + height: 11px; + margin-top: 1px; } - .dots-icon { - color: $gray-50; - height: 16px; - width: 4px; + .gift-icon svg { + height: 16px; + margin: auto; + width: 14px; } - .message-icon, - .gift-icon { - margin: auto; - width: 14px; + .dots-icon { + height: 16px; + width: 4px; } - .gift-icon { - width: 12px; + .block-icon { + width: 16px; } - .block-icon { - width: 16px; + .positive-icon { + width: 14px; } - .positive-icon { - width: 14px; - } - - .report-icon { - width: 16px; + .report-icon { + width: 16px; } .photo { @@ -665,7 +669,7 @@ .header { h1 { - color: $gray-50;; + color: $gray-50; margin-bottom: 0.2rem; } @@ -753,17 +757,6 @@ width: 148px; } - .dropdown-menu { - margin-left: -48px; - width: 210px; - } - - .dropdown-menu.show { - display: block; - width: 210px; - margin-left: -48px; - } - .dot-menu { height: 32px; margin-right: -24px; @@ -920,6 +913,7 @@ import moment from 'moment'; import axios from 'axios'; import each from 'lodash/each'; import cloneDeep from 'lodash/cloneDeep'; +import closeX from '../ui/closeX'; import { mapState } from '@/libs/store'; import MemberDetails from '../memberDetails'; @@ -956,6 +950,7 @@ export default { MemberDetails, profileStats, error404, + closeX, }, mixins: [externalLinks, userCustomStateMixin('userLoggedIn')], props: ['userId', 'startingPage'], @@ -996,6 +991,7 @@ export default { user: null, userLoaded: false, oldTitle: null, + isOpened: true, }; }, computed: { @@ -1039,6 +1035,11 @@ export default { hasClass () { return this.$store.getters['members:hasClass'](this.userLoggedIn); }, + isOpen () { + // Open status is a number so we can tell if the value was passed + if (this.openStatus !== undefined) return this.openStatus === 1; + return this.isOpened; + }, }, watch: { startingPage () { @@ -1272,6 +1273,14 @@ export default { close () { this.$root.$emit('bv::hide::modal', 'profile'); }, + toggle () { + this.isOpened = !this.isOpen; + this.$emit('toggled', this.isOpened); + }, + open () { + this.isOpened = true; + this.$emit('toggled', this.isOpened); + }, }, };