From 8b5bd59267897310ef9286a1369245f1a6a0e113 Mon Sep 17 00:00:00 2001 From: Angelina Filippova Date: Tue, 2 Jun 2020 00:01:56 +0300 Subject: [PATCH] Replace display_name with nickname in Reports and Report Notes, check if account is valid --- src/store/modules/reports.js | 5 ++--- src/views/reports/components/NoteCard.vue | 10 +++++----- src/views/reports/components/Report.vue | 19 ++++++++----------- 3 files changed, 15 insertions(+), 19 deletions(-) diff --git a/src/store/modules/reports.js b/src/store/modules/reports.js index 3a836a2f..6bc98993 100644 --- a/src/store/modules/reports.js +++ b/src/store/modules/reports.js @@ -61,9 +61,8 @@ const reports = { const optimisticNote = { user: { avatar: rootState.user.avatar, - display_name: rootState.user.name, - url: `${rootState.user.authHost}/${rootState.user.name}`, - acct: rootState.user.name + nickname: rootState.user.name, + id: rootState.user.id }, content: content, created_at: new Date().getTime() diff --git a/src/views/reports/components/NoteCard.vue b/src/views/reports/components/NoteCard.vue index 79637f16..b4fc6225 100644 --- a/src/views/reports/components/NoteCard.vue +++ b/src/views/reports/components/NoteCard.vue @@ -4,12 +4,9 @@
- -

{{ note.user.display_name }}

+ +

{{ note.user.nickname }}

- - @{{ note.user.display_name }} -
-

{{ $t('reports.reportOn') }} {{ report.account.display_name }}

+

{{ $t('reports.reportOn') }} {{ report.account.nickname }}

{{ $t('reports.report') }}

{{ $t('reports.id') }}: {{ report.id }}
@@ -30,16 +30,16 @@
{{ $t('reports.account') }}: - + avatar - - {{ report.account.display_name }} + {{ report.account.nickname }} (deactivated) @@ -54,13 +54,13 @@
{{ $t('reports.actor') }}: - + avatar ({{ $t('reports.notFound') }}) @@ -69,7 +69,7 @@
- +
@@ -142,9 +142,6 @@ export default { } }, methods: { - accountExists(account, key) { - return account[key] - }, changeReportState(state, id) { this.$store.dispatch('ChangeReportState', [{ state, id }]) },