Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/contacts.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/ContactDetails/ContactDetailsAvatar.vue')
-rw-r--r--src/components/ContactDetails/ContactDetailsAvatar.vue41
1 files changed, 17 insertions, 24 deletions
diff --git a/src/components/ContactDetails/ContactDetailsAvatar.vue b/src/components/ContactDetails/ContactDetailsAvatar.vue
index 65a7cca0..3c52182c 100644
--- a/src/components/ContactDetails/ContactDetailsAvatar.vue
+++ b/src/components/ContactDetails/ContactDetailsAvatar.vue
@@ -32,16 +32,14 @@
@change="processFile">
<!-- Avatar display -->
- <Avatar
- :disable-tooltip="true"
+ <Avatar :disable-tooltip="true"
:display-name="contact.displayName"
:is-no-user="true"
:size="75"
:url="photoUrl"
class="contact-header-avatar__photo" />
- <Actions
- v-if="!isReadOnly || contact.photo"
+ <Actions v-if="!isReadOnly || contact.photo"
:force-menu="true"
:open.sync="opened"
class="contact-header-avatar__menu">
@@ -49,22 +47,19 @@
<IconImage :size="20" fill-color="#fff" />
</template>
<template v-if="!isReadOnly">
- <ActionButton
- @click.stop.prevent="selectFileInput">
+ <ActionButton @click.stop.prevent="selectFileInput">
<template #icon>
<IconUpload :size="20" />
</template>
{{ t('contacts', 'Upload a new picture') }}
</ActionButton>
- <ActionButton
- @click="selectFilePicker">
+ <ActionButton @click="selectFilePicker">
<template #icon>
<IconFolder :size="20" />
</template>
{{ t('contacts', 'Choose from Files') }}
</ActionButton>
- <ActionButton
- v-for="network in supportedSocial"
+ <ActionButton v-for="network in supportedSocial"
:key="network"
@click="getSocialAvatar(network)">
<template #icon>
@@ -76,16 +71,14 @@
<template v-if="contact.photo">
<!-- FIXME: the link seems to have a bigger font size than the button caption -->
- <ActionLink
- :href="`${contact.url}?photo`"
+ <ActionLink :href="`${contact.url}?photo`"
target="_blank">
<template #icon>
<IconDownload :size="20" />
</template>
{{ t('contacts', 'Download picture') }}
</ActionLink>
- <ActionButton
- v-if="!isReadOnly"
+ <ActionButton v-if="!isReadOnly"
@click="removePhoto">
<template #icon>
<IconDelete :size="20" />
@@ -98,16 +91,16 @@
</template>
<script>
-import Avatar from '@nextcloud/vue/dist/Components/NcAvatar'
-import Actions from '@nextcloud/vue/dist/Components/NcActions'
-import ActionButton from '@nextcloud/vue/dist/Components/NcActionButton'
-import ActionLink from '@nextcloud/vue/dist/Components/NcActionLink'
-import IconDownload from 'vue-material-design-icons/Download'
-import IconCloudDownload from 'vue-material-design-icons/CloudDownload'
-import IconDelete from 'vue-material-design-icons/Delete'
-import IconUpload from 'vue-material-design-icons/Upload'
-import IconFolder from 'vue-material-design-icons/Folder'
-import IconImage from 'vue-material-design-icons/Image'
+import Avatar from '@nextcloud/vue/dist/Components/NcAvatar.js'
+import Actions from '@nextcloud/vue/dist/Components/NcActions.js'
+import ActionButton from '@nextcloud/vue/dist/Components/NcActionButton.js'
+import ActionLink from '@nextcloud/vue/dist/Components/NcActionLink.js'
+import IconDownload from 'vue-material-design-icons/Download.vue'
+import IconCloudDownload from 'vue-material-design-icons/CloudDownload.vue'
+import IconDelete from 'vue-material-design-icons/Delete.vue'
+import IconUpload from 'vue-material-design-icons/Upload.vue'
+import IconFolder from 'vue-material-design-icons/Folder.vue'
+import IconImage from 'vue-material-design-icons/Image.vue'
import { showError, showInfo, getFilePickerBuilder, showSuccess } from '@nextcloud/dialogs'
import { generateUrl, generateRemoteUrl } from '@nextcloud/router'