FEATURE: Add support for maskable icons in the PWA manifest

FEATURE: Add support for maskable icons in the PWA manifest

Because:

This commit:

  • Adds a new key under the icons array in the webmanifest, named purpose with maskable value.
diff --git a/app/controllers/metadata_controller.rb b/app/controllers/metadata_controller.rb
index 189852a..51d1a1e 100644
--- a/app/controllers/metadata_controller.rb
+++ b/app/controllers/metadata_controller.rb
@@ -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

GitHub sha: 3e590b87

2 Likes