Save layoutconfigJSON as preferences, the are saved in the morescreen

This commit is contained in:
Pieter Vander Vennet 2022-02-14 15:41:14 +01:00
parent c874afc745
commit 6cb5803efd
6 changed files with 44 additions and 10 deletions

View file

@ -72,7 +72,7 @@ export default class DetermineLayout {
public static LoadLayoutFromHash(
userLayoutParam: UIEventSource<string>
): LayoutConfig | null {
): (LayoutConfig & {definition: LayoutConfigJson}) | null {
let hash = location.hash.substr(1);
let json: any;
@ -113,7 +113,9 @@ export default class DetermineLayout {
const layoutToUse = DetermineLayout.prepCustomTheme(json)
userLayoutParam.setData(layoutToUse.id);
return new LayoutConfig(layoutToUse, false);
const config = new LayoutConfig(layoutToUse, false);
config["definition"] = json
return <any> config
} catch (e) {
console.error(e)
if (hash === undefined || hash.length < 10) {