FIX: Update mobile logo resolution
This makes Discourse compliant with latest Google PWA requirements, so we get the App Install banner back. Should bump our Lighthouse PWA Audit score to 11/11.
This commit is contained in:
parent
d888d3c54c
commit
32b3847d52
|
@ -13,6 +13,8 @@ class MetadataController < ApplicationController
|
||||||
private
|
private
|
||||||
|
|
||||||
def default_manifest
|
def default_manifest
|
||||||
|
logo = SiteSetting.mobile_logo_url || SiteSetting.logo_small_url || SiteSetting.apple_touch_icon_url
|
||||||
|
|
||||||
manifest = {
|
manifest = {
|
||||||
name: SiteSetting.title,
|
name: SiteSetting.title,
|
||||||
short_name: SiteSetting.title,
|
short_name: SiteSetting.title,
|
||||||
|
@ -23,8 +25,8 @@ class MetadataController < ApplicationController
|
||||||
theme_color: "##{ColorScheme.hex_for_name('header_background')}",
|
theme_color: "##{ColorScheme.hex_for_name('header_background')}",
|
||||||
icons: [
|
icons: [
|
||||||
{
|
{
|
||||||
src: SiteSetting.apple_touch_icon_url,
|
src: logo,
|
||||||
sizes: "144x144",
|
sizes: "512x512",
|
||||||
type: "image/png"
|
type: "image/png"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
@ -1011,7 +1011,7 @@ en:
|
||||||
digest_logo_url: "The alternate logo image used at the top of your site's email summary. Should be a wide rectangle shape. Should not be an SVG image. If left blank `logo_url` will be used."
|
digest_logo_url: "The alternate logo image used at the top of your site's email summary. Should be a wide rectangle shape. Should not be an SVG image. If left blank `logo_url` will be used."
|
||||||
logo_small_url: "The small logo image at the top left of your site, should be a square shape, seen when scrolling down. If left blank a home glyph will be shown."
|
logo_small_url: "The small logo image at the top left of your site, should be a square shape, seen when scrolling down. If left blank a home glyph will be shown."
|
||||||
favicon_url: "A favicon for your site, see http://en.wikipedia.org/wiki/Favicon, to work correctly over a CDN it must be a png"
|
favicon_url: "A favicon for your site, see http://en.wikipedia.org/wiki/Favicon, to work correctly over a CDN it must be a png"
|
||||||
mobile_logo_url: "The fixed position logo image used at the top left of your mobile site. Should be a square shape. If left blank, `logo_url` will be used. eg: http://example.com/uploads/default/logo.png"
|
mobile_logo_url: "The fixed position logo image used at the top left of your mobile site and as your logo/splash image on Android. Recommended size is 512px by 512px. If left blank, `logo_url` will be used. eg: http://example.com/uploads/default/logo.png"
|
||||||
apple_touch_icon_url: "Icon used for Apple touch devices. Recommended size is 144px by 144px."
|
apple_touch_icon_url: "Icon used for Apple touch devices. Recommended size is 144px by 144px."
|
||||||
|
|
||||||
notification_email: "The from: email address used when sending all essential system emails. The domain specified here must have SPF, DKIM and reverse PTR records set correctly for email to arrive."
|
notification_email: "The from: email address used when sending all essential system emails. The domain specified here must have SPF, DKIM and reverse PTR records set correctly for email to arrive."
|
||||||
|
|
Loading…
Reference in New Issue