9f4a9bff46
* upstream/develop: (173 commits) Fix: Change condition fix typo update store according to retweeted status #433 - update sort by for conversation display replies_count right after reply icon expose replies_count from mastodon api Apparently, MastoAPI gives status in ancestors if you try opening a repeat... make side drawer use gesture service and fix its animations review/remove error hiding errata review #433 - sort conversation for retweets and clean up Revert "Merge branch 'revert-987b5162' into 'develop'" Revert "Merge branch 'mastoapi/friends-tl' into 'develop'" Add await to login action' Remove console log Fix warnings in user profile routing Add tests for gesture service, fix bug with perpendicular directions #255 - clean up autocomplete form #255 - clean up user settings page with self-closing html tags ...
85 lines
2.0 KiB
JavaScript
85 lines
2.0 KiB
JavaScript
import { set } from 'vue'
|
|
import { setPreset } from '../services/style_setter/style_setter.js'
|
|
|
|
const defaultState = {
|
|
// Stuff from static/config.json and apiConfig
|
|
name: 'Pleroma FE',
|
|
registrationOpen: true,
|
|
textlimit: 5000,
|
|
server: 'http://localhost:4040/',
|
|
theme: 'pleroma-dark',
|
|
background: '/static/aurora_borealis.jpg',
|
|
logo: '/static/logo.png',
|
|
logoMask: true,
|
|
logoMargin: '.2em',
|
|
redirectRootNoLogin: '/main/all',
|
|
redirectRootLogin: '/main/friends',
|
|
showInstanceSpecificPanel: false,
|
|
formattingOptionsEnabled: false,
|
|
alwaysShowSubjectInput: true,
|
|
hideMutedPosts: false,
|
|
collapseMessageWithSubject: false,
|
|
hidePostStats: false,
|
|
hideUserStats: false,
|
|
hideFilteredStatuses: false,
|
|
disableChat: false,
|
|
scopeCopy: true,
|
|
subjectLineBehavior: 'email',
|
|
postContentType: 'text/plain',
|
|
loginMethod: 'password',
|
|
nsfwCensorImage: undefined,
|
|
vapidPublicKey: undefined,
|
|
noAttachmentLinks: false,
|
|
showFeaturesPanel: true,
|
|
minimalScopesMode: false,
|
|
|
|
// Nasty stuff
|
|
pleromaBackend: true,
|
|
emoji: [],
|
|
customEmoji: [],
|
|
restrictedNicknames: [],
|
|
postFormats: [],
|
|
|
|
// Feature-set, apparently, not everything here is reported...
|
|
mediaProxyAvailable: false,
|
|
chatAvailable: false,
|
|
gopherAvailable: false,
|
|
suggestionsEnabled: false,
|
|
suggestionsWeb: '',
|
|
|
|
// Html stuff
|
|
instanceSpecificPanelContent: '',
|
|
tos: '',
|
|
|
|
// Version Information
|
|
backendVersion: '',
|
|
frontendVersion: ''
|
|
}
|
|
|
|
const instance = {
|
|
state: defaultState,
|
|
mutations: {
|
|
setInstanceOption (state, { name, value }) {
|
|
if (typeof value !== 'undefined') {
|
|
set(state, name, value)
|
|
}
|
|
}
|
|
},
|
|
actions: {
|
|
setInstanceOption ({ commit, dispatch }, { name, value }) {
|
|
commit('setInstanceOption', {name, value})
|
|
switch (name) {
|
|
case 'name':
|
|
dispatch('setPageTitle')
|
|
break
|
|
}
|
|
},
|
|
setTheme ({ commit }, themeName) {
|
|
commit('setInstanceOption', { name: 'theme', value: themeName })
|
|
return setPreset(themeName, commit)
|
|
}
|
|
}
|
|
}
|
|
|
|
export default instance
|