From f4276f72416ab0eb8171b843d475d31f13533a44 Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Mon, 1 Aug 2022 23:20:27 +0300 Subject: [PATCH 1/5] made quick settings into their own component, added quick view settings, added both to conversation view --- src/components/conversation/conversation.js | 6 +- src/components/conversation/conversation.vue | 8 ++ .../quick_filter_settings.js} | 7 +- .../quick_filter_settings.vue} | 18 ++-- .../quick_view_settings.js | 69 +++++++++++++ .../quick_view_settings.vue | 96 +++++++++++++++++++ src/components/timeline/timeline.js | 6 +- src/components/timeline/timeline.vue | 3 +- src/i18n/en.json | 7 +- 9 files changed, 203 insertions(+), 17 deletions(-) rename src/components/{timeline/timeline_quick_settings.js => quick_filter_settings/quick_filter_settings.js} (94%) rename src/components/{timeline/timeline_quick_settings.vue => quick_filter_settings/quick_filter_settings.vue} (87%) create mode 100644 src/components/quick_view_settings/quick_view_settings.js create mode 100644 src/components/quick_view_settings/quick_view_settings.vue diff --git a/src/components/conversation/conversation.js b/src/components/conversation/conversation.js index 3b540cac..712e2a2c 100644 --- a/src/components/conversation/conversation.js +++ b/src/components/conversation/conversation.js @@ -1,6 +1,8 @@ import { reduce, filter, findIndex, clone, get } from 'lodash' import Status from '../status/status.vue' import ThreadTree from '../thread_tree/thread_tree.vue' +import QuickFilterSettings from '../quick_filter_settings/quick_filter_settings.vue' +import QuickViewSettings from '../quick_view_settings/quick_view_settings.vue' import { library } from '@fortawesome/fontawesome-svg-core' import { @@ -343,7 +345,9 @@ const conversation = { }, components: { Status, - ThreadTree + ThreadTree, + QuickFilterSettings, + QuickViewSettings }, watch: { statusId (newVal, oldVal) { diff --git a/src/components/conversation/conversation.vue b/src/components/conversation/conversation.vue index 1adbe250..c7dacdf9 100644 --- a/src/components/conversation/conversation.vue +++ b/src/components/conversation/conversation.vue @@ -17,6 +17,14 @@ > {{ $t('timeline.collapse') }} + +
@@ -88,11 +86,11 @@ - + diff --git a/src/components/timeline/timeline.js b/src/components/timeline/timeline.js index c575e876..f195940a 100644 --- a/src/components/timeline/timeline.js +++ b/src/components/timeline/timeline.js @@ -2,7 +2,8 @@ import Status from '../status/status.vue' import timelineFetcher from '../../services/timeline_fetcher/timeline_fetcher.service.js' import Conversation from '../conversation/conversation.vue' import TimelineMenu from '../timeline_menu/timeline_menu.vue' -import TimelineQuickSettings from './timeline_quick_settings.vue' +import QuickFilterSettings from '../quick_filter_settings/quick_filter_settings.vue' +import QuickViewSettings from '../quick_view_settings/quick_view_settings.vue' import { debounce, throttle, keyBy } from 'lodash' import { library } from '@fortawesome/fontawesome-svg-core' import { faCircleNotch, faCog } from '@fortawesome/free-solid-svg-icons' @@ -38,7 +39,8 @@ const Timeline = { Status, Conversation, TimelineMenu, - TimelineQuickSettings + QuickFilterSettings, + QuickViewSettings }, computed: { filteredVisibleStatuses () { diff --git a/src/components/timeline/timeline.vue b/src/components/timeline/timeline.vue index 266c1d9a..627cafbb 100644 --- a/src/components/timeline/timeline.vue +++ b/src/components/timeline/timeline.vue @@ -16,7 +16,8 @@ > {{ $t('timeline.up_to_date') }}
- + +
Date: Tue, 2 Aug 2022 23:54:06 +0300 Subject: [PATCH 2/5] change icons --- src/components/quick_view_settings/quick_view_settings.js | 6 +++--- src/components/quick_view_settings/quick_view_settings.vue | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/components/quick_view_settings/quick_view_settings.js b/src/components/quick_view_settings/quick_view_settings.js index bb39eb13..ad9e166c 100644 --- a/src/components/quick_view_settings/quick_view_settings.js +++ b/src/components/quick_view_settings/quick_view_settings.js @@ -1,12 +1,12 @@ import Popover from '../popover/popover.vue' import { mapGetters } from 'vuex' import { library } from '@fortawesome/fontawesome-svg-core' -import { faTableList, faFolderTree, faBars, faWrench } from '@fortawesome/free-solid-svg-icons' +import { faList, faFolderTree, faBarsStaggered, faWrench } from '@fortawesome/free-solid-svg-icons' library.add( - faTableList, + faList, faFolderTree, - faBars, + faBarsStaggered, faWrench ) diff --git a/src/components/quick_view_settings/quick_view_settings.vue b/src/components/quick_view_settings/quick_view_settings.vue index 78f315f3..31ff3c6b 100644 --- a/src/components/quick_view_settings/quick_view_settings.vue +++ b/src/components/quick_view_settings/quick_view_settings.vue @@ -23,7 +23,7 @@ {{ $t('settings.conversation_display_linear_quick') }} + /> {{ $t('settings.conversation_display_linear_quick') }}
From 2802e47ac947bc884dcbc86f00803fd3613efa95 Mon Sep 17 00:00:00 2001 From: HJ <30-hj@users.noreply.git.pleroma.social> Date: Thu, 4 Aug 2022 19:34:29 +0000 Subject: [PATCH 3/5] Apply 1 suggestion(s) to 1 file(s) --- src/components/quick_view_settings/quick_view_settings.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/components/quick_view_settings/quick_view_settings.js b/src/components/quick_view_settings/quick_view_settings.js index ad9e166c..d1135f01 100644 --- a/src/components/quick_view_settings/quick_view_settings.js +++ b/src/components/quick_view_settings/quick_view_settings.js @@ -20,7 +20,6 @@ const QuickViewSettings = { methods: { setConversationDisplay (visibility) { this.$store.dispatch('setOption', { name: 'conversationDisplay', value: visibility }) - this.$store.dispatch('queueFlushAll') }, openTab (tab) { this.$store.dispatch('openSettingsModalTab', tab) From 44d6d36ed19f58800800cd9c394464658b688889 Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Thu, 4 Aug 2022 23:32:06 +0300 Subject: [PATCH 4/5] fix bugs --- .../quick_view_settings.js | 7 +-- .../quick_view_settings.vue | 48 +++++++++---------- 2 files changed, 27 insertions(+), 28 deletions(-) diff --git a/src/components/quick_view_settings/quick_view_settings.js b/src/components/quick_view_settings/quick_view_settings.js index d1135f01..2798f37a 100644 --- a/src/components/quick_view_settings/quick_view_settings.js +++ b/src/components/quick_view_settings/quick_view_settings.js @@ -1,12 +1,12 @@ import Popover from '../popover/popover.vue' import { mapGetters } from 'vuex' import { library } from '@fortawesome/fontawesome-svg-core' -import { faList, faFolderTree, faBarsStaggered, faWrench } from '@fortawesome/free-solid-svg-icons' +import { faList, faFolderTree, faBars, faWrench } from '@fortawesome/free-solid-svg-icons' library.add( faList, faFolderTree, - faBarsStaggered, + faBars, faWrench ) @@ -51,7 +51,8 @@ const QuickViewSettings = { showUserAvatars: { get () { return this.mergedConfig.mentionLinkShowAvatar }, set () { - const value = !this.mentionLinkShowAvatar + const value = !this.showUserAvatars + console.log(value) this.$store.dispatch('setOption', { name: 'mentionLinkShowAvatar', value }) } }, diff --git a/src/components/quick_view_settings/quick_view_settings.vue b/src/components/quick_view_settings/quick_view_settings.vue index 31ff3c6b..4dc8a060 100644 --- a/src/components/quick_view_settings/quick_view_settings.vue +++ b/src/components/quick_view_settings/quick_view_settings.vue @@ -6,30 +6,28 @@ >