feat(website-settings): Configurable Splash Image

Configurable Splash Image option which will override app's splash_image
hook set.
This commit is contained in:
gavin 2022-05-27 16:36:37 +05:30
parent 9348ba5537
commit f416e2a1d2
2 changed files with 11 additions and 3 deletions

View file

@ -21,6 +21,7 @@
"website_theme_image_link",
"brand",
"banner_image",
"splash_image",
"brand_html",
"set_banner_from_image",
"favicon",
@ -413,6 +414,11 @@
"fieldname": "footer_powered",
"fieldtype": "Small Text",
"label": "Footer \"Powered By\""
},
{
"fieldname": "splash_image",
"fieldtype": "Attach Image",
"label": "Splash Image"
}
],
"icon": "fa fa-cog",
@ -420,7 +426,7 @@
"index_web_pages_for_search": 1,
"issingle": 1,
"links": [],
"modified": "2022-03-09 01:47:31.094462",
"modified": "2022-05-27 12:33:29.019998",
"modified_by": "Administrator",
"module": "Website",
"name": "Website Settings",
@ -445,4 +451,4 @@
"sort_order": "ASC",
"states": [],
"track_changes": 1
}
}

View file

@ -136,7 +136,7 @@ def get_website_settings(context=None):
}
)
settings = frappe.get_single("Website Settings")
settings: "WebsiteSettings" = frappe.get_single("Website Settings")
for k in [
"banner_html",
"banner_image",
@ -203,6 +203,8 @@ def get_website_settings(context=None):
context["hide_login"] = settings.hide_login
context["splash_image"] = settings.splash_image or context["splash_image"]
return context