Properly parse negative filesizes

This commit is contained in:
Andrew Brown 2017-03-24 21:44:08 +00:00
parent 2f7e199fff
commit ba56f87f74

View File

@ -167,7 +167,7 @@
<div class="col s12">
<div class="card" style="padding: 15px">
<p>
You have <strong><%= Filesize.from("#{current_user.upload_bandwidth_kb}KB").pretty %></strong> of bandwidth remaining.
You have <strong><%= (current_user.upload_bandwidth_kb) > 0 ? Filesize.from("#{current_user.upload_bandwidth_kb}KB").pretty : '-' + Filesize.from("#{current_user.upload_bandwidth_kb}KB").pretty %></strong> of bandwidth remaining.
</p>
<p>
This bandwidth can be used to upload images to your content anywhere on the site. Deleting an uploaded image frees