summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard Steinmetz <richard@steinmetz.cloud>2022-07-15 13:15:08 +0200
committerRichard Steinmetz <richard@steinmetz.cloud>2022-07-15 13:15:08 +0200
commit3326a8a1e99d9f8a3a90ef80efe9a456714c4f61 (patch)
tree1b36384eff0a877266ad9fd02af1e88a016e766f /src
parent6e010da59cda7dcdfd121e560e38d1011d021dcc (diff)
Remove dead contact photo modal
The modal could not be opened/reached because the trigger was inside the modal. Unfortunately, this can't be fixed right now because the avatar component does not expose a click event and can't be wrapped in a div without destroying its styling. Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
Diffstat (limited to 'src')
-rw-r--r--src/components/ContactDetails/ContactDetailsAvatar.vue67
1 files changed, 0 insertions, 67 deletions
diff --git a/src/components/ContactDetails/ContactDetailsAvatar.vue b/src/components/ContactDetails/ContactDetailsAvatar.vue
index 9411fb70..a16e70a8 100644
--- a/src/components/ContactDetails/ContactDetailsAvatar.vue
+++ b/src/components/ContactDetails/ContactDetailsAvatar.vue
@@ -40,7 +40,6 @@
:url="photoUrl"
class="contact-header-avatar__photo" />
- <!-- attention, this menu exists twice in this file -->
<Actions
v-if="!isReadOnly || contact.photo"
:force-menu="true"
@@ -83,66 +82,11 @@
</ActionButton>
</template>
</Actions>
-
- <!-- Big picture display modal -->
- <Modal v-if="maximizeAvatar"
- ref="modal"
- :clear-view-delay="-1"
- class="contact-header-modal"
- size="large"
- :title="contact.displayName"
- @close="toggleModal">
- <!-- attention, this menu exists twice in this file -->
- <template #actions>
- <template v-if="!isReadOnly">
- <ActionButton
- icon="icon-upload"
- @click="selectFileInput">
- {{ t('contacts', 'Upload a new picture') }}
- </ActionButton>
- <ActionButton
- icon="icon-folder"
- @click="selectFilePicker">
- {{ t('contacts', 'Choose from Files') }}
- </ActionButton>
- <ActionButton
- v-for="network in supportedSocial"
- :key="network"
- :icon="'icon-' + network.toLowerCase()"
- @click="getSocialAvatar(network)">
- {{ t('contacts', 'Get from ' + network) }}
- </ActionButton>
- </template>
-
- <!-- FIXME: the link seems to have a bigger font size than the button caption -->
- <ActionLink
- v-if="contact.photo"
- :href="`${contact.url}?photo`"
- icon="icon-download"
- target="_blank">
- {{ t('contacts', 'Download picture') }}
- </ActionLink>
- <ActionButton
- v-if="!isReadOnly && contact.photo"
- icon="icon-delete"
- @click="removePhoto">
- {{ t('contacts', 'Delete picture') }}
- </ActionButton>
- </template>
-
- <div class="contact-header-modal__photo-wrapper"
- @click.exact.self="toggleModal">
- <img ref="img"
- :src="photoUrl"
- class="contact-header-modal__photo">
- </div>
- </Modal>
</div>
</template>
<script>
import Avatar from '@nextcloud/vue/dist/Components/Avatar'
-import Modal from '@nextcloud/vue/dist/Components/Modal'
import Actions from '@nextcloud/vue/dist/Components/Actions'
import ActionButton from '@nextcloud/vue/dist/Components/ActionButton'
import ActionLink from '@nextcloud/vue/dist/Components/ActionLink'
@@ -165,7 +109,6 @@ export default {
ActionLink,
Actions,
Avatar,
- Modal,
},
props: {
@@ -177,7 +120,6 @@ export default {
data() {
return {
- maximizeAvatar: false,
opened: false,
loading: false,
photoUrl: undefined,
@@ -377,18 +319,9 @@ export default {
},
/**
- * Toggle the full image preview
- */
- toggleModal() {
- // maximise or minimise avatar photo
- this.maximizeAvatar = !this.maximizeAvatar
- },
-
- /**
* Remove the contact's picture
*/
removePhoto() {
- this.maximizeAvatar = false
this.contact.vCard.removeAllProperties('photo')
this.$store.dispatch('updateContact', this.contact)
},