Skip to content

armgit / dashy

Public Imported from GitHub
0

πŸš€ A self-hostable personal dashboard built for you. Includes status-checking, widgets, themes, icon packs, a UI editor and tons more!

:bug: Fixes item size/ layout buttons (#629)

Alicia Sykes24e487cde52b
diff --git a/src/utils/ConfigAccumalator.js b/src/utils/ConfigAccumalator.js
index 9a408309..3e0ab772 100644
--- a/src/utils/ConfigAccumalator.js
+++ b/src/utils/ConfigAccumalator.js
@@ -40,11 +40,11 @@ export default class ConfigAccumulator {
usersAppConfig = appConfigFile;
}
// Some settings have their own local storage keys, apply them here
- usersAppConfig.layout = appConfigFile.layout
- || localStorage[localStorageKeys.LAYOUT_ORIENTATION]
+ usersAppConfig.layout = localStorage[localStorageKeys.LAYOUT_ORIENTATION]
+ || appConfigFile.layout
|| defaultLayout;
- usersAppConfig.iconSize = appConfigFile.iconSize
- || localStorage[localStorageKeys.ICON_SIZE]
+ usersAppConfig.iconSize = localStorage[localStorageKeys.ICON_SIZE]
+ || appConfigFile.iconSize
|| defaultIconSize;
// Don't let users modify users locally
if (appConfigFile.auth) usersAppConfig.auth = appConfigFile.auth;
@@ -60,7 +60,7 @@ export default class ConfigAccumulator {
try { localPageInfo = JSON.parse(localStorage[localStorageKeys.PAGE_INFO]); }
catch (e) { ErrorHandler('Malformed pageInfo data in local storage'); }
}
- const filePageInfo = this.conf ? this.conf.pageInfo || {} : {};
+ const filePageInfo = this.conf?.pageInfo || {};
return { ...defaultPageInfo, ...filePageInfo, ...localPageInfo };
}