From 2c9930bd5b5c1279e0890aeba673ad6b5ce2af18 Mon Sep 17 00:00:00 2001 From: NEETzsche Date: Thu, 9 Nov 2023 15:03:21 -0700 Subject: Display the latest scrobble under a user's name --- src/components/status/status.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src/components/status/status.js') diff --git a/src/components/status/status.js b/src/components/status/status.js index e722a635..a339694d 100644 --- a/src/components/status/status.js +++ b/src/components/status/status.js @@ -39,7 +39,8 @@ import { faThumbtack, faChevronUp, faChevronDown, - faAngleDoubleRight + faAngleDoubleRight, + faPlay } from '@fortawesome/free-solid-svg-icons' library.add( @@ -59,7 +60,8 @@ library.add( faThumbtack, faChevronUp, faChevronDown, - faAngleDoubleRight + faAngleDoubleRight, + faPlay ) const camelCase = name => name.charAt(0).toUpperCase() + name.slice(1) @@ -415,6 +417,12 @@ const Status = { }, shouldDisplayQuote () { return this.quotedStatus && this.displayQuote + }, + scrobblePresent () { + return !this.mergedConfig.hideScrobbles && this.status.user.latestScrobble && this.status.user.latestScrobble.artist + }, + scrobble () { + return this.status.user.latestScrobble } }, methods: { -- cgit v1.2.3-70-g09d2 From ec2937ec1f3b0ae153f79604eb35b57ffe0f9af2 Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Mon, 13 Nov 2023 17:29:25 +0200 Subject: add options for marking single notification as read --- src/components/notification/notification.js | 6 ++++++ src/components/notification/notification.vue | 1 + src/components/notifications/notifications.js | 20 ++++++++++++++++++++ src/components/notifications/notifications.vue | 6 +++++- src/components/status/status.js | 3 +++ src/components/status/status.vue | 3 +++ src/modules/statuses.js | 8 ++++++++ .../desktop_notification_utils.js | 22 +++++++++++++++++++++- .../notification_utils/notification_utils.js | 5 +++-- src/services/sw/sw.js | 9 +++++++++ src/sw.js | 6 ++++++ 11 files changed, 85 insertions(+), 4 deletions(-) (limited to 'src/components/status/status.js') diff --git a/src/components/notification/notification.js b/src/components/notification/notification.js index 420db4f0..0e938c42 100644 --- a/src/components/notification/notification.js +++ b/src/components/notification/notification.js @@ -50,6 +50,7 @@ const Notification = { } }, props: ['notification'], + emits: ['interacted'], components: { StatusContent, UserAvatar, @@ -72,6 +73,9 @@ const Notification = { getUser (notification) { return this.$store.state.users.usersObject[notification.from_profile.id] }, + interacted () { + this.$emit('interacted') + }, toggleMute () { this.unmuted = !this.unmuted }, @@ -95,6 +99,7 @@ const Notification = { } }, doApprove () { + this.$emit('interacted') this.$store.state.api.backendInteractor.approveUser({ id: this.user.id }) this.$store.dispatch('removeFollowRequest', this.user) this.$store.dispatch('markSingleNotificationAsSeen', { id: this.notification.id }) @@ -114,6 +119,7 @@ const Notification = { } }, doDeny () { + this.$emit('interacted') this.$store.state.api.backendInteractor.denyUser({ id: this.user.id }) .then(() => { this.$store.dispatch('dismissNotificationLocal', { id: this.notification.id }) diff --git a/src/components/notification/notification.vue b/src/components/notification/notification.vue index 6b3315f9..01ad395f 100644 --- a/src/components/notification/notification.vue +++ b/src/components/notification/notification.vue @@ -6,6 +6,7 @@ class="Notification" :compact="true" :statusoid="notification.status" + @interacted="interacted" />
diff --git a/src/components/notifications/notifications.js b/src/components/notifications/notifications.js index 571df0f1..4cbe8093 100644 --- a/src/components/notifications/notifications.js +++ b/src/components/notifications/notifications.js @@ -159,6 +159,26 @@ const Notifications = { updateScrollPosition () { this.showScrollTop = this.$refs.root.offsetTop < this.scrollerRef.scrollTop }, + notificationClicked (notification) { + const { type, id, seen } = notification + if (!seen) { + switch (type) { + case 'mention': + case 'pleroma:report': + case 'follow_request': + break + default: + this.markOneAsSeen(id) + } + } + }, + notificationInteracted (notification) { + const { id, seen } = notification + if (!seen) this.markOneAsSeen(id) + }, + markOneAsSeen (id) { + this.$store.dispatch('markSingleNotificationAsSeen', { id }) + }, 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 999f8e9c..27ae23cf 100644 --- a/src/components/notifications/notifications.vue +++ b/src/components/notifications/notifications.vue @@ -67,9 +67,13 @@ role="listitem" class="notification" :class="{unseen: !minimalMode && !notification.seen}" + @click="e => notificationClicked(notification)" >
- +
diff --git a/src/components/user_avatar/user_avatar.js b/src/components/user_avatar/user_avatar.js index 33d9a258..ffd81f87 100644 --- a/src/components/user_avatar/user_avatar.js +++ b/src/components/user_avatar/user_avatar.js @@ -3,11 +3,13 @@ import StillImage from '../still-image/still-image.vue' import { library } from '@fortawesome/fontawesome-svg-core' import { - faRobot + faRobot, + faPeopleGroup } from '@fortawesome/free-solid-svg-icons' library.add( - faRobot + faRobot, + faPeopleGroup ) const UserAvatar = { @@ -15,7 +17,7 @@ const UserAvatar = { 'user', 'betterShadow', 'compact', - 'bot' + 'showActorTypeIndicator' ], data () { return { diff --git a/src/components/user_avatar/user_avatar.vue b/src/components/user_avatar/user_avatar.vue index 91c17611..3cbccec3 100644 --- a/src/components/user_avatar/user_avatar.vue +++ b/src/components/user_avatar/user_avatar.vue @@ -18,9 +18,14 @@ :class="{ '-compact': compact }" /> + @@ -79,7 +84,7 @@ height: 100%; } - .bot-indicator { + .actor-type-indicator { position: absolute; bottom: 0; right: 0; diff --git a/src/i18n/en.json b/src/i18n/en.json index bb93f26f..71098822 100644 --- a/src/i18n/en.json +++ b/src/i18n/en.json @@ -499,7 +499,7 @@ "hide_media_previews": "Hide media previews", "hide_muted_posts": "Hide posts of muted users", "mute_bot_posts": "Mute bot posts", - "hide_bot_indication": "Hide bot indication in posts", + "hide_actor_type_indication": "Hide actor type (bots, groups, etc.) indication in posts", "hide_scrobbles": "Hide scrobbles", "hide_all_muted_posts": "Hide muted posts", "max_thumbnails": "Maximum amount of thumbnails per post (empty = no limit)", -- cgit v1.2.3-70-g09d2 From a709127a3c9b20d9d6cca6d9d4f00754a4726428 Mon Sep 17 00:00:00 2001 From: tusooa Date: Wed, 27 Dec 2023 22:55:58 -0500 Subject: Use actor type to determine whether a user is a bot --- src/components/status/status.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/components/status/status.js') diff --git a/src/components/status/status.js b/src/components/status/status.js index 458c8554..8f22b708 100644 --- a/src/components/status/status.js +++ b/src/components/status/status.js @@ -233,7 +233,7 @@ const Status = { return muteWordHits(this.status, this.muteWords) }, botStatus () { - return this.status.user.bot + return this.status.user.actor_type === 'Service' }, showActorTypeIndicator () { return !this.hideBotIndication -- cgit v1.2.3-70-g09d2 From f6d3a66a5b7bcbbecc72a66532866ee096c7752d Mon Sep 17 00:00:00 2001 From: marcin mikołajczak Date: Fri, 19 Jan 2024 19:01:11 +0100 Subject: shouldDisplayFavsAndRepeats MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: marcin mikołajczak --- src/components/status/status.js | 3 +++ src/components/status/status.vue | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'src/components/status/status.js') diff --git a/src/components/status/status.js b/src/components/status/status.js index 129929a3..9e6c9528 100644 --- a/src/components/status/status.js +++ b/src/components/status/status.js @@ -374,6 +374,9 @@ const Status = { hidePostStats () { return this.mergedConfig.hidePostStats }, + shouldDisplayFavsAndRepeats () { + return !this.hidePostStats && this.isFocused && (this.combinedFavsAndRepeatsUsers.length > 0 || this.statusFromGlobalRepository.quotes_count) + }, muteBotStatuses () { return this.mergedConfig.muteBotStatuses }, diff --git a/src/components/status/status.vue b/src/components/status/status.vue index 11dc1e2e..54fcc60f 100644 --- a/src/components/status/status.vue +++ b/src/components/status/status.vue @@ -478,7 +478,7 @@
-- cgit v1.2.3-70-g09d2 From def68e9cda881447bb2d278248635d7ff4f2498f Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Mon, 25 Mar 2024 23:34:19 +0200 Subject: scrobbles age setting --- src/components/settings_modal/tabs/filtering_tab.js | 2 ++ src/components/settings_modal/tabs/filtering_tab.vue | 10 ++++++++++ src/components/status/status.js | 20 +++++++++++++++++++- src/i18n/en.json | 1 + src/modules/config.js | 1 + 5 files changed, 33 insertions(+), 1 deletion(-) (limited to 'src/components/status/status.js') diff --git a/src/components/settings_modal/tabs/filtering_tab.js b/src/components/settings_modal/tabs/filtering_tab.js index 7c37f0bc..06f238af 100644 --- a/src/components/settings_modal/tabs/filtering_tab.js +++ b/src/components/settings_modal/tabs/filtering_tab.js @@ -1,6 +1,7 @@ import { filter, trim, debounce } from 'lodash' import BooleanSetting from '../helpers/boolean_setting.vue' import ChoiceSetting from '../helpers/choice_setting.vue' +import SizeSetting from '../helpers/size_setting.vue' import IntegerSetting from '../helpers/integer_setting.vue' import SharedComputedObject from '../helpers/shared_computed_object.js' @@ -19,6 +20,7 @@ const FilteringTab = { components: { BooleanSetting, ChoiceSetting, + SizeSetting, IntegerSetting }, computed: { diff --git a/src/components/settings_modal/tabs/filtering_tab.vue b/src/components/settings_modal/tabs/filtering_tab.vue index 9e82fcfd..0f796255 100644 --- a/src/components/settings_modal/tabs/filtering_tab.vue +++ b/src/components/settings_modal/tabs/filtering_tab.vue @@ -96,6 +96,16 @@ {{ $t('settings.hide_scrobbles') }} +
  • + + {{ $t('settings.hide_scrobbles_after') }} + +
  • maxAge) return false + return this.status.user.latestScrobble.artist }, scrobble () { return this.status.user.latestScrobble diff --git a/src/i18n/en.json b/src/i18n/en.json index affe4335..b1b39cc2 100644 --- a/src/i18n/en.json +++ b/src/i18n/en.json @@ -502,6 +502,7 @@ "mute_bot_posts": "Mute bot posts", "hide_actor_type_indication": "Hide actor type (bots, groups, etc.) indication in posts", "hide_scrobbles": "Hide scrobbles", + "hide_scrobbles_after": "Hide scrobbles older than", "hide_all_muted_posts": "Hide muted posts", "max_thumbnails": "Maximum amount of thumbnails per post (empty = no limit)", "hide_isp": "Hide instance-specific panel", diff --git a/src/modules/config.js b/src/modules/config.js index abb57272..23ee152c 100644 --- a/src/modules/config.js +++ b/src/modules/config.js @@ -41,6 +41,7 @@ export const defaultState = { hideAttachments: false, hideAttachmentsInConv: false, hideScrobbles: false, + hideScrobblesAfter: '2d', maxThumbnails: 16, hideNsfw: true, preloadImage: true, -- cgit v1.2.3-70-g09d2 From 59656af44cf64069437eda1708b02c7a53788941 Mon Sep 17 00:00:00 2001 From: Alexander Tumin Date: Wed, 21 Feb 2024 21:27:12 +0300 Subject: Allow muting sensitive posts in public timelines --- .../quick_filter_settings/quick_filter_settings.js | 7 +++++++ .../quick_filter_settings.vue | 12 +++++++++++ .../quick_view_settings/quick_view_settings.js | 7 +++++++ .../settings_modal/tabs/filtering_tab.vue | 23 ++++++++++++++++++++++ src/components/status/status.js | 10 +++++++++- src/i18n/en.json | 1 + src/modules/config.js | 1 + src/modules/instance.js | 1 + 8 files changed, 61 insertions(+), 1 deletion(-) (limited to 'src/components/status/status.js') diff --git a/src/components/quick_filter_settings/quick_filter_settings.js b/src/components/quick_filter_settings/quick_filter_settings.js index e67e3a4b..0d667df5 100644 --- a/src/components/quick_filter_settings/quick_filter_settings.js +++ b/src/components/quick_filter_settings/quick_filter_settings.js @@ -63,6 +63,13 @@ const QuickFilterSettings = { const value = !this.muteBotStatuses this.$store.dispatch('setOption', { name: 'muteBotStatuses', value }) } + }, + muteSensitiveStatuses: { + get () { return this.mergedConfig.muteSensitiveStatuses }, + set () { + const value = !this.muteSensitiveStatuses + this.$store.dispatch('setOption', { name: 'muteSensitiveStatuses', value }) + } } } } diff --git a/src/components/quick_filter_settings/quick_filter_settings.vue b/src/components/quick_filter_settings/quick_filter_settings.vue index 082d8497..adb96916 100644 --- a/src/components/quick_filter_settings/quick_filter_settings.vue +++ b/src/components/quick_filter_settings/quick_filter_settings.vue @@ -71,6 +71,18 @@ :aria-hidden="true" />{{ $t('settings.mute_bot_posts') }} +