Compare commits

...

4 Commits

Author SHA1 Message Date
9c9fd84e0a Change layout of topmenu
All checks were successful
Create Docker Image / Build Docker Image (x86_64) (push) Successful in 33s
Create Docker Image / Build Docker Image (arm64) (push) Successful in 1m37s
Create Docker Image / Final Docker Image Manifest (push) Successful in 9s
2024-04-14 20:26:28 +10:00
5cb70da458 Optimise rendering of bbs list 2024-04-14 16:59:06 +10:00
3e561ab068 Optimise rendering of domain list 2024-04-14 16:55:52 +10:00
42cc50512f Fix topmenu dropdown rendering, Recognise POINTs in Address Type 2024-04-14 16:52:47 +10:00
6 changed files with 113 additions and 25 deletions

View File

@ -293,6 +293,8 @@ class Address extends Model
return 'NODE'; return 'NODE';
case self::NODE_POINT: case self::NODE_POINT:
return 'POINT'; return 'POINT';
case self::NODE_PVT:
return 'PRIVATE';
default: default:
return '?'; return '?';
} }

View File

@ -63,14 +63,12 @@ ol {
color: white; color: white;
} }
/* Stop dropdown menu animation */ /* Stop dropdown menu animation - also fixes collapsing transition layout */
/*
.collapsing { .collapsing {
-webkit-transition: none; -webkit-transition: none;
transition: none; transition: none;
display: none; display: none;
} }
*/
/* dropdown menu fixes */ /* dropdown menu fixes */
#nav-menu div.collapse.navbar-collapse.show ul { #nav-menu div.collapse.navbar-collapse.show ul {

View File

@ -241,6 +241,7 @@ a.thispage:hover {
background-color:transparent!important background-color:transparent!important
} }
a.thispage span, a.thispage span,
a.dropdown-item.thispage,
a.thispage:hover span { a.thispage:hover span {
color:#c60!important color:#c60!important
} }

View File

@ -11,8 +11,8 @@
<p>Here is a list of known <strong class="highlight">FTN Networks</strong>.</p> <p>Here is a list of known <strong class="highlight">FTN Networks</strong>.</p>
</div> </div>
<div class="col-10 pt-2"> <div class="col-12 pt-2">
<table class="table monotable"> <table class="table monotable" id="ftnlist">
<thead> <thead>
<tr> <tr>
<th>Domain</th> <th>Domain</th>
@ -34,7 +34,7 @@
@endif @endif
</td> </td>
<td>{{ $do->zones->where('active',TRUE)->pluck('zone_id')->sort()->join(', ') }}</td> <td>{{ $do->zones->where('active',TRUE)->pluck('zone_id')->sort()->join(', ') }}</td>
<td class="text-end">{{ $do->active ? 'YES' : 'NO' }}</td> <td class="text-end">{{ $do->active ? 'Active' : 'Not Active' }}</td>
<td class="text-end">{{ $do->managed() ? 'YES' : 'NO' }}</td> <td class="text-end">{{ $do->managed() ? 'YES' : 'NO' }}</td>
<td> <td>
@foreach (($x=$do->zones->pluck('addresses')->flatten())->where('role',\App\Models\Address::NODE_ZC)->sortBy('zone.zone_id') as $ao) @foreach (($x=$do->zones->pluck('addresses')->flatten())->where('role',\App\Models\Address::NODE_ZC)->sortBy('zone.zone_id') as $ao)
@ -48,4 +48,58 @@
</table> </table>
</div> </div>
</div> </div>
@endsection @endsection
@section('page-css')
@css('datatables')
@append
@section('page-scripts')
@js('datatables')
<script type="text/javascript">
$(document).ready(function() {
$('table tr').click(function() {
var href = $(this).find('a:not(.disabled)').attr('href');
if (href)
window.location = href;
});
$('#ftnlist').DataTable({
paging: true,
pageLength: 25,
searching: true,
autoWidth: false,
conditionalPaging: {
style: 'fade',
speed: 500 // optional
},
columnDefs: [
{
targets: 1,
type: 'num-fmt',
render: {
'sort': function (data,type,row,meta) {
return data ? parseFloat(data) : 0;
},
}
},
{
targets: [2],
visible: false,
},
],
orderFixed: [2, 'asc'],
rowGroup: {
dataSrc: [2],
},
language: {
paginate: {
previous: '&lt;&lt;',
next: '&gt;&gt;'
}
},
});
});
</script>
@append

View File

