mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-12 23:35:58 +00:00
Merge branch 'feature-visualistion-event-post' into 6044-Add-create-New-Event
This commit is contained in:
commit
051c7acd4f
@ -30,6 +30,29 @@
|
||||
<base-icon name="question-circle" />
|
||||
</page-params-link>
|
||||
</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>
|
||||
<!-- Eventdata -->
|
||||
<div v-if="creatEvent" class="eventDatas" style="background-color: #efeef1; padding: 10px">
|
||||
{{ formData.eventStart }}
|
||||
<ds-grid>
|
||||
@ -101,28 +124,7 @@
|
||||
Online Event
|
||||
</div>
|
||||
</div>
|
||||
<ds-space margin-top="base"></ds-space>
|
||||
<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" />
|
||||
<categories-select
|
||||
v-if="categoriesActive"
|
||||
model="categoryIds"
|
||||
|
||||
@ -154,7 +154,6 @@ export default {
|
||||
return this.post && this.post.pinned
|
||||
},
|
||||
ribbonText() {
|
||||
console.log(this.post)
|
||||
if (this.post.pinned) return this.$t('post.pinned')
|
||||
if (this.post.postType[0] === "Event") return this.$t('post.event')
|
||||
return this.$t('post.name')
|
||||
|
||||
@ -25,6 +25,9 @@ export default (i18n) => {
|
||||
query Post($id: ID!) {
|
||||
Post(id: $id) {
|
||||
postType
|
||||
eventStart
|
||||
eventVenue
|
||||
eventLocationName
|
||||
...post
|
||||
...postCounts
|
||||
...tagsCategoriesAndPinned
|
||||
@ -68,6 +71,9 @@ export const filterPosts = (i18n) => {
|
||||
query Post($filter: _PostFilter, $first: Int, $offset: Int, $orderBy: [_PostOrdering]) {
|
||||
Post(filter: $filter, first: $first, offset: $offset, orderBy: $orderBy) {
|
||||
postType
|
||||
eventStart
|
||||
eventVenue
|
||||
eventLocationName
|
||||
...post
|
||||
...postCounts
|
||||
...tagsCategoriesAndPinned
|
||||
@ -106,6 +112,9 @@ export const profilePagePosts = (i18n) => {
|
||||
) {
|
||||
profilePagePosts(filter: $filter, first: $first, offset: $offset, orderBy: $orderBy) {
|
||||
postType
|
||||
eventStart
|
||||
eventVenue
|
||||
eventLocationName
|
||||
...post
|
||||
...postCounts
|
||||
...tagsCategoriesAndPinned
|
||||
|
||||
@ -723,6 +723,12 @@
|
||||
"title": "In der Gruppe „{name}“"
|
||||
},
|
||||
"title": "Beitrag"
|
||||
},
|
||||
"viewEvent": {
|
||||
"forGroup": {
|
||||
"title": "In der Gruppe „{name}“"
|
||||
},
|
||||
"title": "Event"
|
||||
}
|
||||
},
|
||||
"profile": {
|
||||
|
||||
@ -723,6 +723,9 @@
|
||||
"title": "In The Group “{name}”"
|
||||
},
|
||||
"title": "Post"
|
||||
},
|
||||
"viewEvent": {
|
||||
"title": "Event"
|
||||
}
|
||||
},
|
||||
"profile": {
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
<transition name="fade" appear>
|
||||
<div>
|
||||
<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">
|
||||
{{ $t('post.viewPost.forGroup.title', { name: post.group.name }) }}
|
||||
</ds-heading>
|
||||
@ -56,6 +56,24 @@
|
||||
<h2 class="title hyphenate-text">{{ post.title }}</h2>
|
||||
<ds-space margin-bottom="small" />
|
||||
<content-viewer class="content hyphenate-text" :content="post.content" />
|
||||
<!-- Eventdata -->
|
||||
<ds-space v-if="post.postType[0] === 'Event'" margin-bottom="small">
|
||||
<ds-flex>
|
||||
<ds-flex-item width="200px">Start:</ds-flex-item>
|
||||
<ds-flex-item>{{ post.eventStart }}</ds-flex-item>
|
||||
</ds-flex>
|
||||
<ds-space margin-bottom="small" />
|
||||
<ds-flex>
|
||||
<ds-flex-item width="200px">Veranstaltungsort:</ds-flex-item>
|
||||
<ds-flex-item class="text-bold">{{ post.eventLocationName }}</ds-flex-item>
|
||||
</ds-flex>
|
||||
<ds-space margin-bottom="small" />
|
||||
<ds-flex>
|
||||
<ds-flex-item width="200px">Stadt:</ds-flex-item>
|
||||
<ds-flex-item>{{ post.eventVenue }}</ds-flex-item>
|
||||
</ds-flex>
|
||||
|
||||
</ds-space>
|
||||
<!-- Categories -->
|
||||
<div v-if="categoriesActive" class="categories">
|
||||
<ds-space margin="xx-large" />
|
||||
@ -174,7 +192,7 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
links,
|
||||
post: null,
|
||||
post: {postType: ['Article']},
|
||||
ready: false,
|
||||
title: 'loading',
|
||||
showNewCommentForm: true,
|
||||
@ -218,6 +236,10 @@ export default {
|
||||
},
|
||||
]
|
||||
},
|
||||
heading() {
|
||||
if (this.post.postType[0] === 'Event') return this.$t('post.viewEvent.title')
|
||||
return this.$t('post.viewPost.title')
|
||||
},
|
||||
menuModalsData() {
|
||||
return postMenuModalsData(
|
||||
// "this.post" may not always be defined at the beginning …
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user