Merge branch 'feature/toot-app-source' of https://github.com/ineffyble/mastodon into ineffyble-feature/toot-app-source
This commit is contained in:
commit
ab165547fd
13 changed files with 39 additions and 6 deletions
3
app/views/api/v1/apps/show.rabl
Normal file
3
app/views/api/v1/apps/show.rabl
Normal file
|
@ -0,0 +1,3 @@
|
|||
object @application
|
||||
|
||||
attributes :id, :name, :website
|
|
@ -6,6 +6,10 @@ node(:url) { |status| TagManager.instance.url_for(status) }
|
|||
node(:reblogs_count) { |status| defined?(@reblogs_counts_map) ? (@reblogs_counts_map[status.id] || 0) : status.reblogs.count }
|
||||
node(:favourites_count) { |status| defined?(@favourites_counts_map) ? (@favourites_counts_map[status.id] || 0) : status.favourites.count }
|
||||
|
||||
child :application do
|
||||
extends 'api/v1/apps/show'
|
||||
end
|
||||
|
||||
child :account do
|
||||
extends 'api/v1/accounts/show'
|
||||
end
|
||||
|
|
|
@ -28,6 +28,10 @@
|
|||
= link_to TagManager.instance.url_for(status), class: 'detailed-status__datetime u-url u-uid', target: @external_links ? '_blank' : nil, rel: 'noopener' do
|
||||
%span= l(status.created_at)
|
||||
·
|
||||
- if status.application
|
||||
= link_to status.application.website, class: 'detailed-status__application', target: @external_links ? '_blank' : nil, rel: 'noopener' do
|
||||
%span= status.application.name
|
||||
·
|
||||
%span
|
||||
= fa_icon('retweet')
|
||||
%span= status.reblogs.count
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue