mirror of
https://github.com/lunaisnotaboy/mastodon.git
synced 2024-10-31 20:14:26 +00:00
Add app shortcuts (#15234)
* Add app shortcuts Signed-off-by: mkljczk <me@mkljczk.pl> * Fix codeclimate issues Signed-off-by: mkljczk <me@mkljczk.pl> * Change shortcuts Signed-off-by: mkljczk <me@mkljczk.pl> * More consistent new-status icon Signed-off-by: mkljczk <me@mkljczk.pl>
This commit is contained in:
parent
47e507fa61
commit
9342705e6b
|
@ -7,7 +7,7 @@ class ManifestSerializer < ActiveModel::Serializer
|
||||||
attributes :name, :short_name, :description,
|
attributes :name, :short_name, :description,
|
||||||
:icons, :theme_color, :background_color,
|
:icons, :theme_color, :background_color,
|
||||||
:display, :start_url, :scope,
|
:display, :start_url, :scope,
|
||||||
:share_target
|
:share_target, :shortcuts
|
||||||
|
|
||||||
def name
|
def name
|
||||||
object.site_title
|
object.site_title
|
||||||
|
@ -64,4 +64,42 @@ class ManifestSerializer < ActiveModel::Serializer
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
end
|
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
|
end
|
||||||
|
|
BIN
public/shortcuts/direct.png
Normal file
BIN
public/shortcuts/direct.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3 KiB |
BIN
public/shortcuts/new-status.png
Normal file
BIN
public/shortcuts/new-status.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3 KiB |
BIN
public/shortcuts/notifications.png
Normal file
BIN
public/shortcuts/notifications.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3 KiB |
BIN
public/shortcuts/profile.png
Normal file
BIN
public/shortcuts/profile.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.1 KiB |
Loading…
Reference in a new issue