Don't display database button when phpmyadmin is empty

This commit is contained in:
AVMG20 2021-08-03 16:40:39 +02:00
parent e9bc2e8827
commit bdedecbe5b
2 changed files with 8 additions and 4 deletions

View file

@ -33,8 +33,8 @@ DISCORD_GUILD_ID=
DISCORD_ROLE_ID=
#nesseary URL's
PTERODACTYL_URL=https://panel.bitsec.dev
PHPMYADMIN_URL=https://mysql.bitsec.dev
PTERODACTYL_URL=https://panel.controlpanel.gg
PHPMYADMIN_URL=https://mysql.controlpanel.gg #optional. remove to remove database button
DISCORD_INVITE_URL=https://discord.gg/vrUYdxG4wZ
#GOOGLE RECAPTCHA

View file

@ -45,7 +45,9 @@
</a>
<div class="dropdown-menu dropdown-menu-right shadow animated--fade-in" aria-labelledby="dropdownMenuLink">
<a href="{{env('PTERODACTYL_URL' , 'http://localhost')}}/server/{{$server->identifier}}" target="__blank" class="dropdown-item text-info"><i title="manage" class="fas fa-tasks mr-2"></i><span>Manage</span></a>
<a href="{{env('PHPMYADMIN_URL' , 'http://localhost')}}" class="dropdown-item text-info" target="__blank"><i title="manage" class="fas fa-database mr-2"></i><span>Database</span></a>
@if(!empty(env('PHPMYADMIN_URL')))
<a href="{{env('PHPMYADMIN_URL' , 'http://localhost')}}" class="dropdown-item text-info" target="__blank"><i title="manage" class="fas fa-database mr-2"></i><span>Database</span></a>
@endif
<form method="post" onsubmit="return submitResult();" action="{{route('servers.destroy' , $server->id)}}">
@csrf
@method('DELETE')
@ -87,7 +89,9 @@
<div class="card-footer d-flex justify-content-between">
<a href="{{env('PTERODACTYL_URL' , 'http://localhost')}}/server/{{$server->identifier}}" target="__blank" class="btn btn-info mx-3 w-100"><i class="fas fa-tasks mr-2"></i>Manage</a>
<a href="{{env('PHPMYADMIN_URL' , 'http://localhost')}}" target="__blank" class="btn btn-info mx-3 w-100" ><i class="fas fa-database mr-2"></i>Database</a>
@if(!empty(env('PHPMYADMIN_URL')))
<a href="{{env('PHPMYADMIN_URL' , 'http://localhost')}}" target="__blank" class="btn btn-info mx-3 w-100" ><i class="fas fa-database mr-2"></i>Database</a>
@endif
</div>
</div>