|
| 1 | +<template> |
| 2 | + <!-- eslint-disable max-len --> |
| 3 | + <div> |
| 4 | + <NavBar class="px-4 sm:px-16 lg:px-32" v-bind:currentRoute="'Settings'"></NavBar> |
| 5 | + <div class="w-full md:mx-16 lg:mx-32"> |
| 6 | + <section class="w-full md:max-w-xs md:shadow-md md:rounded-md"> |
| 7 | + <div class="relative text-wrap shadow-inner recommendation-card w-full sm:rounded-md" |
| 8 | + v-bind:style="{ |
| 9 | + 'background-repeat': 'no-repeat', |
| 10 | + 'background-position': 'center center', |
| 11 | + 'background-size' :'cover', |
| 12 | + 'background-image': 'url(' + getImage() + ')'}"> |
| 13 | +<!-- <h1 class="absolute bottom-0 w-full text-center pb-8 text-4xl text-white-matcha capitalize">--> |
| 14 | +<!-- {{this.$store.getters.getLoggedInUser.first_name}} {{this.$store.getters.getLoggedInUser.last_name}}</h1>--> |
| 15 | + </div> |
| 16 | + <div class="px-8 py-2 md:pt-4 md:py-0 md:px-0 w-full"> |
| 17 | + <h1 class="text-4xl text-gray-matcha text-center md:text-left md:px-8 font-bold md:font-normal my-4 md:mb-1 md:mt-0">Settings</h1> |
| 18 | + <MenuButton v-bind:class="{'md:px-8':true, 'md:bg-gray-200': show === 'account'}" v-bind:text="'Account'"></MenuButton> |
| 19 | + <hr class="bg-gray-300 w-full md:hidden"> |
| 20 | + <MenuButton v-bind:class="{'md:px-8':true, 'md:bg-gray-200': show === 'profile'}" v-bind:text="'Profile'"></MenuButton> |
| 21 | + </div> |
| 22 | + </section> |
| 23 | + </div> |
| 24 | + </div> |
| 25 | +</template> |
| 26 | + |
| 27 | +<script> |
| 28 | +import NavBar from '@/components/shared/NavBar.vue'; |
| 29 | +import MenuButton from '@/components/app/settings/MenuButton.vue'; |
| 30 | +import imageMan from '../../assets/recommendations/avatars/man1.png'; |
| 31 | +import imageWoman from '../../assets/recommendations/avatars/woman1.png'; |
| 32 | +import imageOther from '../../assets/recommendations/avatars/other.png'; |
| 33 | +
|
| 34 | +export default { |
| 35 | + components: { |
| 36 | + NavBar, |
| 37 | + MenuButton, |
| 38 | + }, |
| 39 | + data: () => ({ |
| 40 | + userInfo: {}, |
| 41 | + show: 'account', |
| 42 | + }), |
| 43 | + methods: { |
| 44 | + getImage() { |
| 45 | + if (this.$store.getters.getLoggedInUser.images.length === 0) { |
| 46 | + if (this.$store.getters.getLoggedInUser.gender === 'male') { |
| 47 | + return imageMan; |
| 48 | + } |
| 49 | + if (this.$store.getters.getLoggedInUser.gender === 'female') { |
| 50 | + return imageWoman; |
| 51 | + } |
| 52 | + return imageOther; |
| 53 | + } |
| 54 | + return this.$store.getters.getLoggedInUser.images[0].link; |
| 55 | + }, |
| 56 | + }, |
| 57 | + beforeMount() { |
| 58 | + console.log(this.$store.getters.getLoggedInUser); |
| 59 | + // const userInfoRequest = this.$http.get(); |
| 60 | + }, |
| 61 | +}; |
| 62 | +</script> |
| 63 | + |
| 64 | +<style scoped> |
| 65 | +.recommendation-card { |
| 66 | + /*width: 24rem;*/ |
| 67 | + height: 24rem; |
| 68 | + /*box-shadow: inset 0 -8rem 1rem rgba(0, 0, 0, 0.3);*/ |
| 69 | +} |
| 70 | +</style> |
0 commit comments