Make dates a little more user friendly
This commit is contained in:
parent
449324fa1c
commit
63d7062f3c
2 changed files with 21 additions and 3 deletions
|
@ -51,7 +51,7 @@
|
||||||
<h3 class="panel-title">File Path Information</h3>
|
<h3 class="panel-title">File Path Information</h3>
|
||||||
</div>
|
</div>
|
||||||
<div class="panel-body">
|
<div class="panel-body">
|
||||||
When configuring any file paths in your server plugins or settings you should use <code>/home/container</code> as your base path. While your SFTP client sees the files as <code>/public</code> this is not true for the server process.
|
When configuring any file paths in your server plugins or settings you should use <code>/home/container</code> as your base path.
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -63,7 +63,16 @@
|
||||||
<a href="/server/{{ $server->uuidShort }}/files" data-action="directory-view">{{ $folder['entry'] }}</a>
|
<a href="/server/{{ $server->uuidShort }}/files" data-action="directory-view">{{ $folder['entry'] }}</a>
|
||||||
</td>
|
</td>
|
||||||
<td data-identifier="size">{{ $folder['size'] }}</td>
|
<td data-identifier="size">{{ $folder['size'] }}</td>
|
||||||
<td data-identifier="modified">{{ date('m/d/y H:i:s', $folder['date']) }}</td>
|
<td data-identifier="modified">
|
||||||
|
<?php $carbon = Carbon::createFromTimestamp($folder['date'])->timezone(env('APP_TIMEZONE', 'America/New_York')); ?>
|
||||||
|
@if($carbon->diffInMinutes(Carbon::now()) > 60)
|
||||||
|
{{ $carbon->format('m/d/y H:i:s') }}
|
||||||
|
@elseif($carbon->diffInSeconds(Carbon::now()) < 5 || $carbon->isFuture())
|
||||||
|
<em>seconds ago</em>
|
||||||
|
@else
|
||||||
|
{{ $carbon->diffForHumans() }}
|
||||||
|
@endif
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@endforeach
|
@endforeach
|
||||||
@foreach ($files as $file)
|
@foreach ($files as $file)
|
||||||
|
@ -130,7 +139,16 @@
|
||||||
@endif
|
@endif
|
||||||
</td>
|
</td>
|
||||||
<td data-identifier="size">{{ $file['size'] }}</td>
|
<td data-identifier="size">{{ $file['size'] }}</td>
|
||||||
<td data-identifier="modified">{{ date('m/d/y H:i:s', $file['date']) }}</td>
|
<td data-identifier="modified">
|
||||||
|
<?php $carbon = Carbon::createFromTimestamp($file['date'])->timezone(env('APP_TIMEZONE', 'America/New_York')); ?>
|
||||||
|
@if($carbon->diffInMinutes(Carbon::now()) > 60)
|
||||||
|
{{ $carbon->format('m/d/y H:i:s') }}
|
||||||
|
@elseif($carbon->diffInSeconds(Carbon::now()) < 5 || $carbon->isFuture())
|
||||||
|
<em>seconds ago</em>
|
||||||
|
@else
|
||||||
|
{{ $carbon->diffForHumans() }}
|
||||||
|
@endif
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@endforeach
|
@endforeach
|
||||||
</tbody>
|
</tbody>
|
||||||
|
|
Loading…
Reference in a new issue