diff --git a/kudos-webapps/src/main/resources/locale/addon/Gamification_en.properties b/kudos-webapps/src/main/resources/locale/addon/Gamification_en.properties index 19a6063c1..6ccf879bd 100644 --- a/kudos-webapps/src/main/resources/locale/addon/Gamification_en.properties +++ b/kudos-webapps/src/main/resources/locale/addon/Gamification_en.properties @@ -2,3 +2,4 @@ gamification.event.title.sendKudos=Kudos : Send kudos gamification.event.description.sendKudos=You sent a Kudos gamification.event.title.receiveKudos=Kudos : Receive kudos gamification.event.description.receiveKudos=You received a Kudos +gamification.event.display.congratulate=Congratulate diff --git a/kudos-webapps/src/main/webapp/WEB-INF/gatein-resources.xml b/kudos-webapps/src/main/webapp/WEB-INF/gatein-resources.xml index 9103fe686..60322e110 100644 --- a/kudos-webapps/src/main/webapp/WEB-INF/gatein-resources.xml +++ b/kudos-webapps/src/main/webapp/WEB-INF/gatein-resources.xml @@ -170,4 +170,27 @@ + + engagementCenterConnectorEventsKudosExtensions + engagement-center-connector-event-extensions + + + vue + + + vuetify + + + eXoVueI18n + + + extensionRegistry + + + commonVueComponents + + + diff --git a/kudos-webapps/src/main/webapp/vue-app/connectorEventExtensions/components/KudosEvent.vue b/kudos-webapps/src/main/webapp/vue-app/connectorEventExtensions/components/KudosEvent.vue new file mode 100644 index 000000000..01f08813e --- /dev/null +++ b/kudos-webapps/src/main/webapp/vue-app/connectorEventExtensions/components/KudosEvent.vue @@ -0,0 +1,62 @@ + + + \ No newline at end of file diff --git a/kudos-webapps/src/main/webapp/vue-app/connectorEventExtensions/extensions.js b/kudos-webapps/src/main/webapp/vue-app/connectorEventExtensions/extensions.js new file mode 100644 index 000000000..ee5a17d21 --- /dev/null +++ b/kudos-webapps/src/main/webapp/vue-app/connectorEventExtensions/extensions.js @@ -0,0 +1,30 @@ +/* + * This file is part of the Meeds project (https://meeds.io/). + * + * Copyright (C) 2020 - 2024 Meeds Association contact@meeds.io + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ +import '../connectorEventExtensions/initComponents'; + +export function init() { + extensionRegistry.registerComponent('engagementCenterEvent', 'connector-event-extensions', { + id: 'kudos-event', + name: 'kudos', + vueComponent: Vue.options.components['kudos-event'], + isEnabled: (params) => [ + 'sendKudos' + ].includes(params?.trigger), + }); +} \ No newline at end of file diff --git a/kudos-webapps/src/main/webapp/vue-app/connectorEventExtensions/initComponents.js b/kudos-webapps/src/main/webapp/vue-app/connectorEventExtensions/initComponents.js new file mode 100644 index 000000000..7f94717db --- /dev/null +++ b/kudos-webapps/src/main/webapp/vue-app/connectorEventExtensions/initComponents.js @@ -0,0 +1,26 @@ +/* + * This file is part of the Meeds project (https://meeds.io/). + * Copyright (C) 2020 - 2024 Meeds Association contact@meeds.io + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +import KudosEvent from './components/KudosEvent.vue'; + +const components = { + 'kudos-event': KudosEvent, +}; + +for (const key in components) { + Vue.component(key, components[key]); +} \ No newline at end of file diff --git a/kudos-webapps/src/main/webapp/vue-app/engagementCenterExtensions/extensions.js b/kudos-webapps/src/main/webapp/vue-app/engagementCenterExtensions/extensions.js index b8e577679..05ecbb76b 100644 --- a/kudos-webapps/src/main/webapp/vue-app/engagementCenterExtensions/extensions.js +++ b/kudos-webapps/src/main/webapp/vue-app/engagementCenterExtensions/extensions.js @@ -31,4 +31,11 @@ export function init() { } }, }); + + extensionRegistry.registerExtension('engagementCenterActions', 'activity-icon', { + id: 'kudos-icon', + type: 'exokudos:activity', + icon: 'fas fa-award', + class: 'primary--text', + }); } \ No newline at end of file diff --git a/kudos-webapps/webpack.common.js b/kudos-webapps/webpack.common.js index b5d29b775..a098386eb 100644 --- a/kudos-webapps/webpack.common.js +++ b/kudos-webapps/webpack.common.js @@ -9,6 +9,7 @@ const config = { kudosAdmin: './src/main/webapp/vue-app/kudos-admin/main.js', kudosOverview: './src/main/webapp/vue-app/kudos-overview/main.js', engagementCenterExtensions: './src/main/webapp/vue-app/engagementCenterExtensions/extensions.js', + connectorEventExtensions: './src/main/webapp/vue-app/connectorEventExtensions/extensions.js', notificationExtension: './src/main/webapp/vue-app/notification-extension/main.js', }, module: {