Commit 8b2885ea authored by Eugen Rochko's avatar Eugen Rochko

Display friendly message if results are empty

parent f105ea7d
...@@ -3,20 +3,24 @@ ...@@ -3,20 +3,24 @@
Your friends Your friends
%small Here are your Twitter friends who are on Mastodon %small Here are your Twitter friends who are on Mastodon
.grid - if @friends.empty?
- @top_instances.each do |instance_info| %p.lead Well, this is unfortunate. Looks like none of your Twitter friends are on Mastodon yet. Or maybe they are, but haven't signed in to this bridge service.
= link_to "https://#{instance_info['uri']}/about", class: 'instance-card', style: "background-image: url(#{instance_info['thumbnail']})" do - else
.info .grid
%span.title= instance_info['title'] - @top_instances.each do |instance_info|
%span.uri= instance_info['uri'] = link_to "https://#{instance_info['uri']}/about", class: 'instance-card', style: "background-image: url(#{instance_info['thumbnail']})" do
%span.users .info
= surround '(', ')' do %span.title= instance_info['title']
= number_with_delimiter instance_info['stats']['user_count'] %span.uri= instance_info['uri']
= 'person'.pluralize(instance_info['stats']['user_count']) %span.users
.grid = surround '(', ')' do
- @friends.each do |user| = number_with_delimiter instance_info['stats']['user_count']
= link_to user.mastodon.info['url'], class: 'user-card' do = 'person'.pluralize(instance_info['stats']['user_count'])
.avatar= image_tag user.mastodon.info['avatar']
.name .grid
%span.display-name= user.mastodon.info['display_name'].presence || user.mastodon.info['username'] - @friends.each do |user|
%span.username= "@#{user.mastodon.uid}" = link_to user.mastodon.info['url'], class: 'user-card' do
.avatar= image_tag user.mastodon.info['avatar']
.name
%span.display-name= user.mastodon.info['display_name'].presence || user.mastodon.info['username']
%span.username= "@#{user.mastodon.uid}"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment