Merge branch 'feature/toot-app-source' of https://github.com/ineffyble/mastodon into ineffyble-feature/toot-app-source

This commit is contained in:
Eugen Rochko 2017-01-15 13:23:47 +01:00
commit ab165547fd
13 changed files with 39 additions and 6 deletions

View file

@ -0,0 +1,3 @@
object @application
attributes :id, :name, :website

View file

@ -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

View file

@ -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