From 551b8f3690bab1f53ec22ccf6963009a30fa45d0 Mon Sep 17 00:00:00 2001 From: Tusooa Zhu Date: Mon, 7 Mar 2022 20:02:53 -0500 Subject: Fix "max depth in thread" setting --- .../settings_modal/helpers/integer_setting.js | 37 ++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 src/components/settings_modal/helpers/integer_setting.js (limited to 'src/components/settings_modal/helpers/integer_setting.js') diff --git a/src/components/settings_modal/helpers/integer_setting.js b/src/components/settings_modal/helpers/integer_setting.js new file mode 100644 index 00000000..fa6569ab --- /dev/null +++ b/src/components/settings_modal/helpers/integer_setting.js @@ -0,0 +1,37 @@ +import { get, set } from 'lodash' +import ModifiedIndicator from './modified_indicator.vue' +export default { + components: { + ModifiedIndicator + }, + props: { + path: String, + disabled: Boolean, + min: Number + }, + computed: { + pathDefault () { + const [firstSegment, ...rest] = this.path.split('.') + return [firstSegment + 'DefaultValue', ...rest].join('.') + }, + state () { + const value = get(this.$parent, this.path) + if (value === undefined) { + return this.defaultState + } else { + return value + } + }, + defaultState () { + return get(this.$parent, this.pathDefault) + }, + isChanged () { + return this.state !== this.defaultState + } + }, + methods: { + update (e) { + set(this.$parent, this.path, parseInt(e.target.value)) + } + } +} -- cgit v1.2.3-70-g09d2 From 650e69c33683b34e002f5fdc698ceb384baf059b Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Tue, 29 Mar 2022 00:02:02 +0300 Subject: fix misc warnings --- src/components/notification/notification.vue | 2 +- src/components/poll/poll.vue | 2 +- src/components/settings_modal/helpers/integer_setting.js | 2 +- src/components/settings_modal/tabs/theme_tab/theme_tab.vue | 6 +++--- src/components/shadow_control/shadow_control.vue | 2 +- src/components/thread_tree/thread_tree.vue | 4 ++-- 6 files changed, 9 insertions(+), 9 deletions(-) (limited to 'src/components/settings_modal/helpers/integer_setting.js') diff --git a/src/components/notification/notification.vue b/src/components/notification/notification.vue index 23157a51..d77b2f57 100644 --- a/src/components/notification/notification.vue +++ b/src/components/notification/notification.vue @@ -112,7 +112,7 @@ - + {{ notification.emoji }} diff --git a/src/components/poll/poll.vue b/src/components/poll/poll.vue index e949c653..c3880096 100644 --- a/src/components/poll/poll.vue +++ b/src/components/poll/poll.vue @@ -71,7 +71,7 @@ {{ $tc("polls.votes_count", poll.votes_count, { count: poll.votes_count }) }} ยท  - +
- filter: drop-shadow()

{{ $t('settings.style.shadows.filter_hint.avatar_inset') }}

- @@ -966,7 +966,7 @@ spread-radius inset - diff --git a/src/components/shadow_control/shadow_control.vue b/src/components/shadow_control/shadow_control.vue index b59ac3bc..d1e5fc22 100644 --- a/src/components/shadow_control/shadow_control.vue +++ b/src/components/shadow_control/shadow_control.vue @@ -204,7 +204,7 @@ v-model="selected.alpha" :disabled="!present" /> - diff --git a/src/components/thread_tree/thread_tree.vue b/src/components/thread_tree/thread_tree.vue index 48942005..f81653eb 100644 --- a/src/components/thread_tree/thread_tree.vue +++ b/src/components/thread_tree/thread_tree.vue @@ -74,7 +74,7 @@ v-if="currentReplies.length && !threadShowing" class="thread-tree-replies thread-tree-replies-hidden" > - -