diff --git a/webapp/components/PostCard/index.spec.js b/webapp/components/PostCard/PostCard.spec.js
similarity index 98%
rename from webapp/components/PostCard/index.spec.js
rename to webapp/components/PostCard/PostCard.spec.js
index 26d0515d6..ab902f05a 100644
--- a/webapp/components/PostCard/index.spec.js
+++ b/webapp/components/PostCard/PostCard.spec.js
@@ -2,7 +2,7 @@ import { config, shallowMount, mount, createLocalVue, RouterLinkStub } from '@vu
import Styleguide from '@human-connection/styleguide'
import Vuex from 'vuex'
import Filters from '~/plugins/vue-filters'
-import PostCard from '.'
+import PostCard from './PostCard.vue'
const localVue = createLocalVue()
diff --git a/webapp/components/PostCard/PostCard.story.js b/webapp/components/PostCard/PostCard.story.js
index 1f9f70110..1e470ce11 100644
--- a/webapp/components/PostCard/PostCard.story.js
+++ b/webapp/components/PostCard/PostCard.story.js
@@ -1,6 +1,6 @@
import { storiesOf } from '@storybook/vue'
import { withA11y } from '@storybook/addon-a11y'
-import HcPostCard from '~/components/PostCard'
+import HcPostCard from './PostCard.vue'
import helpers from '~/storybook/helpers'
helpers.init()
@@ -76,3 +76,23 @@ storiesOf('Post Card', module)
/>
`,
}))
+ .add('pinned by admin', () => ({
+ components: { HcPostCard },
+ store: helpers.store,
+ data: () => ({
+ post: {
+ ...post,
+ pinnedBy: {
+ id: '4711',
+ name: 'Ad Min',
+ role: 'admin',
+ },
+ },
+ }),
+ template: `
+
+ `,
+ }))
diff --git a/webapp/components/PostCard/index.vue b/webapp/components/PostCard/PostCard.vue
similarity index 94%
rename from webapp/components/PostCard/index.vue
rename to webapp/components/PostCard/PostCard.vue
index 84c5e8073..e1c63c121 100644
--- a/webapp/components/PostCard/index.vue
+++ b/webapp/components/PostCard/PostCard.vue
@@ -1,7 +1,7 @@
-
+
+
@@ -116,6 +117,9 @@ export default {
this.deletePostCallback,
)
},
+ isPinned() {
+ return this.post && this.post.pinnedBy
+ },
},
methods: {
async deletePostCallback() {
@@ -175,4 +179,8 @@ export default {
text-indent: -999999px;
}
}
+
+.post--target {
+ border: 1px solid $color-primary;
+}
diff --git a/webapp/locales/de.json b/webapp/locales/de.json
index 9f10d929d..9c460bcd7 100644
--- a/webapp/locales/de.json
+++ b/webapp/locales/de.json
@@ -354,6 +354,7 @@
},
"post": {
"name": "Beitrag",
+ "pinned": "Gepinnt",
"moreInfo": {
"name": "Mehr Info",
"title": "Mehr Informationen",
diff --git a/webapp/locales/en.json b/webapp/locales/en.json
index 189f67bc9..2295ef44b 100644
--- a/webapp/locales/en.json
+++ b/webapp/locales/en.json
@@ -355,6 +355,7 @@
},
"post": {
"name": "Post",
+ "pinned": "Pinned",
"moreInfo": {
"name": "More info",
"title": "More information",
diff --git a/webapp/pages/index.vue b/webapp/pages/index.vue
index a6f822249..53f732459 100644
--- a/webapp/pages/index.vue
+++ b/webapp/pages/index.vue
@@ -60,7 +60,7 @@