Improved post create and edit pages and links

This commit is contained in:
Grzegorz Leoniec 2019-02-06 17:01:05 +01:00
parent d8b1149797
commit 81d19cbc16
No known key found for this signature in database
GPG Key ID: 3AA43686D4EB1377
5 changed files with 12 additions and 17 deletions

View File

@ -68,19 +68,14 @@ export default {
let routes = []
if (this.isOwner && this.context === 'contribution') {
// const link = this.$router.resolve({
// name: 'post-edit-id',
// params: {
// id: this.itemId
// }
// }).href
routes.push({
name: this.$t(`contribution.edit`),
callback: () => {
// eslint-disable-next-line vue/no-side-effects-in-computed-properties
return this.$router.push(`/post/edit/${this.itemId}`)
// return this.$router.push(link)
},
path: this.$router.resolve({
name: 'post-edit-id',
params: {
id: this.itemId
}
}).href,
icon: 'edit'
})
}

View File

@ -16,11 +16,11 @@
<no-ssr>
<ds-button
v-tooltip="{content: 'Create a new Post', placement: 'left', delay: { show: 500 }}"
:path="{ name: 'post-create' }"
class="post-add-button"
icon="plus"
size="x-large"
primary
@click="$router.push('/post/create')"
/>
</no-ssr>
<hc-load-more

View File

@ -3,10 +3,10 @@
:width="{ base: '100%' }"
gutter="base"
>
<ds-flex-item :width="{ base: '100%' }">
<ds-flex-item :width="{ base: '100%', md: 3 }">
<hc-contribution-form />
</ds-flex-item>
<ds-flex-item :width="{ base: '100%', sm: 2, md: 2, lg: 1 }">
<ds-flex-item :width="{ base: '100%', md: 1 }">
&nbsp;
</ds-flex-item>
</ds-flex>

View File

@ -3,10 +3,10 @@
:width="{ base: '100%' }"
gutter="base"
>
<ds-flex-item :width="{ base: '100%' }">
<ds-flex-item :width="{ base: '100%', md: 3 }">
<hc-contribution-form :contribution="contribution" />
</ds-flex-item>
<ds-flex-item :width="{ base: '100%', sm: 2, md: 2, lg: 1 }">
<ds-flex-item :width="{ base: '100%', md: 1 }">
&nbsp;
</ds-flex-item>
</ds-flex>

View File

@ -256,11 +256,11 @@
<ds-button
v-if="myProfile"
v-tooltip="{content: 'Create a new Post', placement: 'left', delay: { show: 500 }}"
:path="{ name: 'post-create' }"
class="profile-post-add-button"
icon="plus"
size="large"
primary
@click="$router.push('/post/create')"
/>
</ds-flex-item>
<template v-if="activePosts.length">