mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 06:49:14 +08:00
FEATURE: Add support for maskable icons in the PWA manifest
Because: - Chrome 78 and Firefox Fenix have support for it - The icons will look better by using all the availiable space - Admins can control the icon and add appropriate padding since we have a dedicated asset for the manifest logo. Read more about it on https://css-tricks.com/maskable-icons-android-adaptive-icons-for-your-pwa/ This commit: - Adds a new key under the icons array in the webmanifest, named purpose with maskable value.
This commit is contained in:
parent
7f8cdea924
commit
3e590b87cf
|
@ -49,6 +49,7 @@ class MetadataController < ApplicationController
|
|||
logo = SiteSetting.site_manifest_icon_url
|
||||
manifest[:icons] << {
|
||||
src: UrlHelper.absolute(logo),
|
||||
purpose: "maskable",
|
||||
sizes: "512x512",
|
||||
type: MiniMime.lookup_by_filename(logo)&.content_type || "image/png"
|
||||
} if logo
|
||||
|
|
Loading…
Reference in New Issue
Block a user