From 5834c555ce148d5dd0bec89ca9c0aab0498051e8 Mon Sep 17 00:00:00 2001 From: Sofien Haj Chedhli Date: Tue, 29 Oct 2024 10:38:40 +0100 Subject: [PATCH 1/2] feat: Display the activity views count - EXO-74854 - Meeds-io/MIPs#161 (#4146) --- .../activity/content/ActivityLink.vue | 28 +++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/webapp/src/main/webapp/vue-apps/activity-stream/components/activity/content/ActivityLink.vue b/webapp/src/main/webapp/vue-apps/activity-stream/components/activity/content/ActivityLink.vue index 17ac963d16f..28ffb011ba0 100644 --- a/webapp/src/main/webapp/vue-apps/activity-stream/components/activity/content/ActivityLink.vue +++ b/webapp/src/main/webapp/vue-apps/activity-stream/components/activity/content/ActivityLink.vue @@ -99,7 +99,7 @@
+ class="my-2 position-relative d-flex flex-column width-full"> {{ $t('UIActivity.label.seeMore') }} +
+ + fas fa-eye + + + {{ activityViewsCount }} + +
@@ -162,7 +175,8 @@ export default { displayReadMoreButton: false, useEmbeddedLinkView: true, summaryLinesToDisplay: 2, - isLandscapeThumbnail: false + isLandscapeThumbnail: false, + activityViews: null }), computed: { getTitle() { @@ -314,6 +328,15 @@ export default { 'min-height': '100%' }; }, + getActivityViews() { + return this.activityTypeExtension && this.activityTypeExtension.getActivityViews; + }, + activityViewsTooltip() { + return this.activityViews?.tooltip && this.$t(this.activityViews.tooltip, {0: this.activityViews?.originalViewsCount}); + }, + activityViewsCount() { + return this.activityViews?.viewsCount; + } }, watch: { activityTypeExtension(newVal, oldVal) { @@ -360,6 +383,7 @@ export default { } } } + this.activityViews = this.getActivityViews && this.getActivityViews(this.activity); }, displayReadMore() { const elem = this.$el?.querySelector?.('.rich-editor-content'); From 247946aeb8678f34273e70061651884fb3228249 Mon Sep 17 00:00:00 2001 From: Helmi Akermi <70575401+hakermi@users.noreply.github.com> Date: Tue, 5 Nov 2024 11:12:35 +0100 Subject: [PATCH 2/2] feat: Hide activity reaction based on activity extension option - EXO-72747 - Meeds-io/MIPs#161 (#4160) Hide activity reaction based on activity extension option --- .../components/activity/ActivityStreamActivity.vue | 6 +++++- .../components/activity/footer/ActivityFooter.vue | 4 ++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/webapp/src/main/webapp/vue-apps/activity-stream/components/activity/ActivityStreamActivity.vue b/webapp/src/main/webapp/vue-apps/activity-stream/components/activity/ActivityStreamActivity.vue index 341cc1825c6..6f47d8a451d 100644 --- a/webapp/src/main/webapp/vue-apps/activity-stream/components/activity/ActivityStreamActivity.vue +++ b/webapp/src/main/webapp/vue-apps/activity-stream/components/activity/ActivityStreamActivity.vue @@ -37,7 +37,7 @@ :activity-types="activityTypes" :activity-type-extension="activityTypeExtension" />