From 25209356760d40ff787019010ce8d7017e2ed04a Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Tue, 24 Mar 2026 13:59:47 +0200 Subject: [PATCH] lint --- src/modules/default_config_state.js | 5 +++-- src/stores/instance.js | 2 +- src/stores/sync_config.js | 4 +++- test/unit/specs/stores/sync_config.spec.js | 3 ++- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/modules/default_config_state.js b/src/modules/default_config_state.js index 8634752bd..429bdd931 100644 --- a/src/modules/default_config_state.js +++ b/src/modules/default_config_state.js @@ -5,9 +5,9 @@ const browserLocale = (navigator.language || 'en').split('-')[0] /// to override it. export const staticOrApiConfigDefault = { name: 'PleromaFE', - theme: 'pleroma-dark', + theme: null, palette: null, - style: null, + style: 'breezy', themeChecksum: undefined, defaultAvatar: '/images/avi.png', defaultBanner: '/images/banner.png', @@ -189,6 +189,7 @@ export const defaultConfigLocal = { themeDebug: false, // debug mode that uses computed backgrounds instead of real ones to debug contrast functions forceThemeRecompilation: false, // flag that forces recompilation on boot even if cache exists } + export const LOCAL_ONLY_KEYS = new Set(Object.keys(defaultConfigLocal)) export const makeUndefined = (c) => diff --git a/src/stores/instance.js b/src/stores/instance.js index c893cab64..0838f7a51 100644 --- a/src/stores/instance.js +++ b/src/stores/instance.js @@ -3,8 +3,8 @@ import { defineStore } from 'pinia' import { instanceDefaultProperties } from '../modules/config.js' import { - instanceDefaultConfig, defaultConfigLocal, + instanceDefaultConfig, staticOrApiConfigDefault, } from '../modules/default_config_state.js' import apiService from '../services/api/api.service.js' diff --git a/src/stores/sync_config.js b/src/stores/sync_config.js index 84011e2cf..d4b5ad50a 100644 --- a/src/stores/sync_config.js +++ b/src/stores/sync_config.js @@ -643,7 +643,9 @@ export const useSyncConfigStore = defineStore('sync_config', { vuexState.config = vuexState.config ?? {} const migratedEntries = new Set(vuexState.config._syncMigration ?? []) - console.debug(`Already migrated Values: ${[...migratedEntries].join() || '[none]'}`) + console.debug( + `Already migrated Values: ${[...migratedEntries].join() || '[none]'}`, + ) Object.entries(oldDefaultConfigSync).forEach(([key, value]) => { const oldValue = vuexState.config[key] diff --git a/test/unit/specs/stores/sync_config.spec.js b/test/unit/specs/stores/sync_config.spec.js index 8078b5949..eef6e39ac 100644 --- a/test/unit/specs/stores/sync_config.spec.js +++ b/test/unit/specs/stores/sync_config.spec.js @@ -1,6 +1,8 @@ import { cloneDeep } from 'lodash' import { createPinia, setActivePinia } from 'pinia' +import { CURRENT_UPDATE_COUNTER } from 'src/components/update_notification/update_notification.js' + import { _getAllFlags, _getRecentData, @@ -15,7 +17,6 @@ import { useSyncConfigStore, VERSION, } from 'src/stores/sync_config.js' -import { CURRENT_UPDATE_COUNTER } from 'src/components/update_notification/update_notification.js' describe('The SyncConfig store', () => { beforeEach(() => {