diff --git a/app/components/follow_button_component.rb b/app/components/follow_button_component.rb index eb3f40344..e379883ee 100644 --- a/app/components/follow_button_component.rb +++ b/app/components/follow_button_component.rb @@ -10,6 +10,7 @@ def initialize(follower:, target:, name: nil) def before_render @i18n_key = @following ? ".unfollow" : ".follow" + @icon = @following ? "person-x-fill" : "person-plus-fill" if @signed_out @path = @target.is_a?(Federails::Actor) ? follow_remote_actor_path(@target) : @@ -28,7 +29,7 @@ def render? end erb_template <<-ERB - <%= button_to translate(@i18n_key, name: @name), @path, method: @method, class: "btn btn-primary" %> + <%= button_to safe_join([helpers.icon(@icon, ""), translate(@i18n_key, name: @name)], " "), @path, method: @method, class: "btn btn-primary" %> ERB private diff --git a/app/views/creators/show.html.erb b/app/views/creators/show.html.erb index 4c6af36dd..b31a2f7f1 100644 --- a/app/views/creators/show.html.erb +++ b/app/views/creators/show.html.erb @@ -1,14 +1,14 @@ <%= content_for :items do %>
@<%= @creator.actor.at_address if SiteSettings.federation_enabled? %>
+@<%= @creator.actor.at_address if SiteSettings.federation_enabled? %>
<%= render FollowButtonComponent.new(follower: current_user, target: @creator) %> <% end %>