Make every configuration option default-overridable by instance admins
This commit is contained in:
parent
90f7dee343
commit
dd910ff8a8
5 changed files with 156 additions and 218 deletions
|
|
@ -4,6 +4,7 @@ import { ensureFinalFallback } from '../i18n/languages.js'
|
|||
import { useInterfaceStore } from 'src/stores/interface.js'
|
||||
// See build/emojis_plugin for more details
|
||||
import { annotationsLoader } from 'virtual:pleroma-fe/emoji-annotations'
|
||||
import { staticOrApiConfigDefault, instanceDefaultConfig } from './default_config_state.js';
|
||||
|
||||
const SORTED_EMOJI_GROUP_IDS = [
|
||||
'smileys-and-emotion',
|
||||
|
|
@ -52,90 +53,15 @@ const defaultState = {
|
|||
vapidPublicKey: undefined,
|
||||
|
||||
// Stuff from static/config.json
|
||||
alwaysShowSubjectInput: true,
|
||||
defaultAvatar: '/images/avi.png',
|
||||
defaultBanner: '/images/banner.png',
|
||||
background: '/static/aurora_borealis.jpg',
|
||||
embeddedToS: true,
|
||||
collapseMessageWithSubject: false,
|
||||
greentext: false,
|
||||
mentionLinkDisplay: 'short',
|
||||
mentionLinkShowTooltip: true,
|
||||
mentionLinkShowAvatar: false,
|
||||
mentionLinkFadeDomain: true,
|
||||
mentionLinkShowYous: false,
|
||||
mentionLinkBoldenYou: true,
|
||||
hideFilteredStatuses: false,
|
||||
// bad name: actually hides posts of muted USERS
|
||||
hideMutedPosts: false,
|
||||
hideMutedThreads: true,
|
||||
hideWordFilteredPosts: false,
|
||||
hidePostStats: false,
|
||||
hideBotIndication: false,
|
||||
hideSitename: false,
|
||||
hideUserStats: false,
|
||||
muteBotStatuses: false,
|
||||
muteSensitiveStatuses: false,
|
||||
modalOnRepeat: false,
|
||||
modalOnUnfollow: false,
|
||||
modalOnBlock: true,
|
||||
modalOnMute: false,
|
||||
modalOnMuteConversation: false,
|
||||
modalOnMuteDomain: true,
|
||||
modalOnDelete: true,
|
||||
modalOnLogout: true,
|
||||
modalOnApproveFollow: false,
|
||||
modalOnDenyFollow: false,
|
||||
modalOnRemoveUserFromFollowers: false,
|
||||
modalMobileCenter: false,
|
||||
loginMethod: 'password',
|
||||
logo: '/static/logo.svg',
|
||||
logoMargin: '.2em',
|
||||
logoMask: true,
|
||||
logoLeft: false,
|
||||
disableUpdateNotification: false,
|
||||
minimalScopesMode: false,
|
||||
nsfwCensorImage: undefined,
|
||||
postContentType: 'text/plain',
|
||||
redirectRootLogin: '/main/friends',
|
||||
redirectRootNoLogin: '/main/all',
|
||||
scopeCopy: true,
|
||||
showFeaturesPanel: true,
|
||||
showInstanceSpecificPanel: false,
|
||||
sidebarRight: false,
|
||||
subjectLineBehavior: 'email',
|
||||
theme: 'pleroma-dark',
|
||||
palette: null,
|
||||
style: null,
|
||||
emojiReactionsScale: 0.5,
|
||||
textSize: '1rem',
|
||||
emojiSize: '2.2rem',
|
||||
navbarSize: '3.5rem',
|
||||
panelHeaderSize: '3.2rem',
|
||||
themeEditorMinWidth: '0rem',
|
||||
forcedRoundness: -1,
|
||||
|
||||
fontsOverride: {},
|
||||
virtualScrolling: true,
|
||||
sensitiveByDefault: false,
|
||||
conversationDisplay: 'linear',
|
||||
conversationTreeAdvanced: false,
|
||||
conversationOtherRepliesButton: 'below',
|
||||
conversationTreeFadeAncestors: false,
|
||||
showExtraNotifications: true,
|
||||
showExtraNotificationsTip: true,
|
||||
showChatsInExtraNotifications: true,
|
||||
showAnnouncementsInExtraNotifications: true,
|
||||
showFollowRequestsInExtraNotifications: true,
|
||||
maxDepthInThread: 6,
|
||||
autocompleteSelect: false,
|
||||
closingDrawerMarksAsSeen: true,
|
||||
unseenAtTop: false,
|
||||
ignoreInactionableSeen: false,
|
||||
unsavedPostAction: 'confirm',
|
||||
autoSaveDraft: false,
|
||||
useAbsoluteTimeFormat: false,
|
||||
absoluteTimeFormatMinAge: '0d',
|
||||
absoluteTime12h: '24h',
|
||||
|
||||
// Instance-wide configurations that should not be changed by individual users
|
||||
...staticOrApiConfigDefault,
|
||||
// Instance admins can override default settings for the whole instance
|
||||
...instanceDefaultConfig,
|
||||
|
||||
// Nasty stuff
|
||||
customEmoji: [],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue