Skip to content

Commit

Permalink
fixup! Add shared items and events for each contact
Browse files Browse the repository at this point in the history
Signed-off-by: greta <[email protected]>
  • Loading branch information
GretaD committed Nov 6, 2023
1 parent d0cfc6f commit 48f417e
Showing 1 changed file with 40 additions and 6 deletions.
46 changes: 40 additions & 6 deletions src/components/ContactDetails.vue
Original file line number Diff line number Diff line change
Expand Up @@ -310,20 +310,42 @@
<div v-if="nextcloudVersion" class="related-resources">
<NcRelatedResourcesPanel provider-id="account"
resource-type="files"
:description="desc"
:limit="5"
:header="t('contacts', 'Recently shared items')"
:item-id="contact.uid" />
:item-id="contact.uid"
:primary="true"
@has-resources="value => hasRelatedResources = value" />
<NcRelatedResourcesPanel provider-id="account"
resource-type="talk"
:description="desc"
:limit="5"
:header="t('contacts', 'Talk conversations')"
:item-id="contact.uid" />
:item-id="contact.uid"
:primary="true"
@has-resources="value => hasRelatedResources = value" />
<NcRelatedResourcesPanel provider-id="account"
resource-type="calendar"
:header="t('contacts', 'Calendar event')"
:item-id="contact.uid" />
:description="desc"
:limit="5"
:header="t('contacts', 'Calendar events')"
:item-id="contact.uid"
:primary="true"
@has-resources="value => hasRelatedResources = value" />
<NcRelatedResourcesPanel provider-id="account"
resource-type="deck"
:description="desc"
:limit="5"
:header="t('contacts', 'Deck cards')"
:item-id="contact.uid" />
:item-id="contact.uid"
:primary="true"
@has-resources="value => hasRelatedResources = value" />
<NcEmptyContent v-if="!hasRelatedResources"
:name="t('contacts', 'No shared items with this contact')">
<template #icon>
<FolderMultipleImage :size="20" />
</template>
</NcEmptyContent>
</div>
<!-- new property select -->
<AddNewProp v-if="!isReadOnly"
Expand Down Expand Up @@ -354,6 +376,7 @@ import {
NcButton,
NcRelatedResourcesPanel,
isMobile,
NcEmptyContent,
} from '@nextcloud/vue'
import IconContact from 'vue-material-design-icons/AccountMultiple.vue'
import IconDownload from 'vue-material-design-icons/Download.vue'
Expand All @@ -368,6 +391,7 @@ import IconCopy from 'vue-material-design-icons/ContentCopy.vue'
import PencilIcon from 'vue-material-design-icons/Pencil.vue'
import CheckIcon from 'vue-material-design-icons/Check.vue'
import EyeCircleIcon from 'vue-material-design-icons/EyeCircle.vue'
import FolderMultipleImage from 'vue-material-design-icons/FolderMultipleImage.vue'

import rfcProps from '../models/rfcProps.js'
import validate from '../services/validate.js'
Expand Down Expand Up @@ -418,6 +442,8 @@ export default {
PropertySelect,
NcButton,
NcRelatedResourcesPanel,
NcEmptyContent,
FolderMultipleImage,
},

mixins: [isMobile],
Expand All @@ -435,6 +461,11 @@ export default {
type: Object,
required: true,
},
desc: {
type: String,
required: true,
default: '',
},
},

data() {
Expand Down Expand Up @@ -463,6 +494,7 @@ export default {
showMenuPopover: false,
profileEnabled,
isTalkEnabled,
hasRelatedResources: false,
}
},

Expand Down Expand Up @@ -1084,13 +1116,15 @@ section.contact-details {
display:inline-grid;
margin-top: 88px;
flex-direction: column;
margin-bottom: -30px;
}
@media only screen and (max-width: 1600px) {
.related-resources {
float: left;
display: inline-grid;
margin-left: 80px;
flex-direction: column
flex-direction: column;
margin-bottom: 0;
}
}
.last-edit {
Expand Down

0 comments on commit 48f417e

Please sign in to comment.