diff options
| author | HJ <30-hj@users.noreply.git.pleroma.social> | 2024-07-31 16:31:06 +0000 |
|---|---|---|
| committer | HJ <30-hj@users.noreply.git.pleroma.social> | 2024-07-31 16:31:06 +0000 |
| commit | 6bc020c733047d7033e508a2b4dffc581d703170 (patch) | |
| tree | fe52d41d57c827e8872da21e5ac10d412058f43e /src/modules/instance.js | |
| parent | 83acbf953a4f50a017e3e857ecbd0b008f0b3be0 (diff) | |
| parent | 9d51eccf5dd0b4b773db5ec146d818b6c8fe18ac (diff) | |
Merge branch 'release/2.7.x' into 'master'
Release 2.7.0
See merge request pleroma/pleroma-fe!1928
Diffstat (limited to 'src/modules/instance.js')
| -rw-r--r-- | src/modules/instance.js | 43 |
1 files changed, 18 insertions, 25 deletions
diff --git a/src/modules/instance.js b/src/modules/instance.js index 1ee64552..99b8b5d5 100644 --- a/src/modules/instance.js +++ b/src/modules/instance.js @@ -1,5 +1,3 @@ -import { getPreset, applyTheme } from '../services/style_setter/style_setter.js' -import { CURRENT_VERSION } from '../services/theme_data/theme_data.service.js' import apiService from '../services/api/api.service.js' import { instanceDefaultProperties } from './config.js' import { langCodeToCldrName, ensureFinalFallback } from '../i18n/languages.js' @@ -44,7 +42,7 @@ const defaultState = { registrationOpen: true, server: 'http://localhost:4040/', textlimit: 5000, - themeData: undefined, + themeData: undefined, // used for theme editor v2 vapidPublicKey: undefined, // Stuff from static/config.json @@ -71,6 +69,7 @@ const defaultState = { hideSitename: false, hideUserStats: false, muteBotStatuses: false, + muteSensitiveStatuses: false, modalOnRepeat: false, modalOnUnfollow: false, modalOnBlock: true, @@ -97,14 +96,29 @@ const defaultState = { sidebarRight: false, subjectLineBehavior: 'email', theme: 'pleroma-dark', + emojiReactionsScale: 0.5, + textSize: '14px', + emojiSize: '2.2rem', + navbarSize: '3.5rem', + panelHeaderSize: '3.2rem', + 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, // Nasty stuff customEmoji: [], @@ -129,6 +143,7 @@ const defaultState = { suggestionsEnabled: false, suggestionsWeb: '', quotingAvailable: false, + groupActorAvailable: false, // Html stuff instanceSpecificPanelContent: '', @@ -269,9 +284,6 @@ const instance = { dispatch('initializeSocket') } break - case 'theme': - dispatch('setTheme', value) - break } }, async getStaticEmoji ({ commit }) { @@ -360,25 +372,6 @@ const instance = { console.warn(e) } }, - - setTheme ({ commit, rootState }, themeName) { - commit('setInstanceOption', { name: 'theme', value: themeName }) - getPreset(themeName) - .then(themeData => { - commit('setInstanceOption', { name: 'themeData', value: themeData }) - // No need to apply theme if there's user theme already - const { customTheme } = rootState.config - if (customTheme) return - - // New theme presets don't have 'theme' property, they use 'source' - const themeSource = themeData.source - if (!themeData.theme || (themeSource && themeSource.themeEngineVersion === CURRENT_VERSION)) { - applyTheme(themeSource) - } else { - applyTheme(themeData.theme) - } - }) - }, fetchEmoji ({ dispatch, state }) { if (!state.customEmojiFetched) { state.customEmojiFetched = true |
