diff options
author | Richard Steinmetz <richard@steinmetz.cloud> | 2023-08-15 20:28:17 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-15 20:28:17 +0200 |
commit | e0083a8cac5fab0f95de0e3fca3c14a9975b38b0 (patch) | |
tree | 7aa57fb8d2c7d5525a7ac102466f57dd5359f89d | |
parent | 4e9e671621557bf335c4b5323860ce2c5b7720d2 (diff) | |
parent | 0060cce13690fbbd6559c9a9502b401a6e9153cf (diff) |
Merge pull request #3567 from nextcloud/fix/3369/only-show-contact-image-action-menu-in-edit-mode
Made contact image action menu only display in edit mode
-rw-r--r-- | src/components/ContactDetails/ContactDetailsAvatar.vue | 47 |
1 files changed, 22 insertions, 25 deletions
diff --git a/src/components/ContactDetails/ContactDetailsAvatar.vue b/src/components/ContactDetails/ContactDetailsAvatar.vue index 20816310..9b520bba 100644 --- a/src/components/ContactDetails/ContactDetailsAvatar.vue +++ b/src/components/ContactDetails/ContactDetailsAvatar.vue @@ -58,35 +58,33 @@ </div> </NcModal> - <Actions v-if="!isReadOnly || contact.photo" + <Actions v-if="!isReadOnly" :force-menu="true" :open.sync="opened" class="contact-header-avatar__menu"> <template #icon> <IconImage :size="20" fill-color="#fff" /> </template> - <template v-if="!isReadOnly"> - <ActionButton @click.stop.prevent="selectFileInput"> - <template #icon> - <IconUpload :size="20" /> - </template> - {{ t('contacts', 'Upload a new picture') }} - </ActionButton> - <ActionButton @click="selectFilePicker"> - <template #icon> - <IconFolder :size="20" /> - </template> - {{ t('contacts', 'Choose from Files') }} - </ActionButton> - <ActionButton v-for="network in supportedSocial" - :key="network" - @click="getSocialAvatar(network)"> - <template #icon> - <IconCloudDownload :size="20" /> - </template> - {{ t('contacts', 'Get from ' + network) }} - </ActionButton> - </template> + <ActionButton @click.stop.prevent="selectFileInput"> + <template #icon> + <IconUpload :size="20" /> + </template> + {{ t('contacts', 'Upload a new picture') }} + </ActionButton> + <ActionButton @click="selectFilePicker"> + <template #icon> + <IconFolder :size="20" /> + </template> + {{ t('contacts', 'Choose from Files') }} + </ActionButton> + <ActionButton v-for="network in supportedSocial" + :key="network" + @click="getSocialAvatar(network)"> + <template #icon> + <IconCloudDownload :size="20" /> + </template> + {{ t('contacts', 'Get from ' + network) }} + </ActionButton> <template v-if="contact.photo"> <!-- FIXME: the link seems to have a bigger font size than the button caption --> @@ -97,8 +95,7 @@ </template> {{ t('contacts', 'Download picture') }} </ActionLink> - <ActionButton v-if="!isReadOnly" - @click="removePhoto"> + <ActionButton @click="removePhoto"> <template #icon> <IconDelete :size="20" /> </template> |