summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnna Aurora <anna@annaaurora.eu>2023-08-15 13:43:42 +0200
committerAnna Aurora <anna@annaaurora.eu>2023-08-15 16:27:16 +0200
commit0060cce13690fbbd6559c9a9502b401a6e9153cf (patch)
tree0cfc1e8f0a4d0c4a850aa2a31ab91cd6489c1a2d
parentb56e5cc31b5a7168a9a7534b4ef9cab76a5daa46 (diff)
Made contact image action menu only display in edit mode
Signed-off-by: Anna Aurora <anna@annaaurora.eu>
-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>