Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
Alex Gleason 2024-05-25 11:23:09 -05:00 committed by marcin mikołajczak
parent 8a2f6d251e
commit 1087edbc69
7 changed files with 12 additions and 12 deletions

View file

@ -6,7 +6,7 @@
"value": [ "value": [
{ {
"tuple": [ "tuple": [
":soapbox_fe", ":pl_fe",
{ {
"logo": "blob:http://localhost:3036/0cdfa863-6889-4199-b870-4942cedd364f", "logo": "blob:http://localhost:3036/0cdfa863-6889-4199-b870-4942cedd364f",
"banner": "blob:http://localhost:3036/a835afed-6078-45bd-92b4-7ffd858c3eca", "banner": "blob:http://localhost:3036/a835afed-6078-45bd-92b4-7ffd858c3eca",

View file

@ -2665,7 +2665,7 @@
}, },
{ {
"db": [ "db": [
":soapbox_fe" ":pl_fe"
], ],
"group": ":pleroma", "group": ":pleroma",
"key": ":frontend_configurations", "key": ":frontend_configurations",
@ -2714,7 +2714,7 @@
}, },
{ {
"tuple": [ "tuple": [
":soapbox_fe", ":pl_fe",
{ {
"brandColor": "#0e9066", "brandColor": "#0e9066",
"copyright": "♥2020. Copying is an act of love. Please copy and share.", "copyright": "♥2020. Copying is an act of love. Please copy and share.",

View file

@ -104,7 +104,7 @@ const updateSoapboxConfig = (data: Record<string, any>) =>
group: ':pleroma', group: ':pleroma',
key: ':frontend_configurations', key: ':frontend_configurations',
value: [{ value: [{
tuple: [':soapbox_fe', data], tuple: [':pl_fe', data],
}], }],
}]; }];

View file

@ -13,7 +13,7 @@ const SETTING_CHANGE = 'SETTING_CHANGE' as const;
const SETTING_SAVE = 'SETTING_SAVE' as const; const SETTING_SAVE = 'SETTING_SAVE' as const;
const SETTINGS_UPDATE = 'SETTINGS_UPDATE' as const; const SETTINGS_UPDATE = 'SETTINGS_UPDATE' as const;
const FE_NAME = 'soapbox_fe'; const FE_NAME = 'pl_fe';
/** Options when changing/saving settings. */ /** Options when changing/saving settings. */
type SettingOpts = { type SettingOpts = {

View file

@ -61,9 +61,9 @@ const fetchSoapboxConfig = (host: string | null) =>
if (features.frontendConfigurations) { if (features.frontendConfigurations) {
return dispatch(fetchFrontendConfigurations()).then(data => { return dispatch(fetchFrontendConfigurations()).then(data => {
if (data.soapbox_fe) { if (data.pl_fe) {
dispatch(importSoapboxConfig(data.soapbox_fe, host)); dispatch(importSoapboxConfig(data.pl_fe, host));
return data.soapbox_fe; return data.pl_fe;
} }
}); });
} else { } else {

View file

@ -165,7 +165,7 @@ describe('compose reducer', () => {
const state = initialState.set('default', ReducerCompose({ privacy: 'public' })); const state = initialState.set('default', ReducerCompose({ privacy: 'public' }));
const action = { const action = {
type: ME_FETCH_SUCCESS, 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({ expect(reducer(state, action as any).toJS().default).toMatchObject({
privacy: 'unlisted', privacy: 'unlisted',
@ -188,7 +188,7 @@ describe('compose reducer', () => {
const state = initialState.set('default', ReducerCompose({ privacy: 'public' })); const state = initialState.set('default', ReducerCompose({ privacy: 'public' }));
const action = { const action = {
type: ME_PATCH_SUCCESS, 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({ expect(reducer(state, action).toJS().default).toMatchObject({
privacy: 'unlisted', privacy: 'unlisted',

View file

@ -21,7 +21,7 @@ const updateFromAdmin = (state: ImmutableMap<string, any>, configs: ImmutableLis
try { try {
return ConfigDB.find(configs, ':pleroma', ':frontend_configurations')! return ConfigDB.find(configs, ':pleroma', ':frontend_configurations')!
.get('value') .get('value')
.find((value: ImmutableMap<string, any>) => value.getIn(['tuple', 0]) === ':soapbox_fe') .find((value: ImmutableMap<string, any>) => value.getIn(['tuple', 0]) === ':pl_fe')
.getIn(['tuple', 1]); .getIn(['tuple', 1]);
} catch { } catch {
return state; return state;
@ -33,7 +33,7 @@ const preloadImport = (state: ImmutableMap<string, any>, action: Record<string,
const feData = action.data[path]; const feData = action.data[path];
if (feData) { if (feData) {
const soapbox = feData.soapbox_fe; const soapbox = feData.pl_fe;
return soapbox ? fallbackState.mergeDeep(fromJS(soapbox)) : fallbackState; return soapbox ? fallbackState.mergeDeep(fromJS(soapbox)) : fallbackState;
} else { } else {
return state; return state;