diff --git a/webapp/components/Group/GroupContentMenu.vue b/webapp/components/Group/GroupContentMenu.vue index e61786fe7..cfebe65a4 100644 --- a/webapp/components/Group/GroupContentMenu.vue +++ b/webapp/components/Group/GroupContentMenu.vue @@ -42,7 +42,7 @@ export default { props: { placement: { type: String, default: 'bottom-end' }, resource: { type: Object, required: true }, - isOwner: { type: String, default: null }, + group: { type: Object, required: true }, resourceType: { type: String, required: true, @@ -56,40 +56,19 @@ export default { const routes = [] if (this.resourceType === 'group') { - if (this.isOwner === 'owner') { + routes.push({ + label: this.$t('group.contentMenu.visitGroupPage'), + icon: 'home', + name: 'group-id-slug', + params: { id: this.group.id, slug: this.group.slug }, + }) + if (this.group.myRole === 'owner') { routes.push({ label: this.$t('admin.settings.name'), path: `/group/edit/${this.resource.id}`, icon: 'edit', }) } - if (this.isOwner === 'usual') { - routes.push({ - label: this.$t('group.unfollowing'), - callback: () => { - // this.$emit('join-group', this.resource) - }, - icon: 'minus', - }) - } - if (this.isOwner === 'pending') { - routes.push({ - label: this.$t('group.unfollowing'), - callback: () => { - // this.removePending(this.resource) - }, - icon: 'minus', - }) - } - if (this.isOwner === null) { - routes.push({ - label: this.$t('group.follow'), - callback: () => { - this.$emit('joinGroup', this.resource) - }, - icon: 'plus', - }) - } } return routes diff --git a/webapp/components/Group/GroupForm.vue b/webapp/components/Group/GroupForm.vue index 87b46091b..daf0c1d2a 100644 --- a/webapp/components/Group/GroupForm.vue +++ b/webapp/components/Group/GroupForm.vue @@ -46,11 +46,18 @@ {{ $t(`group.types.${groupType}`) }} + + - @@ -120,10 +127,6 @@ - - diff --git a/webapp/components/Group/GroupTeaser.vue b/webapp/components/Group/GroupTeaser.vue index 9ebbbcdce..9a6eb9bcc 100644 --- a/webapp/components/Group/GroupTeaser.vue +++ b/webapp/components/Group/GroupTeaser.vue @@ -58,13 +58,7 @@
- +