Skip to content

Commit

Permalink
MEED-2072 Use extension registry send kudos for toolbar activity
Browse files Browse the repository at this point in the history
  • Loading branch information
MayTekayaa committed Aug 24, 2023
1 parent 521bca7 commit 3fba1a8
Show file tree
Hide file tree
Showing 7 changed files with 43 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ NewKudosSentActivityComment.activity_kudos=<i class="uiIcon fa fa-award uiIconKu
NewKudosSentActivityComment.activity_kudos_content={3} Kudos to {1} {2}
NewKudosSentActivityComment.activity_kudos_title=Kudos to {0}

kudos.title=Kudos
exoplatform.kudos.title.sendAKudos=Send a Kudos
exoplatform.kudos.content.to=To:
exoplatform.kudos.choose.audience=Choose an audience:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ NewKudosSentActivityComment.activity_kudos=<i class="uiIcon fa fa-award uiIconKu
NewKudosSentActivityComment.activity_kudos_content={3} Kudos \u00E0 {1} {2}
NewKudosSentActivityComment.activity_kudos_title=Kudos \u00E0 {0}

kudos.title=Kudos
exoplatform.kudos.title.sendAKudos=Envoyer un kudos
exoplatform.kudos.content.to=\u00C0 :
exoplatform.kudos.choose.audience=Choisir l'audience :
Expand Down
1 change: 1 addition & 0 deletions kudos-webapps/src/main/webapp/WEB-INF/gatein-resources.xml
Original file line number Diff line number Diff line change
Expand Up @@ -144,4 +144,5 @@
</depends>
</module>


</gatein-resources>
5 changes: 5 additions & 0 deletions kudos-webapps/src/main/webapp/vue-app/js/Kudos.js
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,11 @@ export function registerComposerExtension() {
vueComponent: Vue.options.components['send-kudos-composer'],
rank: 1,
});
extensionRegistry.registerComponent('ActivityToolbarAction', 'activity-toolbar-action', {
id: 'sendKudosToolbarButton',
vueComponent: Vue.options.components['send-kudos-toolbar-action'],
rank: 10,
});
}

export function registerFavoriteExtensions(title) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export default {
openSendKudosDrawer() {
document.dispatchEvent(new CustomEvent('activity-composer-closed'));
document.dispatchEvent(new CustomEvent('exo-kudos-open-send-modal', {detail: {
id: eXo.env.portal.spaceId,
id: eXo.env.portal.userIdentityId,
type: 'USER_PROFILE',
parentId: '',
owner: eXo.env.portal.userName,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<template>
<v-btn
:ripple="false"
class="d-flex flex-row align-center py-2"
text
@click="openSendKudosDrawer">
<v-icon
color="primary"
size="27">
fa-award
</v-icon>
<v-span class="body-2 font-weight-bold ms-5 mt-1 dark-grey-color">
{{ $t('kudos.title') }}
</v-span>
</v-btn>
</template>
<script>
export default {
methods: {
openSendKudosDrawer() {
document.dispatchEvent(new CustomEvent('exo-kudos-open-send-modal', {detail: {
id: eXo.env.portal.userIdentityId,
type: 'USER_PROFILE',
parentId: '',
owner: eXo.env.portal.userName,
spaceURL: eXo.env.portal.spaceUrl,
readOnlySpace: true
}}));
},
},
};
</script>
2 changes: 2 additions & 0 deletions kudos-webapps/src/main/webapp/vue-app/kudos/initComponents.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import KudosAPI from './components/KudosAPI.vue';
import KudosApp from './components/KudosApp.vue';
import KudosButton from '../kudos/components/KudosButton.vue';
import SendKudosComposer from '../kudos/components/SendKudosComposer.vue';
import SendKudosToolbarAction from '../kudos/components/SendKudosToolbarAction.vue';
import PopoverKudosButton from '../kudos/components/PopoverKudosButton.vue';
import ActivityKudosReactionItem from './components/ActivityKudosReactionItem.vue';
import ActivityKudosReactionList from './components/ActivityKudosReactionList.vue';
Expand All @@ -28,6 +29,7 @@ const components = {
'kudos-overview': KudosOverview,
'kudos-overview-card': KudosOverviewCard,
'send-kudos-composer': SendKudosComposer,
'send-kudos-toolbar-action': SendKudosToolbarAction,
};

for (const key in components) {
Expand Down

0 comments on commit 3fba1a8

Please sign in to comment.