Added post create button to profile page

This commit is contained in:
Grzegorz Leoniec 2019-02-06 15:16:37 +01:00
parent 31bc10842b
commit 7c39735d09
No known key found for this signature in database
GPG Key ID: 3AA43686D4EB1377
2 changed files with 24 additions and 10 deletions

View File

@ -13,14 +13,16 @@
<hc-post-card :post="post" />
</ds-flex-item>
</ds-flex>
<ds-button
v-tooltip="{content: 'Create a new Post', placement: 'left', delay: { show: 500 }}"
class="post-add-button"
icon="plus"
size="x-large"
primary
@click="$router.push('/post/create')"
/>
<no-ssr>
<ds-button
v-tooltip="{content: 'Create a new Post', placement: 'left', delay: { show: 500 }}"
class="post-add-button"
icon="plus"
size="x-large"
primary
@click="$router.push('/post/create')"
/>
</no-ssr>
<hc-load-more
v-if="true"
:loading="$apollo.loading"
@ -142,8 +144,9 @@ export default {
.post-add-button {
z-index: 100;
position: fixed;
bottom: $space-large;
right: $space-small;
top: 100vh;
left: 100vw;
transform: translate(-120%, -120%);
box-shadow: $box-shadow-x-large;
}
</style>

View File

@ -252,6 +252,17 @@
</ds-flex>
</ds-card>
</ds-flex-item>
<ds-flex-item style="text-align: center">
<ds-button
v-if="myProfile"
v-tooltip="{content: 'Create a new Post', placement: 'left', delay: { show: 500 }}"
class="profile-post-add-button"
icon="plus"
size="large"
primary
@click="$router.push('/post/create')"
/>
</ds-flex-item>
<template v-if="activePosts.length">
<ds-flex-item
v-for="post in activePosts"