mirror of
https://github.com/mastodon/mastodon.git
synced 2024-12-29 03:08:51 +01:00
Change PWA start URL from /home
to /
(#27377)
This commit is contained in:
parent
1cad857f14
commit
2ee88a99d9
1 changed files with 9 additions and 2 deletions
|
@ -16,11 +16,18 @@ class ManifestSerializer < ActiveModel::Serializer
|
||||||
512
|
512
|
||||||
).freeze
|
).freeze
|
||||||
|
|
||||||
attributes :name, :short_name,
|
attributes :id, :name, :short_name,
|
||||||
:icons, :theme_color, :background_color,
|
:icons, :theme_color, :background_color,
|
||||||
:display, :start_url, :scope,
|
:display, :start_url, :scope,
|
||||||
:share_target, :shortcuts
|
: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
|
def name
|
||||||
object.title
|
object.title
|
||||||
end
|
end
|
||||||
|
@ -53,7 +60,7 @@ class ManifestSerializer < ActiveModel::Serializer
|
||||||
end
|
end
|
||||||
|
|
||||||
def start_url
|
def start_url
|
||||||
'/home'
|
'/'
|
||||||
end
|
end
|
||||||
|
|
||||||
def scope
|
def scope
|
||||||
|
|
Loading…
Reference in a new issue