Skip to content

Commit

Permalink
Change PWA start URL from /home to / (mastodon#27377)
Browse files Browse the repository at this point in the history
  • Loading branch information
ClearlyClaire authored and ttrace committed Jul 5, 2024
1 parent 7256383 commit 0fb135c
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions app/serializers/manifest_serializer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,18 @@ class ManifestSerializer < ActiveModel::Serializer
512
).freeze

attributes :name, :short_name,
attributes :id, :name, :short_name,
:icons, :theme_color, :background_color,
:display, :start_url, :scope,
:share_target, :shortcuts

def id
# This is set to `/home` because that was the old value of `start_url` and
# thus the fallback ID computed by Chrome:
# https://developer.chrome.com/blog/pwa-manifest-id/
'/home'
end

def name
object.title
end
Expand Down Expand Up @@ -53,7 +60,7 @@ def display
end

def start_url
'/home'
'/'
end

def scope
Expand Down

0 comments on commit 0fb135c

Please sign in to comment.