From 553ee6c8d17cd37a04055ed074974464e617c395 Mon Sep 17 00:00:00 2001 From: FloatingGhost Date: Wed, 3 Aug 2022 13:02:01 +0100 Subject: [PATCH 1/6] Move nav to top of timeline panel --- package.json | 2 +- src/components/timeline_menu/timeline_menu.js | 4 +- .../timeline_menu/timeline_menu.vue | 223 ++++++------------ .../timeline_menu/timeline_menu_content.js | 5 +- yarn.lock | 15 +- 5 files changed, 84 insertions(+), 165 deletions(-) diff --git a/package.json b/package.json index 1445f12c..dcde025a 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,7 @@ "@babel/runtime": "7.17.8", "@chenfengyuan/vue-qrcode": "2.0.0", "@fortawesome/fontawesome-svg-core": "1.3.0", - "@fortawesome/free-regular-svg-icons": "5.15.4", + "@fortawesome/free-regular-svg-icons": "^6.1.2", "@fortawesome/free-solid-svg-icons": "5.15.4", "@fortawesome/vue-fontawesome": "3.0.1", "@kazvmoe-infra/pinch-zoom-element": "1.2.0", diff --git a/src/components/timeline_menu/timeline_menu.js b/src/components/timeline_menu/timeline_menu.js index a3cb968e..35091d24 100644 --- a/src/components/timeline_menu/timeline_menu.js +++ b/src/components/timeline_menu/timeline_menu.js @@ -64,7 +64,9 @@ const TimelineMenu = { } const i18nkey = timelineNames()[this.$route.name] return i18nkey ? this.$t(i18nkey) : route - } + }, + currentUser () { return this.$store.state.users.currentUser }, + privateMode () { return this.$store.state.instance.private } } } diff --git a/src/components/timeline_menu/timeline_menu.vue b/src/components/timeline_menu/timeline_menu.vue index 5efe7db6..946fe47e 100644 --- a/src/components/timeline_menu/timeline_menu.vue +++ b/src/components/timeline_menu/timeline_menu.vue @@ -1,35 +1,56 @@ @@ -37,138 +58,30 @@ diff --git a/src/components/timeline_menu/timeline_menu_content.js b/src/components/timeline_menu/timeline_menu_content.js index 9121a983..9c2ef0c9 100644 --- a/src/components/timeline_menu/timeline_menu_content.js +++ b/src/components/timeline_menu/timeline_menu_content.js @@ -5,10 +5,9 @@ import { faGlobe, faBookmark, faEnvelope, - faHome, - faCircle + faHome } from '@fortawesome/free-solid-svg-icons' - +import { faCircle } from '@fortawesome/free-regular-svg-icons' library.add( faUsers, faGlobe, diff --git a/yarn.lock b/yarn.lock index a761ad0d..5961b770 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1085,6 +1085,11 @@ minimatch "^3.1.2" strip-json-comments "^3.1.1" +"@fortawesome/fontawesome-common-types@6.1.2": + version "6.1.2" + resolved "https://registry.yarnpkg.com/@fortawesome/fontawesome-common-types/-/fontawesome-common-types-6.1.2.tgz#c1095b1bbabf19f37f9ff0719db38d92a410bcfe" + integrity sha512-wBaAPGz1Awxg05e0PBRkDRuTsy4B3dpBm+zreTTyd9TH4uUM27cAL4xWyWR0rLJCrRwzVsQ4hF3FvM6rqydKPA== + "@fortawesome/fontawesome-common-types@^0.2.36": version "0.2.36" resolved "https://registry.yarnpkg.com/@fortawesome/fontawesome-common-types/-/fontawesome-common-types-0.2.36.tgz#b44e52db3b6b20523e0c57ef8c42d315532cb903" @@ -1102,12 +1107,12 @@ dependencies: "@fortawesome/fontawesome-common-types" "^0.3.0" -"@fortawesome/free-regular-svg-icons@5.15.4": - version "5.15.4" - resolved "https://registry.yarnpkg.com/@fortawesome/free-regular-svg-icons/-/free-regular-svg-icons-5.15.4.tgz#b97edab436954333bbeac09cfc40c6a951081a02" - integrity sha512-9VNNnU3CXHy9XednJ3wzQp6SwNwT3XaM26oS4Rp391GsxVYA+0oDR2J194YCIWf7jNRCYKjUCOduxdceLrx+xw== +"@fortawesome/free-regular-svg-icons@^6.1.2": + version "6.1.2" + resolved "https://registry.yarnpkg.com/@fortawesome/free-regular-svg-icons/-/free-regular-svg-icons-6.1.2.tgz#9f04009098addcc11d0d185126f058ed042c3099" + integrity sha512-xR4hA+tAwsaTHGfb+25H1gVU/aJ0Rzu+xIUfnyrhaL13yNQ7TWiI2RvzniAaB+VGHDU2a+Pk96Ve+pkN3/+TTQ== dependencies: - "@fortawesome/fontawesome-common-types" "^0.2.36" + "@fortawesome/fontawesome-common-types" "6.1.2" "@fortawesome/free-solid-svg-icons@5.15.4": version "5.15.4" -- 2.43.0 From 1a01e64cb545fecc8fed1911464eb94c31a3aca0 Mon Sep 17 00:00:00 2001 From: FloatingGhost Date: Wed, 3 Aug 2022 13:32:37 +0100 Subject: [PATCH 2/6] fix currentUser binding --- src/components/timeline_menu/timeline_menu.js | 30 ++++++------------- 1 file changed, 9 insertions(+), 21 deletions(-) diff --git a/src/components/timeline_menu/timeline_menu.js b/src/components/timeline_menu/timeline_menu.js index 35091d24..dbb9a49b 100644 --- a/src/components/timeline_menu/timeline_menu.js +++ b/src/components/timeline_menu/timeline_menu.js @@ -35,25 +35,15 @@ const TimelineMenu = { this.$store.dispatch('setLastTimeline', this.$route.name) } }, + computed: { + currentUser () { + return this.$store.state.users.currentUser + }, + privateMode () { + return this.$store.state.instance.private + } + }, methods: { - openMenu () { - // $nextTick is too fast, animation won't play back but - // instead starts in fully open position. Low values - // like 1-5 work on fast machines but not on mobile, 25 - // seems like a good compromise that plays without significant - // added lag. - setTimeout(() => { - this.isOpen = true - }, 25) - }, - blockOpen (event) { - // For the blank area inside the button element. - // Just setting @click.stop="" makes unintuitive behavior when - // menu is open and clicking on the blank area doesn't close it. - if (!this.isOpen) { - event.stopPropagation() - } - }, timelineName () { const route = this.$route.name if (route === 'tag-timeline') { @@ -64,9 +54,7 @@ const TimelineMenu = { } const i18nkey = timelineNames()[this.$route.name] return i18nkey ? this.$t(i18nkey) : route - }, - currentUser () { return this.$store.state.users.currentUser }, - privateMode () { return this.$store.state.instance.private } + } } } -- 2.43.0 From 74d82cad0e217e4cac2f2cd48d0e81fd83f16e5a Mon Sep 17 00:00:00 2001 From: FloatingGhost Date: Wed, 3 Aug 2022 16:38:25 +0100 Subject: [PATCH 3/6] hide timeline title on mobile --- src/components/timeline_menu/timeline_menu.vue | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/components/timeline_menu/timeline_menu.vue b/src/components/timeline_menu/timeline_menu.vue index 946fe47e..d7d022af 100644 --- a/src/components/timeline_menu/timeline_menu.vue +++ b/src/components/timeline_menu/timeline_menu.vue @@ -84,4 +84,10 @@ margin-left: 1em; color: var(--selectedMenuText, $fallback--text); --lightText: var(--selectedMenuLightText, $fallback--lightText); } + +@media all and (max-width: 900px) { + .timeline-title { + display: none; + } +} -- 2.43.0 From 15696847a4682b09e41edcb285afd983546e49d3 Mon Sep 17 00:00:00 2001 From: FloatingGhost Date: Wed, 3 Aug 2022 18:14:40 +0100 Subject: [PATCH 4/6] order timelines by "size" --- .../timeline_menu/timeline_menu.vue | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/components/timeline_menu/timeline_menu.vue b/src/components/timeline_menu/timeline_menu.vue index d7d022af..e5e3505b 100644 --- a/src/components/timeline_menu/timeline_menu.vue +++ b/src/components/timeline_menu/timeline_menu.vue @@ -26,17 +26,6 @@ :title="$t('nav.public_timeline_description')" /> - - - + + + {{ timelineName() }} -- 2.43.0 From 566b8a85730050f6f8551b7e1303dc8b09f0c12b Mon Sep 17 00:00:00 2001 From: FloatingGhost Date: Fri, 5 Aug 2022 20:28:38 +0100 Subject: [PATCH 5/6] put timeline tabs at top of panel --- src/components/moderation_tools/moderation_tools.vue | 5 +++-- src/components/timeline_menu/timeline_menu_content.vue | 2 +- src/components/user_card/user_card.js | 1 + src/components/user_card/user_card.vue | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/components/moderation_tools/moderation_tools.vue b/src/components/moderation_tools/moderation_tools.vue index 96b8c3a3..75ea08cc 100644 --- a/src/components/moderation_tools/moderation_tools.vue +++ b/src/components/moderation_tools/moderation_tools.vue @@ -13,13 +13,13 @@ @@ -167,6 +167,7 @@ .moderation-tools-popover { height: 100%; + z-index: 999; .trigger { display: flex !important; height: 100%; diff --git a/src/components/timeline_menu/timeline_menu_content.vue b/src/components/timeline_menu/timeline_menu_content.vue index 2e5d3ce9..32548c49 100644 --- a/src/components/timeline_menu/timeline_menu_content.vue +++ b/src/components/timeline_menu/timeline_menu_content.vue @@ -24,7 +24,7 @@ -- 2.43.0 From 6000a01a0e01b41c0c0753ab395480e556e11be6 Mon Sep 17 00:00:00 2001 From: FloatingGhost Date: Wed, 17 Aug 2022 09:36:28 +0100 Subject: [PATCH 6/6] combine alt nav --- src/components/desktop_nav/desktop_nav.vue | 23 +- .../settings_modal/tabs/general_tab.vue | 8 + src/components/timeline/timeline.js | 5 + src/components/timeline/timeline.vue | 6 +- src/components/timeline_menu/timeline_menu.js | 26 +- .../timeline_menu/timeline_menu.vue | 229 ++++++++++++------ .../timeline_menu/timeline_menu_content.js | 5 +- .../timeline_menu/timeline_menu_content.vue | 2 +- .../timeline_menu_content.js | 30 +++ .../timeline_menu_content.vue | 114 +++++++++ .../timeline_menu_tabs/timeline_menu_tabs.js | 61 +++++ .../timeline_menu_tabs/timeline_menu_tabs.vue | 96 ++++++++ src/i18n/en.json | 1 + src/modules/config.js | 1 + 14 files changed, 510 insertions(+), 97 deletions(-) create mode 100644 src/components/timeline_menu_tabs/timeline_menu_content.js create mode 100644 src/components/timeline_menu_tabs/timeline_menu_content.vue create mode 100644 src/components/timeline_menu_tabs/timeline_menu_tabs.js create mode 100644 src/components/timeline_menu_tabs/timeline_menu_tabs.vue diff --git a/src/components/desktop_nav/desktop_nav.vue b/src/components/desktop_nav/desktop_nav.vue index 32b90749..25b4fe8e 100644 --- a/src/components/desktop_nav/desktop_nav.vue +++ b/src/components/desktop_nav/desktop_nav.vue @@ -54,17 +54,6 @@ :title="$t('nav.public_tl')" /> - - - + + + +
  • + + {{ $t('settings.show_panel_nav_shortcuts') }} + +
  • - + +