Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add CTAs below the post CTA - MEED-2072 - Meeds-io/meeds#54 #327

Merged
merged 1 commit into from
Aug 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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