Skip to content

Commit

Permalink
improve team Overview button on mobile
Browse files Browse the repository at this point in the history
Signed-off-by: grnd-alt <salimbelakkaf@outlook.de>
  • Loading branch information
grnd-alt committed Mar 25, 2024
1 parent 9a747fd commit d17a27e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 deletions.
16 changes: 12 additions & 4 deletions src/components/Page/LandingPageWidgets.vue
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<template>
<div class="landing-page-widgets">
<div class="first-row-widgets">
<MembersWidget v-if="!isPublic" :current-collective="currentCollective" />
<NcButton v-if="'contacts' in OC.appswebroots" :href="teamUrl">
<MembersWidget v-if="!isPublic" />
<NcButton v-if="hasContactsApp" :href="teamUrl">
<template #icon>
<TeamsIcon :size="20" />
</template>
<template #default>
<template v-if="!isMobile" #default>
{{ t('collectives','Team Overview') }}
</template>
</NcButton>
Expand All @@ -22,6 +22,7 @@ import RecentPagesWidget from './LandingPageWidgets/RecentPagesWidget.vue'
import NcButton from '@nextcloud/vue/dist/Components/NcButton.js'
import TeamsIcon from '../Icon/TeamsIcon.vue'
import { generateUrl } from '@nextcloud/router'
import isMobile from '@nextcloud/vue/dist/Mixins/isMobile.js'
export default {
name: 'LandingPageWidgets',
Expand All @@ -33,6 +34,10 @@ export default {
TeamsIcon,
},
mixins: [
isMobile,
],
computed: {
...mapGetters([
'isPublic',
Expand All @@ -41,13 +46,16 @@ export default {
teamUrl() {
return generateUrl('/apps/contacts/circle/{teamId}', { teamId: this.currentCollective.circleId })
},
hasContactsApp() {
return 'contacts' in this.OC.appswebroots
},
},
}
</script>

<style scoped>
.landing-page-widgets {
padding-left: 12px;
padding-inline: 12px;
}
.first-row-widgets{
display: flex;
Expand Down
7 changes: 1 addition & 6 deletions src/components/Page/LandingPageWidgets/MembersWidget.vue
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,6 @@ export default {
NcButton,
SkeletonLoading,
},
props: {
currentCollective: {
type: Object,
required: true,
},
},
data() {
return {
Expand All @@ -61,6 +55,7 @@ export default {
...mapGetters([
'circleMembersSorted',
'circleMemberType',
'currentCollective',
'recentPagesUserIds',
]),
Expand Down

0 comments on commit d17a27e

Please sign in to comment.