separation
This commit is contained in:
parent
912aa228d1
commit
573a980512
12 changed files with 56 additions and 31 deletions
|
|
@ -183,7 +183,7 @@ const getTOS = async ({ store }) => {
|
|||
const res = await window.fetch('/static/terms-of-service.html')
|
||||
if (res.ok) {
|
||||
const html = await res.text()
|
||||
useInstanceStore().set({ name: 'tos', value: html })
|
||||
useInstanceStore().set({ name: 'instanceIdentity.tos', value: html })
|
||||
} else {
|
||||
throw res
|
||||
}
|
||||
|
|
@ -198,7 +198,7 @@ const getInstancePanel = async ({ store }) => {
|
|||
if (res.ok) {
|
||||
const html = await res.text()
|
||||
useInstanceStore().set({
|
||||
name: 'instanceSpecificPanelContent',
|
||||
name: 'instanceIdentity.instanceSpecificPanelContent',
|
||||
value: html,
|
||||
})
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -38,7 +38,9 @@ export default (store) => {
|
|||
if (store.state.users.currentUser) {
|
||||
next()
|
||||
} else {
|
||||
next(useInstanceStore().instanceIdentity.redirectRootNoLogin || '/main/all')
|
||||
next(
|
||||
useInstanceStore().instanceIdentity.redirectRootNoLogin || '/main/all',
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -50,7 +52,8 @@ export default (store) => {
|
|||
return (
|
||||
(store.state.users.currentUser
|
||||
? useInstanceStore().instanceIdentity.redirectRootLogin
|
||||
: useInstanceStore().instanceIdentity.redirectRootNoLogin) || '/main/all'
|
||||
: useInstanceStore().instanceIdentity.redirectRootNoLogin) ||
|
||||
'/main/all'
|
||||
)
|
||||
},
|
||||
},
|
||||
|
|
|
|||
|
|
@ -15,13 +15,13 @@ const About = {
|
|||
},
|
||||
computed: {
|
||||
showFeaturesPanel() {
|
||||
return useInstanceStore().showFeaturesPanel
|
||||
return useInstanceStore().instanceIdentity.showFeaturesPanel
|
||||
},
|
||||
showInstanceSpecificPanel() {
|
||||
return (
|
||||
useInstanceStore().showInstanceSpecificPanel &&
|
||||
useInstanceStore().instanceIdentity.showInstanceSpecificPanel &&
|
||||
!this.$store.getters.mergedConfig.hideISP &&
|
||||
useInstanceStore().instanceSpecificPanelContent
|
||||
useInstanceStore().instanceIdentity.instanceSpecificPanelContent
|
||||
)
|
||||
},
|
||||
},
|
||||
|
|
|
|||
|
|
@ -54,7 +54,8 @@ const Attachment = {
|
|||
data() {
|
||||
return {
|
||||
localDescription: this.description || this.attachment.description,
|
||||
nsfwImage: useInstanceStore().nsfwCensorImage || nsfwImage,
|
||||
nsfwImage:
|
||||
useInstanceStore().instanceIdentity.nsfwCensorImage || nsfwImage,
|
||||
hideNsfwLocal: this.$store.getters.mergedConfig.hideNsfw,
|
||||
preloadImage: this.$store.getters.mergedConfig.preloadImage,
|
||||
loading: false,
|
||||
|
|
@ -105,7 +106,9 @@ const Attachment = {
|
|||
return 'file'
|
||||
},
|
||||
referrerpolicy() {
|
||||
return useInstanceStore().mediaProxyAvailable ? '' : 'no-referrer'
|
||||
return useInstanceStore().featureSet.mediaProxyAvailable
|
||||
? ''
|
||||
: 'no-referrer'
|
||||
},
|
||||
type() {
|
||||
return fileTypeService.fileType(this.attachment.mimetype)
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import SearchBar from 'components/search_bar/search_bar.vue'
|
||||
import { mapState, mapActions } from 'pinia'
|
||||
import { mapActions, mapState } from 'pinia'
|
||||
|
||||
import { useInstanceStore } from 'src/stores/instance.js'
|
||||
import { useInterfaceStore } from 'src/stores/interface'
|
||||
|
|
@ -123,6 +123,6 @@ export default {
|
|||
onSearchBarToggled(hidden) {
|
||||
this.searchBarHidden = hidden
|
||||
},
|
||||
...mapActions(useInterfaceStore, ['openSettingsModal'])
|
||||
...mapActions(useInterfaceStore, ['openSettingsModal']),
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import { useInstanceStore } from 'src/stores/instance.js'
|
|||
const InstanceSpecificPanel = {
|
||||
computed: {
|
||||
instanceSpecificPanelContent() {
|
||||
return useInstanceStore().instanceSpecificPanelContent
|
||||
return useInstanceStore().instanceIdentity.instanceSpecificPanelContent
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -274,11 +274,11 @@ const AppearanceTab = {
|
|||
return !window.IntersectionObserver
|
||||
},
|
||||
instanceWallpaper() {
|
||||
useInstanceStore().background
|
||||
useInstanceStore().instanceIdentity.background
|
||||
},
|
||||
instanceWallpaperUsed() {
|
||||
return (
|
||||
useInstanceStore().background &&
|
||||
useInstanceStore().instanceIdentity.background &&
|
||||
!this.$store.state.users.currentUser.background_image
|
||||
)
|
||||
},
|
||||
|
|
@ -333,13 +333,23 @@ const AppearanceTab = {
|
|||
}
|
||||
},
|
||||
isThemeActive(key) {
|
||||
return key === (this.mergedConfig.theme || useInstanceStore().theme)
|
||||
return (
|
||||
key ===
|
||||
(this.mergedConfig.theme || useInstanceStore().instanceIdentity.theme)
|
||||
)
|
||||
},
|
||||
isStyleActive(key) {
|
||||
return key === (this.mergedConfig.style || useInstanceStore().style)
|
||||
return (
|
||||
key ===
|
||||
(this.mergedConfig.style || useInstanceStore().instanceIdentity.style)
|
||||
)
|
||||
},
|
||||
isPaletteActive(key) {
|
||||
return key === (this.mergedConfig.palette || useInstanceStore().palette)
|
||||
return (
|
||||
key ===
|
||||
(this.mergedConfig.palette ||
|
||||
useInstanceStore().instanceIdentity.palette)
|
||||
)
|
||||
},
|
||||
...mapActions(useInterfaceStore, ['setStyle', 'setTheme']),
|
||||
setPalette(name, data) {
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ const FilteringTab = {
|
|||
},
|
||||
computed: {
|
||||
instanceSpecificPanelPresent() {
|
||||
return useInstanceStore().showInstanceSpecificPanel
|
||||
return useInstanceStore().instanceIdentity.showInstanceSpecificPanel
|
||||
},
|
||||
...SharedComputedObject(),
|
||||
...mapState(useServerSideStorageStore, {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { mapState, mapActions } from 'pinia'
|
||||
import { mapActions, mapState } from 'pinia'
|
||||
import { mapGetters } from 'vuex'
|
||||
|
||||
import { USERNAME_ROUTES } from 'src/components/navigation/navigation.js'
|
||||
|
|
@ -105,7 +105,8 @@ const SideDrawer = {
|
|||
logo: (store) => store.instanceIdentity.logo,
|
||||
sitename: (store) => store.instanceIdentity.name,
|
||||
hideSitename: (store) => store.instanceIdentity.hideSitename,
|
||||
pleromaChatMessagesAvailable: (store) => store.featureSet.pleromaChatMessagesAvailable,
|
||||
pleromaChatMessagesAvailable: (store) =>
|
||||
store.featureSet.pleromaChatMessagesAvailable,
|
||||
suggestionsEnabled: (store) => store.featureSet.suggestionsEnabled,
|
||||
}),
|
||||
...mapGetters(['unreadChatCount', 'draftCount']),
|
||||
|
|
@ -124,7 +125,7 @@ const SideDrawer = {
|
|||
touchMove(e) {
|
||||
GestureService.updateSwipe(e, this.closeGesture)
|
||||
},
|
||||
...mapActions(useInterfaceStore, ['openSettingsModal'])
|
||||
...mapActions(useInterfaceStore, ['openSettingsModal']),
|
||||
},
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,14 +1,12 @@
|
|||
import { mapState } from 'pinia'
|
||||
|
||||
import { useInstanceStore } from 'src/stores/instance.js'
|
||||
|
||||
const TermsOfServicePanel = {
|
||||
computed: {
|
||||
content() {
|
||||
return useInstanceStore().tos
|
||||
},
|
||||
embedded() {
|
||||
return useInstanceStore().embeddedToS
|
||||
},
|
||||
},
|
||||
computed: mapState(useInstanceStore, {
|
||||
content: (store) => store.instanceIdentity.tos,
|
||||
embedded: (store) => store.instanceIdentity.embeddedToS,
|
||||
}),
|
||||
}
|
||||
|
||||
export default TermsOfServicePanel
|
||||
|
|
|
|||
|
|
@ -337,10 +337,16 @@ export default {
|
|||
return this.newBanner === null ? currentUrl : newUrl
|
||||
},
|
||||
defaultAvatar() {
|
||||
return useInstanceStore().server + useInstanceStore().defaultAvatar
|
||||
return (
|
||||
useInstanceStore().server +
|
||||
useInstanceStore().instanceIdentity.defaultAvatar
|
||||
)
|
||||
},
|
||||
defaultBanner() {
|
||||
return useInstanceStore().server + useInstanceStore().defaultBanner
|
||||
return (
|
||||
useInstanceStore().server +
|
||||
useInstanceStore().instanceIdentity.defaultBanner
|
||||
)
|
||||
},
|
||||
isDefaultAvatar() {
|
||||
const baseAvatar = useInstanceStore().defaultAvatar
|
||||
|
|
|
|||
|
|
@ -21,6 +21,10 @@ export const staticOrApiConfigDefault = {
|
|||
nsfwCensorImage: null,
|
||||
showFeaturesPanel: true,
|
||||
showInstanceSpecificPanel: false,
|
||||
|
||||
// Html stuff
|
||||
instanceSpecificPanelContent: '',
|
||||
tos: '',
|
||||
}
|
||||
|
||||
/// This object contains setting entries that makes sense
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue