mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
Merge branch 'master' of github.com:Human-Connection/Human-Connection into 1707-reporting-with-specific-information
This commit is contained in:
commit
43e401293d
26
CHANGELOG.md
26
CHANGELOG.md
@ -9,9 +9,13 @@
|
||||
- 🐛 \[Bug\] Update maintenance page email [\#1731](https://github.com/Human-Connection/Human-Connection/issues/1731)
|
||||
- 🐛 \[Bug\] Editing comments is not reactive again [\#1718](https://github.com/Human-Connection/Human-Connection/issues/1718)
|
||||
- 🐛 \[Bug\] Comments with mentions in the end not displayed [\#1665](https://github.com/Human-Connection/Human-Connection/issues/1665)
|
||||
- 🐛 \[Bug\] Moderators and Admins can be blocked [\#1663](https://github.com/Human-Connection/Human-Connection/issues/1663)
|
||||
- 🐛 \[Bug\] Links in Comments don't show up [\#1661](https://github.com/Human-Connection/Human-Connection/issues/1661)
|
||||
- 🐛 \[Bug\] Delete the Sleep Icon [\#1659](https://github.com/Human-Connection/Human-Connection/issues/1659)
|
||||
- 🐛 \[Bug\] Mail Layout German/English not working in Webmail [\#1656](https://github.com/Human-Connection/Human-Connection/issues/1656)
|
||||
- 🐛 \[Bug\] Far to less Characters per Contribution \(2000\) [\#1639](https://github.com/Human-Connection/Human-Connection/issues/1639)
|
||||
- 🐛 \[Bug\] Notifications do just update with page reload [\#1637](https://github.com/Human-Connection/Human-Connection/issues/1637)
|
||||
- 🐛 \[Bug\] Admin statistics entries are missing [\#1633](https://github.com/Human-Connection/Human-Connection/issues/1633)
|
||||
- 🐛 \[Bug\] Can no users used all hashtags be correct? [\#1632](https://github.com/Human-Connection/Human-Connection/issues/1632)
|
||||
- 🐛 \[Bug\] Create account has no info about email, no localisation, no HC logo [\#1631](https://github.com/Human-Connection/Human-Connection/issues/1631)
|
||||
- 🐛 \[Bug\] Embeds are displayed when creating comments but get removed [\#1547](https://github.com/Human-Connection/Human-Connection/issues/1547)
|
||||
@ -21,14 +25,35 @@
|
||||
**Closed issues:**
|
||||
|
||||
- 🚀 \[Feature\] Extend Emoticons [\#1745](https://github.com/Human-Connection/Human-Connection/issues/1745)
|
||||
- 🚀 \[Feature\] Show "Edited" on comments and Posts [\#1669](https://github.com/Human-Connection/Human-Connection/issues/1669)
|
||||
- 🚀 \[Feature\] Change slug [\#1650](https://github.com/Human-Connection/Human-Connection/issues/1650)
|
||||
- 🚀 \[Feature\] Make the slug more visible and usable [\#1486](https://github.com/Human-Connection/Human-Connection/issues/1486)
|
||||
- 🚀 \[Feature\] Report with reason [\#1469](https://github.com/Human-Connection/Human-Connection/issues/1469)
|
||||
- 🚀 \[Feature\] Update `lastActiveAt` on every JWT token check [\#1305](https://github.com/Human-Connection/Human-Connection/issues/1305)
|
||||
- 🚀 \[Feature\] Make Invite an Registration E-Mails translatable and pretty [\#1186](https://github.com/Human-Connection/Human-Connection/issues/1186)
|
||||
- 🚀 \[Feature\] @Username: Unique user identification if identical profile names exist [\#1069](https://github.com/Human-Connection/Human-Connection/issues/1069)
|
||||
- 🚀 \[Feature\] UserSettings - YourData - Email [\#407](https://github.com/Human-Connection/Human-Connection/issues/407)
|
||||
|
||||
**Merged pull requests:**
|
||||
|
||||
- fixes\#1305 lastActiveAt [\#1809](https://github.com/Human-Connection/Human-Connection/pull/1809) ([iylim](https://github.com/iylim))
|
||||
- Show that a Post/Comment has been edited [\#1807](https://github.com/Human-Connection/Human-Connection/pull/1807) ([mattwr18](https://github.com/mattwr18))
|
||||
- fix invites count calculation for admin dashboard [\#1806](https://github.com/Human-Connection/Human-Connection/pull/1806) ([vbelolapotkov](https://github.com/vbelolapotkov))
|
||||
- build\(deps\): bump nuxt from 2.9.2 to 2.10.0 in /webapp [\#1804](https://github.com/Human-Connection/Human-Connection/pull/1804) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
|
||||
- build\(deps\): bump cross-env from 6.0.2 to 6.0.3 in /webapp [\#1803](https://github.com/Human-Connection/Human-Connection/pull/1803) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
|
||||
- build\(deps\): bump @hapi/joi from 16.1.4 to 16.1.5 in /backend [\#1802](https://github.com/Human-Connection/Human-Connection/pull/1802) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
|
||||
- build\(deps\): bump cross-env from 6.0.2 to 6.0.3 in /backend [\#1801](https://github.com/Human-Connection/Human-Connection/pull/1801) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
|
||||
- build\(deps-dev\): bump cross-env from 6.0.2 to 6.0.3 [\#1800](https://github.com/Human-Connection/Human-Connection/pull/1800) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
|
||||
- Remove language toggle from email template [\#1798](https://github.com/Human-Connection/Human-Connection/pull/1798) ([alina-beck](https://github.com/alina-beck))
|
||||
- Max aspect ratio of 1:1 for Post index page [\#1796](https://github.com/Human-Connection/Human-Connection/pull/1796) ([mattwr18](https://github.com/mattwr18))
|
||||
- build\(deps\): bump cross-env from 6.0.0 to 6.0.2 in /backend [\#1794](https://github.com/Human-Connection/Human-Connection/pull/1794) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
|
||||
- build\(deps-dev\): bump cross-env from 6.0.0 to 6.0.2 [\#1793](https://github.com/Human-Connection/Human-Connection/pull/1793) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
|
||||
- build\(deps\): bump metascraper-description from 5.7.5 to 5.7.6 in /backend [\#1792](https://github.com/Human-Connection/Human-Connection/pull/1792) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
|
||||
- build\(deps\): bump cross-env from 6.0.0 to 6.0.2 in /webapp [\#1791](https://github.com/Human-Connection/Human-Connection/pull/1791) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
|
||||
- build\(deps\): bump @nuxtjs/apollo from 4.0.0-rc13.1 to 4.0.0-rc14 in /webapp [\#1790](https://github.com/Human-Connection/Human-Connection/pull/1790) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
|
||||
- Update Post query for blockedByUsers [\#1788](https://github.com/Human-Connection/Human-Connection/pull/1788) ([mattwr18](https://github.com/mattwr18))
|
||||
- Update neo4j to Enterprise edition [\#1787](https://github.com/Human-Connection/Human-Connection/pull/1787) ([mattwr18](https://github.com/mattwr18))
|
||||
- Update to 0.1.2 [\#1786](https://github.com/Human-Connection/Human-Connection/pull/1786) ([mattwr18](https://github.com/mattwr18))
|
||||
- Bump metascraper-logo from 5.7.5 to 5.7.6 in /backend [\#1783](https://github.com/Human-Connection/Human-Connection/pull/1783) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
|
||||
- Bump metascraper-url from 5.7.5 to 5.7.6 in /backend [\#1782](https://github.com/Human-Connection/Human-Connection/pull/1782) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
|
||||
- Bump graphql-middleware from 3.0.5 to 4.0.1 in /backend [\#1781](https://github.com/Human-Connection/Human-Connection/pull/1781) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
|
||||
@ -77,6 +102,7 @@
|
||||
- Bump date-fns from 2.2.1 to 2.3.0 in /backend [\#1714](https://github.com/Human-Connection/Human-Connection/pull/1714) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
|
||||
- Bump @babel/cli from 7.6.0 to 7.6.2 in /backend [\#1713](https://github.com/Human-Connection/Human-Connection/pull/1713) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
|
||||
- \[WIP\]1706 refactor shout spec [\#1712](https://github.com/Human-Connection/Human-Connection/pull/1712) ([aonomike](https://github.com/aonomike))
|
||||
- 407 change your email address [\#1711](https://github.com/Human-Connection/Human-Connection/pull/1711) ([roschaefer](https://github.com/roschaefer))
|
||||
- Remove repetitive labels from emote button [\#1702](https://github.com/Human-Connection/Human-Connection/pull/1702) ([roschaefer](https://github.com/roschaefer))
|
||||
- fix the bug with scrolling post comments into view [\#1701](https://github.com/Human-Connection/Human-Connection/pull/1701) ([vbelolapotkov](https://github.com/vbelolapotkov))
|
||||
- Bump metascraper-description from 5.7.4 to 5.7.5 in /backend [\#1700](https://github.com/Human-Connection/Human-Connection/pull/1700) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
|
||||
|
||||
@ -14,6 +14,7 @@ export default async (driver, authorizationHeader) => {
|
||||
const session = driver.session()
|
||||
const query = `
|
||||
MATCH (user:User {id: $id, deleted: false, disabled: false })
|
||||
SET user.lastActiveAt = toString(datetime())
|
||||
RETURN user {.id, .slug, .name, .avatar, .email, .role, .disabled, .actorId}
|
||||
LIMIT 1
|
||||
`
|
||||
|
||||
@ -1,9 +1,10 @@
|
||||
import Factory from '../seed/factories/index'
|
||||
import { getDriver } from '../bootstrap/neo4j'
|
||||
import { getDriver, neode as getNeode } from '../bootstrap/neo4j'
|
||||
import decode from './decode'
|
||||
|
||||
const factory = Factory()
|
||||
const driver = getDriver()
|
||||
const neode = getNeode()
|
||||
|
||||
// here is the decoded JWT token:
|
||||
// {
|
||||
@ -85,6 +86,33 @@ describe('decode', () => {
|
||||
})
|
||||
})
|
||||
|
||||
it('sets `lastActiveAt`', async () => {
|
||||
let user = await neode.first('User', { id: 'u3' })
|
||||
await expect(user.toJson()).resolves.not.toHaveProperty('lastActiveAt')
|
||||
await decode(driver, authorizationHeader)
|
||||
user = await neode.first('User', { id: 'u3' })
|
||||
await expect(user.toJson()).resolves.toMatchObject({
|
||||
lastActiveAt: expect.any(String),
|
||||
})
|
||||
})
|
||||
|
||||
it('updates `lastActiveAt` for every authenticated request', async () => {
|
||||
let user = await neode.first('User', { id: 'u3' })
|
||||
await user.update({
|
||||
updatedAt: new Date().toISOString(),
|
||||
lastActiveAt: '2019-10-03T23:33:08.598Z',
|
||||
})
|
||||
await expect(user.toJson()).resolves.toMatchObject({
|
||||
lastActiveAt: '2019-10-03T23:33:08.598Z',
|
||||
})
|
||||
await decode(driver, authorizationHeader)
|
||||
user = await neode.first('User', { id: 'u3' })
|
||||
await expect(user.toJson()).resolves.toMatchObject({
|
||||
// should be a different time by now ;)
|
||||
lastActiveAt: expect.not.stringContaining('2019-10-03T23:33'),
|
||||
})
|
||||
})
|
||||
|
||||
describe('but user is deleted', () => {
|
||||
beforeEach(async () => {
|
||||
await user.update({ updatedAt: new Date().toISOString(), deleted: true })
|
||||
@ -92,6 +120,7 @@ describe('decode', () => {
|
||||
|
||||
it('returns null', returnsNull)
|
||||
})
|
||||
|
||||
describe('but user is disabled', () => {
|
||||
beforeEach(async () => {
|
||||
await user.update({ updatedAt: new Date().toISOString(), disabled: true })
|
||||
|
||||
@ -49,6 +49,7 @@ module.exports = {
|
||||
direction: 'in',
|
||||
},
|
||||
invitedBy: { type: 'relationship', relationship: 'INVITED', target: 'User', direction: 'in' },
|
||||
lastActiveAt: { type: 'string', isoDate: true },
|
||||
createdAt: { type: 'string', isoDate: true, default: () => new Date().toISOString() },
|
||||
updatedAt: {
|
||||
type: 'string',
|
||||
|
||||
@ -12,8 +12,13 @@
|
||||
<div v-else :class="{ comment: true, 'disabled-content': comment.deleted || comment.disabled }">
|
||||
<ds-card :id="anchor">
|
||||
<ds-space margin-bottom="small" margin-top="small">
|
||||
<hc-user :user="author" :date-time="comment.createdAt" />
|
||||
<!-- Content Menu (can open Modals) -->
|
||||
<hc-user :user="author" :date-time="comment.createdAt">
|
||||
<template v-slot:dateTime>
|
||||
<ds-text v-if="comment.createdAt !== comment.updatedAt">
|
||||
({{ $t('comment.edited') }})
|
||||
</ds-text>
|
||||
</template>
|
||||
</hc-user>
|
||||
<client-only>
|
||||
<content-menu
|
||||
v-show="!openEditCommentMenu"
|
||||
|
||||
@ -56,7 +56,7 @@ const user = {
|
||||
storiesOf('User', module)
|
||||
.addDecorator(withA11y)
|
||||
.addDecorator(helpers.layout)
|
||||
.add('available user', () => ({
|
||||
.add('available', () => ({
|
||||
components: { User },
|
||||
store: helpers.store,
|
||||
data: () => ({
|
||||
@ -64,7 +64,21 @@ storiesOf('User', module)
|
||||
}),
|
||||
template: '<user :user="user" :trunc="35" :date-time="new Date()" />',
|
||||
}))
|
||||
.add('anonymous user', () => ({
|
||||
.add('has edited something', () => ({
|
||||
components: { User },
|
||||
store: helpers.store,
|
||||
data: () => ({
|
||||
user,
|
||||
}),
|
||||
template: `
|
||||
<user :user="user" :trunc="35" :date-time="new Date()">
|
||||
<template v-slot:dateTime>
|
||||
- HEY! I'm edited
|
||||
</template>
|
||||
</user>
|
||||
`,
|
||||
}))
|
||||
.add('anonymous', () => ({
|
||||
components: { User },
|
||||
store: helpers.store,
|
||||
data: () => ({
|
||||
|
||||
@ -11,17 +11,17 @@
|
||||
<div @mouseover="openMenu(true)" @mouseleave="closeMenu(true)">
|
||||
<hc-avatar class="avatar" :user="user" />
|
||||
<div>
|
||||
<ds-text align="left">
|
||||
<ds-text>
|
||||
<b class="username">{{ userName | truncate(18) }}</b>
|
||||
<ds-text v-if="dateTime" size="small" color="soft">
|
||||
<ds-icon name="clock" />
|
||||
<client-only>
|
||||
<hc-relative-date-time :date-time="dateTime" />
|
||||
</client-only>
|
||||
<slot name="dateTime"></slot>
|
||||
</ds-text>
|
||||
</ds-text>
|
||||
</div>
|
||||
<!-- Time -->
|
||||
<ds-text align="left" size="small" color="soft">
|
||||
{{ userSlug }}
|
||||
</ds-text>
|
||||
|
||||
@ -10,6 +10,7 @@ export default i18n => {
|
||||
contentExcerpt
|
||||
content
|
||||
createdAt
|
||||
updatedAt
|
||||
disabled
|
||||
deleted
|
||||
author {
|
||||
@ -39,6 +40,7 @@ export default i18n => {
|
||||
contentExcerpt
|
||||
content
|
||||
createdAt
|
||||
updatedAt
|
||||
disabled
|
||||
deleted
|
||||
author {
|
||||
|
||||
@ -40,6 +40,7 @@ export const postFragment = lang => gql`
|
||||
content
|
||||
contentExcerpt
|
||||
createdAt
|
||||
updatedAt
|
||||
disabled
|
||||
deleted
|
||||
slug
|
||||
@ -64,6 +65,7 @@ export const commentFragment = lang => gql`
|
||||
fragment comment on Comment {
|
||||
id
|
||||
createdAt
|
||||
updatedAt
|
||||
disabled
|
||||
deleted
|
||||
content
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
"maintenance": {
|
||||
"title": "Human Connection befindet sich in der Wartung",
|
||||
"explanation": "Zurzeit führen wir einige geplante Wartungsarbeiten durch, bitte versuch es später erneut.",
|
||||
"questions": "Bei Fragen oder Problemen erreichst du uns per E-Mail an"
|
||||
"questions": "Bei Fragen oder Problemen erreichst du uns per E-Mail an"
|
||||
},
|
||||
"index": {
|
||||
"no-results": "Keine Beiträge gefunden.",
|
||||
@ -335,7 +335,8 @@
|
||||
"submit": "Kommentiere",
|
||||
"submitted": "Kommentar Gesendet",
|
||||
"updated": "Änderungen gespeichert"
|
||||
}
|
||||
},
|
||||
"edited": "bearbeitet"
|
||||
},
|
||||
"comment": {
|
||||
"content": {
|
||||
@ -348,10 +349,11 @@
|
||||
"show": {
|
||||
"more": "mehr anzeigen",
|
||||
"less": "weniger anzeigen"
|
||||
}
|
||||
},
|
||||
"edited": "bearbeitet"
|
||||
},
|
||||
"quotes": {
|
||||
"african": {
|
||||
"african": {
|
||||
"quote": "Viele kleine Leute an vielen kleinen Orten, die viele kleine Dinge tun, werden das Antlitz dieser Welt verändern.",
|
||||
"author": "Afrikanisches Sprichwort"
|
||||
}
|
||||
|
||||
@ -336,7 +336,8 @@
|
||||
"submit": "Comment",
|
||||
"submitted": "Comment Submitted",
|
||||
"updated": "Changes Saved"
|
||||
}
|
||||
},
|
||||
"edited": "edited"
|
||||
},
|
||||
"comment": {
|
||||
"content": {
|
||||
@ -349,7 +350,8 @@
|
||||
"show": {
|
||||
"more": "show more",
|
||||
"less": "show less"
|
||||
}
|
||||
},
|
||||
"edited": "edited"
|
||||
},
|
||||
"quotes": {
|
||||
"african": {
|
||||
|
||||
@ -118,7 +118,11 @@
|
||||
},
|
||||
"takeAction": {
|
||||
"name": "Tomar uma ação"
|
||||
}
|
||||
},
|
||||
"comment": {
|
||||
"submit": "Commentar"
|
||||
},
|
||||
"edited": "editado"
|
||||
},
|
||||
"quotes": {
|
||||
"african": {
|
||||
@ -202,8 +206,18 @@
|
||||
"delete": "Apagar Contribuição"
|
||||
},
|
||||
"comment": {
|
||||
"edit": "Editar Comentário",
|
||||
"delete": "Apagar Comentário"
|
||||
"content": {
|
||||
"unavailable-placeholder": "… este commenttário não está disponível"
|
||||
},
|
||||
"menu": {
|
||||
"edit": "Editar Comentário",
|
||||
"delete": "Apagar Comentário"
|
||||
},
|
||||
"show": {
|
||||
"more": "mostrar mais",
|
||||
"less": "mostrar menos"
|
||||
},
|
||||
"edited": "editado"
|
||||
},
|
||||
"followButton": {
|
||||
"follow": "Seguir",
|
||||
@ -212,4 +226,4 @@
|
||||
"shoutButton": {
|
||||
"shouted": "Aclamou"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -6,8 +6,11 @@
|
||||
:class="{ 'post-card': true, 'disabled-content': post.disabled }"
|
||||
>
|
||||
<ds-space margin-bottom="small" />
|
||||
<hc-user :user="post.author" :date-time="post.createdAt" />
|
||||
<!-- Content Menu (can open Modals) -->
|
||||
<hc-user :user="post.author" :date-time="post.createdAt">
|
||||
<template v-slot:dateTime>
|
||||
<ds-text v-if="post.createdAt !== post.updatedAt">({{ $t('post.edited') }})</ds-text>
|
||||
</template>
|
||||
</hc-user>
|
||||
<client-only>
|
||||
<content-menu
|
||||
placement="bottom-end"
|
||||
@ -197,7 +200,7 @@ export default {
|
||||
|
||||
.ds-card-image {
|
||||
img {
|
||||
height: 300px;
|
||||
max-height: 710px;
|
||||
object-fit: cover;
|
||||
object-position: center;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user