From 8674f2002320aaa6c380488b0eab636a53c76705 Mon Sep 17 00:00:00 2001 From: Shpuld Shpuldson Date: Mon, 11 Jan 2021 19:32:58 +0200 Subject: separated component --- src/components/report/report.js | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 src/components/report/report.js (limited to 'src/components/report/report.js') diff --git a/src/components/report/report.js b/src/components/report/report.js new file mode 100644 index 00000000..e81417a8 --- /dev/null +++ b/src/components/report/report.js @@ -0,0 +1,23 @@ +import StatusContent from '../status_content/status_content.vue' +import Timeago from '../timeago/timeago.vue' +import generateProfileLink from 'src/services/user_profile_link_generator/user_profile_link_generator' + +const Report = { + props: [ + 'report' + ], + components: { + StatusContent, + Timeago + }, + methods: { + generateUserProfileLink (user) { + return generateProfileLink(user.id, user.screen_name, this.$store.state.instance.restrictedNicknames) + }, + setReportState (id, state) { + return this.$store.state.api.backendInteractor.setReportState({ id, state }) + } + } +} + +export default Report -- cgit v1.2.3-70-g09d2 From e73553dca726703f83e5085560377bfaa202a5f9 Mon Sep 17 00:00:00 2001 From: Shpuld Shpuldson Date: Mon, 18 Jan 2021 15:26:08 +0200 Subject: wip --- src/components/notification/notification.vue | 2 +- src/components/report/report.js | 9 ++++-- src/components/report/report.vue | 24 ++++++++++++++++ src/modules/reports.js | 41 ++++++++++++++++++++++------ src/modules/statuses.js | 4 +++ src/services/api/api.service.js | 8 +++++- 6 files changed, 75 insertions(+), 13 deletions(-) (limited to 'src/components/report/report.js') diff --git a/src/components/notification/notification.vue b/src/components/notification/notification.vue index 3b74249d..40ea0431 100644 --- a/src/components/notification/notification.vue +++ b/src/components/notification/notification.vue @@ -185,7 +185,7 @@