diff options
author | ThibG <thib@sitedethib.com> | 2020-12-15 18:19:20 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-15 18:19:20 +0100 |
commit | 92cfcf168cae094ece281b3cb6d0f5b1539a8c25 (patch) | |
tree | 070a16d495d962a1f4efb9e196fae18803cf3835 /app/serializers | |
parent | 1978f7265e1e83bda25413da26f53c53110af764 (diff) | |
parent | b0722fbc14cf1cee412c3524c51705c9902bde7f (diff) |
Merge pull request #1476 from ThibG/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'app/serializers')
-rw-r--r-- | app/serializers/manifest_serializer.rb | 40 |
1 files changed, 39 insertions, 1 deletions
diff --git a/app/serializers/manifest_serializer.rb b/app/serializers/manifest_serializer.rb index 21ec0d4be..dafe8f55b 100644 --- a/app/serializers/manifest_serializer.rb +++ b/app/serializers/manifest_serializer.rb @@ -7,7 +7,7 @@ class ManifestSerializer < ActiveModel::Serializer attributes :name, :short_name, :description, :icons, :theme_color, :background_color, :display, :start_url, :scope, - :share_target + :share_target, :shortcuts def name object.site_title @@ -64,4 +64,42 @@ class ManifestSerializer < ActiveModel::Serializer }, } end + + def shortcuts + [ + { + name: 'New toot', + url: '/web/statuses/new', + icons: [ + { + src: '/shortcuts/new-status.png', + type: 'image/png', + sizes: '192x192', + }, + ], + }, + { + name: 'Notifications', + url: '/web/notifications', + icons: [ + { + src: '/shortcuts/notifications.png', + type: 'image/png', + sizes: '192x192', + }, + ], + }, + { + name: 'Direct messages', + url: '/web/timelines/direct', + icons: [ + { + src: '/shortcuts/direct.png', + type: 'image/png', + sizes: '192x192', + }, + ], + }, + ] + end end |