Compare commits

..

No commits in common. "f62e0c5718c73bb7d9756f8fa1bdf35ff0f0e9e0" and "63bffe73db08b865750d7abdebf1a39d2497d322" have entirely different histories.

8 changed files with 73 additions and 73 deletions

View file

@ -136,7 +136,7 @@ export default {
return this.currentUser.background_image
},
instanceBackground() {
return useSyncConfigStore().mergedConfig.hideInstanceWallpaper ? null : this.instanceBackgroundUrl
return this.mergedConfig.hideInstanceWallpaper ? null : this.background
},
background() {
return this.userBackground || this.instanceBackground
@ -209,7 +209,7 @@ export default {
'editingAvailable',
]),
...mapState(useInstanceStore, {
instanceBackgroundUrl: (store) => store.instanceIdentity.background,
background: (store) => store.instanceIdentity.background,
showFeaturesPanel: (store) => store.instanceIdentity.showFeaturesPanel,
instanceSpecificPanelPresent: (store) =>
store.instanceIdentity.showInstanceSpecificPanel &&

View file

@ -88,34 +88,38 @@
class="thread-ancestor"
:class="{'thread-ancestor-has-other-replies': getReplies(status.id).length > 1, '-faded': shouldFadeAncestors}"
>
<Status
<status
ref="statusComponent"
:inline-expanded="collapsable && isExpanded"
:statusoid="status"
:expandable="!isExpanded"
:show-pinned="pinnedStatusIdsObject && pinnedStatusIdsObject[status.id]"
:focused="isFocused(status.id)"
:in-conversation="isExpanded"
:highlight="getHighlight()"
:replies="getReplies(status.id)"
:in-profile="inProfile"
:profile-user-id="profileUserId"
class="conversation-status status-fadein panel-body"
:statusoid="status"
:replies="getReplies(status.id)"
:expandable="!isExpanded"
:focused="isFocused(status.id)"
:highlight="getHighlight()"
:inline-expanded="collapsable && isExpanded"
:show-pinned="pinnedStatusIdsObject && pinnedStatusIdsObject[status.id]"
:in-profile="inProfile"
:in-conversation="isExpanded"
:profile-user-id="profileUserId"
:simple-tree="treeViewIsSimple"
:toggle-thread-display="toggleThreadDisplay"
:thread-display-status="threadDisplayStatus"
:show-thread-recursively="showThreadRecursively"
:total-reply-count="totalReplyCount"
:total-reply-depth="totalReplyDepth"
:show-other-replies-as-button="showOtherRepliesButtonInsideStatus"
:dive="() => diveIntoStatus(status.id)"
:controlled-showing-tall="statusContentProperties[status.id].showingTall"
:controlled-toggle-showing-tall="() => toggleStatusContentProperty(status.id, 'showingTall')"
:controlled-expanding-subject="statusContentProperties[status.id].expandingSubject"
:controlled-toggle-expanding-subject="() => toggleStatusContentProperty(status.id, 'expandingSubject')"
:controlled-showing-long-subject="statusContentProperties[status.id].showingLongSubject"
:controlled-toggle-showing-long-subject="() => toggleStatusContentProperty(status.id, 'showingLongSubject')"
:controlled-replying="statusContentProperties[status.id].replying"
:controlled-toggle-replying="() => toggleStatusContentProperty(status.id, 'replying')"
:controlled-media-playing="statusContentProperties[status.id].mediaPlaying"
:controlled-toggle-showing-tall="() => toggleStatusContentProperty(status.id, 'showingTall')"
:controlled-toggle-expanding-subject="() => toggleStatusContentProperty(status.id, 'expandingSubject')"
:controlled-toggle-showing-long-subject="() => toggleStatusContentProperty(status.id, 'showingLongSubject')"
:controlled-toggle-replying="() => toggleStatusContentProperty(status.id, 'replying')"
:controlled-set-media-playing="(newVal) => toggleStatusContentProperty(status.id, 'mediaPlaying', newVal)"
@goto="setHighlight"
@ -191,18 +195,26 @@
v-for="status in conversation"
:key="status.id"
ref="statusComponent"
class="conversation-status status-fadein panel-body"
:statusoid="status"
:replies="getReplies(status.id)"
:expandable="!isExpanded"
:focused="isFocused(status.id)"
:highlight="getHighlight()"
:inline-expanded="collapsable && isExpanded"
:statusoid="status"
:expandable="!isExpanded"
:show-pinned="pinnedStatusIdsObject && pinnedStatusIdsObject[status.id]"
:in-profile="inProfile"
:focused="isFocused(status.id)"
:in-conversation="isExpanded"
:highlight="getHighlight()"
:replies="getReplies(status.id)"
:in-profile="inProfile"
:profile-user-id="profileUserId"
class="conversation-status status-fadein panel-body"
:toggle-thread-display="toggleThreadDisplay"
:thread-display-status="threadDisplayStatus"
:show-thread-recursively="showThreadRecursively"
:total-reply-count="totalReplyCount"
:total-reply-depth="totalReplyDepth"
:status-content-properties="statusContentProperties"
:set-status-content-property="setStatusContentProperty"
:toggle-status-content-property="toggleStatusContentProperty"
@goto="setHighlight"
@toggle-expanded="toggleExpanded"

View file

@ -52,10 +52,7 @@ const MobileNav = {
return this.$store.state.users.currentUser
},
unseenNotifications() {
return unseenNotificationsFromStore(
this.$store,
useSyncConfigStore().mergedConfig.notificationVisibility,
)
return unseenNotificationsFromStore(this.$store)
},
unseenNotificationsCount() {
return (

View file

@ -76,10 +76,7 @@ const Notifications = {
return this.$store.state.notifications.error
},
unseenNotifications() {
return unseenNotificationsFromStore(
this.$store,
useSyncConfigStore().mergedConfig.notificationVisibility,
)
return unseenNotificationsFromStore(this.$store)
},
filteredNotifications() {
if (this.unseenAtTop) {

View file

@ -1,10 +1,10 @@
import { mapState } from 'pinia'
import { mapGetters } from 'vuex'
import Popover from 'src/components/popover/popover.vue'
import QuickFilterSettings from 'src/components/quick_filter_settings/quick_filter_settings.vue'
import { useInterfaceStore } from 'src/stores/interface.js'
import { useSyncConfigStore } from 'src/stores/sync_config.js'
import { library } from '@fortawesome/fontawesome-svg-core'
import {
@ -25,12 +25,18 @@ const QuickViewSettings = {
QuickFilterSettings,
},
methods: {
setConversationDisplay(visibility) {
this.$store.dispatch('setOption', {
name: 'conversationDisplay',
value: visibility,
})
},
openTab(tab) {
useInterfaceStore().openSettingsModalTab(tab)
},
},
computed: {
...mapState(useSyncConfigStore, ['mergedConfig']),
...mapGetters(['mergedConfig']),
...mapState(useInterfaceStore, {
mobileLayout: (state) => state.layoutType === 'mobile',
}),
@ -41,11 +47,8 @@ const QuickViewSettings = {
get() {
return this.mergedConfig.conversationDisplay
},
set(value) {
useSyncConfigStore().setPreference({
path: 'simple.conversationDisplay',
value,
})
set(newVal) {
this.setConversationDisplay(newVal)
},
},
autoUpdate: {
@ -54,7 +57,7 @@ const QuickViewSettings = {
},
set() {
const value = !this.autoUpdate
useSyncConfigStore().setPreference({ path: 'simple.streaming', value })
this.$store.dispatch('setOption', { name: 'streaming', value })
},
},
collapseWithSubjects: {
@ -63,8 +66,8 @@ const QuickViewSettings = {
},
set() {
const value = !this.collapseWithSubjects
useSyncConfigStore().setPreference({
path: 'simple.collapseMessageWithSubject',
this.$store.dispatch('setOption', {
name: 'collapseMessageWithSubject',
value,
})
},
@ -75,8 +78,8 @@ const QuickViewSettings = {
},
set() {
const value = !this.showUserAvatars
useSyncConfigStore().setPreference({
path: 'simple.mentionLinkShowAvatar',
this.$store.dispatch('setOption', {
name: 'mentionLinkShowAvatar',
value,
})
},
@ -87,10 +90,7 @@ const QuickViewSettings = {
},
set() {
const value = !this.muteBotStatuses
useSyncConfigStore().setPreference({
path: 'simple.muteBotStatuses',
value,
})
this.$store.dispatch('setOption', { name: 'muteBotStatuses', value })
},
},
muteSensitiveStatuses: {
@ -99,8 +99,8 @@ const QuickViewSettings = {
},
set() {
const value = !this.muteSensitiveStatuses
useSyncConfigStore().setPreference({
path: 'simple.muteSensitiveStatuses',
this.$store.dispatch('setOption', {
name: 'muteSensitiveStatuses',
value,
})
},

View file

@ -10,7 +10,6 @@ import { useAnnouncementsStore } from 'src/stores/announcements'
import { useInstanceStore } from 'src/stores/instance.js'
import { useInstanceCapabilitiesStore } from 'src/stores/instance_capabilities.js'
import { useInterfaceStore } from 'src/stores/interface'
import { useSyncConfigStore } from 'src/stores/sync_config.js'
import { useShoutStore } from 'src/stores/shout'
import { library } from '@fortawesome/fontawesome-svg-core'
@ -73,10 +72,7 @@ const SideDrawer = {
return useShoutStore().joined
},
unseenNotifications() {
return unseenNotificationsFromStore(
this.$store,
useSyncConfigStore().mergedConfig.notificationVisibility,
)
return unseenNotificationsFromStore(this.$store)
},
unseenNotificationsCount() {
return this.unseenNotifications.length

View file

@ -131,26 +131,25 @@ const Status = {
},
props: [
'statusoid',
'replies',
'expandable',
'inConversation',
'focused',
'highlight',
'compact',
'replies',
'isPreview',
'noHeading',
'inlineExpanded',
'showPinned',
'inProfile',
'inConversation',
'inQuote',
'profileUserId',
'simpleTree',
'showOtherRepliesAsButton',
'dive',
'inQuote',
'simpleTree',
'controlledThreadDisplayStatus',
'controlledToggleThreadDisplay',
'showOtherRepliesAsButton',
'controlledShowingTall',
'controlledToggleShowingTall',
'controlledExpandingSubject',
@ -161,8 +160,9 @@ const Status = {
'controlledToggleReplying',
'controlledMediaPlaying',
'controlledSetMediaPlaying',
'dive',
],
emits: ['interacted', 'goto', 'toggleExpanded'],
emits: ['interacted'],
data() {
return {
uncontrolledReplying: false,

View file

@ -105,17 +105,15 @@ export const filteredNotificationsFromStore = (
)
}
export const unseenNotificationsFromStore = (store, notificationVisibility) => {
export const unseenNotificationsFromStore = (store) => {
const rootGetters = store.rootGetters || store.getters
const ignoreInactionableSeen = rootGetters.mergedConfig.ignoreInactionableSeen
return filteredNotificationsFromStore(store, notificationVisibility).filter(
({ seen, type }) => {
if (!ignoreInactionableSeen) return !seen
if (seen) return false
return ACTIONABLE_NOTIFICATION_TYPES.has(type)
},
)
return filteredNotificationsFromStore(store).filter(({ seen, type }) => {
if (!ignoreInactionableSeen) return !seen
if (seen) return false
return ACTIONABLE_NOTIFICATION_TYPES.has(type)
})
}
export const prepareNotificationObject = (notification, i18n) => {