Skip to content

Commit

Permalink
rename fontawesome icons for v6
Browse files Browse the repository at this point in the history
* rename fas -> fa-solid
* rename far -> fa-regular
  • Loading branch information
goapunk committed Apr 20, 2023
1 parent a0fc7cd commit 2e405d6
Show file tree
Hide file tree
Showing 22 changed files with 34 additions and 34 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const CommentManageDropdown = (props) => {
type="button" className="dropdown-toggle" aria-haspopup="true"
aria-expanded="false" data-bs-toggle="dropdown"
>
<i className="fa fa-ellipsis-h" aria-hidden="true" />
<i className="fa fa-ellipsis" aria-hidden="true" />
</button>
<ul className="dropdown-menu">
{props.renderModeratorOptions && [
Expand Down
8 changes: 4 additions & 4 deletions adhocracy4/comments_async/static/comments_async/comment.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ export default class Comment extends React.Component {
return (
<div>
{this.state.displayNotification &&
<div className="alert alert--success a4-comments__success-notification"><i className="fas fa-check" /> {translated.successMessage}</div>}
<div className="alert alert--success a4-comments__success-notification"><i className="fa-solid fa-check" /> {translated.successMessage}</div>}
<div className={(this.props.is_users_own_comment ? 'a4-comments__comment a4-comments__comment-owner' : 'a4-comments__comment')}>
<a className="a4-comments__anchor" id={'comment_' + this.props.id} href={'./?comment=' + this.props.id}>{'Comment ' + this.props.id}</a>
<ReportModal
Expand Down Expand Up @@ -425,22 +425,22 @@ export default class Comment extends React.Component {
{((this.allowForm() && !this.props.is_deleted) || (this.props.child_comments && this.props.child_comments.length > 0)) &&
<button className="btn btn--no-border a4-comments__action-bar__btn" type="button" onClick={this.toggleShowComments.bind(this)}>
<a href="#child-comment-form">
<i className={this.state.showChildComments ? 'fa fa-minus' : 'far fa-comment'} aria-hidden="true" /> {getAnswerForm(this.state.showChildComments, this.props.child_comments.length)}
<i className={this.state.showChildComments ? 'fa fa-minus' : 'fa-regular fa-comment'} aria-hidden="true" /> {getAnswerForm(this.state.showChildComments, this.props.child_comments.length)}
</a>
</button>}

{!this.props.is_deleted &&
<a
className="btn btn--no-border a4-comments__action-bar__btn" href={'?comment_' + this.props.id}
data-bs-toggle="modal" data-bs-target={'#share_comment_' + this.props.id}
><i className="fas fa-share" /> {translated.share}
><i className="fa-solid fa-share" /> {translated.share}
</a>}

{!this.props.is_deleted && this.props.authenticated_user_pk && !this.props.is_users_own_comment &&
<a
className="btn btn--no-border a4-comments__action-bar__btn" href={'#report_comment_' + this.props.id}
data-bs-toggle="modal"
><i className="fas fa-exclamation-triangle" />{translated.report}
><i className="fa-solid fa-triangle-exclamation" />{translated.report}
</a>}

</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,7 @@ export const CommentBox = (props) => {
onClick={handleToggleFilters}
>
<i
className="fas fa-sliders-h ms-2"
className="fa-solid fa-sliders ms-2"
aria-label={translated.showFilters}
/>
{translated.filters}
Expand All @@ -492,7 +492,7 @@ export const CommentBox = (props) => {
onClick={handleToggleFilters}
>
<i
className="fas fa-times ms-2"
className="fa-solid fa-xmark ms-2"
aria-label={translated.hideFilters}
/>
{translated.hideFilters}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const CommentManageDropdown = (props) => {
aria-expanded="false"
data-bs-toggle="dropdown"
>
<i className="fas fa-ellipsis-h" aria-hidden="true" />
<i className="fa-solid fa-ellipsis" aria-hidden="true" />
</button>
<div className="dropdown-menu dropdown-menu-end">
{props.has_changing_permission && [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export const FilterCategory = ({
<span className={filter === 'all' ? 'a4-comments__filters__btn-text' : 'd-none'}>{translated.display}{filterDisplay}</span>
<span className={filter !== 'all' ? 'a4-comments__filters__btn-text small-screen' : 'd-none'}>{filterDisplay}</span>

<i className={filter === 'all' ? 'fa fa-caret-down' : 'fas fa-check'} aria-hidden="true" />
<i className={filter === 'all' ? 'fa fa-caret-down' : 'fa-solid fa-check'} aria-hidden="true" />
</button>
<div className="dropdown-menu dropend" aria-labelledby="categoryDropdownBtn">
{filter !== 'all' &&
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ export const FilterSearch = ({
onClick={handleClearQuery}
>
<span className="fa-stack fa-2x">
<i className="far fa-circle fa-stack-2x" />
<i className="fas fa-times fa-stack-1x" aria-label={translated.clearSearch} />
<i className="fa-regular fa-circle fa-stack-2x" />
<i className="fa-solid fa-xmark fa-stack-1x" aria-label={translated.clearSearch} />
</span>
</button>

Expand All @@ -50,7 +50,7 @@ export const FilterSearch = ({
type="button"
onClick={() => onSearch(query)}
>
<i className="fas fa-search" aria-label={translated.searchContrib} />
<i className="fa-solid fa-magnifying-glass" aria-label={translated.searchContrib} />
</button>
</div>
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export const FilterSort = ({
>
<span className={sort === 'new' ? 'a4-comments__filters__btn-text' : 'd-none'}>{translated.sortedBy}{sorts[sort]}</span>
<span className={sort !== 'new' ? 'a4-comments__filters__btn-text small-screen' : 'd-none'}>{sorts[sort]}</span>
<i className={sort === 'new' ? 'fa fa-caret-down' : 'fas fa-check'} aria-hidden="true" />
<i className={sort === 'new' ? 'fa fa-caret-down' : 'fa-solid fa-check'} aria-hidden="true" />
</button>
<div className="dropdown-menu dropdown-menu-end" aria-labelledby="sortDropdownBtn">
{Object.keys(sorts).map(objectKey => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export const ModeratorFeedback = ({ lastEdit, feedbackText }) => {
return (
<div className="row">
<div className="a4-comments__moderator-feedback__container">
<i className="fas fa-share a4-comments__moderator-feedback__icon" />
<i className="fa-solid fa-share a4-comments__moderator-feedback__icon" />
<div className="a4-comments__moderator-feedback__content">
<div className="a4-comments__moderator-feedback__moderator">
{translated.moderator}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
class="{{ item.is_active|yesno:"is-active," }}">
{{ item.label }}
{% if not item.is_complete %}
<i class="fa fa-exclamation-circle u-danger" title="{% translate 'Missing fields for publication' %}" aria-label="{% translate 'Missing fields for publication' %}"></i>
<i class="fa fa-circle-exclamation u-danger" title="{% translate 'Missing fields for publication' %}" aria-label="{% translate 'Missing fields for publication' %}"></i>
{% endif %}
</a>
</li>
Expand All @@ -30,7 +30,7 @@
class="{{ item.is_active|yesno:"is-active," }}">
{{ item.label }}
{% if not item.is_complete %}
<i class="fa fa-exclamation-circle u-danger" title="{% translate 'Missing fields for publication' %}" aria-label="{% translate 'Missing fields for publication' %}"></i>
<i class="fa fa-circle-exclamation u-danger" title="{% translate 'Missing fields for publication' %}" aria-label="{% translate 'Missing fields for publication' %}"></i>
{% endif %}
</a>
</li>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@

{% block after_label %}
{% if field.field.required_for_publish and not field.value %}
<i class="fa fa-exclamation-circle u-danger" title="{% translate 'Missing field for publication' %}" aria-label="{% translate 'Missing field for publication' %}"></i>
<i class="fa fa-circle-exclamation u-danger" title="{% translate 'Missing field for publication' %}" aria-label="{% translate 'Missing field for publication' %}"></i>
{% endif %}
{% endblock %}
4 changes: 2 additions & 2 deletions adhocracy4/dashboard/templates/a4dashboard/project_list.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ <h2>

<a href="{% url 'a4dashboard:project-edit' project_slug=project.slug %}"
class="btn btn--light btn--small">
<i class="fas fa-pencil-alt" aria-hidden="true"></i>
<i class="fa-solid fa-pencil" aria-hidden="true"></i>
{% translate 'Edit' %}
</a>

Expand All @@ -53,7 +53,7 @@ <h2>
<input type="hidden" name="project_pk" value="{{ project.pk }}">
<button type="submit" name="duplicate" value="{{ project }}"
class="dropdown-item">
<i class="far fa-copy" aria-hidden="true"></i>
<i class="fa-regular fa-copy" aria-hidden="true"></i>
{% translate 'Duplicate' %}
</button>
</form>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
{% endif %}
{% endfor %}
<input class="search-filter-input" id="{{ id }}" type="search" name="{{ name }}" value="{{ value }}">
<button class="search-filter-btn btn" type="submit" title="{% translate 'Search' %}"><i class="fa fa-search" aria-label="{% translate 'Search' %}"></i></button>
<button class="search-filter-btn btn" type="submit" title="{% translate 'Search' %}"><i class="fa fa-magnifying-glass" aria-label="{% translate 'Search' %}"></i></button>
</form>
</div>
4 changes: 2 additions & 2 deletions adhocracy4/forms/templates/a4forms/includes/inline_form.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@

{% if not form.name.value %}
<button type="button" class="category-formset__delete-label js-remove-form" title="{% translate 'Remove category' %}">
<i class="fa fa-times" aria-label="{% translate 'Remove category' %}"></i>
<i class="fa fa-xmark" aria-label="{% translate 'Remove category' %}"></i>
</button>
{% elif can_delete %}
<label for="{{ form.DELETE.id_for_label }}" class="category-formset__delete-label" title="{% translate 'Remove category' %}">
<i class="fas fa-trash-alt" aria-label="{% translate 'Remove category' %}"></i>
<i class="fa-solid fa-trash-can" aria-label="{% translate 'Remove category' %}"></i>
</label>
{% endif %}
{% for hidden in form.hidden_fields %}
Expand Down
4 changes: 2 additions & 2 deletions adhocracy4/images/templates/a4images/image_upload_widget.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
{% if has_image_set and not is_required %}
<label for="{{ checkbox_id }}" class="btn btn-danger"
title="{% translate 'Remove the picture' %}">
<i class="fas fa-trash-alt"></i>
<i class="fa-solid fa-trash-can"></i>
</label>
{% else %}
<label for="{{ id }}" class="btn btn-default" title="{% translate 'Upload a picture' %}">
<i class="fas fa-cloud-upload-alt"></i>
<i class="fa-solid fa-cloud-arrow-up"></i>
</label>
{% endif %}
</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ function init () {
'<div class="modal-content">' +
'<div class="modal-header">' +
'<h2 class="modal-title u-first-heading">' + modalTitle + '</h2>' +
'<button class="close" aria-label="' + django.gettext('Close') + '" data-bs-dismiss="modal"><i class="fa fa-times"></i></button>' +
'<button class="close" aria-label="' + django.gettext('Close') + '" data-bs-dismiss="modal"><i class="fa fa-xmark"></i></button>' +
'</div>' +
'<div class="modal-body">' +
'<form id="map-import-form" data-ignore-submit="true">' +
Expand Down
2 changes: 1 addition & 1 deletion adhocracy4/maps/static/a4maps/a4maps_display_points.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ function init () {

function getCommentCount (feature) {
return '<span class="map-popup-comments-count">' +
feature.properties.comments_count + ' <i class="far fa-comment" aria-hidden="true"></i>' +
feature.properties.comments_count + ' <i class="fa-regular fa-comment" aria-hidden="true"></i>' +
'<span class="visually-hidden">' +
django.ngettext(
'person commented on this proposal.',
Expand Down
2 changes: 1 addition & 1 deletion adhocracy4/polls/static/PollDashboard/EditPollChoice.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export const EditPollChoice = (props) => {
disabled={props.undeletable}
>
<i
className="fa fa-times"
className="fa fa-xmark"
aria-label={django.gettext('remove')}
/>
</button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export const EditPollOpenQuestion = (props) => {
type="button"
>
<i
className="fas fa-trash-alt"
className="fa-solid fa-trash-can"
aria-label={django.gettext('Delete')}
/>
</button>
Expand Down
2 changes: 1 addition & 1 deletion adhocracy4/polls/static/PollDashboard/EditPollQuestion.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ export const EditPollQuestion = (props) => {
type="button"
>
<i
className="fas fa-trash-alt"
className="fa-solid fa-trash-can"
aria-label={django.gettext('Delete')}
/>
</button>
Expand Down
6 changes: 3 additions & 3 deletions adhocracy4/polls/static/PollDetail/PollResults.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ export default class PollResult extends React.Component {
const highlight = choice.count === max && max > 0
return !this.state.question.is_open &&
<div key={choice.id} className="poll-row__container">
{chosen ? <i className="poll-row__chosen fas fa-check-circle" aria-label={django.gettext('Your choice')} /> : ''}
{chosen ? <i className="poll-row__chosen fa-solid fa-circle-check" aria-label={django.gettext('Your choice')} /> : ''}
<div className="poll-row poll-row--answered">
<div className="poll-row__number">{percent}%</div>
<div className="poll-row__label">{choice.is_other_choice ? django.gettext('other') : choice.label}</div>
Expand All @@ -129,7 +129,7 @@ export default class PollResult extends React.Component {
key={index}
>
<div className="poll-slider__answer">
{this.isUserAnswer(slide) && <i className="fas fa-check-circle" />} {slide.answer}
{this.isUserAnswer(slide) && <i className="fa-solid fa-circle-check" />} {slide.answer}
</div>
<div className={this.props.question.other_choice_answers.length > 1 ? 'poll-slider__count--spaced' : 'poll-slider__count'}>
{index + 1}/{this.props.question.other_choice_answers.length}
Expand All @@ -152,7 +152,7 @@ export default class PollResult extends React.Component {
key={index}
>
<div className="poll-slider__answer">
{this.isUserAnswer(slide) && <i className="fas fa-check-circle" />} {slide.answer}
{this.isUserAnswer(slide) && <i className="fa-solid fa-circle-check" />} {slide.answer}
</div>
<div className={this.props.question.answers.length > 1 ? 'poll-slider__count--spaced' : 'poll-slider__count'}>
{index + 1}/{this.props.question.answers.length}
Expand Down
2 changes: 1 addition & 1 deletion adhocracy4/static/Alert.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const Alert = ({ type, alertAttribute, message, onClick, timeInMs }) => {
<div className="container">
{message}
<button className="alert__close" title={closeTag} onClick={onClick}>
<i className="fa fa-times" aria-label={closeTag} />
<i className="fa fa-xmark" aria-label={closeTag} />
</button>
</div>

Expand Down
2 changes: 1 addition & 1 deletion adhocracy4/static/Modal.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const Modal = (props) => {
data-bs-dismiss="modal"
onClick={props.handleClose}
>
<i className="fa fa-times" aria-hidden="true" />
<i className="fa fa-xmark" aria-hidden="true" />
</button>
</div>

Expand Down

0 comments on commit 2e405d6

Please sign in to comment.