| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- <template lang="pug">
- main.view--profile.f-col.start.w-full
- header
- h2 Profile Page
-
- article(v-if="!loading")
- h3 name: {{ profile.user_name }}
- span(v-if="profile.profile_prefs?.pronouns") ({{ profile.profile_prefs?.pronouns.val }})
- p(v-if="profile.user_email") {{ profile.user_email }}
-
- p I am looking for a
- span {{ profile.profile_prefs?.presence?.val }}
- span {{ profile.profile_prefs?.role?.val }}
- span role
- span no further than {{ profile.profile_prefs?.distance?.val }} miles away
- span from {{ profile.profile_prefs?.zipcode?.val }}
-
- p I am {{ profile.profile_prefs?.urgency?.val.split("_").join(" ") }}.
-
- img(v-if="profile.reveal.map(t => t.description).includes('image')" :src="profile.profile_media[0]" alt="profile-avatar" style="max-height: 200px; width: auto;")
- h3(v-else) image not revealed
-
- p About: {{ profile.profile_description}}
-
- p reveal: {{ profile.reveal.map(t => t.description) }}
- p tags: {{ profile.tags.map(t => t.description) }}
- p images: {{ profile.profile_media }}
- p responses: {{ profile.responses.length }}
- button(@click="$router.go(-1)") back
-
- p(v-else) Loading...
-
- MainNav(@show-sidebar="$emit('show-sidebar')")
- </template>
-
- <script>
- import { fetchProfileByProfileId } from '../services'
-
- export default {
- name: 'ProfileView',
- data: () => ({
- loading: true,
- profile: {},
- }),
- created() {
- this.getProfile()
- },
- methods: {
- async getProfile() {
- this.loading = true
- try {
- this.profile = await fetchProfileByProfileId(
- this.$route.params.pid,
- )
- } catch (err) {
- console.error(err)
- }
- this.loading = false
- },
- },
- }
- </script>
|