diff options
author | りんすき <428rinsuki+git@gmail.com> | 2018-01-18 01:08:10 +0900 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2018-01-17 17:08:10 +0100 |
commit | fbe7756da6e817c3de633f624f5a28bc133e78c8 (patch) | |
tree | 19a31c883cdcf17ce284f90fd45fe46d5d742815 /app/serializers | |
parent | 0a103c774977cda29e5c02e697b4632f98bcc621 (diff) |
implement web share target (#6278)
* web share target * fix * fix
Diffstat (limited to 'app/serializers')
-rw-r--r-- | app/serializers/manifest_serializer.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/app/serializers/manifest_serializer.rb b/app/serializers/manifest_serializer.rb index 95bcc21bb..859ef0d14 100644 --- a/app/serializers/manifest_serializer.rb +++ b/app/serializers/manifest_serializer.rb @@ -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 |