From 31bdf5481c3dafc9a2c51b851e052dee184b9a3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Raimund=20Schl=C3=BC=C3=9Fler?= Date: Tue, 31 Oct 2023 07:51:59 +0100 Subject: [PATCH] feat(NcAvatar): migrate to vue 3 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Raimund Schlüßler --- .eslintrc.js | 1 - src/components/NcAvatar/NcAvatar.vue | 4 ++-- src/components/NcListItemIcon/NcListItemIcon.vue | 9 ++++----- src/components/index.js | 2 +- styleguide.config.js | 1 - tests/unit/components/NcAvatar/NcAvatar.spec.ts | 7 ++++--- vite.config.mts | 1 - 7 files changed, 11 insertions(+), 14 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index 99b3bc3b1d..5989476b16 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -22,7 +22,6 @@ module.exports = { 'src/components/NcBreadcrumb*/*.vue', 'src/components/NcContent/*.vue', 'src/components/NcDashboard*/*.vue', - 'src/components/NcAvatar*/*.vue', 'src/components/NcHeaderMenu*/*.vue', 'src/components/NcRelatedResourcesPanel*/*.vue', 'src/components/NcRich*/**/*.vue', diff --git a/src/components/NcAvatar/NcAvatar.vue b/src/components/NcAvatar/NcAvatar.vue index b382953731..589c0cdca8 100644 --- a/src/components/NcAvatar/NcAvatar.vue +++ b/src/components/NcAvatar/NcAvatar.vue @@ -124,7 +124,7 @@ export default { v-on="hasMenu ? { click: toggleMenu, keydown: toggleMenu, - } : null"> + } : {}"> @@ -558,7 +558,7 @@ export default { } }, - beforeDestroy() { + beforeUnmount() { unsubscribe('settings:avatar:updated', this.loadAvatarUrl) unsubscribe('settings:display-name:updated', this.loadAvatarUrl) if (this.showUserStatus && this.user && !this.isNoUser) { diff --git a/src/components/NcListItemIcon/NcListItemIcon.vue b/src/components/NcListItemIcon/NcListItemIcon.vue index 77838dd6c7..dbeaf3340e 100644 --- a/src/components/NcListItemIcon/NcListItemIcon.vue +++ b/src/components/NcListItemIcon/NcListItemIcon.vue @@ -122,13 +122,13 @@ It might be used for list rendering or within the multiselect for example - + class="option__avatar" />