Make every configuration option default-overridable by instance admins

This commit is contained in:
tusooa 2025-10-14 18:15:46 -04:00
commit dd910ff8a8
No known key found for this signature in database
GPG key ID: 42AEC43D48433C51
5 changed files with 156 additions and 218 deletions

View file

@ -6,7 +6,7 @@ import localeService from '../services/locale/locale.service.js'
import { useI18nStore } from 'src/stores/i18n.js'
import { useInterfaceStore } from 'src/stores/interface.js'
import { defaultState } from './default_config_state.js'
import { instanceDefaultConfig, defaultState } from './default_config_state.js'
const BACKEND_LANGUAGE_COOKIE_NAME = 'userLanguage'
const APPEARANCE_SETTINGS_KEYS = new Set([
@ -38,9 +38,7 @@ export const multiChoiceProperties = [
]
// caching the instance default properties
export const instanceDefaultProperties = Object.entries(defaultState)
.filter(([, value]) => value === undefined)
.map(([key]) => key)
export const instanceDefaultProperties = Object.keys(instanceDefaultConfig)
const config = {
state: { ...defaultState },