From 1087edbc69091e80d5fb9ee79224d6efd751046f Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Sat, 25 May 2024 11:23:09 -0500 Subject: [PATCH] rename MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: marcin mikołajczak --- src/__fixtures__/admin_api_frontend_config.json | 2 +- src/__fixtures__/config_db.json | 4 ++-- src/actions/admin.ts | 2 +- src/actions/settings.ts | 2 +- src/actions/soapbox.ts | 6 +++--- src/reducers/compose.test.ts | 4 ++-- src/reducers/soapbox.ts | 4 ++-- 7 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/__fixtures__/admin_api_frontend_config.json b/src/__fixtures__/admin_api_frontend_config.json index ee37450f81..311cb3d95f 100644 --- a/src/__fixtures__/admin_api_frontend_config.json +++ b/src/__fixtures__/admin_api_frontend_config.json @@ -6,7 +6,7 @@ "value": [ { "tuple": [ - ":soapbox_fe", + ":pl_fe", { "logo": "blob:http://localhost:3036/0cdfa863-6889-4199-b870-4942cedd364f", "banner": "blob:http://localhost:3036/a835afed-6078-45bd-92b4-7ffd858c3eca", diff --git a/src/__fixtures__/config_db.json b/src/__fixtures__/config_db.json index 240164bb63..10e20a3f51 100644 --- a/src/__fixtures__/config_db.json +++ b/src/__fixtures__/config_db.json @@ -2665,7 +2665,7 @@ }, { "db": [ - ":soapbox_fe" + ":pl_fe" ], "group": ":pleroma", "key": ":frontend_configurations", @@ -2714,7 +2714,7 @@ }, { "tuple": [ - ":soapbox_fe", + ":pl_fe", { "brandColor": "#0e9066", "copyright": "♥2020. Copying is an act of love. Please copy and share.", diff --git a/src/actions/admin.ts b/src/actions/admin.ts index 917085d982..b2d53b2c53 100644 --- a/src/actions/admin.ts +++ b/src/actions/admin.ts @@ -104,7 +104,7 @@ const updateSoapboxConfig = (data: Record) => group: ':pleroma', key: ':frontend_configurations', value: [{ - tuple: [':soapbox_fe', data], + tuple: [':pl_fe', data], }], }]; diff --git a/src/actions/settings.ts b/src/actions/settings.ts index e1b5ac478c..c65148d4a0 100644 --- a/src/actions/settings.ts +++ b/src/actions/settings.ts @@ -13,7 +13,7 @@ const SETTING_CHANGE = 'SETTING_CHANGE' as const; const SETTING_SAVE = 'SETTING_SAVE' as const; const SETTINGS_UPDATE = 'SETTINGS_UPDATE' as const; -const FE_NAME = 'soapbox_fe'; +const FE_NAME = 'pl_fe'; /** Options when changing/saving settings. */ type SettingOpts = { diff --git a/src/actions/soapbox.ts b/src/actions/soapbox.ts index d0cdf5ccae..58c4a66fca 100644 --- a/src/actions/soapbox.ts +++ b/src/actions/soapbox.ts @@ -61,9 +61,9 @@ const fetchSoapboxConfig = (host: string | null) => if (features.frontendConfigurations) { return dispatch(fetchFrontendConfigurations()).then(data => { - if (data.soapbox_fe) { - dispatch(importSoapboxConfig(data.soapbox_fe, host)); - return data.soapbox_fe; + if (data.pl_fe) { + dispatch(importSoapboxConfig(data.pl_fe, host)); + return data.pl_fe; } }); } else { diff --git a/src/reducers/compose.test.ts b/src/reducers/compose.test.ts index 181e3b3356..4357748c33 100644 --- a/src/reducers/compose.test.ts +++ b/src/reducers/compose.test.ts @@ -165,7 +165,7 @@ describe('compose reducer', () => { const state = initialState.set('default', ReducerCompose({ privacy: 'public' })); const action = { type: ME_FETCH_SUCCESS, - me: { pleroma: { settings_store: { soapbox_fe: { defaultPrivacy: 'unlisted' } } } }, + me: { pleroma: { settings_store: { pl_fe: { defaultPrivacy: 'unlisted' } } } }, }; expect(reducer(state, action as any).toJS().default).toMatchObject({ privacy: 'unlisted', @@ -188,7 +188,7 @@ describe('compose reducer', () => { const state = initialState.set('default', ReducerCompose({ privacy: 'public' })); const action = { type: ME_PATCH_SUCCESS, - me: { pleroma: { settings_store: { soapbox_fe: { defaultPrivacy: 'unlisted' } } } }, + me: { pleroma: { settings_store: { pl_fe: { defaultPrivacy: 'unlisted' } } } }, }; expect(reducer(state, action).toJS().default).toMatchObject({ privacy: 'unlisted', diff --git a/src/reducers/soapbox.ts b/src/reducers/soapbox.ts index f2ac74893c..c3b1cc33ea 100644 --- a/src/reducers/soapbox.ts +++ b/src/reducers/soapbox.ts @@ -21,7 +21,7 @@ const updateFromAdmin = (state: ImmutableMap, configs: ImmutableLis try { return ConfigDB.find(configs, ':pleroma', ':frontend_configurations')! .get('value') - .find((value: ImmutableMap) => value.getIn(['tuple', 0]) === ':soapbox_fe') + .find((value: ImmutableMap) => value.getIn(['tuple', 0]) === ':pl_fe') .getIn(['tuple', 1]); } catch { return state; @@ -33,7 +33,7 @@ const preloadImport = (state: ImmutableMap, action: Record