Fix/improve local ActiveStorage backend usage and handling of WebApp icons #162

Merged
greg merged 10 commits from bugfix/local_web_app_icons into chore/update_dependencies 2024-02-27 16:07:55 +00:00
Showing only changes of commit a7410058fa - Show all commits

View File

@@ -18,6 +18,8 @@ module AppCatalogManager
@app.metadata[prop] = metadata.send(prop) if prop
end
@app.save!
if icon = metadata.select_icon(sizes: "256x256") ||
icon = metadata.select_icon(sizes: "192x192")
attach_remote_image(:icon, icon)
@@ -27,8 +29,6 @@ module AppCatalogManager
if apple_touch_icon = metadata.select_icon(purpose: "apple-touch-icon")
attach_remote_image(:apple_touch_icon, apple_touch_icon)
end
@app.save!
rescue Manifique::Error => e
msg = "Fetching web app manifest failed for #{e.url}: #{e.type}"
Rails.logger.warn(msg)