massive rename and separation merged config into its own "store"

This commit is contained in:
Henry Jameson 2026-03-24 21:42:22 +02:00
commit 4e235562aa
65 changed files with 272 additions and 221 deletions

View file

@ -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) {