Skip to content
Snippets Groups Projects
Unverified Commit 9342705e authored by Marcin Mikołajczak's avatar Marcin Mikołajczak Committed by GitHub
Browse files

Add app shortcuts (#15234)


* Add app shortcuts

Signed-off-by: default avatarmkljczk <me@mkljczk.pl>

* Fix codeclimate issues

Signed-off-by: default avatarmkljczk <me@mkljczk.pl>

* Change shortcuts

Signed-off-by: default avatarmkljczk <me@mkljczk.pl>

* More consistent new-status icon

Signed-off-by: default avatarmkljczk <me@mkljczk.pl>
parent 47e507fa
No related branches found
No related tags found
No related merge requests found
......@@ -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
public/shortcuts/direct.png

2.97 KiB

public/shortcuts/new-status.png

2.96 KiB

public/shortcuts/notifications.png

3 KiB

public/shortcuts/profile.png

4.09 KiB

0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment