Skip to content

Commit

Permalink
Merge pull request #3767 from nextcloud/backport/3760/stable5.5
Browse files Browse the repository at this point in the history
[stable5.5] Remove empty content when at least one related resrouce exists.
  • Loading branch information
st3iny authored Jan 3, 2024
2 parents 3f6471d + 67e74f9 commit 9d4b431
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions src/components/ContactDetails.vue
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@
:header="t('contacts', 'Media shares with you')"
:item-id="contact.uid"
:primary="true"
@has-resources="value => hasRelatedResources = value"
@has-resources="value => hasFilesResources = value"
@has-error="value => filesPanelHasError = value" />
<NcRelatedResourcesPanel v-if="!talkPanelHasError"
provider-id="account"
Expand All @@ -328,7 +328,7 @@
:header="t('contacts', 'Talk conversations with you')"
:item-id="contact.uid"
:primary="true"
@has-resources="value => hasRelatedResources = value"
@has-resources="value => hasTalkResources = value"
@has-error="value => talkPanelHasError = value" />
<NcRelatedResourcesPanel v-if="!calendarPanelHasError"
provider-id="account"
Expand All @@ -338,7 +338,7 @@
:header="t('contacts', 'Calendar events with you')"
:item-id="contact.uid"
:primary="true"
@has-resources="value => hasRelatedResources = value"
@has-resources="value => hasCalendarResources = value"
@has-error="value => calendarPanelHasError = value" />
<NcRelatedResourcesPanel v-if="!deckPanelHasError"
provider-id="account"
Expand All @@ -348,7 +348,7 @@
:header="t('contacts', 'Deck cards with you')"
:item-id="contact.uid"
:primary="true"
@has-resources="value => hasRelatedResources = value"
@has-resources="value => hasDeckResources = value"
@has-error="value => deckPanelHasError = value" />
<NcEmptyContent v-if="!hasRelatedResources && !loadingData"
:name="t('contacts', 'No shared items with this contact')">
Expand Down Expand Up @@ -504,7 +504,10 @@ export default {
showMenuPopover: false,
profileEnabled,
isTalkEnabled,
hasRelatedResources: false,
hasFilesResources: false,
hasTalkResources: false,
hasCalendarResources: false,
hasDeckResources: false,
deckPanelHasError: false,
filesPanelHasError: false,
talkPanelHasError: false,
Expand All @@ -514,6 +517,9 @@ export default {
},

computed: {
hasRelatedResources() {
return this.hasFilesResources || this.hasTalkResources || this.hasCalendarResources || this.hasDeckResources
},
/**
* The address book is read-only (e.g. shared with me).
*
Expand Down

0 comments on commit 9d4b431

Please sign in to comment.