Skip to content

Commit 448e83f

Browse files
authored
feat(web): use favicon available in Website Settings (#1540)
1 parent 43e84e3 commit 448e83f

2 files changed

Lines changed: 11 additions & 4 deletions

File tree

frontend/index.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@
77
content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
88
<title>{{ app_name }}</title>
99
<meta name="description" content="Simple, work messaging tool.">
10-
<link rel="apple-touch-icon" sizes="180x180" href="/assets/raven/manifest/apple-touch-icon.png">
11-
<link rel="icon" type="image/png" sizes="32x32" href="/assets/raven/manifest/favicon-32x32.png">
12-
<link rel="icon" type="image/png" sizes="16x16" href="/assets/raven/manifest/favicon-16x16.png">
10+
<link rel="apple-touch-icon" sizes="180x180" href="{{ apple_touch_icon }}">
11+
<link rel="icon" type="image/png" sizes="32x32" href="{{ icon_32 }}">
12+
<link rel="icon" type="image/png" sizes="16x16" href="{{ icon_16 }}">
1313
<meta name="msapplication-TileColor" content="#000000">
1414
<meta name="theme-color" content="#191919">
15-
<link rel="mask-icon" href="/safari-pinned-tab.svg" color="#000000">
15+
<link rel="mask-icon" href="{{ mask_icon }}" color="#000000">
1616

1717
<meta name="apple-mobile-web-app-capable" content="yes" />
1818
<meta name="apple-mobile-web-app-title" content="{{ app_name }} | Raven" />

raven/www/raven.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,13 @@ def get_context(context):
5252
else:
5353
context["app_name"] = "Raven"
5454

55+
favicon = frappe.get_website_settings("favicon")
56+
57+
context["icon_32"] = favicon or "/assets/raven/manifest/favicon-32x32.png"
58+
context["icon_16"] = favicon or "/assets/raven/manifest/favicon-16x16.png"
59+
context["apple_touch_icon"] = favicon or "/assets/raven/manifest/apple-touch-icon.png"
60+
context["mask_icon"] = favicon or "/assets/raven/manifest/safari-pinned-tab.svg"
61+
5562
if frappe.session.user != "Guest":
5663
capture("active_site", "raven")
5764

0 commit comments

Comments
 (0)