1
0
mirror of https://github.com/flarum/core.git synced 2025-08-01 22:20:21 +02:00

Adapt to FontAwesome v5.0.6 icon name changes (#2)

This commit is contained in:
AFR
2018-02-24 05:44:35 +07:00
committed by Franz Liedke
parent d3346de77e
commit cc50059f57

View File

@@ -53,12 +53,12 @@ export default class StatisticsWidget extends DashboardWidget {
<div className="StatisticsWidget-labels"> <div className="StatisticsWidget-labels">
<div className="StatisticsWidget-label">{app.translator.trans('flarum-statistics.admin.statistics.total_label')}</div> <div className="StatisticsWidget-label">{app.translator.trans('flarum-statistics.admin.statistics.total_label')}</div>
<div className="StatisticsWidget-label"> <div className="StatisticsWidget-label">
<SelectDropdown buttonClassName="Button Button--text" caretIcon="caret-down"> <SelectDropdown buttonClassName="Button Button--text" caretIcon="fa fa-caret-down">
{Object.keys(this.periods).map(period => ( {Object.keys(this.periods).map(period => (
<Button <Button
active={period === this.selectedPeriod} active={period === this.selectedPeriod}
onclick={this.changePeriod.bind(this, period)} onclick={this.changePeriod.bind(this, period)}
icon={period === this.selectedPeriod ? 'check' : true}> icon={period === this.selectedPeriod ? 'fa fa-check' : true}>
{app.translator.trans('flarum-statistics.admin.statistics.'+period+'_label')} {app.translator.trans('flarum-statistics.admin.statistics.'+period+'_label')}
</Button> </Button>
))} ))}
@@ -80,7 +80,7 @@ export default class StatisticsWidget extends DashboardWidget {
{abbreviateNumber(thisPeriodCount)}{' '} {abbreviateNumber(thisPeriodCount)}{' '}
{periodChange ? ( {periodChange ? (
<span className={'StatisticsWidget-change StatisticsWidget-change--'+(periodChange > 0 ? 'up' : 'down')}> <span className={'StatisticsWidget-change StatisticsWidget-change--'+(periodChange > 0 ? 'up' : 'down')}>
{icon('arrow-'+(periodChange > 0 ? 'up' : 'down'))} {icon('fa fa-arrow-'+(periodChange > 0 ? 'up' : 'down'))}
{Math.abs(periodChange.toFixed(1))}% {Math.abs(periodChange.toFixed(1))}%
</span> </span>
) : ''} ) : ''}