-
+
{{ $t('editor.hashtag.addHashtag') }}
-
- #{{ query }}
-
+
#{{ query }}
@@ -40,9 +38,7 @@
{{ $t('editor.hashtag.addHashtag') }}
-
- #{{ query }}
-
+
#{{ query }}
@@ -455,7 +451,7 @@ export default {
// For hashtags handles pressing of space.
spaceHandler() {
if (this.suggestionType === this.hashtagSuggestionType && this.query !== '') {
- this.selectItem({ name: this.query })
+ this.selectItem({ id: this.query })
}
},
// we have to replace our suggestion text with a mention
@@ -467,8 +463,8 @@ export default {
label: item.slug,
},
hashtag: {
- id: item.name,
- label: item.name,
+ id: item.id,
+ label: item.id,
},
}
this.insertMentionOrHashtag({
diff --git a/webapp/components/PostCard/PostCard.story.js b/webapp/components/PostCard/PostCard.story.js
index 8d7691c22..7cd579140 100644
--- a/webapp/components/PostCard/PostCard.story.js
+++ b/webapp/components/PostCard/PostCard.story.js
@@ -24,7 +24,7 @@ const post = {
deleted: false,
contributionsCount: 25,
shoutedCount: 5,
- commentsCount: 39,
+ commentedCount: 39,
followedByCount: 2,
followedByCurrentUser: true,
location: null,
@@ -38,7 +38,7 @@ const post = {
],
__typename: 'User',
},
- commentsCount: 12,
+ commentedCount: 12,
categories: [],
shoutedCount: 421,
__typename: 'Post',
diff --git a/webapp/components/PostCard/index.vue b/webapp/components/PostCard/index.vue
index 3fee24176..2ec8cf606 100644
--- a/webapp/components/PostCard/index.vue
+++ b/webapp/components/PostCard/index.vue
@@ -48,9 +48,9 @@
-
+
- {{ post.commentsCount }}
+ {{ post.commentedCount }}
{
name: 'Trick',
slug: 'trick',
},
- commentsCount: 0,
+ commentedCount: 0,
createdAt: '2019-03-13T11:00:20.835Z',
id: 'p10',
label: 'Eos aut illo omnis quis eaque et iure aut.',
diff --git a/webapp/components/SearchInput.vue b/webapp/components/SearchInput.vue
index 098b30610..c93e65d61 100644
--- a/webapp/components/SearchInput.vue
+++ b/webapp/components/SearchInput.vue
@@ -46,7 +46,7 @@
- {{ option.commentsCount }}
+ {{ option.commentedCount }}
diff --git a/webapp/components/Tag/index.vue b/webapp/components/Tag/index.vue
index 9337c02a6..1895d4fcf 100644
--- a/webapp/components/Tag/index.vue
+++ b/webapp/components/Tag/index.vue
@@ -1,7 +1,7 @@
- {{ name }}
+ {{ id }}
@@ -9,7 +9,7 @@
export default {
name: 'HcTag',
props: {
- name: { type: String, required: true },
+ id: { type: String, required: true },
},
}
diff --git a/webapp/components/Tag/spec.js b/webapp/components/Tag/spec.js
index 6a82ce641..4824c65fc 100644
--- a/webapp/components/Tag/spec.js
+++ b/webapp/components/Tag/spec.js
@@ -6,20 +6,20 @@ const localVue = createLocalVue()
localVue.use(Styleguide)
describe('Tag', () => {
- let name
+ let id
let Wrapper = () => {
return shallowMount(Tag, {
localVue,
propsData: {
- name,
+ id,
},
})
}
describe('given a String for Name', () => {
beforeEach(() => {
- name = 'Liebe'
+ id = 'Liebe'
})
it('shows Name', () => {
diff --git a/webapp/components/User/index.vue b/webapp/components/User/index.vue
index 7841fe596..0fefe4eb3 100644
--- a/webapp/components/User/index.vue
+++ b/webapp/components/User/index.vue
@@ -50,7 +50,11 @@
-
+
@@ -64,8 +68,8 @@
@@ -121,10 +125,6 @@ export default {
itsMe() {
return this.user.slug === this.$store.getters['auth/user'].slug
},
- fanCount() {
- let count = Number(this.user.followedByCount) || 0
- return count
- },
userLink() {
const { id, slug } = this.user
if (!(id && slug)) return ''
diff --git a/webapp/graphql/CommentMutations.js b/webapp/graphql/CommentMutations.js
index 6b0f653fc..bf4fc33ea 100644
--- a/webapp/graphql/CommentMutations.js
+++ b/webapp/graphql/CommentMutations.js
@@ -1,6 +1,6 @@
import gql from 'graphql-tag'
-export default () => {
+export default i18n => {
return {
CreateComment: gql`
mutation($postId: ID!, $content: String!) {
@@ -8,15 +8,26 @@ export default () => {
id
contentExcerpt
content
+ createdAt
+ disabled
+ deleted
author {
id
slug
name
avatar
+ disabled
+ deleted
+ shoutedCount
+ contributionsCount
+ commentedCount
+ followedByCount
+ followedByCurrentUser
+ badges {
+ id
+ icon
+ }
}
- createdAt
- deleted
- disabled
}
}
`,
@@ -24,8 +35,19 @@ export default () => {
mutation($content: String!, $id: ID!) {
UpdateComment(content: $content, id: $id) {
id
- content
contentExcerpt
+ content
+ createdAt
+ disabled
+ deleted
+ author {
+ id
+ slug
+ name
+ avatar
+ disabled
+ deleted
+ }
}
}
`,
diff --git a/webapp/graphql/CommentQuery.js b/webapp/graphql/CommentQuery.js
index 4d82165f0..c2daaa943 100644
--- a/webapp/graphql/CommentQuery.js
+++ b/webapp/graphql/CommentQuery.js
@@ -17,7 +17,7 @@ export default app => {
deleted
shoutedCount
contributionsCount
- commentsCount
+ commentedCount
followedByCount
followedByCurrentUser
location {
diff --git a/webapp/graphql/PostCommentsQuery.js b/webapp/graphql/PostCommentsQuery.js
deleted file mode 100644
index 08c8ea4ea..000000000
--- a/webapp/graphql/PostCommentsQuery.js
+++ /dev/null
@@ -1,39 +0,0 @@
-import gql from 'graphql-tag'
-
-export default i18n => {
- const lang = i18n.locale().toUpperCase()
- return gql(`
- query Post($slug: String!) {
- Post(slug: $slug) {
- comments(orderBy: createdAt_asc) {
- id
- contentExcerpt
- content
- createdAt
- disabled
- deleted
- author {
- id
- slug
- name
- avatar
- disabled
- deleted
- shoutedCount
- contributionsCount
- commentsCount
- followedByCount
- followedByCurrentUser
- location {
- name: name${lang}
- }
- badges {
- id
- icon
- }
- }
- }
- }
- }
- `)
-}
diff --git a/webapp/graphql/PostQuery.js b/webapp/graphql/PostQuery.js
index 9d54a5d2b..13898200a 100644
--- a/webapp/graphql/PostQuery.js
+++ b/webapp/graphql/PostQuery.js
@@ -22,7 +22,7 @@ export default i18n => {
deleted
shoutedCount
contributionsCount
- commentsCount
+ commentedCount
followedByCount
followedByCurrentUser
location {
@@ -34,12 +34,12 @@ export default i18n => {
}
}
tags {
- name
+ id
}
- commentsCount
- comments(orderBy: createdAt_desc) {
+ comments(orderBy: createdAt_asc) {
id
contentExcerpt
+ content
createdAt
disabled
deleted
@@ -52,7 +52,7 @@ export default i18n => {
deleted
shoutedCount
contributionsCount
- commentsCount
+ commentedCount
followedByCount
followedByCurrentUser
location {
@@ -99,7 +99,7 @@ export const filterPosts = i18n => {
deleted
contributionsCount
shoutedCount
- commentsCount
+ commentedCount
followedByCount
followedByCurrentUser
location {
@@ -110,7 +110,6 @@ export const filterPosts = i18n => {
icon
}
}
- commentsCount
categories {
id
name
diff --git a/webapp/graphql/UserProfile/User.js b/webapp/graphql/User.js
similarity index 93%
rename from webapp/graphql/UserProfile/User.js
rename to webapp/graphql/User.js
index 9febce142..7771481a6 100644
--- a/webapp/graphql/UserProfile/User.js
+++ b/webapp/graphql/User.js
@@ -2,7 +2,7 @@ import gql from 'graphql-tag'
export default i18n => {
const lang = i18n.locale().toUpperCase()
- return gql(`
+ return gql`
query User($id: ID!) {
User(id: $id) {
id
@@ -35,7 +35,7 @@ export default i18n => {
followedByCount
followedByCurrentUser
contributionsCount
- commentsCount
+ commentedCount
badges {
id
icon
@@ -57,7 +57,7 @@ export default i18n => {
followedByCount
followedByCurrentUser
contributionsCount
- commentsCount
+ commentedCount
badges {
id
icon
@@ -66,12 +66,11 @@ export default i18n => {
name: name${lang}
}
}
- contributionsCount
socialMedia {
id
url
}
}
}
- `)
+ `
}
diff --git a/webapp/graphql/UserProfile/Post.js b/webapp/graphql/UserProfile/Post.js
deleted file mode 100644
index c33572a9e..000000000
--- a/webapp/graphql/UserProfile/Post.js
+++ /dev/null
@@ -1,38 +0,0 @@
-import gql from 'graphql-tag'
-
-export default i18n => {
- const lang = i18n.locale().toUpperCase()
- return gql(`
- query Post($filter: _PostFilter, $first: Int, $offset: Int) {
- Post(filter: $filter, first: $first, offset: $offset, orderBy: createdAt_desc) {
- id
- slug
- title
- contentExcerpt
- shoutedCount
- commentsCount
- deleted
- image
- createdAt
- disabled
- deleted
- categories {
- id
- name
- icon
- }
- author {
- id
- slug
- avatar
- name
- disabled
- deleted
- location {
- name: name${lang}
- }
- }
- }
- }
- `)
-}
diff --git a/webapp/graphql/settings/BlockedUsers.js b/webapp/graphql/settings/BlockedUsers.js
index e47355b18..8f882f8ad 100644
--- a/webapp/graphql/settings/BlockedUsers.js
+++ b/webapp/graphql/settings/BlockedUsers.js
@@ -1,7 +1,7 @@
import gql from 'graphql-tag'
export const BlockedUsers = () => {
- return gql(`
+ return gql`
{
blockedUsers {
id
@@ -13,27 +13,31 @@ export const BlockedUsers = () => {
deleted
}
}
- `)
+ `
}
export const Block = () => {
- return gql(`mutation($id:ID!) {
- block(id: $id) {
- id
- name
- isBlocked
- followedByCurrentUser
+ return gql`
+ mutation($id: ID!) {
+ block(id: $id) {
+ id
+ name
+ isBlocked
+ followedByCurrentUser
+ }
}
- }`)
+ `
}
export const Unblock = () => {
- return gql(`mutation($id:ID!) {
- unblock(id: $id) {
- id
- name
- isBlocked
- followedByCurrentUser
+ return gql`
+ mutation($id: ID!) {
+ unblock(id: $id) {
+ id
+ name
+ isBlocked
+ followedByCurrentUser
+ }
}
- }`)
+ `
}
diff --git a/webapp/locales/de.json b/webapp/locales/de.json
index 33c8e37c5..14980a112 100644
--- a/webapp/locales/de.json
+++ b/webapp/locales/de.json
@@ -171,7 +171,7 @@
"deleteUserAccount": {
"name": "Daten löschen",
"contributionsCount": "Meine {count} Beiträge löschen",
- "commentsCount": "Meine {count} Kommentare löschen",
+ "commentedCount": "Meine {count} Kommentare löschen",
"accountDescription": "Sei dir bewusst, dass deine Beiträge und Kommentare für unsere Community wichtig sind. Wenn du sie trotzdem löschen möchtest, musst du sie unten markieren.",
"accountWarning": "Dein Konto, deine Beiträge oder Kommentare kannst du nach dem Löschen WEDER VERWALTEN NOCH WIEDERHERSTELLEN!",
"success": "Konto erfolgreich gelöscht!",
diff --git a/webapp/locales/en.json b/webapp/locales/en.json
index 664cbaff2..59323fd5a 100644
--- a/webapp/locales/en.json
+++ b/webapp/locales/en.json
@@ -171,7 +171,7 @@
"deleteUserAccount": {
"name": "Delete data",
"contributionsCount": "Delete my {count} posts",
- "commentsCount": "Delete my {count} comments",
+ "commentedCount": "Delete my {count} comments",
"accountDescription": "Be aware that your Post and Comments are important to our community. If you still choose to delete them, you have to mark them below.",
"accountWarning": "You CAN'T MANAGE and CAN'T RECOVER your Account, Posts, or Comments after deleting your account!",
"success": "Account successfully deleted!",
diff --git a/webapp/locales/pl.json b/webapp/locales/pl.json
index 3f6746adf..ed5f049ab 100644
--- a/webapp/locales/pl.json
+++ b/webapp/locales/pl.json
@@ -121,7 +121,7 @@
"deleteUserAccount": {
"name": "Usuń dane",
"contributionsCount": "Usuń {count} moich postów",
- "commentsCount": "Usuń {count} moich komentarzy",
+ "commentedCount": "Usuń {count} moich komentarzy",
"accountDescription": "Be aware that your Post and Comments are important to our community. If you still choose to delete them, you have to mark them below.",
"accountWarning": "Po usunięcie Twojego konta, nie możesz ZARZĄDZAĆ ani ODZYSKAĆ danych, wpisów oraz komentarzy!",
"success": "Konto zostało usunięte",
diff --git a/webapp/nuxt.config.js b/webapp/nuxt.config.js
index 3c25e43b6..c7d6d1a27 100644
--- a/webapp/nuxt.config.js
+++ b/webapp/nuxt.config.js
@@ -100,6 +100,7 @@ module.exports = {
{ src: '~/plugins/v-tooltip.js', ssr: false },
{ src: '~/plugins/izi-toast.js', ssr: false },
{ src: '~/plugins/vue-filters.js' },
+ { src: '~/plugins/vue-infinite-scroll.js', ssr: false },
],
router: {
diff --git a/webapp/package.json b/webapp/package.json
index f3fa36012..675038e44 100644
--- a/webapp/package.json
+++ b/webapp/package.json
@@ -50,8 +50,8 @@
]
},
"dependencies": {
- "@human-connection/styleguide": "0.5.17",
- "@nuxtjs/apollo": "^4.0.0-rc10",
+ "@human-connection/styleguide": "0.5.19",
+ "@nuxtjs/apollo": "^4.0.0-rc9",
"@nuxtjs/axios": "~5.5.4",
"@nuxtjs/dotenv": "~1.4.0",
"@nuxtjs/style-resources": "~1.0.0",
@@ -60,7 +60,7 @@
"apollo-client": "~2.6.4",
"cookie-universal-nuxt": "~2.0.17",
"cross-env": "~5.2.0",
- "date-fns": "2.0.0-beta.4",
+ "date-fns": "2.0.0-beta.5",
"express": "~4.17.1",
"graphql": "~14.4.2",
"isemail": "^3.2.0",
@@ -76,6 +76,7 @@
"tiptap-extensions": "~1.26.2",
"v-tooltip": "~2.0.2",
"vue-count-to": "~1.0.13",
+ "vue-infinite-scroll": "^2.0.2",
"vue-izitoast": "roschaefer/vue-izitoast#patch-1",
"vuex-i18n": "~1.13.1",
"vue-sweetalert-icons": "~4.2.0",
@@ -94,7 +95,7 @@
"@vue/test-utils": "~1.0.0-beta.29",
"babel-core": "~7.0.0-bridge.0",
"babel-eslint": "~10.0.2",
- "babel-jest": "~24.8.0",
+ "babel-jest": "~24.9.0",
"babel-loader": "~8.0.6",
"babel-preset-vue": "~2.0.2",
"core-js": "~2.6.9",
diff --git a/webapp/pages/admin/index.vue b/webapp/pages/admin/index.vue
index 7790ed849..ca8ce4df7 100644
--- a/webapp/pages/admin/index.vue
+++ b/webapp/pages/admin/index.vue
@@ -7,7 +7,7 @@
-
+
@@ -16,7 +16,7 @@
-
+
@@ -30,7 +30,7 @@
uppercase
>
-
+
@@ -44,7 +44,7 @@
uppercase
>
-
+
@@ -58,7 +58,7 @@
uppercase
>
-
+
@@ -72,7 +72,7 @@
uppercase
>
-
+
@@ -81,7 +81,7 @@
-
+
@@ -90,7 +90,7 @@
-
+
@@ -99,7 +99,7 @@
-
+
@@ -128,9 +128,6 @@ export default {
return process.client
},
},
- mounted() {
- this.$apollo.queries.statistics.startPolling(5000)
- },
apollo: {
statistics: {
query: gql`
diff --git a/webapp/pages/admin/tags.vue b/webapp/pages/admin/tags.vue
index c5a28dc11..9ede1d502 100644
--- a/webapp/pages/admin/tags.vue
+++ b/webapp/pages/admin/tags.vue
@@ -1,12 +1,12 @@
-
+
{{ scope.index + 1 }}.
-
+
- #{{ scope.row.name | truncate(20) }}
+ #{{ scope.row.id | truncate(20) }}
@@ -25,8 +25,8 @@ export default {
computed: {
fields() {
return {
- id: this.$t('admin.tags.number'),
- name: this.$t('admin.tags.name'),
+ index: this.$t('admin.tags.number'),
+ id: this.$t('admin.tags.name'),
taggedCountUnique: {
label: this.$t('admin.tags.tagCountUnique'),
align: 'right',
@@ -44,7 +44,6 @@ export default {
query {
Tag(first: 20, orderBy: taggedCountUnique_desc) {
id
- name
taggedCount
taggedCountUnique
}
diff --git a/webapp/pages/index.spec.js b/webapp/pages/index.spec.js
index 805640ef6..6dacd6069 100644
--- a/webapp/pages/index.spec.js
+++ b/webapp/pages/index.spec.js
@@ -5,6 +5,7 @@ import Styleguide from '@human-connection/styleguide'
import Filters from '~/plugins/vue-filters'
import VTooltip from 'v-tooltip'
import FilterMenu from '~/components/FilterMenu/FilterMenu'
+import InfiniteScroll from '~/plugins/vue-infinite-scroll'
const localVue = createLocalVue()
@@ -12,6 +13,7 @@ localVue.use(Vuex)
localVue.use(Styleguide)
localVue.use(Filters)
localVue.use(VTooltip)
+localVue.use(InfiniteScroll)
config.stubs['no-ssr'] = ''
config.stubs['router-link'] = ''
diff --git a/webapp/pages/index.vue b/webapp/pages/index.vue
index 683e5eb65..e8d68a561 100644
--- a/webapp/pages/index.vue
+++ b/webapp/pages/index.vue
@@ -33,7 +33,16 @@
primary
/>
-
+
+
+
@@ -87,7 +96,7 @@ export default {
label: this.$t('sorting.commented'),
value: 'Commented',
icons: 'comment',
- order: 'commentsCount_desc',
+ order: 'commentedCount_desc',
},
],
}
diff --git a/webapp/pages/post/_id/_slug/index.vue b/webapp/pages/post/_id/_slug/index.vue
index 6a39c7d81..1a7e84789 100644
--- a/webapp/pages/post/_id/_slug/index.vue
+++ b/webapp/pages/post/_id/_slug/index.vue
@@ -38,7 +38,7 @@