mirror of
https://github.com/IT4Change/Ocelot-Social.git
synced 2025-12-13 07:45:56 +00:00
last step construct
This commit is contained in:
parent
bc008ddb86
commit
c930dd6d52
@ -30,6 +30,30 @@
|
|||||||
<base-icon name="question-circle" />
|
<base-icon name="question-circle" />
|
||||||
</page-params-link>
|
</page-params-link>
|
||||||
</div>
|
</div>
|
||||||
|
<ds-space margin-top="base" />
|
||||||
|
<ds-input
|
||||||
|
model="title"
|
||||||
|
:placeholder="$t('contribution.title')"
|
||||||
|
name="title"
|
||||||
|
autofocus
|
||||||
|
size="large"
|
||||||
|
/>
|
||||||
|
<ds-chip size="base" :color="errors && errors.title && 'danger'">
|
||||||
|
{{ formData.title.length }}/{{ formSchema.title.max }}
|
||||||
|
<base-icon v-if="errors && errors.title" name="warning" />
|
||||||
|
</ds-chip>
|
||||||
|
<editor
|
||||||
|
:users="users"
|
||||||
|
:value="formData.content"
|
||||||
|
:hashtags="hashtags"
|
||||||
|
@input="updateEditorContent"
|
||||||
|
/>
|
||||||
|
<ds-chip size="base" :color="errors && errors.content && 'danger'">
|
||||||
|
{{ contentLength }}
|
||||||
|
<base-icon v-if="errors && errors.content" name="warning" />
|
||||||
|
</ds-chip>
|
||||||
|
<ds-space margin-top="base" />
|
||||||
|
<!-- Eventdata -->
|
||||||
<div v-if="creatEvent" class="eventDatas" style="background-color: #efeef1; padding: 10px">
|
<div v-if="creatEvent" class="eventDatas" style="background-color: #efeef1; padding: 10px">
|
||||||
{{ formData.eventStart }}
|
{{ formData.eventStart }}
|
||||||
<ds-grid>
|
<ds-grid>
|
||||||
@ -101,28 +125,7 @@
|
|||||||
Online Event
|
Online Event
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<ds-space margin-top="base"></ds-space>
|
<ds-space margin-top="base" />
|
||||||
<ds-input
|
|
||||||
model="title"
|
|
||||||
:placeholder="$t('contribution.title')"
|
|
||||||
name="title"
|
|
||||||
autofocus
|
|
||||||
size="large"
|
|
||||||
/>
|
|
||||||
<ds-chip size="base" :color="errors && errors.title && 'danger'">
|
|
||||||
{{ formData.title.length }}/{{ formSchema.title.max }}
|
|
||||||
<base-icon v-if="errors && errors.title" name="warning" />
|
|
||||||
</ds-chip>
|
|
||||||
<editor
|
|
||||||
:users="users"
|
|
||||||
:value="formData.content"
|
|
||||||
:hashtags="hashtags"
|
|
||||||
@input="updateEditorContent"
|
|
||||||
/>
|
|
||||||
<ds-chip size="base" :color="errors && errors.content && 'danger'">
|
|
||||||
{{ contentLength }}
|
|
||||||
<base-icon v-if="errors && errors.content" name="warning" />
|
|
||||||
</ds-chip>
|
|
||||||
<categories-select
|
<categories-select
|
||||||
v-if="categoriesActive"
|
v-if="categoriesActive"
|
||||||
model="categoryIds"
|
model="categoryIds"
|
||||||
|
|||||||
@ -154,7 +154,6 @@ export default {
|
|||||||
return this.post && this.post.pinned
|
return this.post && this.post.pinned
|
||||||
},
|
},
|
||||||
ribbonText() {
|
ribbonText() {
|
||||||
console.log(this.post)
|
|
||||||
if (this.post.pinned) return this.$t('post.pinned')
|
if (this.post.pinned) return this.$t('post.pinned')
|
||||||
if (this.post.postType[0] === "Event") return this.$t('post.event')
|
if (this.post.postType[0] === "Event") return this.$t('post.event')
|
||||||
return this.$t('post.name')
|
return this.$t('post.name')
|
||||||
|
|||||||
@ -25,6 +25,9 @@ export default (i18n) => {
|
|||||||
query Post($id: ID!) {
|
query Post($id: ID!) {
|
||||||
Post(id: $id) {
|
Post(id: $id) {
|
||||||
postType
|
postType
|
||||||
|
eventStart
|
||||||
|
eventVenue
|
||||||
|
eventLocationName
|
||||||
...post
|
...post
|
||||||
...postCounts
|
...postCounts
|
||||||
...tagsCategoriesAndPinned
|
...tagsCategoriesAndPinned
|
||||||
@ -68,6 +71,9 @@ export const filterPosts = (i18n) => {
|
|||||||
query Post($filter: _PostFilter, $first: Int, $offset: Int, $orderBy: [_PostOrdering]) {
|
query Post($filter: _PostFilter, $first: Int, $offset: Int, $orderBy: [_PostOrdering]) {
|
||||||
Post(filter: $filter, first: $first, offset: $offset, orderBy: $orderBy) {
|
Post(filter: $filter, first: $first, offset: $offset, orderBy: $orderBy) {
|
||||||
postType
|
postType
|
||||||
|
eventStart
|
||||||
|
eventVenue
|
||||||
|
eventLocationName
|
||||||
...post
|
...post
|
||||||
...postCounts
|
...postCounts
|
||||||
...tagsCategoriesAndPinned
|
...tagsCategoriesAndPinned
|
||||||
@ -106,6 +112,9 @@ export const profilePagePosts = (i18n) => {
|
|||||||
) {
|
) {
|
||||||
profilePagePosts(filter: $filter, first: $first, offset: $offset, orderBy: $orderBy) {
|
profilePagePosts(filter: $filter, first: $first, offset: $offset, orderBy: $orderBy) {
|
||||||
postType
|
postType
|
||||||
|
eventStart
|
||||||
|
eventVenue
|
||||||
|
eventLocationName
|
||||||
...post
|
...post
|
||||||
...postCounts
|
...postCounts
|
||||||
...tagsCategoriesAndPinned
|
...tagsCategoriesAndPinned
|
||||||
|
|||||||
@ -723,6 +723,12 @@
|
|||||||
"title": "In der Gruppe „{name}“"
|
"title": "In der Gruppe „{name}“"
|
||||||
},
|
},
|
||||||
"title": "Beitrag"
|
"title": "Beitrag"
|
||||||
|
},
|
||||||
|
"viewEvent": {
|
||||||
|
"forGroup": {
|
||||||
|
"title": "In der Gruppe „{name}“"
|
||||||
|
},
|
||||||
|
"title": "Event"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"profile": {
|
"profile": {
|
||||||
|
|||||||
@ -723,6 +723,9 @@
|
|||||||
"title": "In The Group “{name}”"
|
"title": "In The Group “{name}”"
|
||||||
},
|
},
|
||||||
"title": "Post"
|
"title": "Post"
|
||||||
|
},
|
||||||
|
"viewEvent": {
|
||||||
|
"title": "Event"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"profile": {
|
"profile": {
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
<transition name="fade" appear>
|
<transition name="fade" appear>
|
||||||
<div>
|
<div>
|
||||||
<ds-space margin="small">
|
<ds-space margin="small">
|
||||||
<ds-heading tag="h1">{{ $t('post.viewPost.title') }}</ds-heading>
|
<ds-heading tag="h1">{{ heading }}</ds-heading>
|
||||||
<ds-heading v-if="post && post.group" tag="h2">
|
<ds-heading v-if="post && post.group" tag="h2">
|
||||||
{{ $t('post.viewPost.forGroup.title', { name: post.group.name }) }}
|
{{ $t('post.viewPost.forGroup.title', { name: post.group.name }) }}
|
||||||
</ds-heading>
|
</ds-heading>
|
||||||
@ -56,6 +56,14 @@
|
|||||||
<h2 class="title hyphenate-text">{{ post.title }}</h2>
|
<h2 class="title hyphenate-text">{{ post.title }}</h2>
|
||||||
<ds-space margin-bottom="small" />
|
<ds-space margin-bottom="small" />
|
||||||
<content-viewer class="content hyphenate-text" :content="post.content" />
|
<content-viewer class="content hyphenate-text" :content="post.content" />
|
||||||
|
<!-- Eventdata -->
|
||||||
|
<ds-space v-if="post.postType[0] === 'Event'" margin-bottom="small">
|
||||||
|
<ds-list size="small" style="background-color: beige; padding: 10px;">
|
||||||
|
<ds-list-item><span style="width: 100px">Start:</span> {{ post.eventStart }}</ds-list-item>
|
||||||
|
<ds-list-item><span style="width: 100px">Location:</span> {{ post.eventLocationName }}</ds-list-item>
|
||||||
|
<ds-list-item><span style="width: 100px">Ort:</span> {{ post.eventVenue }}</ds-list-item>
|
||||||
|
</ds-list>
|
||||||
|
</ds-space>
|
||||||
<!-- Categories -->
|
<!-- Categories -->
|
||||||
<div v-if="categoriesActive" class="categories">
|
<div v-if="categoriesActive" class="categories">
|
||||||
<ds-space margin="xx-large" />
|
<ds-space margin="xx-large" />
|
||||||
@ -174,7 +182,7 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
links,
|
links,
|
||||||
post: null,
|
post: {postType: ['Article']},
|
||||||
ready: false,
|
ready: false,
|
||||||
title: 'loading',
|
title: 'loading',
|
||||||
showNewCommentForm: true,
|
showNewCommentForm: true,
|
||||||
@ -218,6 +226,10 @@ export default {
|
|||||||
},
|
},
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
heading() {
|
||||||
|
if (this.post.postType[0] === 'Event') return this.$t('post.viewEvent.title')
|
||||||
|
return this.$t('post.viewPost.title')
|
||||||
|
},
|
||||||
menuModalsData() {
|
menuModalsData() {
|
||||||
return postMenuModalsData(
|
return postMenuModalsData(
|
||||||
// "this.post" may not always be defined at the beginning …
|
// "this.post" may not always be defined at the beginning …
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user