From a4e3cccf1cba238e5bfd96ea8c60f0d12bc6b7aa Mon Sep 17 00:00:00 2001 From: Shpuld Shpuldson Date: Wed, 6 Jan 2021 18:31:34 +0200 Subject: somewhat workign version still with fixture --- src/components/notifications/notifications.js | 1 + src/components/notifications/notifications.scss | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'src/components/notifications') diff --git a/src/components/notifications/notifications.js b/src/components/notifications/notifications.js index 49258563..25773fe0 100644 --- a/src/components/notifications/notifications.js +++ b/src/components/notifications/notifications.js @@ -66,6 +66,7 @@ const Notifications = { return this.$store.state.statuses.notifications.loading }, notificationsToDisplay () { + console.log(this.notifications) return this.filteredNotifications.slice(0, this.unseenCount + this.seenToDisplayCount) }, ...mapGetters(['unreadChatCount']) diff --git a/src/components/notifications/notifications.scss b/src/components/notifications/notifications.scss index 682ae127..58a86fb0 100644 --- a/src/components/notifications/notifications.scss +++ b/src/components/notifications/notifications.scss @@ -60,8 +60,10 @@ height: 32px; } - --link: var(--faintLink); - --text: var(--faint); + .faint { + --link: var(--faintLink); + --text: var(--faint); + } } .follow-request-accept { -- cgit v1.2.3-70-g09d2 From 3e6309ef94c72770dc83cc53fd05f66e69538bc7 Mon Sep 17 00:00:00 2001 From: Shpuld Shpuldson Date: Mon, 1 Feb 2021 14:43:01 +0200 Subject: remove logs --- src/components/notification/notification.js | 3 --- src/components/notifications/notifications.js | 1 - src/components/report/report.js | 1 - 3 files changed, 5 deletions(-) (limited to 'src/components/notifications') diff --git a/src/components/notification/notification.js b/src/components/notification/notification.js index 38211bb3..1634c035 100644 --- a/src/components/notification/notification.js +++ b/src/components/notification/notification.js @@ -78,9 +78,6 @@ const Notification = { this.$store.dispatch('dismissNotificationLocal', { id: this.notification.id }) this.$store.dispatch('removeFollowRequest', this.user) }) - }, - testlog (a) { - console.log(a) } }, computed: { diff --git a/src/components/notifications/notifications.js b/src/components/notifications/notifications.js index 25773fe0..49258563 100644 --- a/src/components/notifications/notifications.js +++ b/src/components/notifications/notifications.js @@ -66,7 +66,6 @@ const Notifications = { return this.$store.state.statuses.notifications.loading }, notificationsToDisplay () { - console.log(this.notifications) return this.filteredNotifications.slice(0, this.unseenCount + this.seenToDisplayCount) }, ...mapGetters(['unreadChatCount']) diff --git a/src/components/report/report.js b/src/components/report/report.js index 4d9108af..14b0cfd4 100644 --- a/src/components/report/report.js +++ b/src/components/report/report.js @@ -24,7 +24,6 @@ const Report = { return generateProfileLink(user.id, user.screen_name, this.$store.state.instance.restrictedNicknames) }, setReportState (state) { - console.log('setting state', state) return this.$store.dispatch('setReportState', { id: this.report.id, state }) } } -- cgit v1.2.3-70-g09d2 From efc6b6b703971acd9cff7bb452a1fad40b801f87 Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Wed, 17 Aug 2022 20:49:20 +0300 Subject: add "scroll to top" button to timelines and notifications --- src/components/notifications/notifications.js | 22 ++++++++++++++++++++-- src/components/notifications/notifications.vue | 12 +++++++++++- src/components/timeline/timeline.js | 5 +++++ src/components/timeline/timeline.vue | 8 ++++++++ 4 files changed, 44 insertions(+), 3 deletions(-) (limited to 'src/components/notifications') diff --git a/src/components/notifications/notifications.js b/src/components/notifications/notifications.js index 0851f407..7a3d6759 100644 --- a/src/components/notifications/notifications.js +++ b/src/components/notifications/notifications.js @@ -10,10 +10,11 @@ import { } from '../../services/notification_utils/notification_utils.js' import FaviconService from '../../services/favicon_service/favicon_service.js' import { library } from '@fortawesome/fontawesome-svg-core' -import { faCircleNotch } from '@fortawesome/free-solid-svg-icons' +import { faCircleNotch, faCircleUp } from '@fortawesome/free-solid-svg-icons' library.add( - faCircleNotch + faCircleNotch, + faCircleUp ) const DEFAULT_SEEN_TO_DISPLAY_COUNT = 30 @@ -34,6 +35,7 @@ const Notifications = { }, data () { return { + showScrollTop: false, bottomedOut: false, // How many seen notifications to display in the list. The more there are, // the heavier the page becomes. This count is increased when loading @@ -90,8 +92,16 @@ const Notifications = { notificationsToDisplay () { return this.filteredNotifications.slice(0, this.unseenCount + this.seenToDisplayCount) }, + noSticky () { return this.$store.getters.mergedConfig.disableStickyHeaders }, ...mapGetters(['unreadChatCount']) }, + mounted () { + this.scrollerRef = this.$refs.root.closest('.column.-scrollable') + this.scrollerRef.addEventListener('scroll', this.updateScrollPosition) + }, + unmounted () { + this.scrollerRef.removeEventListener('scroll', this.updateScrollPosition) + }, watch: { unseenCountTitle (count) { if (count > 0) { @@ -104,6 +114,14 @@ const Notifications = { } }, methods: { + scrollToTop () { + const scrollable = this.scrollerRef + scrollable.scrollTo({ top: this.$refs.root.offsetTop }) + // this.$refs.root.scrollIntoView({ behavior: 'smooth', block: 'start' }) + }, + updateScrollPosition () { + this.showScrollTop = this.$refs.root.offsetTop < this.scrollerRef.scrollTop + }, markAsSeen () { this.$store.dispatch('markNotificationsAsSeen') this.seenToDisplayCount = DEFAULT_SEEN_TO_DISPLAY_COUNT diff --git a/src/components/notifications/notifications.vue b/src/components/notifications/notifications.vue index e778e27b..16b5e8f6 100644 --- a/src/components/notifications/notifications.vue +++ b/src/components/notifications/notifications.vue @@ -6,6 +6,7 @@
{{ unseenCount }}
+
diff --git a/src/components/timeline/timeline.js b/src/components/timeline/timeline.js index 8f6cae66..6fca869f 100644 --- a/src/components/timeline/timeline.js +++ b/src/components/timeline/timeline.js @@ -29,6 +29,7 @@ const Timeline = { ], data () { return { + showScrollTop: false, paused: false, unfocused: false, bottomedOut: false, @@ -123,6 +124,9 @@ const Timeline = { this.$store.commit('setLoading', { timeline: this.timelineName, value: false }) }, methods: { + scrollToTop () { + window.scrollTo({ top: this.$el.offsetTop }) + }, stopBlockingClicks: debounce(function () { this.blockingClicks = false }, 1000), @@ -222,6 +226,7 @@ const Timeline = { } }, handleScroll: throttle(function (e) { + this.showScrollTop = this.$el.offsetTop < window.scrollY this.determineVisibleStatuses() this.scrollLoad(e) }, 200), diff --git a/src/components/timeline/timeline.vue b/src/components/timeline/timeline.vue index 627cafbb..a6bfeed1 100644 --- a/src/components/timeline/timeline.vue +++ b/src/components/timeline/timeline.vue @@ -2,6 +2,14 @@
+
-- cgit v1.2.3-70-g09d2 From 986c4537021842e9b21c89c0ffb84033169cafe6 Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Wed, 24 Aug 2022 22:31:48 +0300 Subject: use a bit more compact layout on mobile --- src/components/notifications/notifications.js | 5 ++- src/components/notifications/notifications.vue | 8 +++- src/components/timeline/timeline.js | 14 ++++-- src/components/timeline/timeline.scss | 16 +++++++ src/components/timeline/timeline.vue | 61 +++++++++++++++++++------- 5 files changed, 83 insertions(+), 21 deletions(-) (limited to 'src/components/notifications') diff --git a/src/components/notifications/notifications.js b/src/components/notifications/notifications.js index 7a3d6759..058d2669 100644 --- a/src/components/notifications/notifications.js +++ b/src/components/notifications/notifications.js @@ -10,11 +10,12 @@ import { } from '../../services/notification_utils/notification_utils.js' import FaviconService from '../../services/favicon_service/favicon_service.js' import { library } from '@fortawesome/fontawesome-svg-core' -import { faCircleNotch, faCircleUp } from '@fortawesome/free-solid-svg-icons' +import { faCircleNotch, faArrowUp, faMinus } from '@fortawesome/free-solid-svg-icons' library.add( faCircleNotch, - faCircleUp + faArrowUp, + faMinus ) const DEFAULT_SEEN_TO_DISPLAY_COUNT = 30 diff --git a/src/components/notifications/notifications.vue b/src/components/notifications/notifications.vue index d57166eb..7577164d 100644 --- a/src/components/notifications/notifications.vue +++ b/src/components/notifications/notifications.vue @@ -26,7 +26,13 @@ type="button" @click="scrollToTop" > - + + + + - -
- {{ $t('timeline.up_to_date') }} -
+ +
-- cgit v1.2.3-70-g09d2 From 09a4d963d4dd336c0d46f5abed0d9a47bbd0de6e Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Wed, 24 Aug 2022 22:37:07 +0300 Subject: fix notifications --- src/components/notifications/notifications.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/components/notifications') diff --git a/src/components/notifications/notifications.js b/src/components/notifications/notifications.js index 058d2669..2682912a 100644 --- a/src/components/notifications/notifications.js +++ b/src/components/notifications/notifications.js @@ -98,9 +98,13 @@ const Notifications = { }, mounted () { this.scrollerRef = this.$refs.root.closest('.column.-scrollable') + if (!this.scrollerRef) { + this.scrollerRef = this.$refs.root.closest('.mobile-notifications') + } this.scrollerRef.addEventListener('scroll', this.updateScrollPosition) }, unmounted () { + if (!this.scrollerRef) return this.scrollerRef.removeEventListener('scroll', this.updateScrollPosition) }, watch: { @@ -112,6 +116,16 @@ const Notifications = { FaviconService.clearFaviconBadge() this.$store.dispatch('setPageTitle', '') } + }, + teleportTarget () { + // handle scroller change + this.scrollerRef.removeEventListener('scroll', this.updateScrollPosition) + this.scrollerRef = this.$refs.root.closest('.column.-scrollable') + if (!this.scrollerRef) { + this.scrollerRef = this.$refs.root.closest('.mobile-notifications') + } + this.scrollerRef.addEventListener('scroll', this.updateScrollPosition) + this.updateScrollPosition() } }, methods: { -- cgit v1.2.3-70-g09d2 From af734afe3694ff3c77d4457b93b02309c4f55d6d Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Wed, 24 Aug 2022 22:46:41 +0300 Subject: lint --- src/components/notifications/notifications.vue | 16 ++++++++-------- src/components/timeline/timeline.js | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) (limited to 'src/components/notifications') diff --git a/src/components/notifications/notifications.vue b/src/components/notifications/notifications.vue index 7577164d..08d65439 100644 --- a/src/components/notifications/notifications.vue +++ b/src/components/notifications/notifications.vue @@ -4,9 +4,9 @@ :to="teleportTarget" >
- - - - + + + +
- + +
- +
Date: Thu, 29 Sep 2022 11:49:19 +0300 Subject: fix buttons overlapping --- src/components/notifications/notifications.scss | 5 +++-- src/components/timeline/timeline.scss | 6 ++++-- 2 files changed, 7 insertions(+), 4 deletions(-) (limited to 'src/components/notifications') diff --git a/src/components/notifications/notifications.scss b/src/components/notifications/notifications.scss index f4a3e099..b57dfb3a 100644 --- a/src/components/notifications/notifications.scss +++ b/src/components/notifications/notifications.scss @@ -35,11 +35,12 @@ text-align: center; width: var(--__panel-heading-height); height: var(--__panel-heading-height); - margin: calc(-1 * var(--panel-heading-height-padding)); + margin: calc(-1 * var(--panel-heading-height-padding)) 0; + margin-right: -0.5em; > button { box-sizing: border-box; - padding: calc(1 * var(--panel-heading-height-padding)); + padding: calc(1 * var(--panel-heading-height-padding)) 0; height: 100%; width: 100%; text-align: center; diff --git a/src/components/timeline/timeline.scss b/src/components/timeline/timeline.scss index c38ecfea..18a80a63 100644 --- a/src/components/timeline/timeline.scss +++ b/src/components/timeline/timeline.scss @@ -18,11 +18,12 @@ text-align: center; width: var(--__panel-heading-height); height: var(--__panel-heading-height); - margin: calc(-1 * var(--panel-heading-height-padding)); + margin: calc(-1 * var(--panel-heading-height-padding)) 0; + margin-right: -0.5em; > button { box-sizing: border-box; - padding: calc(1 * var(--panel-heading-height-padding)); + padding: calc(1 * var(--panel-heading-height-padding)) 0; height: 100%; width: 100%; text-align: center; @@ -37,6 +38,7 @@ align-self: stretch; text-align: center; width: var(--__panel-heading-height); + margin-right: -0.5em; svg { font-size: 1.2em; -- cgit v1.2.3-70-g09d2 From ce6ce4b6cdd3aea2712ce73c0b0fd9d64372ac8e Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Thu, 29 Sep 2022 11:52:48 +0300 Subject: minor improvements --- src/components/notifications/notifications.scss | 2 +- src/components/timeline/timeline.scss | 4 ++-- src/components/timeline/timeline.vue | 6 ++++-- src/panel.scss | 3 ++- 4 files changed, 9 insertions(+), 6 deletions(-) (limited to 'src/components/notifications') diff --git a/src/components/notifications/notifications.scss b/src/components/notifications/notifications.scss index b57dfb3a..245e3f47 100644 --- a/src/components/notifications/notifications.scss +++ b/src/components/notifications/notifications.scss @@ -36,7 +36,7 @@ width: var(--__panel-heading-height); height: var(--__panel-heading-height); margin: calc(-1 * var(--panel-heading-height-padding)) 0; - margin-right: -0.5em; + margin-right: calc(-1 * var(--__panel-heading-gap)); > button { box-sizing: border-box; diff --git a/src/components/timeline/timeline.scss b/src/components/timeline/timeline.scss index 18a80a63..f5dbb639 100644 --- a/src/components/timeline/timeline.scss +++ b/src/components/timeline/timeline.scss @@ -19,7 +19,7 @@ width: var(--__panel-heading-height); height: var(--__panel-heading-height); margin: calc(-1 * var(--panel-heading-height-padding)) 0; - margin-right: -0.5em; + margin-right: calc(-1 * var(--__panel-heading-gap)); > button { box-sizing: border-box; @@ -38,7 +38,7 @@ align-self: stretch; text-align: center; width: var(--__panel-heading-height); - margin-right: -0.5em; + margin-right: calc(-1 * var(--__panel-heading-gap)); svg { font-size: 1.2em; diff --git a/src/components/timeline/timeline.vue b/src/components/timeline/timeline.vue index fe5d4822..15d097e8 100644 --- a/src/components/timeline/timeline.vue +++ b/src/components/timeline/timeline.vue @@ -5,9 +5,11 @@ v-if="!embedded" :timeline-name="timelineName" /> -
+
diff --git a/src/components/notifications/notifications.scss b/src/components/notifications/notifications.scss index 245e3f47..f71f9b76 100644 --- a/src/components/notifications/notifications.scss +++ b/src/components/notifications/notifications.scss @@ -29,27 +29,6 @@ } } } - - .timeline-header-button { - align-self: stretch; - text-align: center; - width: var(--__panel-heading-height); - height: var(--__panel-heading-height); - margin: calc(-1 * var(--panel-heading-height-padding)) 0; - margin-right: calc(-1 * var(--__panel-heading-gap)); - - > button { - box-sizing: border-box; - padding: calc(1 * var(--panel-heading-height-padding)) 0; - height: 100%; - width: 100%; - text-align: center; - - svg { - font-size: 1.2em; - } - } - } } .notification { diff --git a/src/components/notifications/notifications.vue b/src/components/notifications/notifications.vue index 22f67e65..3f4b1b42 100644 --- a/src/components/notifications/notifications.vue +++ b/src/components/notifications/notifications.vue @@ -21,7 +21,7 @@ >{{ unseenCount }}
- +
button { - box-sizing: border-box; - padding: calc(1 * var(--panel-heading-height-padding)) 0; - height: 100%; - width: 100%; - text-align: center; - - svg { - font-size: 1.2em; - } - } - } - - .timeline-header-icon { - align-self: stretch; - text-align: center; - width: var(--__panel-heading-height); - margin-right: calc(-1 * var(--__panel-heading-gap)); - - svg { - font-size: 1.2em; - } - } - .loadmore-button { position: relative } diff --git a/src/components/timeline/timeline.vue b/src/components/timeline/timeline.vue index 15d097e8..77480345 100644 --- a/src/components/timeline/timeline.vue +++ b/src/components/timeline/timeline.vue @@ -6,7 +6,7 @@ :timeline-name="timelineName" />
button { + box-sizing: border-box; + padding: calc(1 * var(--panel-heading-height-padding)) 0; + height: 100%; + width: 100%; + text-align: center; + + svg { + font-size: 1.2em; + } + } + } + + .rightside-icon { + align-self: stretch; + text-align: center; + width: var(--__panel-heading-height); + margin-right: calc(-1 * var(--__panel-heading-gap)); + + svg { + font-size: 1.2em; + } + } } .panel-footer { -- cgit v1.2.3-70-g09d2 From 1435b65e36a21dd3a05a9393803beb7e06bcd4ae Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Mon, 17 Oct 2022 21:50:37 +0300 Subject: add titles to mobile buttons --- src/components/notifications/notifications.vue | 1 + src/components/timeline/timeline.vue | 3 +++ src/i18n/en.json | 1 + 3 files changed, 5 insertions(+) (limited to 'src/components/notifications') diff --git a/src/components/notifications/notifications.vue b/src/components/notifications/notifications.vue index 3f4b1b42..f9c90a7e 100644 --- a/src/components/notifications/notifications.vue +++ b/src/components/notifications/notifications.vue @@ -27,6 +27,7 @@
-
+ -- cgit v1.2.3-70-g09d2 From 17aa503106f129e391f8478ade6821f09ef7494a Mon Sep 17 00:00:00 2001 From: tusooa Date: Tue, 8 Nov 2022 00:43:33 -0500 Subject: Make notification panel a list of articles --- src/components/notification/notification.vue | 17 ++++++++++------- src/components/notifications/notifications.vue | 6 +++++- 2 files changed, 15 insertions(+), 8 deletions(-) (limited to 'src/components/notifications') diff --git a/src/components/notification/notification.vue b/src/components/notification/notification.vue index 26b174ff..84f3f7de 100644 --- a/src/components/notification/notification.vue +++ b/src/components/notification/notification.vue @@ -1,11 +1,14 @@ diff --git a/src/components/notifications/notifications.vue b/src/components/notifications/notifications.vue index 7ed419d1..02a87fcc 100644 --- a/src/components/notifications/notifications.vue +++ b/src/components/notifications/notifications.vue @@ -50,10 +50,14 @@
-
+
-- cgit v1.2.3-70-g09d2 From b718c0c77d16bf917dc564404cb0fa61a2c535b3 Mon Sep 17 00:00:00 2001 From: tusooa Date: Tue, 8 Nov 2022 10:34:38 -0500 Subject: Use feed role for notifs and timelines --- src/components/notifications/notifications.vue | 2 +- src/components/timeline/timeline.vue | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/components/notifications') diff --git a/src/components/notifications/notifications.vue b/src/components/notifications/notifications.vue index 02a87fcc..3d5878d4 100644 --- a/src/components/notifications/notifications.vue +++ b/src/components/notifications/notifications.vue @@ -52,7 +52,7 @@
Date: Mon, 21 Nov 2022 22:17:33 +0200 Subject: lint --- src/components/emoji_input/emoji_input.vue | 13 ++++++++++--- src/components/emoji_picker/emoji_picker.vue | 4 ++-- src/components/mobile_nav/mobile_nav.vue | 6 +++--- src/components/notifications/notifications.vue | 2 +- src/components/popover/popover.vue | 5 ++++- .../quick_filter_settings/quick_filter_settings.vue | 2 +- src/components/quick_view_settings/quick_view_settings.vue | 2 +- src/components/search/search.js | 4 ++-- src/components/timeline/timeline.vue | 14 ++++++++++---- 9 files changed, 34 insertions(+), 18 deletions(-) (limited to 'src/components/notifications') diff --git a/src/components/emoji_input/emoji_input.vue b/src/components/emoji_input/emoji_input.vue index 63bf856e..c9bbc18f 100644 --- a/src/components/emoji_input/emoji_input.vue +++ b/src/components/emoji_input/emoji_input.vue @@ -6,9 +6,16 @@ > -
+
{{ preText }} - x + x {{ postText }}