Skip to content

Commit

Permalink
Improve about page (#906)
Browse files Browse the repository at this point in the history
  • Loading branch information
realodix authored Oct 4, 2023
1 parent 22e7983 commit 53425fa
Show file tree
Hide file tree
Showing 2 changed files with 104 additions and 22 deletions.
4 changes: 4 additions & 0 deletions resources/css/base.css
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@
h3 {
@apply text-2xl;
}

h4 {
@apply text-xl;
}
}

/*
Expand Down
122 changes: 100 additions & 22 deletions resources/views/backend/about.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,65 +4,143 @@

@section('content')
<main>
<div class="common-card-style p-4">
<h4>Links</h4>
<table>
<tbody>
<tr>
<td class="w-72">Total</td>
<td>{{$url->count()}}</td>
</tr>
<tr>
<td>From Registered Users</td>
<td>{{$url->whereUserId(auth()->id())->count()}}</td>
</tr>
<tr>
<td>From Unregistered Users</td>
<td>{{$url->numberOfUrlsByGuests()}}</td>
</tr>
</tbody>
</table>

<br>

<h4>Users</h4>
<table>
<tbody>
<tr>
<td class="w-72">Registered</td>
<td>{{$user->count()}}</td>
</tr>
<tr>
<td>Unregistered</td>
<td>{{$user->totalGuestUsers()}}</td>
</tr>
</tbody>
</table>

<br>

<h4>Random String</h4>
<table>
<tbody>
<tr>
<td class="w-72">Possible Output</td>
<td>{{$keyGeneratorService->maxCapacity()}}</td>
</tr>
<tr>
<td>Generated</td>
<td>{{$keyGeneratorService->usedCapacity()}}</td>
</tr>
</tbody>
</table>
</div>

<br>

<div class="common-card-style p-4">
<div class="flex mb-8">
<div class="w-1/2">
<span class="text-2xl text-uh-1">
{{__('About System')}}
{{__('Configuration')}}
</span>
</div>
</div>

<h3>Random Characters</h3>
<h4>Shortened Links</h4>
<table>
<tbody>
@php
$hashLength = config('urlhub.hash_length');
$redirectCacheMaxAge = config('urlhub.redirect_cache_max_age');
@endphp
<tr>
<td>Length</td>
<td>{{config('urlhub.hash_length')}}</td>
<td class="w-72">Random string length</td>
<td>{{$hashLength.' '.str('character')->plural($hashLength)}}</td>
</tr>
<tr>
<td>Possible Output</td>
<td>{{$keyGeneratorService->maxCapacity()}}</td>
<td>web_title</td>
<td>{{var_export(config('urlhub.web_title'))}}</td>
</tr>
<tr>
<td>Generated</td>
<td>{{$keyGeneratorService->usedCapacity()}}</td>
<td>redirect_status_code</td>
<td>{{config('urlhub.redirect_status_code')}}</td>
</tr>
<tr>
<td>redirect_cache_max_age</td>
<td>{{$redirectCacheMaxAge.' '.str('second')->plural($redirectCacheMaxAge)}}</td>
</tr>
<tr>
<td>track_bot_visits</td>
<td>{{var_export(config('urlhub.track_bot_visits'))}}</td>
</tr>
</tbody>
</table>

<br>

<h3>Short Links</h3>
<h4>Guest / Unregistered Users</h4>
<table>
<tbody>
<tr>
<td class="w-60">Total</td>
<td>{{$url->count()}}</td>
<td class="w-72">Anyone can shorten the link</td>
<td>{{var_export(config('urlhub.public_site'))}}</td>
</tr>
<tr>
<td>From Registered Users</td>
<td>{{$url->whereUserId(auth()->id())->count()}}</td>
</tr>
<tr>
<td>From Unregistered Users</td>
<td>{{$url->numberOfUrlsByGuests()}}</td>
<td>Anyone can sign up</td>
<td>{{var_export(config('urlhub.registration'))}}</td>
</tr>
</tbody>
</table>

<br>

<h3>Users</h3>
<h4>QRCode</h4>
<table>
<tbody>
<tr>
<td class="w-60">Registered</td>
<td>{{$user->count()}}</td>
<td class="w-72">Enable</td>
<td>{{var_export(config('urlhub.qrcode'))}}</td>
</tr>
<tr>
<td>Unregistered</td>
<td>{{$user->totalGuestUsers()}}</td>
<td>Size</td>
<td>{{config('urlhub.qrcode_size')}} px</td>
</tr>
<tr>
<td>Margin</td>
<td>{{config('urlhub.qrcode_margin')}} px</td>
</tr>
<tr>
<td>Format</td>
<td>{{config('urlhub.qrcode_format')}}</td>
</tr>
<tr>
<td>Error correction levels</td>
<td>{{config('urlhub.qrcode_error_correction')}}</td>
</tr>
<tr>
<td>Round block</td>
<td>{{var_export(config('urlhub.qrcode_round_block_size'))}}</td>
</tr>
</tbody>
</table>
Expand Down

0 comments on commit 53425fa

Please sign in to comment.