0
0
Fork 0

implement web share target (#6278)

* web share target

* fix

* fix
This commit is contained in:
りんすき 2018-01-18 01:08:10 +09:00 committed by Eugen Rochko
parent 0a103c7749
commit fbe7756da6
2 changed files with 8 additions and 2 deletions

View file

@ -6,7 +6,8 @@ class ManifestSerializer < ActiveModel::Serializer
attributes :name, :short_name, :description,
:icons, :theme_color, :background_color,
:display, :start_url, :scope
:display, :start_url, :scope,
:share_target
def name
object.site_title
@ -49,4 +50,8 @@ class ManifestSerializer < ActiveModel::Serializer
def scope
root_url
end
def share_target
{ url_template: 'share?title={title}&text={text}&url={url}' }
end
end