posts: update tag counter icons.

This commit is contained in:
evazion
2020-08-02 18:06:40 -05:00
parent b3a4c7aa43
commit 6b7cd7b972
10 changed files with 37 additions and 63 deletions

View File

@@ -19,7 +19,7 @@ export default @observer class TagCounter extends Component {
return (
<span class="tag-counter">
<span class="tag-count">{this.tagCount}</span> / {TagCounter.highCount} tags
<i class={`far fa-${this.emoji}`}></i>
<img src={`/images/${this.iconName}.png`}/>
</span>
);
}
@@ -28,13 +28,13 @@ export default @observer class TagCounter extends Component {
this.tagCount = Utility.regexp_split($(this.props.tags).val()).length;
}
@computed get emoji() {
@computed get iconName() {
if (this.tagCount < TagCounter.lowCount) {
return "frown";
return "blobglare";
} else if (this.tagCount >= TagCounter.lowCount && this.tagCount < TagCounter.highCount) {
return "meh";
return "blobthinkingglare";
} else {
return "smile";
return "blobaww";
}
}