massive rename and separation merged config into its own "store"
This commit is contained in:
parent
1be0debc63
commit
4e235562aa
65 changed files with 272 additions and 221 deletions
|
|
@ -5,7 +5,7 @@ import StaffPanel from '../staff_panel/staff_panel.vue'
|
|||
import TermsOfServicePanel from '../terms_of_service_panel/terms_of_service_panel.vue'
|
||||
|
||||
import { useInstanceStore } from 'src/stores/instance.js'
|
||||
import { useSyncConfigStore } from 'src/stores/sync_config.js'
|
||||
import { useMergedConfigStore } from 'src/stores/merged_config.js'
|
||||
|
||||
const About = {
|
||||
components: {
|
||||
|
|
@ -22,7 +22,7 @@ const About = {
|
|||
showInstanceSpecificPanel() {
|
||||
return (
|
||||
useInstanceStore().instanceIdentity.showInstanceSpecificPanel &&
|
||||
!useSyncConfigStore().mergedConfig.hideISP &&
|
||||
!useMergedConfigStore().mergedConfig.hideISP &&
|
||||
useInstanceStore().instanceIdentity.instanceSpecificPanelContent
|
||||
)
|
||||
},
|
||||
|
|
|
|||
|
|
@ -7,8 +7,8 @@ import Popover from '../popover/popover.vue'
|
|||
import ProgressButton from '../progress_button/progress_button.vue'
|
||||
|
||||
import { useInstanceCapabilitiesStore } from 'src/stores/instance_capabilities.js'
|
||||
import { useMergedConfigStore } from 'src/stores/merged_config.js'
|
||||
import { useReportsStore } from 'src/stores/reports'
|
||||
import { useSyncConfigStore } from 'src/stores/sync_config.js'
|
||||
|
||||
import { library } from '@fortawesome/fontawesome-svg-core'
|
||||
import { faEllipsisV } from '@fortawesome/free-solid-svg-icons'
|
||||
|
|
@ -90,10 +90,10 @@ const AccountActions = {
|
|||
},
|
||||
computed: {
|
||||
shouldConfirmBlock() {
|
||||
return useSyncConfigStore().mergedConfig.modalOnBlock
|
||||
return useMergedConfigStore().mergedConfig.modalOnBlock
|
||||
},
|
||||
shouldConfirmRemoveUserFromFollowers() {
|
||||
return useSyncConfigStore().mergedConfig.modalOnRemoveUserFromFollowers
|
||||
return useMergedConfigStore().mergedConfig.modalOnRemoveUserFromFollowers
|
||||
},
|
||||
...mapState(useInstanceCapabilitiesStore, [
|
||||
'blockExpiration',
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import VideoAttachment from '../video_attachment/video_attachment.vue'
|
|||
import { useInstanceStore } from 'src/stores/instance.js'
|
||||
import { useInstanceCapabilitiesStore } from 'src/stores/instance_capabilities.js'
|
||||
import { useMediaViewerStore } from 'src/stores/media_viewer'
|
||||
import { useSyncConfigStore } from 'src/stores/sync_config.js'
|
||||
import { useMergedConfigStore } from 'src/stores/merged_config.js'
|
||||
|
||||
import { library } from '@fortawesome/fontawesome-svg-core'
|
||||
import {
|
||||
|
|
@ -58,8 +58,8 @@ const Attachment = {
|
|||
localDescription: this.description || this.attachment.description,
|
||||
nsfwImage:
|
||||
useInstanceStore().instanceIdentity.nsfwCensorImage || nsfwImage,
|
||||
hideNsfwLocal: useSyncConfigStore().mergedConfig.hideNsfw,
|
||||
preloadImage: useSyncConfigStore().mergedConfig.preloadImage,
|
||||
hideNsfwLocal: useMergedConfigStore().mergedConfig.hideNsfw,
|
||||
preloadImage: useMergedConfigStore().mergedConfig.preloadImage,
|
||||
loading: false,
|
||||
img: this.attachment.type === 'image' && document.createElement('img'),
|
||||
modalOpen: false,
|
||||
|
|
@ -91,7 +91,7 @@ const Attachment = {
|
|||
return this.size === 'hide'
|
||||
},
|
||||
useContainFit() {
|
||||
return useSyncConfigStore().mergedConfig.useContainFit
|
||||
return this.mergedConfig.useContainFit
|
||||
},
|
||||
placeholderName() {
|
||||
if (this.attachment.description === '' || !this.attachment.description) {
|
||||
|
|
@ -134,7 +134,7 @@ const Attachment = {
|
|||
videoTag() {
|
||||
return this.useModal ? 'button' : 'span'
|
||||
},
|
||||
...mapState(useSyncConfigStore, ['mergedConfig']),
|
||||
...mapState(useMergedConfigStore, ['mergedConfig']),
|
||||
},
|
||||
watch: {
|
||||
'attachment.description'(newVal) {
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ import UserAvatar from '../user_avatar/user_avatar.vue'
|
|||
|
||||
import { useInstanceStore } from 'src/stores/instance.js'
|
||||
import { useInterfaceStore } from 'src/stores/interface'
|
||||
import { useSyncConfigStore } from 'src/stores/sync_config.js'
|
||||
import { useMergedConfigStore } from 'src/stores/merged_config.js'
|
||||
|
||||
import { library } from '@fortawesome/fontawesome-svg-core'
|
||||
import { faEllipsisH, faTimes } from '@fortawesome/free-solid-svg-icons'
|
||||
|
|
@ -86,7 +86,7 @@ const ChatMessage = {
|
|||
return { left: 50 }
|
||||
}
|
||||
},
|
||||
...mapPiniaState(useSyncConfigStore, ['mergedConfig', 'findUser']),
|
||||
...mapPiniaState(useMergedConfigStore, ['mergedConfig', 'findUser']),
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import { mapState } from 'pinia'
|
|||
import Select from 'src/components/select/select.vue'
|
||||
import ConfirmModal from './confirm_modal.vue'
|
||||
|
||||
import { useSyncConfigStore } from 'src/stores/sync_config.js'
|
||||
import { useMergedConfigStore } from 'src/stores/merged_config.js'
|
||||
|
||||
export default {
|
||||
props: ['type', 'user', 'status'],
|
||||
|
|
@ -45,7 +45,7 @@ export default {
|
|||
}
|
||||
}
|
||||
},
|
||||
...mapState(useSyncConfigStore, ['mergedConfig']),
|
||||
...mapState(useMergedConfigStore, ['mergedConfig']),
|
||||
},
|
||||
methods: {
|
||||
optionallyPrompt() {
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ import Status from '../status/status.vue'
|
|||
import ThreadTree from '../thread_tree/thread_tree.vue'
|
||||
|
||||
import { useInterfaceStore } from 'src/stores/interface'
|
||||
import { useSyncConfigStore } from 'src/stores/sync_config.js'
|
||||
import { useMergedConfigStore } from 'src/stores/merged_config.js'
|
||||
|
||||
import { library } from '@fortawesome/fontawesome-svg-core'
|
||||
import {
|
||||
|
|
@ -82,7 +82,7 @@ const conversation = {
|
|||
// maxDepthInThread = max number of depths that is *visible*
|
||||
// since our depth starts with 0 and "showing" means "showing children"
|
||||
// there is a -2 here
|
||||
const maxDepth = useSyncConfigStore().mergedConfig.maxDepthInThread - 2
|
||||
const maxDepth = this.mergedConfig.maxDepthInThread - 2
|
||||
return maxDepth >= 1 ? maxDepth : 1
|
||||
},
|
||||
streamingEnabled() {
|
||||
|
|
@ -92,22 +92,22 @@ const conversation = {
|
|||
)
|
||||
},
|
||||
displayStyle() {
|
||||
return useSyncConfigStore().mergedConfig.conversationDisplay
|
||||
return this.mergedConfig.conversationDisplay
|
||||
},
|
||||
isTreeView() {
|
||||
return !this.isLinearView
|
||||
},
|
||||
treeViewIsSimple() {
|
||||
return !useSyncConfigStore().mergedConfig.conversationTreeAdvanced
|
||||
return !this.mergedConfig.conversationTreeAdvanced
|
||||
},
|
||||
isLinearView() {
|
||||
return this.displayStyle === 'linear'
|
||||
},
|
||||
shouldFadeAncestors() {
|
||||
return useSyncConfigStore().mergedConfig.conversationTreeFadeAncestors
|
||||
return this.mergedConfig.conversationTreeFadeAncestors
|
||||
},
|
||||
otherRepliesButtonPosition() {
|
||||
return useSyncConfigStore().mergedConfig.conversationOtherRepliesButton
|
||||
return this.mergedConfig.conversationOtherRepliesButton
|
||||
},
|
||||
showOtherRepliesButtonBelowStatus() {
|
||||
return this.otherRepliesButtonPosition === 'below'
|
||||
|
|
@ -393,7 +393,7 @@ const conversation = {
|
|||
maybeHighlight() {
|
||||
return this.isExpanded ? this.highlight : null
|
||||
},
|
||||
...mapPiniaState(useSyncConfigStore, ['mergedConfig']),
|
||||
...mapPiniaState(useMergedConfigStore, ['mergedConfig']),
|
||||
...mapState({
|
||||
mastoUserSocketStatus: (state) => state.api.mastoUserSocketStatus,
|
||||
}),
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import ConfirmModal from '../confirm_modal/confirm_modal.vue'
|
|||
|
||||
import { useInstanceStore } from 'src/stores/instance.js'
|
||||
import { useInterfaceStore } from 'src/stores/interface'
|
||||
import { useSyncConfigStore } from 'src/stores/sync_config.js'
|
||||
import { useMergedConfigStore } from 'src/stores/merged_config.js'
|
||||
|
||||
import { library } from '@fortawesome/fontawesome-svg-core'
|
||||
import {
|
||||
|
|
@ -97,7 +97,7 @@ export default {
|
|||
return this.$store.state.users.currentUser
|
||||
},
|
||||
shouldConfirmLogout() {
|
||||
return useSyncConfigStore().mergedConfig.modalOnLogout
|
||||
return useMergedConfigStore().mergedConfig.modalOnLogout
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { useSyncConfigStore } from 'src/stores/sync_config.js'
|
||||
import { useMergedConfigStore } from 'src/stores/merged_config.js'
|
||||
|
||||
const DialogModal = {
|
||||
props: {
|
||||
|
|
@ -15,7 +15,7 @@ const DialogModal = {
|
|||
},
|
||||
computed: {
|
||||
mobileCenter() {
|
||||
return useSyncConfigStore().mergedConfig.modalMobileCenter
|
||||
return useMergedConfigStore().mergedConfig.modalMobileCenter
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import Gallery from 'src/components/gallery/gallery.vue'
|
|||
import PostStatusForm from 'src/components/post_status_form/post_status_form.vue'
|
||||
import StatusContent from 'src/components/status_content/status_content.vue'
|
||||
|
||||
import { useSyncConfigStore } from 'src/stores/sync_config.js'
|
||||
import { useMergedConfigStore } from 'src/stores/merged_config.js'
|
||||
|
||||
import { library } from '@fortawesome/fontawesome-svg-core'
|
||||
import { faPollH } from '@fortawesome/free-solid-svg-icons'
|
||||
|
|
@ -59,7 +59,7 @@ const Draft = {
|
|||
: undefined
|
||||
},
|
||||
localCollapseSubjectDefault() {
|
||||
return useSyncConfigStore().mergedConfig.collapseMessageWithSubject
|
||||
return useMergedConfigStore().mergedConfig.collapseMessageWithSubject
|
||||
},
|
||||
nsfwClickthrough() {
|
||||
if (!this.draft.nsfw) {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import DialogModal from 'src/components/dialog_modal/dialog_modal.vue'
|
||||
|
||||
import { useSyncConfigStore } from 'src/stores/sync_config.js'
|
||||
import { useMergedConfigStore } from 'src/stores/merged_config.js'
|
||||
|
||||
const DraftCloser = {
|
||||
data() {
|
||||
|
|
@ -14,10 +14,10 @@ const DraftCloser = {
|
|||
emits: ['save', 'discard'],
|
||||
computed: {
|
||||
action() {
|
||||
if (useSyncConfigStore().mergedConfig.autoSaveDraft) {
|
||||
if (useMergedConfigStore().mergedConfig.autoSaveDraft) {
|
||||
return 'save'
|
||||
} else {
|
||||
return useSyncConfigStore().mergedConfig.unsavedPostAction
|
||||
return useMergedConfigStore().mergedConfig.unsavedPostAction
|
||||
}
|
||||
},
|
||||
shouldConfirm() {
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ import genRandomSeed from '../../services/random_seed/random_seed.service.js'
|
|||
import EmojiPicker from '../emoji_picker/emoji_picker.vue'
|
||||
import UnicodeDomainIndicator from '../unicode_domain_indicator/unicode_domain_indicator.vue'
|
||||
|
||||
import { useSyncConfigStore } from 'src/stores/sync_config.js'
|
||||
import { useMergedConfigStore } from 'src/stores/merged_config.js'
|
||||
|
||||
import { library } from '@fortawesome/fontawesome-svg-core'
|
||||
import { faSmileBeam } from '@fortawesome/free-regular-svg-icons'
|
||||
|
|
@ -133,10 +133,10 @@ const EmojiInput = {
|
|||
},
|
||||
computed: {
|
||||
padEmoji() {
|
||||
return useSyncConfigStore().mergedConfig.padEmoji
|
||||
return useMergedConfigStore().mergedConfig.padEmoji
|
||||
},
|
||||
defaultCandidateIndex() {
|
||||
return useSyncConfigStore().mergedConfig.autocompleteSelect ? 0 : -1
|
||||
return useMergedConfigStore().mergedConfig.autocompleteSelect ? 0 : -1
|
||||
},
|
||||
preText() {
|
||||
return this.modelValue.slice(0, this.caret)
|
||||
|
|
@ -165,7 +165,7 @@ const EmojiInput = {
|
|||
},
|
||||
languages() {
|
||||
return ensureFinalFallback(
|
||||
useSyncConfigStore().mergedConfig.interfaceLanguage,
|
||||
useMergedConfigStore().mergedConfig.interfaceLanguage,
|
||||
)
|
||||
},
|
||||
maybeLocalizedEmojiNamesAndKeywords() {
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import StillImage from '../still-image/still-image.vue'
|
|||
|
||||
import { useEmojiStore } from 'src/stores/emoji.js'
|
||||
import { useInstanceStore } from 'src/stores/instance.js'
|
||||
import { useSyncConfigStore } from 'src/stores/sync_config.js'
|
||||
import { useMergedConfigStore } from 'src/stores/merged_config.js'
|
||||
|
||||
import { library } from '@fortawesome/fontawesome-svg-core'
|
||||
import {
|
||||
|
|
@ -341,7 +341,7 @@ const EmojiPicker = {
|
|||
this.$nextTick(() => {
|
||||
this.updateEmojiSize()
|
||||
})
|
||||
return useSyncConfigStore().mergedConfig.fontSize
|
||||
return useMergedConfigStore().mergedConfig.fontSize
|
||||
},
|
||||
emojiHeight() {
|
||||
return this.emojiSize
|
||||
|
|
@ -406,7 +406,7 @@ const EmojiPicker = {
|
|||
},
|
||||
languages() {
|
||||
return ensureFinalFallback(
|
||||
useSyncConfigStore().mergedConfig.interfaceLanguage,
|
||||
useMergedConfigStore().mergedConfig.interfaceLanguage,
|
||||
)
|
||||
},
|
||||
maybeLocalizedEmojiName() {
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import { mapGetters } from 'vuex'
|
|||
|
||||
import { useAnnouncementsStore } from 'src/stores/announcements.js'
|
||||
import { useInterfaceStore } from 'src/stores/interface.js'
|
||||
import { useSyncConfigStore } from 'src/stores/sync_config.js'
|
||||
import { useMergedConfigStore } from 'src/stores/merged_config.js'
|
||||
|
||||
import { library } from '@fortawesome/fontawesome-svg-core'
|
||||
import {
|
||||
|
|
@ -56,7 +56,7 @@ const ExtraNotifications = {
|
|||
...mapPiniaState(useAnnouncementsStore, {
|
||||
unreadAnnouncementCount: 'unreadAnnouncementCount',
|
||||
}),
|
||||
...mapPiniaState(useSyncConfigStore, ['mergedConfig']),
|
||||
...mapPiniaState(useMergedConfigStore, ['mergedConfig']),
|
||||
},
|
||||
methods: {
|
||||
openNotificationSettings() {
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import {
|
|||
} from '../../services/follow_manipulate/follow_manipulate'
|
||||
import ConfirmModal from '../confirm_modal/confirm_modal.vue'
|
||||
|
||||
import { useSyncConfigStore } from 'src/stores/sync_config.js'
|
||||
import { useMergedConfigStore } from 'src/stores/merged_config.js'
|
||||
export default {
|
||||
props: ['relationship', 'user', 'labelFollowing', 'buttonClass'],
|
||||
components: {
|
||||
|
|
@ -18,7 +18,7 @@ export default {
|
|||
},
|
||||
computed: {
|
||||
shouldConfirmUnfollow() {
|
||||
return useSyncConfigStore().mergedConfig.modalOnUnfollow
|
||||
return useMergedConfigStore().mergedConfig.modalOnUnfollow
|
||||
},
|
||||
isPressed() {
|
||||
return this.inProgress || this.relationship.following
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import { notificationsFromStore } from '../../services/notification_utils/notifi
|
|||
import BasicUserCard from '../basic_user_card/basic_user_card.vue'
|
||||
import ConfirmModal from '../confirm_modal/confirm_modal.vue'
|
||||
|
||||
import { useSyncConfigStore } from 'src/stores/sync_config.js'
|
||||
import { useMergedConfigStore } from 'src/stores/merged_config.js'
|
||||
|
||||
const FollowRequestCard = {
|
||||
props: ['user'],
|
||||
|
|
@ -78,7 +78,7 @@ const FollowRequestCard = {
|
|||
},
|
||||
computed: {
|
||||
mergedConfig() {
|
||||
return useSyncConfigStore().mergedConfig
|
||||
return useMergedConfigStore().mergedConfig
|
||||
},
|
||||
shouldConfirmApprove() {
|
||||
return this.mergedConfig.modalOnApproveFollow
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { mapState } from 'pinia'
|
||||
|
||||
import { useSyncConfigStore } from 'src/stores/sync_config.js'
|
||||
import { useMergedConfigStore } from 'src/stores/merged_config.js'
|
||||
|
||||
const LinkPreview = {
|
||||
name: 'LinkPreview',
|
||||
|
|
@ -26,7 +26,7 @@ const LinkPreview = {
|
|||
hideNsfwConfig() {
|
||||
return this.mergedConfig.hideNsfw
|
||||
},
|
||||
...mapState(useSyncConfigStore, ['mergedConfig']),
|
||||
...mapState(useMergedConfigStore, ['mergedConfig']),
|
||||
},
|
||||
created() {
|
||||
if (this.useImage) {
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import fileSizeFormatService from '../../services/file_size_format/file_size_for
|
|||
import statusPosterService from '../../services/status_poster/status_poster.service.js'
|
||||
|
||||
import { useInstanceStore } from 'src/stores/instance.js'
|
||||
import { useSyncConfigStore } from 'src/stores/sync_config.js'
|
||||
import { useMergedConfigStore } from 'src/stores/merged_config.js'
|
||||
|
||||
import { library } from '@fortawesome/fontawesome-svg-core'
|
||||
import { faCircleNotch, faUpload } from '@fortawesome/free-solid-svg-icons'
|
||||
|
|
@ -34,7 +34,7 @@ const mediaUpload = {
|
|||
}
|
||||
|
||||
// Skip if image compression is disabled
|
||||
if (!useSyncConfigStore().mergedConfig.imageCompression) {
|
||||
if (!useMergedConfigStore().mergedConfig.imageCompression) {
|
||||
return file
|
||||
}
|
||||
|
||||
|
|
@ -79,7 +79,7 @@ const mediaUpload = {
|
|||
|
||||
// Convert to WebP if supported and alwaysUseJpeg is false, otherwise JPEG
|
||||
const type =
|
||||
!useSyncConfigStore().mergedConfig.alwaysUseJpeg && supportsWebP
|
||||
!useMergedConfigStore().mergedConfig.alwaysUseJpeg && supportsWebP
|
||||
? 'image/webp'
|
||||
: 'image/jpeg'
|
||||
const extension = type === 'image/webp' ? '.webp' : '.jpg'
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ import {
|
|||
import UnicodeDomainIndicator from '../unicode_domain_indicator/unicode_domain_indicator.vue'
|
||||
import UserAvatar from '../user_avatar/user_avatar.vue'
|
||||
|
||||
import { useSyncConfigStore } from 'src/stores/sync_config.js'
|
||||
import { useMergedConfigStore } from 'src/stores/merged_config.js'
|
||||
import { useUserHighlightStore } from 'src/stores/user_highlight.js'
|
||||
|
||||
import generateProfileLink from 'src/services/user_profile_link_generator/user_profile_link_generator'
|
||||
|
|
@ -160,7 +160,7 @@ const MentionLink = {
|
|||
shouldFadeDomain() {
|
||||
return this.mergedConfig.mentionLinkFadeDomain
|
||||
},
|
||||
...mapPiniaState(useSyncConfigStore, ['mergedConfig']),
|
||||
...mapPiniaState(useMergedConfigStore, ['mergedConfig']),
|
||||
...mapPiniaState(useUserHighlightStore, ['highlight']),
|
||||
...mapState({
|
||||
currentUser: (state) => state.users.currentUser,
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import { mapState } from 'pinia'
|
|||
|
||||
import MentionLink from 'src/components/mention_link/mention_link.vue'
|
||||
|
||||
import { useSyncConfigStore } from 'src/stores/sync_config.js'
|
||||
import { useMergedConfigStore } from 'src/stores/merged_config.js'
|
||||
|
||||
export const MENTIONS_LIMIT = 5
|
||||
|
||||
|
|
@ -28,7 +28,7 @@ const MentionsLine = {
|
|||
manyMentions() {
|
||||
return this.extraMentions.length > 0
|
||||
},
|
||||
...mapState(useSyncConfigStore, ['mergedConfig']),
|
||||
...mapState(useMergedConfigStore, ['mergedConfig']),
|
||||
},
|
||||
methods: {
|
||||
toggleShowMore() {
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ import SideDrawer from '../side_drawer/side_drawer.vue'
|
|||
|
||||
import { useAnnouncementsStore } from 'src/stores/announcements.js'
|
||||
import { useInstanceStore } from 'src/stores/instance.js'
|
||||
import { useSyncConfigStore } from 'src/stores/sync_config.js'
|
||||
import { useMergedConfigStore } from 'src/stores/merged_config.js'
|
||||
|
||||
import { library } from '@fortawesome/fontawesome-svg-core'
|
||||
import {
|
||||
|
|
@ -54,14 +54,17 @@ const MobileNav = {
|
|||
unseenNotifications() {
|
||||
return unseenNotificationsFromStore(
|
||||
this.$store,
|
||||
useSyncConfigStore().mergedConfig.notificationVisibility,
|
||||
useSyncConfigStore().mergedConfig.ignoreInactionableSeen,
|
||||
useMergedConfigStore().mergedConfig.notificationVisibility,
|
||||
useMergedConfigStore().mergedConfig.ignoreInactionableSeen,
|
||||
)
|
||||
},
|
||||
unseenNotificationsCount() {
|
||||
return (
|
||||
this.unseenNotifications.length +
|
||||
countExtraNotifications(this.$store, useSyncConfigStore().mergedConfig)
|
||||
countExtraNotifications(
|
||||
this.$store,
|
||||
useMergedConfigStore().mergedConfig,
|
||||
)
|
||||
)
|
||||
},
|
||||
unseenCount() {
|
||||
|
|
@ -80,15 +83,15 @@ const MobileNav = {
|
|||
return this.$route.name === 'chat'
|
||||
},
|
||||
...mapState(useAnnouncementsStore, ['unreadAnnouncementCount']),
|
||||
...mapState(useSyncConfigStore, {
|
||||
...mapState(useMergedConfigStore, {
|
||||
pinnedItems: (store) =>
|
||||
new Set(store.prefsStorage.collections.pinnedNavItems).has('chats'),
|
||||
}),
|
||||
shouldConfirmLogout() {
|
||||
return useSyncConfigStore().mergedConfig.modalOnLogout
|
||||
return useMergedConfigStore().mergedConfig.modalOnLogout
|
||||
},
|
||||
closingDrawerMarksAsSeen() {
|
||||
return useSyncConfigStore().mergedConfig.closingDrawerMarksAsSeen
|
||||
return useMergedConfigStore().mergedConfig.closingDrawerMarksAsSeen
|
||||
},
|
||||
...mapGetters(['unreadChatCount']),
|
||||
},
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import { debounce } from 'lodash'
|
||||
|
||||
import { useMergedConfigStore } from 'src/stores/merged_config.js'
|
||||
import { usePostStatusStore } from 'src/stores/post_status.js'
|
||||
import { useSyncConfigStore } from 'src/stores/sync_config.js'
|
||||
|
||||
import { library } from '@fortawesome/fontawesome-svg-core'
|
||||
import { faPen } from '@fortawesome/free-solid-svg-icons'
|
||||
|
|
@ -46,10 +46,10 @@ const MobilePostStatusButton = {
|
|||
)
|
||||
},
|
||||
isPersistent() {
|
||||
return !!useSyncConfigStore().mergedConfig.alwaysShowNewPostButton
|
||||
return !!useMergedConfigStore().mergedConfig.alwaysShowNewPostButton
|
||||
},
|
||||
autohideFloatingPostButton() {
|
||||
return !!useSyncConfigStore().mergedConfig.autohideFloatingPostButton
|
||||
return !!useMergedConfigStore().mergedConfig.autohideFloatingPostButton
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ import UserLink from '../user_link/user_link.vue'
|
|||
import UserPopover from '../user_popover/user_popover.vue'
|
||||
|
||||
import { useInstanceStore } from 'src/stores/instance.js'
|
||||
import { useSyncConfigStore } from 'src/stores/sync_config.js'
|
||||
import { useMergedConfigStore } from 'src/stores/merged_config.js'
|
||||
import { useUserHighlightStore } from 'src/stores/user_highlight.js'
|
||||
|
||||
import generateProfileLink from 'src/services/user_profile_link_generator/user_profile_link_generator'
|
||||
|
|
@ -210,7 +210,7 @@ const Notification = {
|
|||
return isStatusNotification(this.notification.type)
|
||||
},
|
||||
mergedConfig() {
|
||||
return useSyncConfigStore().mergedConfig
|
||||
return useMergedConfigStore().mergedConfig
|
||||
},
|
||||
shouldConfirmApprove() {
|
||||
return this.mergedConfig.modalOnApproveFollow
|
||||
|
|
|
|||
|
|
@ -108,6 +108,7 @@
|
|||
<script>
|
||||
import Popover from '../popover/popover.vue'
|
||||
|
||||
import { useMergedConfigStore } from 'src/stores/merged_config.js'
|
||||
import { useSyncConfigStore } from 'src/stores/sync_config.js'
|
||||
|
||||
import { library } from '@fortawesome/fontawesome-svg-core'
|
||||
|
|
@ -119,7 +120,7 @@ export default {
|
|||
components: { Popover },
|
||||
computed: {
|
||||
filters() {
|
||||
return useSyncConfigStore().mergedConfig.notificationVisibility
|
||||
return useMergedConfigStore().mergedConfig.notificationVisibility
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ import NotificationFilters from './notification_filters.vue'
|
|||
|
||||
import { useAnnouncementsStore } from 'src/stores/announcements.js'
|
||||
import { useInterfaceStore } from 'src/stores/interface.js'
|
||||
import { useSyncConfigStore } from 'src/stores/sync_config.js'
|
||||
import { useMergedConfigStore } from 'src/stores/merged_config.js'
|
||||
|
||||
import { library } from '@fortawesome/fontawesome-svg-core'
|
||||
import {
|
||||
|
|
@ -78,7 +78,7 @@ const Notifications = {
|
|||
unseenNotifications() {
|
||||
return unseenNotificationsFromStore(
|
||||
this.$store,
|
||||
useSyncConfigStore().mergedConfig.notificationVisibility,
|
||||
useMergedConfigStore().mergedConfig.notificationVisibility,
|
||||
)
|
||||
},
|
||||
filteredNotifications() {
|
||||
|
|
@ -86,17 +86,17 @@ const Notifications = {
|
|||
return [
|
||||
...filteredNotificationsFromStore(
|
||||
this.$store,
|
||||
useSyncConfigStore().mergedConfig.notificationVisibility,
|
||||
useMergedConfigStore().mergedConfig.notificationVisibility,
|
||||
).filter((n) => this.shouldShowUnseen(n)),
|
||||
...filteredNotificationsFromStore(
|
||||
this.$store,
|
||||
useSyncConfigStore().mergedConfig.notificationVisibility,
|
||||
useMergedConfigStore().mergedConfig.notificationVisibility,
|
||||
).filter((n) => !this.shouldShowUnseen(n)),
|
||||
]
|
||||
} else {
|
||||
return filteredNotificationsFromStore(
|
||||
this.$store,
|
||||
useSyncConfigStore().mergedConfig.notificationVisibility,
|
||||
useMergedConfigStore().mergedConfig.notificationVisibility,
|
||||
this.filterMode,
|
||||
)
|
||||
}
|
||||
|
|
@ -108,12 +108,12 @@ const Notifications = {
|
|||
return this.unseenNotifications.length
|
||||
},
|
||||
ignoreInactionableSeen() {
|
||||
return useSyncConfigStore().mergedConfig.ignoreInactionableSeen
|
||||
return useMergedConfigStore().mergedConfig.ignoreInactionableSeen
|
||||
},
|
||||
extraNotificationsCount() {
|
||||
return countExtraNotifications(
|
||||
this.$store,
|
||||
useSyncConfigStore().mergedConfig,
|
||||
useMergedConfigStore().mergedConfig,
|
||||
)
|
||||
},
|
||||
unseenCountTitle() {
|
||||
|
|
@ -149,10 +149,10 @@ const Notifications = {
|
|||
)
|
||||
},
|
||||
noSticky() {
|
||||
return useSyncConfigStore().mergedConfig.disableStickyHeaders
|
||||
return useMergedConfigStore().mergedConfig.disableStickyHeaders
|
||||
},
|
||||
unseenAtTop() {
|
||||
return useSyncConfigStore().mergedConfig.unseenAtTop
|
||||
return useMergedConfigStore().mergedConfig.unseenAtTop
|
||||
},
|
||||
showExtraNotifications() {
|
||||
return !this.noExtra
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@ import Timeago from 'components/timeago/timeago.vue'
|
|||
|
||||
import genRandomSeed from '../../services/random_seed/random_seed.service.js'
|
||||
|
||||
import { useMergedConfigStore } from 'src/stores/merged_config.js'
|
||||
import { usePollsStore } from 'src/stores/polls.js'
|
||||
import { useSyncConfigStore } from 'src/stores/sync_config.js'
|
||||
|
||||
export default {
|
||||
name: 'Poll',
|
||||
|
|
@ -49,7 +49,7 @@ export default {
|
|||
return (this.poll && this.poll.expired) || false
|
||||
},
|
||||
expirationLabel() {
|
||||
if (useSyncConfigStore().mergedConfig.useAbsoluteTimeFormat) {
|
||||
if (useMergedConfigStore().mergedConfig.useAbsoluteTimeFormat) {
|
||||
return this.expired ? 'polls.expired_at' : 'polls.expires_at'
|
||||
} else {
|
||||
return this.expired ? 'polls.expired' : 'polls.expires_in'
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@ import { useInstanceStore } from 'src/stores/instance.js'
|
|||
import { useInstanceCapabilitiesStore } from 'src/stores/instance_capabilities.js'
|
||||
import { useInterfaceStore } from 'src/stores/interface.js'
|
||||
import { useMediaViewerStore } from 'src/stores/media_viewer.js'
|
||||
import { useMergedConfigStore } from 'src/stores/merged_config.js'
|
||||
import { useSyncConfigStore } from 'src/stores/sync_config.js'
|
||||
|
||||
import { pollFormToMasto } from 'src/services/poll/poll.service.js'
|
||||
|
|
@ -163,7 +164,7 @@ const PostStatusForm = {
|
|||
const preset = this.$route.query.message
|
||||
let statusText = preset || ''
|
||||
|
||||
const { scopeCopy } = useSyncConfigStore().mergedConfig
|
||||
const { scopeCopy } = useMergedConfigStore().mergedConfig
|
||||
|
||||
const [statusType, refId] = typeAndRefId({
|
||||
replyTo: this.replyTo,
|
||||
|
|
@ -193,7 +194,7 @@ const PostStatusForm = {
|
|||
: this.$store.state.users.currentUser.default_scope
|
||||
|
||||
const { postContentType: contentType, sensitiveByDefault } =
|
||||
useSyncConfigStore().mergedConfig
|
||||
useMergedConfigStore().mergedConfig
|
||||
|
||||
statusParams = {
|
||||
type: statusType,
|
||||
|
|
@ -324,7 +325,7 @@ const PostStatusForm = {
|
|||
},
|
||||
hideScopeNotice() {
|
||||
return (
|
||||
this.disableNotice || useSyncConfigStore().mergedConfig.hideScopeNotice
|
||||
this.disableNotice || useMergedConfigStore().mergedConfig.hideScopeNotice
|
||||
)
|
||||
},
|
||||
pollContentError() {
|
||||
|
|
@ -380,7 +381,7 @@ const PostStatusForm = {
|
|||
return this.newStatus.hasPoll
|
||||
},
|
||||
shouldAutoSaveDraft() {
|
||||
return useSyncConfigStore().mergedConfig.autoSaveDraft
|
||||
return useMergedConfigStore().mergedConfig.autoSaveDraft
|
||||
},
|
||||
autoSaveState() {
|
||||
if (this.saveable) {
|
||||
|
|
@ -411,7 +412,7 @@ const PostStatusForm = {
|
|||
)
|
||||
)
|
||||
},
|
||||
...mapState(useSyncConfigStore, ['mergedConfig']),
|
||||
...mapState(useMergedConfigStore, ['mergedConfig']),
|
||||
...mapState(useInterfaceStore, {
|
||||
mobileLayout: (store) => store.mobileLayout,
|
||||
}),
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ import Popover from '../popover/popover.vue'
|
|||
|
||||
import { useInterfaceStore } from 'src/stores/interface.js'
|
||||
import { useLocalConfigStore } from 'src/stores/local_config.js'
|
||||
import { useMergedConfigStore } from 'src/stores/merged_config.js'
|
||||
import { useSyncConfigStore } from 'src/stores/sync_config.js'
|
||||
|
||||
import { library } from '@fortawesome/fontawesome-svg-core'
|
||||
|
|
@ -32,7 +33,7 @@ const QuickFilterSettings = {
|
|||
},
|
||||
},
|
||||
computed: {
|
||||
...mapState(useSyncConfigStore, ['mergedConfig']),
|
||||
...mapState(useMergedConfigStore, ['mergedConfig']),
|
||||
...mapState(useInterfaceStore, {
|
||||
mobileLayout: (state) => state.layoutType === 'mobile',
|
||||
}),
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ 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 { useMergedConfigStore } from 'src/stores/merged_config.js'
|
||||
import { useSyncConfigStore } from 'src/stores/sync_config.js'
|
||||
|
||||
import { library } from '@fortawesome/fontawesome-svg-core'
|
||||
|
|
@ -30,7 +31,7 @@ const QuickViewSettings = {
|
|||
},
|
||||
},
|
||||
computed: {
|
||||
...mapState(useSyncConfigStore, ['mergedConfig']),
|
||||
...mapState(useMergedConfigStore, ['mergedConfig']),
|
||||
...mapState(useInterfaceStore, {
|
||||
mobileLayout: (state) => state.layoutType === 'mobile',
|
||||
}),
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import ConfirmModal from '../confirm_modal/confirm_modal.vue'
|
||||
|
||||
import { useSyncConfigStore } from 'src/stores/sync_config.js'
|
||||
import { useMergedConfigStore } from 'src/stores/merged_config.js'
|
||||
|
||||
export default {
|
||||
props: ['user', 'relationship'],
|
||||
|
|
@ -22,7 +22,7 @@ export default {
|
|||
}
|
||||
},
|
||||
shouldConfirmRemoveUserFromFollowers() {
|
||||
return useSyncConfigStore().mergedConfig.modalOnRemoveUserFromFollowers
|
||||
return useMergedConfigStore().mergedConfig.modalOnRemoveUserFromFollowers
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import Checkbox from 'src/components/checkbox/checkbox.vue'
|
||||
import Setting from './setting.js'
|
||||
|
||||
import { useSyncConfigStore } from 'src/stores/sync_config.js'
|
||||
import { useMergedConfigStore } from 'src/stores/merged_config.js'
|
||||
|
||||
export default {
|
||||
...Setting,
|
||||
|
|
@ -45,7 +45,7 @@ export default {
|
|||
if (this.forceNew) return true
|
||||
if (!this.allowNew) return false
|
||||
|
||||
const isExpert = useSyncConfigStore().mergedConfig.expertLevel > 0
|
||||
const isExpert = useMergedConfigStore().mergedConfig.expertLevel > 0
|
||||
const hasBuiltins = this.builtinEntries.length > 0
|
||||
|
||||
if (hasBuiltins) {
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ import ModifiedIndicator from './modified_indicator.vue'
|
|||
import { useInstanceStore } from 'src/stores/instance.js'
|
||||
import { useInterfaceStore } from 'src/stores/interface.js'
|
||||
import { useLocalConfigStore } from 'src/stores/local_config.js'
|
||||
import { useMergedConfigStore } from 'src/stores/merged_config.js'
|
||||
import { useSyncConfigStore } from 'src/stores/sync_config.js'
|
||||
|
||||
export default {
|
||||
|
|
@ -244,7 +245,7 @@ export default {
|
|||
case 'admin':
|
||||
return this.$store.state.adminSettings.config
|
||||
default:
|
||||
return useSyncConfigStore().mergedConfig
|
||||
return useMergedConfigStore().mergedConfig
|
||||
}
|
||||
},
|
||||
configSink() {
|
||||
|
|
@ -323,7 +324,7 @@ export default {
|
|||
case 'profile':
|
||||
return {}
|
||||
default: {
|
||||
return get(useSyncConfigStore().mergedConfigDefault, this.path)
|
||||
return get(useMergedConfigStore().mergedConfigDefault, this.path)
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
@ -379,7 +380,7 @@ export default {
|
|||
matchesExpertLevel() {
|
||||
const settingExpertLevel = this.expert || 0
|
||||
const userToggleExpert =
|
||||
useSyncConfigStore().mergedConfig.expertLevel || 0
|
||||
useMergedConfigStore().mergedConfig.expertLevel || 0
|
||||
|
||||
return settingExpertLevel <= userToggleExpert
|
||||
},
|
||||
|
|
@ -405,7 +406,7 @@ export default {
|
|||
this.draft = cloneDeep(this.state)
|
||||
} else {
|
||||
set(
|
||||
useSyncConfigStore().mergedConfig,
|
||||
useMergedConfigStore().mergedConfig,
|
||||
this.path,
|
||||
cloneDeep(this.defaultState),
|
||||
)
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
import { mapState as mapPiniaState } from 'pinia'
|
||||
import { mapState } from 'vuex'
|
||||
|
||||
import { useSyncConfigStore } from 'src/stores/sync_config.js'
|
||||
import { useMergedConfigStore } from 'src/stores/merged_config.js'
|
||||
|
||||
const SharedComputedObject = () => ({
|
||||
...mapPiniaState(useSyncConfigStore, ['mergedConfig']),
|
||||
...mapPiniaState(useSyncConfigStore, {
|
||||
...mapPiniaState(useMergedConfigStore, ['mergedConfig']),
|
||||
...mapPiniaState(useMergedConfigStore, {
|
||||
expertLevel: (store) => store.mergedConfig.expertLevel,
|
||||
}),
|
||||
...mapState({
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ import SecurityTab from './tabs/security_tab/security_tab.vue'
|
|||
import StyleTab from './tabs/style_tab/style_tab.vue'
|
||||
|
||||
import { useInterfaceStore } from 'src/stores/interface.js'
|
||||
import { useSyncConfigStore } from 'src/stores/sync_config.js'
|
||||
import { useMergedConfigStore } from 'src/stores/merged_config.js'
|
||||
|
||||
import { library } from '@fortawesome/fontawesome-svg-core'
|
||||
import {
|
||||
|
|
@ -84,7 +84,7 @@ const SettingsModalContent = {
|
|||
return useInterfaceStore().settingsModalState === 'visible'
|
||||
},
|
||||
expertLevel() {
|
||||
return useSyncConfigStore().mergedConfig.expertLevel
|
||||
return useMergedConfigStore().mergedConfig.expertLevel
|
||||
},
|
||||
},
|
||||
data() {
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ import UnitSetting from '../helpers/unit_setting.vue'
|
|||
|
||||
import { useInstanceStore } from 'src/stores/instance.js'
|
||||
import { useInstanceCapabilitiesStore } from 'src/stores/instance_capabilities.js'
|
||||
import { useMergedConfigStore } from 'src/stores/merged_config.js'
|
||||
import { useSyncConfigStore } from 'src/stores/sync_config.js'
|
||||
|
||||
import localeService from 'src/services/locale/locale.service.js'
|
||||
|
|
@ -116,7 +117,7 @@ const ComposingTab = {
|
|||
},
|
||||
language: {
|
||||
get: function () {
|
||||
return useSyncConfigStore().mergedConfig.interfaceLanguage
|
||||
return useMergedConfigStore().mergedConfig.interfaceLanguage
|
||||
},
|
||||
set: function (val) {
|
||||
useSyncConfigStore().setSimplePrefAndSave({
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ import UnitSetting from '../helpers/unit_setting.vue'
|
|||
|
||||
import { useInstanceCapabilitiesStore } from 'src/stores/instance_capabilities.js'
|
||||
import { useInterfaceStore } from 'src/stores/interface'
|
||||
import { useMergedConfigStore } from 'src/stores/merged_config.js'
|
||||
import { useSyncConfigStore } from 'src/stores/sync_config.js'
|
||||
|
||||
import {
|
||||
|
|
@ -36,7 +37,7 @@ const FilteringTab = {
|
|||
label: this.$t(`user_card.mute_block_${mode}`),
|
||||
})),
|
||||
muteFiltersDraftObject: cloneDeep(
|
||||
useSyncConfigStore().mergedConfig.muteFilters,
|
||||
useMergedConfigStore().mergedConfig.muteFilters,
|
||||
),
|
||||
muteFiltersDraftDirty: Object.fromEntries(
|
||||
Object.entries(
|
||||
|
|
@ -100,7 +101,7 @@ const FilteringTab = {
|
|||
...mapState(useInstanceCapabilitiesStore, ['blockExpiration']),
|
||||
onMuteDefaultActionLv1: {
|
||||
get() {
|
||||
const value = useSyncConfigStore().mergedConfig.onMuteDefaultAction
|
||||
const value = useMergedConfigStore().mergedConfig.onMuteDefaultAction
|
||||
if (value === 'ask' || value === 'forever') {
|
||||
return value
|
||||
} else {
|
||||
|
|
@ -120,7 +121,7 @@ const FilteringTab = {
|
|||
},
|
||||
onBlockDefaultActionLv1: {
|
||||
get() {
|
||||
const value = useSyncConfigStore().mergedConfig.onBlockDefaultAction
|
||||
const value = useMergedConfigStore().mergedConfig.onBlockDefaultAction
|
||||
if (value === 'ask' || value === 'forever') {
|
||||
return value
|
||||
} else {
|
||||
|
|
@ -263,7 +264,7 @@ const FilteringTab = {
|
|||
},
|
||||
muteFiltersObject() {
|
||||
this.muteFiltersDraftObject = cloneDeep(
|
||||
useSyncConfigStore().mergedConfig.muteFilters,
|
||||
useMergedConfigStore().mergedConfig.muteFilters,
|
||||
)
|
||||
},
|
||||
},
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ import UnitSetting from '../helpers/unit_setting.vue'
|
|||
import { useInstanceStore } from 'src/stores/instance.js'
|
||||
import { useInstanceCapabilitiesStore } from 'src/stores/instance_capabilities.js'
|
||||
import { useLocalConfigStore } from 'src/stores/local_config.js'
|
||||
import { useMergedConfigStore } from 'src/stores/merged_config.js'
|
||||
import { useSyncConfigStore } from 'src/stores/sync_config.js'
|
||||
|
||||
import localeService from 'src/services/locale/locale.service.js'
|
||||
|
|
@ -37,7 +38,7 @@ const GeneralTab = {
|
|||
computed: {
|
||||
language: {
|
||||
get: function () {
|
||||
return useSyncConfigStore().mergedConfig.interfaceLanguage
|
||||
return useMergedConfigStore().mergedConfig.interfaceLanguage
|
||||
},
|
||||
set: function (val) {
|
||||
useSyncConfigStore().setSimplePrefAndSave({
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import SharedComputedObject from '../helpers/shared_computed_object.js'
|
|||
import UnitSetting from '../helpers/unit_setting.vue'
|
||||
|
||||
import { useInstanceCapabilitiesStore } from 'src/stores/instance_capabilities.js'
|
||||
import { useSyncConfigStore } from 'src/stores/sync_config.js'
|
||||
import { useMergedConfigStore } from 'src/stores/merged_config.js'
|
||||
|
||||
const GeneralTab = {
|
||||
data() {
|
||||
|
|
@ -31,12 +31,12 @@ const GeneralTab = {
|
|||
'suggestionsEnabled',
|
||||
]),
|
||||
columns() {
|
||||
const mode = useSyncConfigStore().mergedConfig.thirdColumnMode
|
||||
const mode = useMergedConfigStore().mergedConfig.thirdColumnMode
|
||||
|
||||
const notif = mode === 'none' ? [] : ['notifs']
|
||||
|
||||
if (
|
||||
useSyncConfigStore().mergedConfig.sidebarRight ||
|
||||
useMergedConfigStore().mergedConfig.sidebarRight ||
|
||||
mode === 'postform'
|
||||
) {
|
||||
return [...notif, 'content', 'sidebar']
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ import Preview from './theme_preview.vue'
|
|||
|
||||
import { useInstanceStore } from 'src/stores/instance.js'
|
||||
import { useInterfaceStore } from 'src/stores/interface.js'
|
||||
import { useSyncConfigStore } from 'src/stores/sync_config.js'
|
||||
import { useMergedConfigStore } from 'src/stores/merged_config.js'
|
||||
|
||||
import {
|
||||
getContrastRatioLayers,
|
||||
|
|
@ -82,7 +82,7 @@ export default {
|
|||
}),
|
||||
availableStyles: [],
|
||||
selected: '',
|
||||
selectedTheme: useSyncConfigStore().mergedConfig.theme,
|
||||
selectedTheme: useMergedConfigStore().mergedConfig.theme,
|
||||
themeWarning: undefined,
|
||||
tempImportFile: undefined,
|
||||
engineVersion: 0,
|
||||
|
|
|
|||
|
|
@ -10,8 +10,8 @@ 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 { useMergedConfigStore } from 'src/stores/merged_config.js'
|
||||
import { useShoutStore } from 'src/stores/shout'
|
||||
import { useSyncConfigStore } from 'src/stores/sync_config.js'
|
||||
|
||||
import { library } from '@fortawesome/fontawesome-svg-core'
|
||||
import {
|
||||
|
|
@ -75,7 +75,7 @@ const SideDrawer = {
|
|||
unseenNotifications() {
|
||||
return unseenNotificationsFromStore(
|
||||
this.$store,
|
||||
useSyncConfigStore().mergedConfig.notificationVisibility,
|
||||
useMergedConfigStore().mergedConfig.notificationVisibility,
|
||||
)
|
||||
},
|
||||
unseenNotificationsCount() {
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@ import UserPopover from '../user_popover/user_popover.vue'
|
|||
|
||||
import { useInstanceStore } from 'src/stores/instance.js'
|
||||
import { useInstanceCapabilitiesStore } from 'src/stores/instance_capabilities.js'
|
||||
import { useMergedConfigStore } from 'src/stores/merged_config.js'
|
||||
import { useSyncConfigStore } from 'src/stores/sync_config.js'
|
||||
import { useUserHighlightStore } from 'src/stores/user_highlight.js'
|
||||
|
||||
|
|
@ -477,7 +478,7 @@ const Status = {
|
|||
return this.$store.state.users.currentUser
|
||||
},
|
||||
mergedConfig() {
|
||||
return useSyncConfigStore().mergedConfig
|
||||
return useMergedConfigStore().mergedConfig
|
||||
},
|
||||
isSuspendable() {
|
||||
return !this.replying && this.mediaPlaying.length === 0
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import { useInstanceStore } from 'src/stores/instance.js'
|
|||
import { useInstanceCapabilitiesStore } from 'src/stores/instance_capabilities.js'
|
||||
import { useReportsStore } from 'src/stores/reports.js'
|
||||
import { useStatusHistoryStore } from 'src/stores/statusHistory.js'
|
||||
import { useSyncConfigStore } from 'src/stores/sync_config.js'
|
||||
import { useMergedConfigStore } from 'src/stores/merged_config.js'
|
||||
|
||||
const PRIVATE_SCOPES = new Set(['private', 'direct'])
|
||||
const PUBLIC_SCOPES = new Set(['public', 'unlisted'])
|
||||
|
|
@ -53,7 +53,7 @@ export const BUTTONS = [
|
|||
!PRIVATE_SCOPES.has(status.visibility)),
|
||||
toggleable: true,
|
||||
confirm: ({ status, getters }) =>
|
||||
!status.repeated && useSyncConfigStore().mergedConfig.modalOnRepeat,
|
||||
!status.repeated && useMergedConfigStore().mergedConfig.modalOnRepeat,
|
||||
confirmStrings: {
|
||||
title: 'status.repeat_confirm_title',
|
||||
body: 'status.repeat_confirm',
|
||||
|
|
@ -228,7 +228,7 @@ export const BUTTONS = [
|
|||
currentUser.privileges.includes('messages_delete'))
|
||||
)
|
||||
},
|
||||
confirm: ({ getters }) => useSyncConfigStore().mergedConfig.modalOnDelete,
|
||||
confirm: ({ getters }) => useMergedConfigStore().mergedConfig.modalOnDelete,
|
||||
confirmStrings: {
|
||||
title: 'status.delete_confirm_title',
|
||||
body: 'status.delete_confirm',
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import { mapState } from 'pinia'
|
|||
|
||||
import RichContent from 'src/components/rich_content/rich_content.jsx'
|
||||
|
||||
import { useSyncConfigStore } from 'src/stores/sync_config.js'
|
||||
import { useMergedConfigStore } from 'src/stores/merged_config.js'
|
||||
|
||||
import { library } from '@fortawesome/fontawesome-svg-core'
|
||||
import {
|
||||
|
|
@ -108,7 +108,7 @@ const StatusBody = {
|
|||
collapsedStatus() {
|
||||
return this.status.raw_html.replace(/(\n|<br\s?\/?>)/g, ' ')
|
||||
},
|
||||
...mapState(useSyncConfigStore, ['mergedConfig']),
|
||||
...mapState(useMergedConfigStore, ['mergedConfig']),
|
||||
},
|
||||
components: {
|
||||
RichContent,
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import LinkPreview from '../link-preview/link-preview.vue'
|
|||
import Poll from '../poll/poll.vue'
|
||||
|
||||
import { useMediaViewerStore } from 'src/stores/media_viewer.js'
|
||||
import { useSyncConfigStore } from 'src/stores/sync_config.js'
|
||||
import { useMergedConfigStore } from 'src/stores/merged_config.js'
|
||||
|
||||
import { library } from '@fortawesome/fontawesome-svg-core'
|
||||
import {
|
||||
|
|
@ -76,7 +76,7 @@ const StatusContent = {
|
|||
uncontrolledShowingLongSubject: false,
|
||||
// not as computed because it sets the initial state which will be changed later
|
||||
uncontrolledExpandingSubject:
|
||||
!useSyncConfigStore().mergedConfig.collapseMessageWithSubject,
|
||||
!useMergedConfigStore().mergedConfig.collapseMessageWithSubject,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
|
@ -124,7 +124,7 @@ const StatusContent = {
|
|||
maxThumbnails() {
|
||||
return this.mergedConfig.maxThumbnails
|
||||
},
|
||||
...mapPiniaState(useSyncConfigStore, ['mergedConfig']),
|
||||
...mapPiniaState(useMergedConfigStore, ['mergedConfig']),
|
||||
...mapState({
|
||||
currentUser: (state) => state.users.currentUser,
|
||||
}),
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { useSyncConfigStore } from 'src/stores/sync_config.js'
|
||||
import { useMergedConfigStore } from 'src/stores/merged_config.js'
|
||||
|
||||
const StillImage = {
|
||||
props: [
|
||||
|
|
@ -17,7 +17,7 @@ const StillImage = {
|
|||
return {
|
||||
// for lazy loading, see loadLazy()
|
||||
realSrc: this.src,
|
||||
stopGifs: useSyncConfigStore().mergedConfig.stopGifs,
|
||||
stopGifs: useMergedConfigStore().mergedConfig.stopGifs,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { useSyncConfigStore } from 'src/stores/sync_config.js'
|
||||
import { useMergedConfigStore } from 'src/stores/merged_config.js'
|
||||
|
||||
import * as DateUtils from 'src/services/date_utils/date_utils.js'
|
||||
import localeService from 'src/services/locale/locale.service.js'
|
||||
|
|
@ -15,17 +15,17 @@ export default {
|
|||
},
|
||||
computed: {
|
||||
shouldUseAbsoluteTimeFormat() {
|
||||
if (!useSyncConfigStore().mergedConfig.useAbsoluteTimeFormat) {
|
||||
if (!useMergedConfigStore().mergedConfig.useAbsoluteTimeFormat) {
|
||||
return false
|
||||
}
|
||||
return (
|
||||
DateUtils.durationStrToMs(
|
||||
useSyncConfigStore().mergedConfig.absoluteTimeFormatMinAge,
|
||||
useMergedConfigStore().mergedConfig.absoluteTimeFormatMinAge,
|
||||
) <= this.relativeTimeMs
|
||||
)
|
||||
},
|
||||
time12hFormat() {
|
||||
return useSyncConfigStore().mergedConfig.absoluteTimeFormat12h === '12h'
|
||||
return useMergedConfigStore().mergedConfig.absoluteTimeFormat12h === '12h'
|
||||
},
|
||||
browserLocale() {
|
||||
return localeService.internalToBrowserLocale(this.$i18n.locale)
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ import Status from '../status/status.vue'
|
|||
import TimelineMenu from '../timeline_menu/timeline_menu.vue'
|
||||
|
||||
import { useInterfaceStore } from 'src/stores/interface.js'
|
||||
import { useSyncConfigStore } from 'src/stores/sync_config.js'
|
||||
import { useMergedConfigStore } from 'src/stores/merged_config.js'
|
||||
|
||||
import timelineFetcher from 'src/services/timeline_fetcher/timeline_fetcher.service.js'
|
||||
|
||||
|
|
@ -126,7 +126,7 @@ const Timeline = {
|
|||
return this.timeline.visibleStatuses.slice(min, max).map((_) => _.id)
|
||||
},
|
||||
virtualScrollingEnabled() {
|
||||
return useSyncConfigStore().mergedConfig.virtualScrolling
|
||||
return useMergedConfigStore().mergedConfig.virtualScrolling
|
||||
},
|
||||
...mapState(useInterfaceStore, {
|
||||
mobileLayout: (store) => store.layoutType === 'mobile',
|
||||
|
|
@ -314,7 +314,7 @@ const Timeline = {
|
|||
},
|
||||
watch: {
|
||||
newStatusCount(count) {
|
||||
if (!useSyncConfigStore().mergedConfig.streaming) {
|
||||
if (!useMergedConfigStore().mergedConfig.streaming) {
|
||||
return
|
||||
}
|
||||
if (count > 0) {
|
||||
|
|
@ -325,7 +325,8 @@ const Timeline = {
|
|||
top < 15 &&
|
||||
!this.paused &&
|
||||
!(
|
||||
this.unfocused && useSyncConfigStore().mergedConfig.pauseOnUnfocused
|
||||
this.unfocused &&
|
||||
useMergedConfigStore().mergedConfig.pauseOnUnfocused
|
||||
)
|
||||
) {
|
||||
this.showNewStatuses()
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
import Modal from 'src/components/modal/modal.vue'
|
||||
|
||||
import { useInstanceStore } from 'src/stores/instance.js'
|
||||
import { useMergedConfigStore } from 'src/stores/merged_config.js'
|
||||
import { useSyncConfigStore } from 'src/stores/sync_config.js'
|
||||
|
||||
import pleromaTanFoxMask from 'src/assets/pleromatan_apology_fox_mask.png'
|
||||
|
|
@ -43,7 +44,7 @@ const UpdateNotification = {
|
|||
this.$store.state.users.currentUser &&
|
||||
useSyncConfigStore().flagStorage.updateCounter <
|
||||
CURRENT_UPDATE_COUNTER &&
|
||||
!useSyncConfigStore().mergedConfig.dontShowUpdateNotifs
|
||||
!useMergedConfigStore().mergedConfig.dontShowUpdateNotifs
|
||||
)
|
||||
},
|
||||
},
|
||||
|
|
|
|||
|
|
@ -12,8 +12,6 @@ import suggestor from 'src/components/emoji_input/suggestor.js'
|
|||
import ImageCropper from 'src/components/image_cropper/image_cropper.vue'
|
||||
import RichContent from 'src/components/rich_content/rich_content.jsx'
|
||||
import UserTimedFilterModal from 'src/components/user_timed_filter_modal/user_timed_filter_modal.vue'
|
||||
import { useInterfaceStore } from '../../stores/interface'
|
||||
import { useMediaViewerStore } from '../../stores/media_viewer'
|
||||
import AccountActions from '../account_actions/account_actions.vue'
|
||||
import FollowButton from '../follow_button/follow_button.vue'
|
||||
import ModerationTools from '../moderation_tools/moderation_tools.vue'
|
||||
|
|
@ -27,8 +25,10 @@ import UserNote from '../user_note/user_note.vue'
|
|||
import { useEmojiStore } from 'src/stores/emoji.js'
|
||||
import { useInstanceStore } from 'src/stores/instance.js'
|
||||
import { useInstanceCapabilitiesStore } from 'src/stores/instance_capabilities.js'
|
||||
import { useInterfaceStore } from 'src/stores/interface'
|
||||
import { useMediaViewerStore } from 'src/stores/media_viewer'
|
||||
import { useMergedConfigStore } from 'src/stores/merged_config.js'
|
||||
import { usePostStatusStore } from 'src/stores/post_status'
|
||||
import { useSyncConfigStore } from 'src/stores/sync_config.js'
|
||||
import { useUserHighlightStore } from 'src/stores/user_highlight.js'
|
||||
|
||||
import { propsToNative } from 'src/services/attributes_helper/attributes_helper.service.js'
|
||||
|
|
@ -385,7 +385,7 @@ export default {
|
|||
],
|
||||
})
|
||||
},
|
||||
...mapState(useSyncConfigStore, ['mergedConfig']),
|
||||
...mapState(useMergedConfigStore, ['mergedConfig']),
|
||||
},
|
||||
methods: {
|
||||
muteUser() {
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import { defineAsyncComponent } from 'vue'
|
|||
|
||||
import UserCard from '../user_card/user_card.vue'
|
||||
|
||||
import { useSyncConfigStore } from 'src/stores/sync_config.js'
|
||||
import { useMergedConfigStore } from 'src/stores/merged_config.js'
|
||||
|
||||
const UserPopover = {
|
||||
name: 'UserPopover',
|
||||
|
|
@ -12,7 +12,7 @@ const UserPopover = {
|
|||
UserCard,
|
||||
Popover: defineAsyncComponent(() => import('../popover/popover.vue')),
|
||||
},
|
||||
computed: mapState(useSyncConfigStore, {
|
||||
computed: mapState(useMergedConfigStore, {
|
||||
userPopoverAvatarAction: (state) =>
|
||||
state.mergedConfig.userPopoverAvatarAction,
|
||||
userPopoverOverlay: (state) => state.mergedConfig.userPopoverOverlay,
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ import Checkbox from 'src/components/checkbox/checkbox.vue'
|
|||
import ConfirmModal from 'src/components/confirm_modal/confirm_modal.vue'
|
||||
import Select from 'src/components/select/select.vue'
|
||||
|
||||
import { useMergedConfigStore } from 'src/stores/merged_config.js'
|
||||
import { useSyncConfigStore } from 'src/stores/sync_config.js'
|
||||
|
||||
import { durationStrToMs } from 'src/services/date_utils/date_utils.js'
|
||||
|
|
@ -9,8 +10,8 @@ import { durationStrToMs } from 'src/services/date_utils/date_utils.js'
|
|||
const UserTimedFilterModal = {
|
||||
data() {
|
||||
const action = this.isMute
|
||||
? useSyncConfigStore().mergedConfig.onMuteDefaultAction
|
||||
: useSyncConfigStore().mergedConfig.onBlockDefaultAction
|
||||
? useMergedConfigStore().mergedConfig.onMuteDefaultAction
|
||||
: useMergedConfigStore().mergedConfig.onBlockDefaultAction
|
||||
const doAsk = action === 'ask'
|
||||
const defaultValues = {}
|
||||
|
||||
|
|
@ -46,9 +47,11 @@ const UserTimedFilterModal = {
|
|||
computed: {
|
||||
shouldConfirm() {
|
||||
if (this.isMute) {
|
||||
return useSyncConfigStore().mergedConfig.onMuteDefaultAction === 'ask'
|
||||
return useMergedConfigStore().mergedConfig.onMuteDefaultAction === 'ask'
|
||||
} else {
|
||||
return useSyncConfigStore().mergedConfig.onBlockDefaultAction === 'ask'
|
||||
return (
|
||||
useMergedConfigStore().mergedConfig.onBlockDefaultAction === 'ask'
|
||||
)
|
||||
}
|
||||
},
|
||||
expiryString() {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { useSyncConfigStore } from 'src/stores/sync_config.js'
|
||||
import { useMergedConfigStore } from 'src/stores/merged_config.js'
|
||||
|
||||
const VideoAttachment = {
|
||||
props: ['attachment', 'controls'],
|
||||
|
|
@ -11,10 +11,10 @@ const VideoAttachment = {
|
|||
},
|
||||
computed: {
|
||||
loopVideo() {
|
||||
if (useSyncConfigStore().mergedConfig.loopVideoSilentOnly) {
|
||||
if (useMergedConfigStore().mergedConfig.loopVideoSilentOnly) {
|
||||
return !this.hasAudio
|
||||
}
|
||||
return useSyncConfigStore().mergedConfig.loopVideo
|
||||
return useMergedConfigStore().mergedConfig.loopVideo
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue