WIP
This commit is contained in:
parent
5bdf341560
commit
35a3d59235
12 changed files with 80 additions and 65 deletions
|
|
@ -172,6 +172,7 @@ const setSettings = async ({ apiConfig, staticConfig, store }) => {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
console.log(config)
|
||||||
|
|
||||||
const copyInstancePrefOption = (path) => {
|
const copyInstancePrefOption = (path) => {
|
||||||
if (get(config, path) !== undefined) {
|
if (get(config, path) !== undefined) {
|
||||||
|
|
@ -277,14 +278,26 @@ const getNodeInfo = async ({ store }) => {
|
||||||
const data = await res.json()
|
const data = await res.json()
|
||||||
const metadata = data.metadata
|
const metadata = data.metadata
|
||||||
const features = metadata.features
|
const features = metadata.features
|
||||||
|
|
||||||
useInstanceStore().set({
|
useInstanceStore().set({
|
||||||
path: 'name',
|
path: 'localBubbleInstances',
|
||||||
|
value: metadata.localBubbleInstances ?? [],
|
||||||
|
})
|
||||||
|
|
||||||
|
useInstanceStore().set({
|
||||||
|
path: 'instanceIdentity.name',
|
||||||
value: metadata.nodeName,
|
value: metadata.nodeName,
|
||||||
})
|
})
|
||||||
|
|
||||||
useInstanceStore().set({
|
useInstanceStore().set({
|
||||||
path: 'registrationOpen',
|
path: 'registrationOpen',
|
||||||
value: data.openRegistrations,
|
value: data.openRegistrations,
|
||||||
})
|
})
|
||||||
|
useInstanceStore().set({
|
||||||
|
path: 'restrictedNicknames',
|
||||||
|
value: metadata.restrictedNicknames,
|
||||||
|
})
|
||||||
|
|
||||||
useInstanceStore().set({
|
useInstanceStore().set({
|
||||||
path: 'featureSet.mediaProxyAvailable',
|
path: 'featureSet.mediaProxyAvailable',
|
||||||
value: features.includes('media_proxy'),
|
value: features.includes('media_proxy'),
|
||||||
|
|
@ -323,10 +336,6 @@ const getNodeInfo = async ({ store }) => {
|
||||||
path: 'featureSet.editingAvailable',
|
path: 'featureSet.editingAvailable',
|
||||||
value: features.includes('editing'),
|
value: features.includes('editing'),
|
||||||
})
|
})
|
||||||
useInstanceStore().set({
|
|
||||||
path: 'pollLimits',
|
|
||||||
value: metadata.pollLimits,
|
|
||||||
})
|
|
||||||
useInstanceStore().set({
|
useInstanceStore().set({
|
||||||
path: 'featureSet.mailerEnabled',
|
path: 'featureSet.mailerEnabled',
|
||||||
value: metadata.mailerEnabled,
|
value: metadata.mailerEnabled,
|
||||||
|
|
@ -344,35 +353,34 @@ const getNodeInfo = async ({ store }) => {
|
||||||
value: features.includes('pleroma:block_expiration'),
|
value: features.includes('pleroma:block_expiration'),
|
||||||
})
|
})
|
||||||
useInstanceStore().set({
|
useInstanceStore().set({
|
||||||
path: 'featureSet.localBubbleInstances',
|
path: 'featureSet.localBubble',
|
||||||
value: metadata.localBubbleInstances ?? [],
|
value: Array.isArray(metadata.localBubbleInstances),
|
||||||
})
|
})
|
||||||
|
|
||||||
const uploadLimits = metadata.uploadLimits
|
const uploadLimits = metadata.uploadLimits
|
||||||
useInstanceStore().set({
|
useInstanceStore().set({
|
||||||
path: 'uploadlimit',
|
path: 'limits.uploadlimit',
|
||||||
value: parseInt(uploadLimits.general),
|
value: parseInt(uploadLimits.general),
|
||||||
})
|
})
|
||||||
useInstanceStore().set({
|
useInstanceStore().set({
|
||||||
path: 'avatarlimit',
|
path: 'limits.avatarlimit',
|
||||||
value: parseInt(uploadLimits.avatar),
|
value: parseInt(uploadLimits.avatar),
|
||||||
})
|
})
|
||||||
useInstanceStore().set({
|
useInstanceStore().set({
|
||||||
path: 'backgroundlimit',
|
path: 'limits.backgroundlimit',
|
||||||
value: parseInt(uploadLimits.background),
|
value: parseInt(uploadLimits.background),
|
||||||
})
|
})
|
||||||
useInstanceStore().set({
|
useInstanceStore().set({
|
||||||
path: 'bannerlimit',
|
path: 'limits.bannerlimit',
|
||||||
value: parseInt(uploadLimits.banner),
|
value: parseInt(uploadLimits.banner),
|
||||||
})
|
})
|
||||||
useInstanceStore().set({
|
useInstanceStore().set({
|
||||||
path: 'fieldsLimits',
|
path: 'limits.fieldsLimits',
|
||||||
value: metadata.fieldsLimits,
|
value: metadata.fieldsLimits,
|
||||||
})
|
})
|
||||||
|
|
||||||
useInstanceStore().set({
|
useInstanceStore().set({
|
||||||
path: 'restrictedNicknames',
|
path: 'limits.pollLimits',
|
||||||
value: metadata.restrictedNicknames,
|
value: metadata.pollLimits,
|
||||||
})
|
})
|
||||||
useInstanceStore().set({
|
useInstanceStore().set({
|
||||||
path: 'featureSet.postFormats',
|
path: 'featureSet.postFormats',
|
||||||
|
|
@ -389,6 +397,8 @@ const getNodeInfo = async ({ store }) => {
|
||||||
value: suggestions.web,
|
value: suggestions.web,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
//
|
||||||
|
|
||||||
const software = data.software
|
const software = data.software
|
||||||
useInstanceStore().set({
|
useInstanceStore().set({
|
||||||
path: 'backendVersion',
|
path: 'backendVersion',
|
||||||
|
|
@ -399,8 +409,7 @@ const getNodeInfo = async ({ store }) => {
|
||||||
value: software.repository,
|
value: software.repository,
|
||||||
})
|
})
|
||||||
|
|
||||||
const priv = metadata.private
|
useInstanceStore().set({ path: 'private', value: metadata.private })
|
||||||
useInstanceStore().set({ path: 'private', value: priv })
|
|
||||||
|
|
||||||
const frontendVersion = window.___pleromafe_commit_hash
|
const frontendVersion = window.___pleromafe_commit_hash
|
||||||
useInstanceStore().set({
|
useInstanceStore().set({
|
||||||
|
|
@ -422,6 +431,7 @@ const getNodeInfo = async ({ store }) => {
|
||||||
path: 'federationPolicy',
|
path: 'federationPolicy',
|
||||||
value: federation,
|
value: federation,
|
||||||
})
|
})
|
||||||
|
|
||||||
useInstanceStore().set({
|
useInstanceStore().set({
|
||||||
path: 'federating',
|
path: 'federating',
|
||||||
value:
|
value:
|
||||||
|
|
@ -542,7 +552,6 @@ const afterStoreSetup = async ({ pinia, store, storageError, i18n }) => {
|
||||||
? overrides.target
|
? overrides.target
|
||||||
: window.location.origin
|
: window.location.origin
|
||||||
useInstanceStore().set({ path: 'server', value: server })
|
useInstanceStore().set({ path: 'server', value: server })
|
||||||
console.log('AFTER', useInstanceStore().server, server)
|
|
||||||
|
|
||||||
await setConfig({ store })
|
await setConfig({ store })
|
||||||
try {
|
try {
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
import { mapGetters } from 'vuex'
|
import { mapGetters } from 'vuex'
|
||||||
|
import { mapState } from 'pinia'
|
||||||
|
|
||||||
import { useInstanceStore } from 'src/stores/instance.js'
|
import { useInstanceStore } from 'src/stores/instance.js'
|
||||||
import { useMediaViewerStore } from 'src/stores/media_viewer'
|
import { useMediaViewerStore } from 'src/stores/media_viewer'
|
||||||
|
|
@ -55,7 +56,7 @@ const Attachment = {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
localDescription: this.description || this.attachment.description,
|
localDescription: this.description || this.attachment.description,
|
||||||
nsfwImage: useInstanceStore().nsfwCensorImage || nsfwImage,
|
nsfwImage: useInstanceStore().instanceIdentity.nsfwCensorImage || nsfwImage,
|
||||||
hideNsfwLocal: useSyncConfigStore().mergedConfig.hideNsfw,
|
hideNsfwLocal: useSyncConfigStore().mergedConfig.hideNsfw,
|
||||||
preloadImage: useSyncConfigStore().mergedConfig.preloadImage,
|
preloadImage: useSyncConfigStore().mergedConfig.preloadImage,
|
||||||
loading: false,
|
loading: false,
|
||||||
|
|
@ -90,9 +91,6 @@ const Attachment = {
|
||||||
usePlaceholder() {
|
usePlaceholder() {
|
||||||
return this.size === 'hide'
|
return this.size === 'hide'
|
||||||
},
|
},
|
||||||
useContainFit() {
|
|
||||||
return useSyncConfigStore().mergedConfig.useContainFit
|
|
||||||
},
|
|
||||||
placeholderName() {
|
placeholderName() {
|
||||||
if (this.attachment.description === '' || !this.attachment.description) {
|
if (this.attachment.description === '' || !this.attachment.description) {
|
||||||
return this.type.toUpperCase()
|
return this.type.toUpperCase()
|
||||||
|
|
@ -125,7 +123,7 @@ const Attachment = {
|
||||||
modalTypes = ['image', 'video', 'audio', 'flash']
|
modalTypes = ['image', 'video', 'audio', 'flash']
|
||||||
break
|
break
|
||||||
default:
|
default:
|
||||||
modalTypes = this.mergedConfig.playVideosInModal
|
modalTypes = this.playVideosInModal
|
||||||
? ['image', 'video', 'flash']
|
? ['image', 'video', 'flash']
|
||||||
: ['image']
|
: ['image']
|
||||||
break
|
break
|
||||||
|
|
@ -135,7 +133,11 @@ const Attachment = {
|
||||||
videoTag() {
|
videoTag() {
|
||||||
return this.useModal ? 'button' : 'span'
|
return this.useModal ? 'button' : 'span'
|
||||||
},
|
},
|
||||||
...mapGetters(['mergedConfig']),
|
...mapState(useSyncConfigStore, {
|
||||||
|
useContainFit: (state) => state.mergedConfig.useContainFit,
|
||||||
|
playVideosInModal: (state) => state.mergedConfig.playVideosInModal,
|
||||||
|
useOneClickNsfw: (state) => state.mergedConfig.useOneClickNsfw,
|
||||||
|
}),
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
'attachment.description'(newVal) {
|
'attachment.description'(newVal) {
|
||||||
|
|
@ -186,9 +188,9 @@ const Attachment = {
|
||||||
},
|
},
|
||||||
toggleHidden(event) {
|
toggleHidden(event) {
|
||||||
if (
|
if (
|
||||||
this.mergedConfig.useOneClickNsfw &&
|
this.useOneClickNsfw &&
|
||||||
!this.showHidden &&
|
!this.showHidden &&
|
||||||
(this.type !== 'video' || this.mergedConfig.playVideosInModal)
|
(this.type !== 'video' || this.playVideosInModal)
|
||||||
) {
|
) {
|
||||||
this.openModal(event)
|
this.openModal(event)
|
||||||
return
|
return
|
||||||
|
|
|
||||||
|
|
@ -87,7 +87,7 @@ const conversation = {
|
||||||
},
|
},
|
||||||
streamingEnabled() {
|
streamingEnabled() {
|
||||||
return (
|
return (
|
||||||
this.mergedConfig.useStreamingApi &&
|
useSyncConfigStore().mergedConfig.useStreamingApi &&
|
||||||
this.mastoUserSocketStatus === WSConnectionStatus.JOINED
|
this.mastoUserSocketStatus === WSConnectionStatus.JOINED
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -118,7 +118,7 @@ const NavPanel = {
|
||||||
}),
|
}),
|
||||||
...mapPiniaState(useInstanceStore, {
|
...mapPiniaState(useInstanceStore, {
|
||||||
bubbleTimeline: (store) =>
|
bubbleTimeline: (store) =>
|
||||||
store.featureSet.localBubbleInstances.length > 0,
|
store.featureSet.localBubble,
|
||||||
pleromaChatMessagesAvailable: (store) =>
|
pleromaChatMessagesAvailable: (store) =>
|
||||||
store.featureSet.pleromaChatMessagesAvailable,
|
store.featureSet.pleromaChatMessagesAvailable,
|
||||||
bookmarkFolders: (store) =>
|
bookmarkFolders: (store) =>
|
||||||
|
|
|
||||||
|
|
@ -78,7 +78,7 @@ const NavPanel = {
|
||||||
pleromaChatMessagesAvailable: (store) =>
|
pleromaChatMessagesAvailable: (store) =>
|
||||||
store.featureSet.pleromaChatMessagesAvailable,
|
store.featureSet.pleromaChatMessagesAvailable,
|
||||||
bubbleTimelinesSupported: (store) =>
|
bubbleTimelinesSupported: (store) =>
|
||||||
store.featureSet.localBubbleInstances.length > 0,
|
store.featureSet.localBubble,
|
||||||
}),
|
}),
|
||||||
...mapState({
|
...mapState({
|
||||||
currentUser: (state) => state.users.currentUser,
|
currentUser: (state) => state.users.currentUser,
|
||||||
|
|
|
||||||
|
|
@ -49,8 +49,8 @@ export const BUTTONS = [
|
||||||
(currentUser.id === status.user.id ||
|
(currentUser.id === status.user.id ||
|
||||||
!PRIVATE_SCOPES.has(status.visibility)),
|
!PRIVATE_SCOPES.has(status.visibility)),
|
||||||
toggleable: true,
|
toggleable: true,
|
||||||
confirm: ({ status, getters }) =>
|
confirm: ({ status, mergedConfig }) =>
|
||||||
!status.repeated && getters.mergedConfig.modalOnRepeat,
|
!status.repeated && mergedConfig.modalOnRepeat,
|
||||||
confirmStrings: {
|
confirmStrings: {
|
||||||
title: 'status.repeat_confirm_title',
|
title: 'status.repeat_confirm_title',
|
||||||
body: 'status.repeat_confirm',
|
body: 'status.repeat_confirm',
|
||||||
|
|
@ -158,8 +158,8 @@ export const BUTTONS = [
|
||||||
name: 'editHistory',
|
name: 'editHistory',
|
||||||
icon: 'history',
|
icon: 'history',
|
||||||
label: 'status.status_history',
|
label: 'status.status_history',
|
||||||
if({ status, state }) {
|
if({ status, instance }) {
|
||||||
return state.instance.editingAvailable && status.edited_at !== null
|
return instance.editingAvailable && status.edited_at !== null
|
||||||
},
|
},
|
||||||
action({ status }) {
|
action({ status }) {
|
||||||
const originalStatus = { ...status }
|
const originalStatus = { ...status }
|
||||||
|
|
@ -186,10 +186,10 @@ export const BUTTONS = [
|
||||||
name: 'edit',
|
name: 'edit',
|
||||||
icon: 'pen',
|
icon: 'pen',
|
||||||
label: 'status.edit',
|
label: 'status.edit',
|
||||||
if({ status, loggedIn, currentUser, state }) {
|
if({ status, loggedIn, currentUser, instance }) {
|
||||||
return (
|
return (
|
||||||
loggedIn &&
|
loggedIn &&
|
||||||
state.instance.editingAvailable &&
|
instance.editingAvailable &&
|
||||||
status.user.id === currentUser.id
|
status.user.id === currentUser.id
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
|
|
@ -222,7 +222,7 @@ export const BUTTONS = [
|
||||||
currentUser.privileges.includes('messages_delete'))
|
currentUser.privileges.includes('messages_delete'))
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
confirm: ({ getters }) => getters.mergedConfig.modalOnDelete,
|
confirm: ({ mergedConfig }) => mergedConfig.modalOnDelete,
|
||||||
confirmStrings: {
|
confirmStrings: {
|
||||||
title: 'status.delete_confirm_title',
|
title: 'status.delete_confirm_title',
|
||||||
body: 'status.delete_confirm',
|
body: 'status.delete_confirm',
|
||||||
|
|
@ -240,10 +240,10 @@ export const BUTTONS = [
|
||||||
name: 'share',
|
name: 'share',
|
||||||
icon: 'share-alt',
|
icon: 'share-alt',
|
||||||
label: 'status.copy_link',
|
label: 'status.copy_link',
|
||||||
action({ state, status, router }) {
|
action({ instance, status, router }) {
|
||||||
navigator.clipboard.writeText(
|
navigator.clipboard.writeText(
|
||||||
[
|
[
|
||||||
state.instance.server,
|
instance.server,
|
||||||
router.resolve({ name: 'conversation', params: { id: status.id } })
|
router.resolve({ name: 'conversation', params: { id: status.id } })
|
||||||
.href,
|
.href,
|
||||||
].join(''),
|
].join(''),
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@ import ConfirmModal from 'src/components/confirm_modal/confirm_modal.vue'
|
||||||
import Popover from 'src/components/popover/popover.vue'
|
import Popover from 'src/components/popover/popover.vue'
|
||||||
import genRandomSeed from 'src/services/random_seed/random_seed.service.js'
|
import genRandomSeed from 'src/services/random_seed/random_seed.service.js'
|
||||||
import { useSyncConfigStore } from 'src/stores/sync_config.js'
|
import { useSyncConfigStore } from 'src/stores/sync_config.js'
|
||||||
|
import { useInstanceStore } from 'src/stores/instance.js'
|
||||||
import ActionButtonContainer from './action_button_container.vue'
|
import ActionButtonContainer from './action_button_container.vue'
|
||||||
import { BUTTONS } from './buttons_definitions.js'
|
import { BUTTONS } from './buttons_definitions.js'
|
||||||
|
|
||||||
|
|
@ -56,8 +57,8 @@ const StatusActionButtons = {
|
||||||
replying: this.replying,
|
replying: this.replying,
|
||||||
emit: this.$emit,
|
emit: this.$emit,
|
||||||
dispatch: this.$store.dispatch,
|
dispatch: this.$store.dispatch,
|
||||||
state: this.$store.state,
|
instance: useInstanceStore(),
|
||||||
getters: this.$store.getters,
|
mergedConfig: useSyncConfigStore().mergedConfig,
|
||||||
router: this.$router,
|
router: this.$router,
|
||||||
currentUser: this.currentUser,
|
currentUser: this.currentUser,
|
||||||
loggedIn: !!this.currentUser,
|
loggedIn: !!this.currentUser,
|
||||||
|
|
|
||||||
|
|
@ -67,7 +67,7 @@ const TimelineMenu = {
|
||||||
bookmarkFolders: (state) =>
|
bookmarkFolders: (state) =>
|
||||||
state.featureSet.pleromaBookmarkFoldersAvailable,
|
state.featureSet.pleromaBookmarkFoldersAvailable,
|
||||||
bubbleTimeline: (state) =>
|
bubbleTimeline: (state) =>
|
||||||
state.featureSet.localBubbleInstances.length > 0,
|
state.featureSet.localBubble,
|
||||||
privateMode: (state) => state.private,
|
privateMode: (state) => state.private,
|
||||||
federating: (state) => state.federating,
|
federating: (state) => state.federating,
|
||||||
}),
|
}),
|
||||||
|
|
|
||||||
|
|
@ -220,11 +220,11 @@ export default {
|
||||||
},
|
},
|
||||||
userHighlightType: {
|
userHighlightType: {
|
||||||
get() {
|
get() {
|
||||||
const data = this.mergedConfig.highlight[this.user.screen_name]
|
const data = this.highlight[this.user.screen_name]
|
||||||
return (data && data.type) || 'disabled'
|
return (data && data.type) || 'disabled'
|
||||||
},
|
},
|
||||||
set(type) {
|
set(type) {
|
||||||
const data = this.mergedConfig.highlight[this.user.screen_name]
|
const data = this.highlight[this.user.screen_name]
|
||||||
if (type !== 'disabled') {
|
if (type !== 'disabled') {
|
||||||
this.$store.dispatch('setHighlight', {
|
this.$store.dispatch('setHighlight', {
|
||||||
user: this.user.screen_name,
|
user: this.user.screen_name,
|
||||||
|
|
@ -241,7 +241,7 @@ export default {
|
||||||
},
|
},
|
||||||
userHighlightColor: {
|
userHighlightColor: {
|
||||||
get() {
|
get() {
|
||||||
const data = this.mergedConfig.highlight[this.user.screen_name]
|
const data = this.highlight[this.user.screen_name]
|
||||||
return data && data.color
|
return data && data.color
|
||||||
},
|
},
|
||||||
set(color) {
|
set(color) {
|
||||||
|
|
@ -384,11 +384,11 @@ export default {
|
||||||
],
|
],
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
...mapGetters(['mergedConfig']),
|
|
||||||
...mapState(useSyncConfigStore, {
|
...mapState(useSyncConfigStore, {
|
||||||
hideUserStats: (store) => store.prefsStorage.simple.hideUserStats,
|
hideUserStats: (store) => store.mergedConfig.hideUserStats,
|
||||||
|
userCardLeftJustify: (store) => store.mergedConfig.userCardLeftJustify,
|
||||||
userCardHidePersonalMarks: (store) =>
|
userCardHidePersonalMarks: (store) =>
|
||||||
store.prefsStorage.simple.userCardHidePersonalMarks,
|
store.mergedConfig.userCardHidePersonalMarks,
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
|
||||||
|
|
@ -357,7 +357,7 @@
|
||||||
<RichContent
|
<RichContent
|
||||||
v-if="!hideBio"
|
v-if="!hideBio"
|
||||||
class="user-card-bio"
|
class="user-card-bio"
|
||||||
:class="{ '-justify-left': mergedConfig.userCardLeftJustify }"
|
:class="{ '-justify-left': userCardLeftJustify }"
|
||||||
:html="editable ? newBio.replace(/\n/g, '<br>') : user.description_html"
|
:html="editable ? newBio.replace(/\n/g, '<br>') : user.description_html"
|
||||||
:emoji="editable ? emoji : user.emoji"
|
:emoji="editable ? emoji : user.emoji"
|
||||||
:handle-links="true"
|
:handle-links="true"
|
||||||
|
|
@ -368,7 +368,7 @@
|
||||||
v-model="newBio"
|
v-model="newBio"
|
||||||
enable-emoji-picker
|
enable-emoji-picker
|
||||||
class="user-card-bio"
|
class="user-card-bio"
|
||||||
:class="{ '-justify-left': mergedConfig.userCardLeftJustify }"
|
:class="{ '-justify-left': userCardLeftJustify }"
|
||||||
:suggest="emojiUserSuggestor"
|
:suggest="emojiUserSuggestor"
|
||||||
>
|
>
|
||||||
<template #default="inputProps">
|
<template #default="inputProps">
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@ const browserLocale = (window.navigator.language || 'en').split('-')[0]
|
||||||
/// Put settings here only if it does not make sense for a normal user
|
/// Put settings here only if it does not make sense for a normal user
|
||||||
/// to override it.
|
/// to override it.
|
||||||
export const staticOrApiConfigDefault = {
|
export const staticOrApiConfigDefault = {
|
||||||
|
name: 'PleromaFE',
|
||||||
theme: 'pleroma-dark',
|
theme: 'pleroma-dark',
|
||||||
palette: null,
|
palette: null,
|
||||||
style: null,
|
style: null,
|
||||||
|
|
@ -18,7 +19,7 @@ export const staticOrApiConfigDefault = {
|
||||||
redirectRootLogin: '/main/friends',
|
redirectRootLogin: '/main/friends',
|
||||||
redirectRootNoLogin: '/main/all',
|
redirectRootNoLogin: '/main/all',
|
||||||
hideSitename: false,
|
hideSitename: false,
|
||||||
nsfwCensorImage: undefined,
|
nsfwCensorImage: null,
|
||||||
showFeaturesPanel: true,
|
showFeaturesPanel: true,
|
||||||
showInstanceSpecificPanel: false,
|
showInstanceSpecificPanel: false,
|
||||||
}
|
}
|
||||||
|
|
@ -93,7 +94,7 @@ export const instanceDefaultConfig = {
|
||||||
sidebarRight: false,
|
sidebarRight: false,
|
||||||
scopeCopy: true,
|
scopeCopy: true,
|
||||||
subjectLineBehavior: 'email',
|
subjectLineBehavior: 'email',
|
||||||
alwaysShowSubjectInput: false,
|
alwaysShowSubjectInput: true,
|
||||||
postContentType: 'text/plain',
|
postContentType: 'text/plain',
|
||||||
minimalScopesMode: false,
|
minimalScopesMode: false,
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -18,11 +18,6 @@ const defaultState = {
|
||||||
registrationOpen: true,
|
registrationOpen: true,
|
||||||
server: 'http://localhost:4040/',
|
server: 'http://localhost:4040/',
|
||||||
textlimit: 5000,
|
textlimit: 5000,
|
||||||
bannerlimit: null,
|
|
||||||
avatarlimit: null,
|
|
||||||
backgroundlimit: null,
|
|
||||||
uploadlimit: null,
|
|
||||||
fieldsLimits: null,
|
|
||||||
private: false,
|
private: false,
|
||||||
federating: true,
|
federating: true,
|
||||||
federationPolicy: null,
|
federationPolicy: null,
|
||||||
|
|
@ -41,6 +36,20 @@ const defaultState = {
|
||||||
...staticOrApiConfigDefault,
|
...staticOrApiConfigDefault,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
limits: {
|
||||||
|
bannerlimit: null,
|
||||||
|
avatarlimit: null,
|
||||||
|
backgroundlimit: null,
|
||||||
|
uploadlimit: null,
|
||||||
|
fieldsLimits: null,
|
||||||
|
pollLimits: {
|
||||||
|
max_options: 4,
|
||||||
|
max_option_chars: 255,
|
||||||
|
min_expiration: 60,
|
||||||
|
max_expiration: 60 * 60 * 24,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
// Instance admins can override default settings for the whole instance
|
// Instance admins can override default settings for the whole instance
|
||||||
prefsStorage: {
|
prefsStorage: {
|
||||||
...instanceDefaultConfig,
|
...instanceDefaultConfig,
|
||||||
|
|
@ -56,6 +65,7 @@ const defaultState = {
|
||||||
birthdayRequired: false,
|
birthdayRequired: false,
|
||||||
birthdayMinAge: 0,
|
birthdayMinAge: 0,
|
||||||
restrictedNicknames: [],
|
restrictedNicknames: [],
|
||||||
|
localBubbleInstances: [], // Akkoma
|
||||||
|
|
||||||
// Feature-set, apparently, not everything here is reported...
|
// Feature-set, apparently, not everything here is reported...
|
||||||
featureSet: {
|
featureSet: {
|
||||||
|
|
@ -79,7 +89,7 @@ const defaultState = {
|
||||||
blockExpiration: false,
|
blockExpiration: false,
|
||||||
tagPolicyAvailable: false,
|
tagPolicyAvailable: false,
|
||||||
pollsAvailable: false,
|
pollsAvailable: false,
|
||||||
localBubbleInstances: [], // Akkoma
|
localBubble: false, // Akkoma
|
||||||
},
|
},
|
||||||
|
|
||||||
// Html stuff
|
// Html stuff
|
||||||
|
|
@ -90,14 +100,6 @@ const defaultState = {
|
||||||
backendVersion: '',
|
backendVersion: '',
|
||||||
backendRepository: '',
|
backendRepository: '',
|
||||||
frontendVersion: '',
|
frontendVersion: '',
|
||||||
|
|
||||||
pollsAvailable: false,
|
|
||||||
pollLimits: {
|
|
||||||
max_options: 4,
|
|
||||||
max_option_chars: 255,
|
|
||||||
min_expiration: 60,
|
|
||||||
max_expiration: 60 * 60 * 24,
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export const useInstanceStore = defineStore('instance', {
|
export const useInstanceStore = defineStore('instance', {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue