summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard Steinmetz <richard@steinmetz.cloud>2023-08-15 20:28:17 +0200
committerGitHub <noreply@github.com>2023-08-15 20:28:17 +0200
commite0083a8cac5fab0f95de0e3fca3c14a9975b38b0 (patch)
tree7aa57fb8d2c7d5525a7ac102466f57dd5359f89d /src
parent4e9e671621557bf335c4b5323860ce2c5b7720d2 (diff)
parent0060cce13690fbbd6559c9a9502b401a6e9153cf (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
Diffstat (limited to 'src')
-rw-r--r--src/components/ContactDetails/ContactDetailsAvatar.vue47
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>