From f6b7dc45acd690225b92ceed8dc688263cae8958 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Molakvo=C3=A6=20=28skjnldsv=29?= Date: Thu, 16 May 2019 17:04:43 +0200 Subject: Fix avatar errors, and migrate settings menu to Actions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: John Molakvoæ (skjnldsv) --- css/ContactDetailsAvatar.scss | 2 +- package-lock.json | 10 +- package.json | 2 +- .../ContactDetails/ContactDetailsAvatar.vue | 6 +- src/components/Settings/SettingsAddressbook.vue | 240 +++++++++++---------- webpack.common.js | 2 +- 6 files changed, 133 insertions(+), 129 deletions(-) diff --git a/css/ContactDetailsAvatar.scss b/css/ContactDetailsAvatar.scss index f86c1709..6ec6cfe8 100644 --- a/css/ContactDetailsAvatar.scss +++ b/css/ContactDetailsAvatar.scss @@ -76,7 +76,7 @@ &__popovermenu { // center margin: calc((100% - 44px) / 2); - & /deep/ .action-item__menutoggle { + & .action-item__menutoggle { // hide three dot menu, in favour of icon-picture-force-white z-index: -1; &::before { diff --git a/package-lock.json b/package-lock.json index 67eed9d2..28987fff 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2319,8 +2319,8 @@ "dev": true }, "cdav-library": { - "version": "github:nextcloud/cdav-library#18b38778637386424dff1acf7f9a41b4ca757721", - "from": "github:nextcloud/cdav-library#18b38778637386424dff1acf7f9a41b4ca757721", + "version": "github:nextcloud/cdav-library#3e3fae357ccbc427d6e44df9cd572285caa71d9c", + "from": "github:nextcloud/cdav-library", "requires": { "@babel/polyfill": "^7.4.4" } @@ -7015,9 +7015,9 @@ } }, "nextcloud-vue": { - "version": "0.11.1", - "resolved": "https://registry.npmjs.org/nextcloud-vue/-/nextcloud-vue-0.11.1.tgz", - "integrity": "sha512-gQnAyTyIjgSOPMLrTMfmVldjwP3lz+xWU6gynDj3InGl4EgjoRp+7fQfgvanPAoDJWLHYh/cmxm4O9AaVZCSSg==", + "version": "0.11.2", + "resolved": "https://registry.npmjs.org/nextcloud-vue/-/nextcloud-vue-0.11.2.tgz", + "integrity": "sha512-N65Wi+J5sI8dh8RnZxBFvePiyeeMhOXlkc8A2v3vsurpiIIQQyt8VHVjYo1FKfGUhvTWG1HQog8FERimZucJlQ==", "requires": { "hammerjs": "^2.0.8", "md5": "^2.2.1", diff --git a/package.json b/package.json index 436bd2e2..92006aaf 100644 --- a/package.json +++ b/package.json @@ -42,7 +42,7 @@ "ical.js": "^1.3.0", "moment": "^2.24.0", "nextcloud-server": "^0.15.9", - "nextcloud-vue": "^0.11.1", + "nextcloud-vue": "^0.11.2", "p-limit": "^2.2.0", "p-queue": "^5.0.0", "qr-image": "^3.2.0", diff --git a/src/components/ContactDetails/ContactDetailsAvatar.vue b/src/components/ContactDetails/ContactDetailsAvatar.vue index fb54cd89..cbccfdc9 100644 --- a/src/components/ContactDetails/ContactDetailsAvatar.vue +++ b/src/components/ContactDetails/ContactDetailsAvatar.vue @@ -108,8 +108,8 @@ export default { }, computed: { photo() { - const type = this.contact.vCard.getFirstProperty('photo').type - if (!this.contact.photo.startsWith('data') && type === 'binary') { + const photo = this.contact.vCard.getFirstProperty('photo') + if (photo && !this.contact.photo.startsWith('data') && photo.type === 'binary') { // split on coma in case of any leftover base64 data and retrieve last part // usually we come to this part when the base64 image type is unknown return `data:image;base64,${this.contact.photo.split(',').pop()}` @@ -242,7 +242,7 @@ export default { }, updateImgSize() { - if (this.contact.photo) { + if (this.contact.photo && this.$refs.img) { this.updateHeightWidth(this.$refs.img.naturalHeight, this.$refs.img.naturalWidth) } }, diff --git a/src/components/Settings/SettingsAddressbook.vue b/src/components/Settings/SettingsAddressbook.vue index e831b387..9e39cb8f 100644 --- a/src/components/Settings/SettingsAddressbook.vue +++ b/src/components/Settings/SettingsAddressbook.vue @@ -34,12 +34,55 @@ class="addressbook__share icon-shared" @click="toggleShare" /> - -
-
- -
-
+ + + + {{ copyButtonText }} + + + + + {{ t('contacts', 'Download') }} + + + + + + + {{ t('contacts', 'Delete') }} + + @@ -47,13 +90,18 @@