Skip to content

Commit

Permalink
Updated file size formatting for admins
Browse files Browse the repository at this point in the history
  • Loading branch information
dsbilling committed Jan 26, 2021
1 parent 1121a99 commit def6b30
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

* Updated skin information
* Updated file validation for skin upload
* Updated file size formatting for admins

### Removed
* Remove a old folder from 0.1.0 causing issues
Expand Down
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"enlightn/enlightn": "^1.0",
"fideloper/proxy": "^4.4",
"fruitcake/laravel-cors": "^2.0",
"gabrielelana/byte-units": "^0.5.0",
"guzzlehttp/guzzle": "^7.0.1",
"harrk/gamejolt-api": "^1.1",
"intervention/image": "^2.5",
Expand Down
58 changes: 57 additions & 1 deletion composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion resources/views/skin/index.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<div class="card-body">
<h5 class="card-title">{{ $playerskin }}</h5>
<p class="card-text">
<small class="text-muted">{{ Storage::disk('player')->size($playerskin) }} KB</small>
<small class="text-muted">{{ \ByteUnits\Binary::bytes(Storage::disk('player')->size($playerskin))->format() }}</small>
<br>
<small class="text-muted">Owned by {{ App\Models\GJUser::where('gjid', str_replace('.png', '', $playerskin))->first()->gju ?? 'Game Jolt ID: '.str_replace('.png', '', $playerskin) }}</small>
</p>
Expand Down

0 comments on commit def6b30

Please sign in to comment.