From c57af7e242ac4294f15738cbf723abd6e3fc8a6c Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Mon, 28 Mar 2022 17:13:48 +0300 Subject: [PATCH 1/7] remove some warnings --- src/boot/after_store.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/boot/after_store.js b/src/boot/after_store.js index 91a13174e..87448c8c1 100644 --- a/src/boot/after_store.js +++ b/src/boot/after_store.js @@ -17,6 +17,7 @@ import FaviconService from '../services/favicon_service/favicon_service.js' // disable compat for certain features configureCompat({ + ATTR_FALSE_VALUE: false, COMPONENT_V_MODEL: false, INSTANCE_SET: false, RENDER_FUNCTION: false From bdd240a2308ee729680a7e9d0cf7d801dfdbe4cc Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Mon, 28 Mar 2022 17:21:42 +0300 Subject: [PATCH 2/7] fix some more warnings --- src/components/timeline/timeline.js | 4 ++-- src/directives/body_scroll_lock.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/timeline/timeline.js b/src/components/timeline/timeline.js index 6ede1dc52..8ec5d1e5e 100644 --- a/src/components/timeline/timeline.js +++ b/src/components/timeline/timeline.js @@ -43,8 +43,8 @@ const Timeline = { filteredVisibleStatuses () { return this.timeline.visibleStatuses.filter(status => this.timelineName !== 'user' || (status.id >= this.timeline.minId && status.id <= this.timeline.maxId)) }, - filteredPinnedStatusesId () { - return this.pinnedStatusIds.filter(statusId => this.timeline.statusesObject[statusId]) + filteredPinnedStatusIds () { + return (this.pinnedStatusIds || []).filter(statusId => this.timeline.statusesObject[statusId]) }, newStatusCount () { return this.timeline.newStatusCount diff --git a/src/directives/body_scroll_lock.js b/src/directives/body_scroll_lock.js index 13a6de1c7..f5cc22472 100644 --- a/src/directives/body_scroll_lock.js +++ b/src/directives/body_scroll_lock.js @@ -50,7 +50,7 @@ const enableBodyScroll = (el) => { } const directive = { - inserted: (el, binding) => { + mounted: (el, binding) => { if (binding.value) { disableBodyScroll(el) } From 4b630c3c36518853489009c27602bdae392b4c94 Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Mon, 28 Mar 2022 17:37:26 +0300 Subject: [PATCH 3/7] fix warnings --- src/components/status/status.js | 4 ++-- src/components/status_content/status_content.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/status/status.js b/src/components/status/status.js index 088ddcc5e..ee0da4dc7 100644 --- a/src/components/status/status.js +++ b/src/components/status/status.js @@ -69,7 +69,7 @@ const controlledOrUncontrolledGetters = list => list.reduce((res, name) => { const controlledName = `controlled${camelized}` const uncontrolledName = `uncontrolled${camelized}` res[name] = function () { - return this[toggle] ? this[controlledName] : this[uncontrolledName] + return (Object.getOwnPropertyDescriptor(this, toggle) && this[toggle]) ? this[controlledName] : this[uncontrolledName] } return res }, {}) @@ -311,7 +311,7 @@ const Status = { return this.mergedConfig.hideWordFilteredPosts }, hideStatus () { - return (this.virtualHidden || !this.shouldNotMute) && ( + return (!this.shouldNotMute) && ( (this.muted && this.hideFilteredStatuses) || (this.userIsMuted && this.hideMutedUsers) || (this.status.thread_muted && this.hideMutedThreads) || diff --git a/src/components/status_content/status_content.js b/src/components/status_content/status_content.js index cf72ccb84..0200382bf 100644 --- a/src/components/status_content/status_content.js +++ b/src/components/status_content/status_content.js @@ -31,7 +31,7 @@ const controlledOrUncontrolledGetters = list => list.reduce((res, name) => { const controlledName = `controlled${camelized}` const uncontrolledName = `uncontrolled${camelized}` res[name] = function () { - return this[toggle] ? this[controlledName] : this[uncontrolledName] + return (Object.getOwnPropertyDescriptor(this, toggle) && this[toggle]) ? this[controlledName] : this[uncontrolledName] } return res }, {}) From 7b10e47b21d4bd130d5d44f394e4836548899fd9 Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Mon, 28 Mar 2022 23:54:30 +0300 Subject: [PATCH 4/7] rename some binding hooks according to new names --- src/directives/body_scroll_lock.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/directives/body_scroll_lock.js b/src/directives/body_scroll_lock.js index f5cc22472..b6d167902 100644 --- a/src/directives/body_scroll_lock.js +++ b/src/directives/body_scroll_lock.js @@ -55,7 +55,7 @@ const directive = { disableBodyScroll(el) } }, - componentUpdated: (el, binding) => { + updated: (el, binding) => { if (binding.oldValue === binding.value) { return } @@ -66,7 +66,7 @@ const directive = { enableBodyScroll(el) } }, - unbind: (el) => { + unmounted: (el) => { enableBodyScroll(el) } } From 9afbb12f956434f0426a00d311406ddd8348c892 Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Mon, 28 Mar 2022 23:55:11 +0300 Subject: [PATCH 5/7] fix opacity control again --- src/components/opacity_input/opacity_input.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/opacity_input/opacity_input.vue b/src/components/opacity_input/opacity_input.vue index c5142df0a..83bc917d3 100644 --- a/src/components/opacity_input/opacity_input.vue +++ b/src/components/opacity_input/opacity_input.vue @@ -20,7 +20,7 @@ :id="name" class="input-number" type="number" - :value="value || fallback" + :value="modelValue || fallback" :disabled="!present || disabled" max="1" min="0" From f21dc21a83cbcf4c502b8fbf56cabac797a0b9da Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Mon, 28 Mar 2022 23:55:26 +0300 Subject: [PATCH 6/7] properly implement resettableAsyncComponent --- .../async_component_error.vue | 1 + .../settings_modal/settings_modal.js | 4 ++-- src/services/resettable_async_component.js | 23 ++++++++----------- 3 files changed, 13 insertions(+), 15 deletions(-) diff --git a/src/components/async_component_error/async_component_error.vue b/src/components/async_component_error/async_component_error.vue index b1b59638d..26ab5d21c 100644 --- a/src/components/async_component_error/async_component_error.vue +++ b/src/components/async_component_error/async_component_error.vue @@ -19,6 +19,7 @@