fixes on login

This commit is contained in:
Ludovic CANDELLIER
2023-08-28 22:58:11 +02:00
parent f721422abc
commit 7addea00a2
7 changed files with 94 additions and 73 deletions

View File

@@ -1,44 +1,43 @@
<button type="button" class="btn bg-light green-dark p-0" data-toggle="dropdown">
@if (App\Repositories\Shop\Customers::isConnected())
<img src="{{ App\Repositories\Shop\Customers::getAvatar() }}" class="img-fluid" title="{{ App\Repositories\Shop\Customers::getName() }}">
@else
<img src="/img/header/login.svg" width="36px">
@endif
@if (App\Repositories\Shop\Customers::isConnected())
<img src="{{ App\Repositories\Shop\Customers::getAvatar() }}" class="img-fluid" title="{{ App\Repositories\Shop\Customers::getName() }}">
@else
<img src="/img/header/login.svg" width="36px">
@endif
</button>
<ul class="dropdown-menu" aria-labelledby="dLabel">
@if (App\Repositories\Shop\Customers::isConnected())
<li class="dropdown-item">
<a href="{{ route('Shop.Customers.profile') }}" title="Accèdez à vos factures, remises ..." rel="nofollow">
<span>Votre compte</span>
</a>
</li>
<li class="dropdown-item">
<a href="#" onclick="event.preventDefault(); document.getElementById('logout-form').submit();">
Déconnexion
</a>
@if (App\Repositories\Shop\Customers::isConnected())
<li class="dropdown-item">
<a href="{{ route('Shop.Customers.profile') }}" title="Accèdez à vos factures, remises ..." rel="nofollow">
<span>Votre compte</span>
</a>
</li>
<li class="dropdown-item">
<a href="#" onclick="event.preventDefault(); document.getElementById('logout-form').submit();">
Déconnexion
</a>
<form id="logout-form" action="{{ route('Shop.logout') }}" method="POST" style="display: none;">
@csrf
</form>
<form id="logout-form" action="{{ route('Shop.logout') }}" method="POST" style="display: none;">
@csrf
</form>
</li>
@else
<li class="dropdown-item">
<a href="{{ route('Shop.Orders.order') }}" title="Identifiez-vous" rel="nofollow">
<span>Connexion</span>
</a>
</li>
<li class="dropdown-item">
<a href="{{ route('Shop.register') }}" title="Enregistrez-vous" rel="nofollow">
<span>Creer votre compte</span>
</a>
</li>
<li class="dropdown-item">
<a href="https://www.jardinenvie.com/boutique/commander" title="Télécharger le catalogue" rel="nofollow">
<span>Télécharger le catalogue</span>
</a>
</li>
@endif
</li>
@else
<li class="dropdown-item">
<a href="{{ route('Shop.login') }}" title="Identifiez-vous" rel="nofollow">
<span>Connexion</span>
</a>
</li>
<li class="dropdown-item">
<a href="{{ route('Shop.register') }}" title="Enregistrez-vous" rel="nofollow">
<span>Creer votre compte</span>
</a>
</li>
@endif
<li class="dropdown-item">
<a href="https://www.jardinenvie.com/boutique/commander" title="Télécharger le catalogue" rel="nofollow">
<span>Télécharger le catalogue</span>
</a>
</li>
</ul>