|
7 | 7 |
|
8 | 8 | <div class="dropdown-menu dropdown-menu-right" aria-labelledby="navbarDropdown">
|
9 | 9 | <!-- Team Management -->
|
10 |
| - <div class="block px-4 py-2 text-xs text-gray-400"> |
11 |
| - {{ __('Manage Team') }} |
12 |
| - </div> |
13 |
| - |
| 10 | + <h6 class="dropdown-header">{{ __('Manage Team') }}r</h6> |
| 11 | + |
14 | 12 | <!-- Team Settings -->
|
15 |
| - <x-dropdown-link href="{{ route('teams.show', Auth::user()->currentTeam->id) }}"> |
16 |
| - {{ __('Team Settings') }} |
17 |
| - </x-dropdown-link> |
| 13 | + <a class="dropdown-item" href="{{ route('teams.show', Auth::user()->currentTeam->id) }}">{{ __('Team Settings') }}</a> |
18 | 14 |
|
19 | 15 | @can('create', Laravel\Jetstream\Jetstream::newTeamModel())
|
20 |
| - <x-dropdown-link href="{{ route('teams.create') }}"> |
21 |
| - {{ __('Create New Team') }} |
22 |
| - </x-dropdown-link> |
| 16 | + <a class="dropdown-item" href="{{ route('teams.create') }}">{{ __('Create New Team') }}</a> |
23 | 17 | @endcan
|
24 | 18 |
|
25 | 19 | <!-- Team Switcher -->
|
26 | 20 | @if (Auth::user()->allTeams()->count() > 1)
|
27 |
| - <div class="border-t border-gray-200"></div> |
28 |
| - |
29 |
| - <div class="block px-4 py-2 text-xs text-gray-400"> |
30 |
| - {{ __('Switch Teams') }} |
31 |
| - </div> |
| 21 | + <div class="dropdown-divider"></div> |
| 22 | + |
| 23 | + <h6 class="dropdown-header">{{ __('Switch Teams') }}r</h6> |
32 | 24 |
|
33 | 25 | @foreach (Auth::user()->allTeams() as $team)
|
34 |
| - <x-switchable-team :team="$team" /> |
| 26 | + <form method="POST" action="{{ route('current-team.update') }}" x-data> |
| 27 | + @method('PUT') |
| 28 | + @csrf |
| 29 | + |
| 30 | + <!-- Hidden Team ID --> |
| 31 | + <input type="hidden" name="team_id" value="{{ $team->id }}"> |
| 32 | + |
| 33 | + <x-dynamic-component :component="$component" href="#" x-on:click.prevent="$root.submit();"> |
| 34 | + <div class="flex items-center"> |
| 35 | + @if (Auth::user()->isCurrentTeam($team)) |
| 36 | + <svg class="me-2 size-5 text-green-400" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"> |
| 37 | + <path stroke-linecap="round" stroke-linejoin="round" d="M9 12.75L11.25 15 15 9.75M21 12a9 9 0 11-18 0 9 9 0 0118 0z" /> |
| 38 | + </svg> |
| 39 | + @endif |
| 40 | + |
| 41 | + <div class="truncate">{{ $team->name }}</div> |
| 42 | + </div> |
| 43 | + </x-dynamic-component> |
| 44 | + </form> |
35 | 45 | @endforeach
|
36 | 46 | @endif
|
37 | 47 | </div>
|
|
0 commit comments