add user online information for admins

This commit is contained in:
Thomas G 2022-08-08 22:28:38 +10:00
parent 0776babe14
commit c04531b500
2 changed files with 8 additions and 10 deletions

View File

@ -12,14 +12,7 @@
<h1>Welcome to ARCHBLOX!</h1>
<p>ARCHBLOX is a Work-In-Progress revival.</p>
<br>
<a alt="Log In button" href="{{ route('login') }}">Log In</a>
<a alt="Sign Up button" href="{{ route('register') }}">Sign Up</a>
<p><a alt="Log In button" href="{{ route('login') }}">Log In</a> | <a alt="Sign Up button" href="{{ route('register') }}">Sign Up</a></p>
<br>
<p id="ARCHBLOX" class="invisible">Want to check out the published site? <a href="https://archblox.com">Click
here!</a></p>
<p id="discord">Also, <a href="https://discord.gg/nudzQ7hkWY">Join our Discord!</a></p>
<br>
<br>
<h3>User Count</h3>
<p>There are <strong>{{ App\Models\User::count() }}</strong> users registered</p>
<a href="https://discord.gg/nudzQ7hkWY">Join our Discord!</a>
@endsection

View File

@ -70,7 +70,7 @@
<script>
function third() {
document.querySelector('.smallnav').classList.toggle('invisible_navbar');
}
}
document.querySelector('#smallnav_open').addEventListener('click', third);
</script>
@break
@ -141,6 +141,11 @@
@yield('content')
</div>
<div id="footer">
@if (!Auth::guest() && Auth::user()->isAdmin())
<p><strong>{{ App\Models\User::count() }}</strong> users registered | <strong>{{ App\Models\User::where('last_seen', '>', Carbon\Carbon::now()->subMinute()->toDateTimeString())->count(); }}</strong>
users are online</p>
<br>
@endif
<p>ARCHBLOX is not affiliated with Roblox Corp, Lego, Sony, SEGA, Microsoft, Nintendo or any other company.
We're still Morbin'!</p>
<p><a href="{{ route('privacy') }}">Privacy Policy</a> <a href="{{ route('tos') }}">Terms of Service</a>