@ -4,15 +4,21 @@
<ul id="navlist-desktop"> <ul id="navlist-desktop">
<li><a href="{{ url($user ? 'dashboard' : '/') }}" class="@if(preg_match('#^([dashboard]?[/]?)+$#',request()->path()))thispage disabled @endif"><span>Home</span></a></li> <li><a href="{{ url($user ? 'dashboard' : '/') }}" class="@if(preg_match('#^([dashboard]?[/]?)+$#',request()->path()))thispage disabled @endif"><span>Home</span></a></li>
<li><a href="{{ url('about') }}" class="@if(preg_match('#^about#',request()->path()))thispage disabled @endif"><span>About</span></a></li> <li><a href="{{ url('about') }}" class="@if(preg_match('#^about#',request()->path()))thispage disabled @endif"><span>About</span></a></li>
<li><a href="{{ url('domain/list') }}" class="@if(preg_match('#^domain/list#',request()->path()))thispage disabled @endif"><span>FTN List</span></a></li> <li>
<li><a href="{{ url('system/list') }}" class="@if(preg_match('#^system/list#',request()->path()))thispage disabled @endif"><span>BBS List</span></a></li> <a class="@if(preg_match('#[domain|system]/list#',request()->path()))thispage @endif" type="button" data-bs-toggle="collapse" data-bs-target="#dropdown-list" aria-controls="dropdown-list" aria-expanded="false" aria-label="Toggle Lists">
<span>Lists</span>
</a>
<div class="collapse navbar-collapse" id="dropdown-list">
<ul class="dropdown-menu dropdown-menu-dark">
<li><a class="dropdown-item @if(preg_match('#^system/list#',request()->path()))thispage disabled @endif" href="{{ url('system/list') }}">BBS List</a></li>
<li><a class="dropdown-item @if(preg_match('#^domain/list#',request()->path()))thispage disabled @endif" href="{{ url('domain/list') }}">FTN List</a></li>
</ul>
</div>
</li>
<li><a href="{{ url('status') }}" class="@if(preg_match('#^status#',request()->path()))thispage disabled @endif"><span>Status</span></a></li> <li><a href="{{ url('status') }}" class="@if(preg_match('#^status#',request()->path()))thispage disabled @endif"><span>Status</span></a></li>
{{-- {{--
<li><a href="{{ url('help') }}" class="@if(preg_match('#^help#',request()->path()))thispage @endif disabled"><span>Help</span></a></li> <li><a href="{{ url('help') }}" class="@if(preg_match('#^help#',request()->path()))thispage @endif disabled"><span>Help</span></a></li>
--}} --}}
@can('admin')
<li><a href="{{ url('setup') }}" class="@if(preg_match('#^setup#',request()->path()))thispage @endif"><span>Setup</span></a></li>
@endcan
@if(preg_match('#^/network/#',request()->path())) @if(preg_match('#^/network/#',request()->path()))
<li><a href="{{ url('join') }}" class="@if(preg_match('#^join#',request()->path()))thispage @endif"><span>Join</span></a></li> <li><a href="{{ url('join') }}" class="@if(preg_match('#^join#',request()->path()))thispage @endif"><span>Join</span></a></li>
@endif @endif
@ -21,24 +27,23 @@
<ul class="float-end"> <ul class="float-end">
@auth @auth
<li> <li>
<a class="{{ $user->switched ? 'switched' : '' }}" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNavDarkDropdown" aria-controls="navbarNavDarkDropdown" aria-expanded="false" aria-label="Toggle navigation"> <a class="{{ $user->switched ? 'switched' : '' }}" type="button" data-bs-toggle="collapse" data-bs-target="#user-menu-list" aria-controls="navbarNavDarkDropdown" aria-expanded="false" aria-label="Toggle navigation">
<span>{{ $user->name }}</span> <span>{{ $user->name }}</span>
</a> </a>
<div class="collapse navbar-collapse" id="navbarNavDarkDropdown"> <div class="collapse navbar-collapse" id="user-menu-list">
<ul class="dropdown-menu dropdown-menu-dark"> <ul class="dropdown-menu dropdown-menu-dark">
<li><a class="dropdown-item" href="{{ url('user/system/register') }}">Register/Link System</a></li> <li><a class="dropdown-item" href="{{ url('user/system/register') }}">Register/Link System</a></li>
@can('admin')
<li><a class="dropdown-item @if(preg_match('#^setup#',request()->path()))thispage @endif" href="{{ url('setup') }}">Setup</a></li>
@endcan
@if($user->switched)
<li><a class="dropdown-item" href="{{ url('admin/switch/stop') }}">Switch Back</a></li>
@else
<li><a class="dropdown-item" href="{{ url('logout') }}">Logout</a></li>
@endif
</ul> </ul>
</div> </div>
</li> </li>
@if($user->switched)
<li><a href="{{ url('admin/switch/stop') }}">
<span>Switch Back</span>
</a></li>
@else
<li><a href="{{ url('logout') }}"><span>Logout</span></a></li>
@endif
@endauth @endauth
@guest @guest
<li><a href="{{ url('login') }}"><span>Login</span></a></li> <li><a href="{{ url('login') }}"><span>Login</span></a></li>

View File

@ -12,7 +12,7 @@
</div> </div>
<div class="col-12 pt-2"> <div class="col-12 pt-2">
<table class="table monotable"> <table class="table monotable" id="bbslist">
<thead> <thead>
<tr> <tr>
<th class="w-25">System</th> <th class="w-25">System</th>
@ -39,4 +39,32 @@
</table> </table>
</div> </div>
</div> </div>
@endsection @endsection
@section('page-css')
@css('datatables')
@append
@section('page-scripts')
@js('datatables')
<script type="text/javascript">
$(document).ready(function() {
$('#bbslist').DataTable({
paging: true,
pageLength: 25,
searching: true,
autoWidth: false,
conditionalPaging: {
style: 'fade',
speed: 500 // optional
},
language: {
paginate: {
previous: '&lt;&lt;',
next: '&gt;&gt;'
}
},
});
});
</script>
@append