From f4276f72416ab0eb8171b843d475d31f13533a44 Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Mon, 1 Aug 2022 23:20:27 +0300 Subject: [PATCH 1/6] 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 3b540cacd0..712e2a2c7c 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 1adbe2500e..c7dacdf9ab 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 c575e87631..f195940a25 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 266c1d9a76..627cafbbb2 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 09:06:45 +0000 Subject: [PATCH 2/6] Update dependency vue-i18n to v9.2.0 --- package.json | 2 +- yarn.lock | 72 ++++++++++++++++++++++++++-------------------------- 2 files changed, 37 insertions(+), 37 deletions(-) diff --git a/package.json b/package.json index 68838a6a94..e7033b7548 100644 --- a/package.json +++ b/package.json @@ -40,7 +40,7 @@ "qrcode": "1", "utf8": "^3.0.0", "vue": "3.2.37", - "vue-i18n": "9.2.0-beta.40", + "vue-i18n": "9.2.0", "vue-router": "4.1.3", "vue-template-compiler": "2.7.8", "vuex": "4.0.2" diff --git a/yarn.lock b/yarn.lock index 5da002e444..b034ae119a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1375,29 +1375,29 @@ source-map "^0.6.1" yaml-eslint-parser "^0.3.2" -"@intlify/core-base@9.2.0-beta.40": - version "9.2.0-beta.40" - resolved "https://registry.yarnpkg.com/@intlify/core-base/-/core-base-9.2.0-beta.40.tgz#85df2e183b2102716c5d40795848fc2359354580" - integrity sha512-vOR0lHgtJ3IkzvXLeMQeNeYreFSKG9v3SU8QOD//WKHdBy4QPISs9CZJkYzBeBVCJVZ/eM6OTSbXF8M2k53iCw== +"@intlify/core-base@9.2.0": + version "9.2.0" + resolved "https://registry.yarnpkg.com/@intlify/core-base/-/core-base-9.2.0.tgz#e652ef7f71597c5d6b123ae34f01e106bb8c5a1b" + integrity sha512-PkaiY9FAzZHAwPNaS+3csXR6L5k8LFBsSjn63/dy5BqE3pOJd07R4+NYtk8ezxymUemu7p5cS9YX77cmnQO6aQ== dependencies: - "@intlify/devtools-if" "9.2.0-beta.40" - "@intlify/message-compiler" "9.2.0-beta.40" - "@intlify/shared" "9.2.0-beta.40" - "@intlify/vue-devtools" "9.2.0-beta.40" + "@intlify/devtools-if" "9.2.0" + "@intlify/message-compiler" "9.2.0" + "@intlify/shared" "9.2.0" + "@intlify/vue-devtools" "9.2.0" -"@intlify/devtools-if@9.2.0-beta.40": - version "9.2.0-beta.40" - resolved "https://registry.yarnpkg.com/@intlify/devtools-if/-/devtools-if-9.2.0-beta.40.tgz#bee42fefaaaa590aa5ac7fe2a98777fb84bfaf5e" - integrity sha512-EUiuLxlgortD1dhT0btm3YYIs2vk9kMdcGXiYYbHWRTylc8Iv7Yz47y5Y+IlbZzk51h/nYvuqXE1h9diZZWAvQ== +"@intlify/devtools-if@9.2.0": + version "9.2.0" + resolved "https://registry.yarnpkg.com/@intlify/devtools-if/-/devtools-if-9.2.0.tgz#55249fcea03b08a6c4d5f04a253f086c74090595" + integrity sha512-8yfusyhUaqInnn6Cma+NTTh5+EWyrnAkez36qADetbUnY4tCeGyAy+MmIAGh0uqmJVIeX94vd6L1AaA0p9McGg== dependencies: - "@intlify/shared" "9.2.0-beta.40" + "@intlify/shared" "9.2.0" -"@intlify/message-compiler@9.2.0-beta.40": - version "9.2.0-beta.40" - resolved "https://registry.yarnpkg.com/@intlify/message-compiler/-/message-compiler-9.2.0-beta.40.tgz#d5d0c5652b9e74e0b4da07a2b8731e1f0e729029" - integrity sha512-6QWTSYewmkew4nsRqgkwTVuGFKzxVCOK8EXsPt15N+tN1g+OYjC3PfGA2dPB6cVkNxqA9mV/hNK02uHPWU9t0A== +"@intlify/message-compiler@9.2.0": + version "9.2.0" + resolved "https://registry.yarnpkg.com/@intlify/message-compiler/-/message-compiler-9.2.0.tgz#0516f144bed8274b3ea4c9eede4b9a6c08fd046d" + integrity sha512-KGwwZsl+Nw2O26ZOKdytncxzKnMZ236KmM70u4GePgbizI+pu8yAh0apKxljSPzEJ7WECKTVc9R+laG12EJQYA== dependencies: - "@intlify/shared" "9.2.0-beta.40" + "@intlify/shared" "9.2.0" source-map "0.6.1" "@intlify/message-compiler@next": @@ -1408,23 +1408,23 @@ "@intlify/shared" "9.2.0-beta.34" source-map "0.6.1" +"@intlify/shared@9.2.0": + version "9.2.0" + resolved "https://registry.yarnpkg.com/@intlify/shared/-/shared-9.2.0.tgz#bcd026e419a9eb2e577afe520481ceaca80b3aa9" + integrity sha512-71uObL3Sy2ZiBQBMVETbkspE4Plpy87Hvlj6FAUF3xdD+M82tuxe3MVJjaD3ucqhtHmQWBkAWEurVLdPYr8G2g== + "@intlify/shared@9.2.0-beta.34", "@intlify/shared@next": version "9.2.0-beta.34" resolved "https://registry.yarnpkg.com/@intlify/shared/-/shared-9.2.0-beta.34.tgz#e8e9a93455eadcc9785fe2e2437fe037fc267f7d" integrity sha512-hbUKcVbTOkLVpnlSeZE1OPgEI7FpvhuZF/gb84xECTjXEImIa3u0fIcJKUUffv3dlAx8fMOE5xKgDzngidm0tw== -"@intlify/shared@9.2.0-beta.40": - version "9.2.0-beta.40" - resolved "https://registry.yarnpkg.com/@intlify/shared/-/shared-9.2.0-beta.40.tgz#a850936008e6e865310b2a49136d494dd326faab" - integrity sha512-xWz+SFjgt/LfaSbbHVn+V7gmvX4ZNP3cIFta790GWZ/tEgwJeC3tkV7i45iUbZ4ZimOerFgKH05b7qvJlKb6RQ== - -"@intlify/vue-devtools@9.2.0-beta.40": - version "9.2.0-beta.40" - resolved "https://registry.yarnpkg.com/@intlify/vue-devtools/-/vue-devtools-9.2.0-beta.40.tgz#37457fd719b0b6afb0679c33ceb47b0ac77f457c" - integrity sha512-3A0D/E9quf+KWonzXUDk3xNP0+d1DMdtAwyXNTjzFcQPvjugC2Xn6fmsd0kNn7nHjgpB+vwIuamGiuE+S+OULw== +"@intlify/vue-devtools@9.2.0": + version "9.2.0" + resolved "https://registry.yarnpkg.com/@intlify/vue-devtools/-/vue-devtools-9.2.0.tgz#fb7f18e83378da3504d500210ce3994552e18d18" + integrity sha512-6P/tE/JdNNVo1z/sr/FnSd90OVlox2XuKMmzHR13nvpHGX7fjRn6pVv47L2jySOYG1cMezmYvJl14TAddKpw5Q== dependencies: - "@intlify/core-base" "9.2.0-beta.40" - "@intlify/shared" "9.2.0-beta.40" + "@intlify/core-base" "9.2.0" + "@intlify/shared" "9.2.0" "@intlify/vue-i18n-loader@^5.0.0": version "5.0.0" @@ -10403,14 +10403,14 @@ vue-eslint-parser@^9.0.1: lodash "^4.17.21" semver "^7.3.6" -vue-i18n@9.2.0-beta.40: - version "9.2.0-beta.40" - resolved "https://registry.yarnpkg.com/vue-i18n/-/vue-i18n-9.2.0-beta.40.tgz#8088b19d619f47bf0e0f529f9bd1413460f2ff56" - integrity sha512-UwcGsbTTaDJry6BbFFzt115EVHN/bXi07DyUIZ4zrYeGMBPp2QAptMwVaGUQid1gaMmUreAKarGIqw46oCQEvg== +vue-i18n@9.2.0: + version "9.2.0" + resolved "https://registry.yarnpkg.com/vue-i18n/-/vue-i18n-9.2.0.tgz#18e746aa0d6739860fe73383daff8884b6fd3c47" + integrity sha512-vN8aW8Vn4r4eRhUgTLK1/kCIYMb3LQmuloa1YP4NsehiASCX0XCq50tgUAz1o0eBAZ8YvhdlaVPqlO7O0wCnkQ== dependencies: - "@intlify/core-base" "9.2.0-beta.40" - "@intlify/shared" "9.2.0-beta.40" - "@intlify/vue-devtools" "9.2.0-beta.40" + "@intlify/core-base" "9.2.0" + "@intlify/shared" "9.2.0" + "@intlify/vue-devtools" "9.2.0" "@vue/devtools-api" "^6.2.1" vue-loader@^16.0.0: From 4903069481508221ed047761be20a558799e712d Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Tue, 2 Aug 2022 23:54:06 +0300 Subject: [PATCH 3/6] 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 bb39eb134f..ad9e166c35 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 78f315f34d..31ff3c6b3c 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 4/6] 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 ad9e166c35..d1135f01ab 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 5/6] 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 d1135f01ab..2798f37ac4 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 31ff3c6b3c..4dc8a06076 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 @@ >