feat: add frontend admin shortcut for staff
Build and Deploy / verify (push) Failing after 15m18s
Build and Deploy / deploy (push) Skipped

Let admin and editor open /admin in a new tab from the public header and profile, so they can jump to the backend without leaving the site.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
gouki
2026-09-21 23:42:54 +00:00
co-authored by Cursor
parent 36c4ffc5b4
commit debead72a5
13 changed files with 644 additions and 0 deletions
@@ -0,0 +1,9 @@
@auth
@if(auth()->user()->canAccessAdmin())
@if(! empty($asList))
<li><a href="{{ url('/admin') }}" target="_blank" rel="noopener">管理</a></li>
@else
<a href="{{ url('/admin') }}" target="_blank" rel="noopener">管理</a>
@endif
@endif
@endauth
@@ -18,6 +18,7 @@
</form>
@auth
<a href="{{ route('profile') }}">{{ auth()->user()->name }}</a>
@include('partials.admin-link')
<form action="{{ route('logout') }}" method="post" class="inline-form">
@csrf
<button type="submit" class="link-btn">退出</button>