99 size =" normal"
1010 @closing =" onClose" >
1111 <div class =" modal-collective-members" >
12+ <a
13+ v-if =" showTeamLink"
14+ class =" team-link"
15+ :href =" teamUrl"
16+ :title =" t('collectives', 'Team overview')"
17+ target =" _blank" >
18+ <OpenInNewIcon :size =" 20" />
19+ </a >
1220 <MemberPicker
1321 :show-current =" true"
1422 :circle-id =" collective.circleId"
2129
2230<script >
2331import { t } from ' @nextcloud/l10n'
32+ import { generateUrl } from ' @nextcloud/router'
2433import { mapActions , mapState } from ' pinia'
2534import NcDialog from ' @nextcloud/vue/components/NcDialog'
35+ import OpenInNewIcon from ' vue-material-design-icons/OpenInNew.vue'
2636import MemberPicker from ' ../Member/MemberPicker.vue'
2737import { autocompleteSourcesToCircleMemberTypes , circlesMemberTypes } from ' ../../constants.js'
2838import { useCirclesStore } from ' ../../stores/circles.js'
2939import { useCollectivesStore } from ' ../../stores/collectives.js'
40+ import { useRootStore } from ' ../../stores/root.js'
3041
3142export default {
3243 name: ' CollectiveMembersModal' ,
3344
3445 components: {
3546 MemberPicker,
3647 NcDialog,
48+ OpenInNewIcon,
3749 },
3850
3951 props: {
@@ -46,10 +58,23 @@ export default {
4658 computed: {
4759 ... mapState (useCirclesStore, [' circleMembersSorted' ]),
4860 ... mapState (useCollectivesStore, [' isCollectiveAdmin' ]),
61+ ... mapState (useRootStore, [' isPublic' ]),
4962
5063 currentUserIsAdmin () {
5164 return this .isCollectiveAdmin (this .collective )
5265 },
66+
67+ teamUrl () {
68+ return generateUrl (' /apps/contacts/circle/{teamId}' , { teamId: this .collective .circleId })
69+ },
70+
71+ hasContactsApp () {
72+ return ' contacts' in window .OC .appswebroots
73+ },
74+
75+ showTeamLink () {
76+ return this .hasContactsApp && ! this .isPublic
77+ },
5378 },
5479
5580 beforeMount () {
@@ -82,9 +107,35 @@ export default {
82107 </script >
83108
84109<style lang="scss" scoped>
110+ :deep(.modal-container__content ) {
111+ position : relative ;
112+ }
113+
85114.modal-collective-members {
86115 height : 550px ;
87116 max-height : 80vh ;
88117 padding-bottom : 12px ;
89118}
119+
120+ .team-link {
121+ position : absolute ;
122+ top : 0 ;
123+ right : 12px ;
124+ display : flex ;
125+ align-items : center ;
126+ height : var (--default-clickable-area );
127+ color : var (--color-text-maxcontrast );
128+ text-decoration : none ;
129+
130+ & :hover ,
131+ & :focus-visible {
132+ color : var (--color-primary-element );
133+ transition : color var (--animation-quick ) ease ;
134+ }
135+
136+ & :focus-visible {
137+ outline : 2px solid var (--color-main-text );
138+ border-radius : var (--border-radius-small );
139+ }
140+ }
90141 </style >
0 commit comments