diff options
| author | tusooa <tusooa@kazv.moe> | 2023-01-15 10:00:44 -0500 |
|---|---|---|
| committer | tusooa <tusooa@kazv.moe> | 2023-01-15 10:00:44 -0500 |
| commit | d2ba67d565ba68acc1938dc9ae2c866a6e39d4d6 (patch) | |
| tree | 1dad722edc84b5ba1759a13e1944167c5ffcf7c3 /src/components/settings_modal/tabs | |
| parent | a28032fa58ff341b8815a0651d621ed358efd168 (diff) | |
| parent | 4d2056d8aaa8f2c20a3275503857d38ac9112e5f (diff) | |
Merge remote-tracking branch 'upstream/develop' into tusooa/stylelint
Diffstat (limited to 'src/components/settings_modal/tabs')
| -rw-r--r-- | src/components/settings_modal/tabs/filtering_tab.js | 9 | ||||
| -rw-r--r-- | src/components/settings_modal/tabs/profile_tab.js | 2 |
2 files changed, 8 insertions, 3 deletions
diff --git a/src/components/settings_modal/tabs/filtering_tab.js b/src/components/settings_modal/tabs/filtering_tab.js index 5354e5db..7c37f0bc 100644 --- a/src/components/settings_modal/tabs/filtering_tab.js +++ b/src/components/settings_modal/tabs/filtering_tab.js @@ -1,4 +1,4 @@ -import { filter, trim } from 'lodash' +import { filter, trim, debounce } from 'lodash' import BooleanSetting from '../helpers/boolean_setting.vue' import ChoiceSetting from '../helpers/choice_setting.vue' import IntegerSetting from '../helpers/integer_setting.vue' @@ -29,11 +29,16 @@ const FilteringTab = { }, set (value) { this.muteWordsStringLocal = value + this.debouncedSetMuteWords(value) + } + }, + debouncedSetMuteWords () { + return debounce((value) => { this.$store.dispatch('setOption', { name: 'muteWords', value: filter(value.split('\n'), (word) => trim(word).length > 0) }) - } + }, 1000) } }, // Updating nested properties diff --git a/src/components/settings_modal/tabs/profile_tab.js b/src/components/settings_modal/tabs/profile_tab.js index b86faef0..ff2ccef2 100644 --- a/src/components/settings_modal/tabs/profile_tab.js +++ b/src/components/settings_modal/tabs/profile_tab.js @@ -153,7 +153,7 @@ const ProfileTab = { return false }, deleteField (index, event) { - this.$delete(this.newFields, index) + this.newFields.splice(index, 1) }, uploadFile (slot, e) { const file = e.target.files[0] |
