diff --git a/src/App.js b/src/App.js index 5b1403828..44ff6aee3 100644 --- a/src/App.js +++ b/src/App.js @@ -26,8 +26,8 @@ import { useI18nStore } from 'src/stores/i18n.js' import { useInstanceStore } from 'src/stores/instance.js' import { useInstanceCapabilitiesStore } from 'src/stores/instance_capabilities.js' import { useInterfaceStore } from 'src/stores/interface.js' +import { useMergedConfigStore } from 'src/stores/merged_config.js' import { useShoutStore } from 'src/stores/shout.js' -import { useSyncConfigStore } from 'src/stores/sync_config.js' import messages from 'src/i18n/messages' import localeService from 'src/services/locale/locale.service.js' @@ -80,7 +80,7 @@ export default { }, created() { // Load the locale from the storage - const value = useSyncConfigStore().mergedConfig.interfaceLanguage + const value = useMergedConfigStore().mergedConfig.interfaceLanguage useI18nStore().setLanguage(value) useEmojiStore().loadUnicodeEmojiData(value) @@ -132,7 +132,7 @@ export default { ] }, navClasses() { - const { navbarColumnStretch } = useSyncConfigStore().mergedConfig + const { navbarColumnStretch } = useMergedConfigStore().mergedConfig return [ '-' + this.layoutType, ...(navbarColumnStretch ? ['-column-stretch'] : []), @@ -145,7 +145,7 @@ export default { return this.currentUser.background_image }, instanceBackground() { - return useSyncConfigStore().mergedConfig.hideInstanceWallpaper + return useMergedConfigStore().mergedConfig.hideInstanceWallpaper ? null : this.instanceBackgroundUrl }, @@ -172,19 +172,21 @@ export default { if (this.isChats) return false if (this.isListEdit) return false return ( - useSyncConfigStore().mergedConfig.alwaysShowNewPostButton || + useMergedConfigStore().mergedConfig.alwaysShowNewPostButton || this.layoutType === 'mobile' ) }, shoutboxPosition() { - return useSyncConfigStore().mergedConfig.alwaysShowNewPostButton || false + return ( + useMergedConfigStore().mergedConfig.alwaysShowNewPostButton || false + ) }, hideShoutbox() { - return useSyncConfigStore().mergedConfig.hideShoutbox + return useMergedConfigStore().mergedConfig.hideShoutbox }, reverseLayout() { const { thirdColumnMode, sidebarRight: reverseSetting } = - useSyncConfigStore().mergedConfig + useMergedConfigStore().mergedConfig if (this.layoutType !== 'wide') { return reverseSetting } else { @@ -194,10 +196,10 @@ export default { } }, noSticky() { - return useSyncConfigStore().mergedConfig.disableStickyHeaders + return useMergedConfigStore().mergedConfig.disableStickyHeaders }, showScrollbars() { - return useSyncConfigStore().mergedConfig.showScrollbars + return useMergedConfigStore().mergedConfig.showScrollbars }, scrollParent() { return window /* this.$refs.appContentRef */ @@ -205,10 +207,10 @@ export default { showInstanceSpecificPanel() { return ( this.instanceSpecificPanelPresent && - !useSyncConfigStore().mergedConfig.hideISP + !useMergedConfigStore().mergedConfig.hideISP ) }, - ...mapState(useSyncConfigStore, ['mergedConfig']), + ...mapState(useMergedConfigStore, ['mergedConfig']), ...mapState(useInterfaceStore, [ 'themeApplied', 'styleDataUsed', diff --git a/src/boot/after_store.js b/src/boot/after_store.js index 7d1995347..a345e2ae5 100644 --- a/src/boot/after_store.js +++ b/src/boot/after_store.js @@ -33,6 +33,7 @@ import { useInstanceStore } from 'src/stores/instance.js' import { useInstanceCapabilitiesStore } from 'src/stores/instance_capabilities.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 { useOAuthStore } from 'src/stores/oauth' import { useSyncConfigStore } from 'src/stores/sync_config.js' import { useUserHighlightStore } from 'src/stores/user_highlight.js' @@ -527,6 +528,7 @@ const afterStoreSetup = async ({ pinia, store, storageError, i18n }) => { useInterfaceStore().setLayoutWidth(windowWidth()) useInterfaceStore().setLayoutHeight(windowHeight()) window.syncConfig = useSyncConfigStore() + window.mergedConfig = useMergedConfigStore() window.localConfig = useLocalConfigStore() window.highlightConfig = useUserHighlightStore() @@ -554,7 +556,7 @@ const afterStoreSetup = async ({ pinia, store, storageError, i18n }) => { return Promise.reject(e) } - applyStyleConfig(useSyncConfigStore().mergedConfig, i18n.global) + applyStyleConfig(useMergedConfigStore().mergedConfig, i18n.global) // Now we can try getting the server settings and logging in // Most of these are preloaded into the index.html so blocking is minimized diff --git a/src/components/about/about.js b/src/components/about/about.js index ab1ace320..404843e8b 100644 --- a/src/components/about/about.js +++ b/src/components/about/about.js @@ -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 ) }, diff --git a/src/components/account_actions/account_actions.js b/src/components/account_actions/account_actions.js index 38f585675..f204adbde 100644 --- a/src/components/account_actions/account_actions.js +++ b/src/components/account_actions/account_actions.js @@ -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', diff --git a/src/components/attachment/attachment.js b/src/components/attachment/attachment.js index 32d8426b8..fbe77a687 100644 --- a/src/components/attachment/attachment.js +++ b/src/components/attachment/attachment.js @@ -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) { diff --git a/src/components/chat_message/chat_message.js b/src/components/chat_message/chat_message.js index b7267be2b..1675f9ddd 100644 --- a/src/components/chat_message/chat_message.js +++ b/src/components/chat_message/chat_message.js @@ -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 { diff --git a/src/components/confirm_modal/mute_confirm.js b/src/components/confirm_modal/mute_confirm.js index 888aa017b..ffd3a3076 100644 --- a/src/components/confirm_modal/mute_confirm.js +++ b/src/components/confirm_modal/mute_confirm.js @@ -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() { diff --git a/src/components/conversation/conversation.js b/src/components/conversation/conversation.js index c3bd50444..b0d3a304c 100644 --- a/src/components/conversation/conversation.js +++ b/src/components/conversation/conversation.js @@ -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, }), diff --git a/src/components/desktop_nav/desktop_nav.js b/src/components/desktop_nav/desktop_nav.js index 0871e0bd3..3382413a0 100644 --- a/src/components/desktop_nav/desktop_nav.js +++ b/src/components/desktop_nav/desktop_nav.js @@ -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: { diff --git a/src/components/dialog_modal/dialog_modal.js b/src/components/dialog_modal/dialog_modal.js index e5c399086..083f7a21d 100644 --- a/src/components/dialog_modal/dialog_modal.js +++ b/src/components/dialog_modal/dialog_modal.js @@ -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 }, }, } diff --git a/src/components/draft/draft.js b/src/components/draft/draft.js index 5ee85dff4..ffc299af6 100644 --- a/src/components/draft/draft.js +++ b/src/components/draft/draft.js @@ -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) { diff --git a/src/components/draft_closer/draft_closer.js b/src/components/draft_closer/draft_closer.js index 5f297bf4c..2648b40c5 100644 --- a/src/components/draft_closer/draft_closer.js +++ b/src/components/draft_closer/draft_closer.js @@ -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() { diff --git a/src/components/emoji_input/emoji_input.js b/src/components/emoji_input/emoji_input.js index ae46b0334..0146a3de8 100644 --- a/src/components/emoji_input/emoji_input.js +++ b/src/components/emoji_input/emoji_input.js @@ -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() { diff --git a/src/components/emoji_picker/emoji_picker.js b/src/components/emoji_picker/emoji_picker.js index 1e4594b2c..1d19987ac 100644 --- a/src/components/emoji_picker/emoji_picker.js +++ b/src/components/emoji_picker/emoji_picker.js @@ -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() { diff --git a/src/components/extra_notifications/extra_notifications.js b/src/components/extra_notifications/extra_notifications.js index 67be59144..ec5ceebe1 100644 --- a/src/components/extra_notifications/extra_notifications.js +++ b/src/components/extra_notifications/extra_notifications.js @@ -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() { diff --git a/src/components/follow_button/follow_button.js b/src/components/follow_button/follow_button.js index 539749bc8..644f95f85 100644 --- a/src/components/follow_button/follow_button.js +++ b/src/components/follow_button/follow_button.js @@ -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 diff --git a/src/components/follow_request_card/follow_request_card.js b/src/components/follow_request_card/follow_request_card.js index b7959a2d3..a6ffcd28b 100644 --- a/src/components/follow_request_card/follow_request_card.js +++ b/src/components/follow_request_card/follow_request_card.js @@ -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 diff --git a/src/components/link-preview/link-preview.js b/src/components/link-preview/link-preview.js index a465cc213..808030fbb 100644 --- a/src/components/link-preview/link-preview.js +++ b/src/components/link-preview/link-preview.js @@ -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) { diff --git a/src/components/media_upload/media_upload.js b/src/components/media_upload/media_upload.js index be62142c6..2cb6a96e6 100644 --- a/src/components/media_upload/media_upload.js +++ b/src/components/media_upload/media_upload.js @@ -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' diff --git a/src/components/mention_link/mention_link.js b/src/components/mention_link/mention_link.js index 7d0113d35..5edc89516 100644 --- a/src/components/mention_link/mention_link.js +++ b/src/components/mention_link/mention_link.js @@ -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, diff --git a/src/components/mentions_line/mentions_line.js b/src/components/mentions_line/mentions_line.js index bd3882866..88d2b3257 100644 --- a/src/components/mentions_line/mentions_line.js +++ b/src/components/mentions_line/mentions_line.js @@ -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() { diff --git a/src/components/mobile_nav/mobile_nav.js b/src/components/mobile_nav/mobile_nav.js index d3301c325..f47cef893 100644 --- a/src/components/mobile_nav/mobile_nav.js +++ b/src/components/mobile_nav/mobile_nav.js @@ -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']), }, diff --git a/src/components/mobile_post_status_button/mobile_post_status_button.js b/src/components/mobile_post_status_button/mobile_post_status_button.js index 594cd6688..4969352f6 100644 --- a/src/components/mobile_post_status_button/mobile_post_status_button.js +++ b/src/components/mobile_post_status_button/mobile_post_status_button.js @@ -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: { diff --git a/src/components/notification/notification.js b/src/components/notification/notification.js index 152200790..5f612cb9c 100644 --- a/src/components/notification/notification.js +++ b/src/components/notification/notification.js @@ -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 diff --git a/src/components/notifications/notification_filters.vue b/src/components/notifications/notification_filters.vue index a29e6bb85..9232930df 100644 --- a/src/components/notifications/notification_filters.vue +++ b/src/components/notifications/notification_filters.vue @@ -108,6 +108,7 @@