nicolium: use new key for frontend_configurations

Signed-off-by: nicole mikołajczyk <git@mkljczk.pl>
This commit is contained in:
nicole mikołajczyk
2026-03-02 21:35:22 +01:00
parent 29ac4cc790
commit f958e56278
3 changed files with 11 additions and 7 deletions

View File

@ -49,7 +49,7 @@ const updateFrontendConfig = (data: Record<string, any>) => (dispatch: AppDispat
key: ':frontend_configurations',
value: [
{
tuple: [':pl_fe', data],
tuple: [':nicolium', data],
},
],
},

View File

@ -33,10 +33,14 @@ const fetchFrontendConfig =
if (features.frontendConfigurations) {
return dispatch(fetchFrontendConfigurations()).then((data) => {
const key = 'pl_fe';
if (data[key]) {
dispatch(importFrontendConfig(data[key], host));
return data[key];
const legacyKey = 'pl_fe';
const key = 'nicolium';
const foundData = data[key] || data[legacyKey];
if (foundData) {
dispatch(importFrontendConfig(foundData, host));
return foundData;
} else {
return dispatch(fetchFrontendConfigJson(host));
}

View File

@ -35,8 +35,8 @@ const preloadImport = (state: Record<string, any>, action: Record<string, any>)
const feData = action.data[path];
if (feData) {
const plfe = feData.pl_fe;
return plfe ? { ...fallbackState, ...plfe } : fallbackState;
const nicoliumConfig = feData.nicolium || feData.pl_fe;
return nicoliumConfig ? { ...fallbackState, ...nicoliumConfig } : fallbackState;
} else {
return state;
}