🐛 App tile flex fix (#1255)

* 🎨 flex

* 🎨 Improved flex organization on app tile

* ✏️ disallowAppNameProgagation to Propagation

* ✨ User customizable lineclamp and config migration
This commit is contained in:
Tagaishi authored and GitHub committed 2023-08-11 20:47:14 +02:00
1 parent d5f74eb4bf
commit d6736d6539
9 files changed
+121 -94

No files matched your search

+17
View File
@@ -10,6 +10,8 @@ export const getFrontendConfig = async (name: string): Promise<ConfigType> => {
let config = getConfig(name);
let shouldMigrateConfig = false;
config = migrateAppConfigs(config);
const anyWeatherWidgetWithStringLocation = config.widgets.some(
(widget) => widget.type === 'weather' && typeof widget.properties.location === 'string'
);
@@ -129,3 +131,18 @@ const migratePiholeIntegrationField = (config: BackendConfigType) => {
}),
};
};
const migrateAppConfigs = (config: BackendConfigType) => {
return {
...config,
apps: config.apps.map((app) => ({
...app,
appearance: {
...app.appearance,
appNameStatus: app.appearance.appNameStatus?? 'normal',
positionAppName: app.appearance.positionAppName?? 'column',
lineClampAppName: app.appearance.lineClampAppName?? 1,
}
}))
}
}