WIP(profile): close button finally workinating

This commit is contained in:
CuriousMagpie
2023-09-01 16:14:36 -04:00
parent e143d36d28
commit 321a01b081
2 changed files with 16 additions and 9 deletions
@@ -1,8 +1,5 @@
<template> <template>
<div> <div>
<close-x
@click="close()"
/>
<div <div
v-if="!user && userLoaded" v-if="!user && userLoaded"
> >
@@ -512,6 +509,11 @@
<style lang="scss" > <style lang="scss" >
@import '~@/assets/scss/colors.scss'; @import '~@/assets/scss/colors.scss';
.modal-header {
padding: 24px;
border-bottom: 0px solid $white;
background-color: $white;
}
#userProfile { #userProfile {
.dropdown-menu { .dropdown-menu {
margin-left: -48px; margin-left: -48px;
@@ -959,7 +961,6 @@ import markdown from '@/directives/markdown';
import achievementsLib from '@/../../common/script/libs/achievements'; import achievementsLib from '@/../../common/script/libs/achievements';
import Content from '@/../../common/script/content'; import Content from '@/../../common/script/content';
import profileStats from './profileStats'; import profileStats from './profileStats';
import closeX from '../ui/closeX';
import message from '@/assets/svg/message.svg'; import message from '@/assets/svg/message.svg';
import gift from '@/assets/svg/gift.svg'; import gift from '@/assets/svg/gift.svg';
@@ -990,7 +991,6 @@ export default {
profileStats, profileStats,
error404, error404,
toggle, toggle,
closeX,
}, },
mixins: [externalLinks, userCustomStateMixin('userLoggedIn')], mixins: [externalLinks, userCustomStateMixin('userLoggedIn')],
props: ['userId', 'startingPage'], props: ['userId', 'startingPage'],
@@ -1322,9 +1322,6 @@ export default {
this.isOpened = true; this.isOpened = true;
this.$emit('toggled', this.isOpened); this.$emit('toggled', this.isOpened);
}, },
close () {
this.$root.$emit('bv::hide::modal', 'profile');
},
}, },
}; };
</script> </script>
@@ -2,10 +2,15 @@
<b-modal <b-modal
id="profile" id="profile"
:hide-footer="true" :hide-footer="true"
:hide-header="true"
@hide="beforeHide" @hide="beforeHide"
@shown="onShown()" @shown="onShown()"
> >
<div slot="modal-header">
<close-x
@close="close()"
/>
</div>
<profile <profile
:user-id="userId" :user-id="userId"
:starting-page="startingPage" :starting-page="startingPage"
@@ -44,10 +49,12 @@
<script> <script>
import profile from './profile'; import profile from './profile';
import closeX from '../ui/closeX';
export default { export default {
components: { components: {
profile, profile,
closeX,
}, },
data () { data () {
return { return {
@@ -76,6 +83,9 @@ export default {
this.$router.back(); this.$router.back();
} }
}, },
close () {
this.$root.$emit('bv::hide::modal', 'profile');
},
}, },
}; };