@@ -12,16 +12,19 @@ import { t } from '@nextcloud/l10n'
1212import { computed } from ' vue'
1313import { useRoute } from ' vue-router'
1414import NcButton from ' @nextcloud/vue/components/NcButton'
15+ import NcChip from ' @nextcloud/vue/components/NcChip'
1516import NcLoadingIcon from ' @nextcloud/vue/components/NcLoadingIcon'
1617import AppActions from ' ../AppActions.vue'
1718import AppIcon from ' ../AppIcon.vue'
1819import BadgeAppDaemon from ' ../BadgeAppDaemon.vue'
1920import BadgeAppLevel from ' ../BadgeAppLevel.vue'
2021import { useActions } from ' ../../composables/useActions.ts'
22+ import { useLimitedGroups } from ' ../../composables/useLimitedGroups.ts'
2123
2224const { app, isNarrow } = defineProps <{
2325 app: IAppstoreApp | IAppstoreExApp
2426 isNarrow? : boolean
27+ isWide? : boolean
2528}>()
2629
2730const route = useRoute ()
@@ -46,6 +49,7 @@ const detailsAction = computed<AppAction>(() => ({
4649 inline: false ,
4750}))
4851
52+ const groupsAppIsLimitedTo = useLimitedGroups (() => app )
4953const rawActions = useActions (() => app )
5054const actions = computed (() => [
5155 ... rawActions .value ,
@@ -80,6 +84,21 @@ const actions = computed(() => [
8084 <BadgeAppDaemon v-if =" 'daemon' in app && app.daemon" :daemon =" app.daemon" />
8185 </div >
8286 </td >
87+ <td v-if =" isWide" >
88+ <ul
89+ v-if =" groupsAppIsLimitedTo.length > 0"
90+ :class =" $style.appTableRow__groupsCell"
91+ :title =" groupsAppIsLimitedTo.map((group) => group.displayName).join(', ')" >
92+ <template v-for =" group , index in groupsAppIsLimitedTo " :key =" group .id " >
93+ <li v-if =" index === 3" aria-hidden =" true" >
94+ …
95+ </li >
96+ <li :class =" { 'hidden-visually': index > 2 }" >
97+ <NcChip :text =" group.displayName" noClose />
98+ </li >
99+ </template >
100+ </ul >
101+ </td >
83102 <td >
84103 <div :class =" $style.appTableRow__actionsCell" >
85104 <AppActions
@@ -117,6 +136,11 @@ const actions = computed(() => [
117136 color : var (--color-text-maxcontrast );
118137}
119138
139+ .appTableRow__groupsCell {
140+ display : flex ;
141+ gap : var (--default-grid-baseline );
142+ }
143+
120144.appTableRow__actionsCell {
121145 display : flex ;
122146 gap : var (--default-grid-baseline );
0 commit comments