views: change upvote/downvote icons to arrows.
Change the upvote and downvote icons for posts, comments, and BURs from thumbs-up / thumbs-down icons to up-arrow / down-arrow icons.
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
class CommentComponent < ApplicationComponent
|
||||
attr_reader :comment, :context, :dtext_data, :current_user
|
||||
delegate :link_to_user, :time_ago_in_words_tagged, :format_text, :edit_icon, :delete_icon, :undelete_icon, :flag_icon, to: :helpers
|
||||
delegate :link_to_user, :time_ago_in_words_tagged, :format_text, :edit_icon, :delete_icon, :undelete_icon, :flag_icon, :upvote_icon, :downvote_icon, to: :helpers
|
||||
|
||||
def initialize(comment:, current_user:, context: nil, dtext_data: nil)
|
||||
@comment = comment
|
||||
|
||||
@@ -47,21 +47,21 @@
|
||||
<% if votable? %>
|
||||
<li class="comment-votes">
|
||||
<% if current_user.is_anonymous? %>
|
||||
<%= link_to "🡹", login_path(url: request.fullpath), class: "comment-upvote-link" %>
|
||||
<%= link_to upvote_icon, login_path(url: request.fullpath), class: "comment-upvote-link" %>
|
||||
<% elsif upvoted? %>
|
||||
<%= link_to "🡹", comment_comment_votes_path(comment_id: comment.id), class: "comment-upvote-link comment-unvote-link", method: :delete, remote: true %>
|
||||
<%= link_to upvote_icon, comment_comment_votes_path(comment_id: comment.id), class: "comment-upvote-link comment-unvote-link", method: :delete, remote: true %>
|
||||
<% else %>
|
||||
<%= link_to "🡹", comment_comment_votes_path(comment_id: comment.id, score: "1"), class: "comment-upvote-link", method: :post, remote: true %>
|
||||
<%= link_to upvote_icon, comment_comment_votes_path(comment_id: comment.id, score: "1"), class: "comment-upvote-link", method: :post, remote: true %>
|
||||
<% end %>
|
||||
|
||||
<span class="comment-score"><%= comment.score %></span>
|
||||
|
||||
<% if current_user.is_anonymous? %>
|
||||
<%= link_to "🡻", login_path(url: request.fullpath), class: "comment-downvote-link" %>
|
||||
<%= link_to downvote_icon, login_path(url: request.fullpath), class: "comment-downvote-link" %>
|
||||
<% elsif downvoted? %>
|
||||
<%= link_to "🡻", comment_comment_votes_path(comment_id: comment.id), class: "comment-downvote-link comment-unvote-link", method: :delete, remote: true %>
|
||||
<%= link_to downvote_icon, comment_comment_votes_path(comment_id: comment.id), class: "comment-downvote-link comment-unvote-link", method: :delete, remote: true %>
|
||||
<% else %>
|
||||
<%= link_to "🡻", comment_comment_votes_path(comment_id: comment.id, score: "-1"), class: "comment-downvote-link", method: :post, remote: true %>
|
||||
<%= link_to downvote_icon, comment_comment_votes_path(comment_id: comment.id, score: "-1"), class: "comment-downvote-link", method: :post, remote: true %>
|
||||
<% end %>
|
||||
</li>
|
||||
<% end %>
|
||||
|
||||
Reference in New Issue
Block a user