Skip to content

Commit

Permalink
Remove empty content overlaping related resources
Browse files Browse the repository at this point in the history
Signed-off-by: greta <[email protected]>
  • Loading branch information
GretaD authored and backportbot-nextcloud[bot] committed Jan 3, 2024
1 parent 3f6471d commit 67e74f9
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"

Check warning on line 321 in src/components/ContactDetails.vue

View check run for this annotation

Codecov / codecov/patch

src/components/ContactDetails.vue#L321

Added line #L321 was not covered by tests
@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"

Check warning on line 341 in src/components/ContactDetails.vue

View check run for this annotation

Codecov / codecov/patch

src/components/ContactDetails.vue#L341

Added line #L341 was not covered by tests
@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,

Check warning on line 508 in src/components/ContactDetails.vue

View check run for this annotation

Codecov / codecov/patch

src/components/ContactDetails.vue#L507-L508

Added lines #L507 - L508 were not covered by tests
hasCalendarResources: false,
hasDeckResources: false,

Check warning on line 510 in src/components/ContactDetails.vue

View check run for this annotation

Codecov / codecov/patch

src/components/ContactDetails.vue#L510

Added line #L510 was not covered by tests
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
},

Check warning on line 522 in src/components/ContactDetails.vue

View check run for this annotation

Codecov / codecov/patch

src/components/ContactDetails.vue#L520-L522

Added lines #L520 - L522 were not covered by tests
/**
* The address book is read-only (e.g. shared with me).
*
Expand Down

0 comments on commit 67e74f9

Please sign in to comment.