Redo notification list

This commit is contained in:
2026-04-18 15:47:06 +02:00
parent f3e5100d5d
commit 4fc11d7329

View File

@@ -2,66 +2,65 @@
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}" class="scroll-smooth"> <html lang="{{ str_replace('_', '-', app()->getLocale()) }}" class="scroll-smooth">
@include('partials.head') @include('partials.head')
<body class="font-sans antialiased"> <body class="font-sans antialiased">
<div class="flex flex-col min-h-screen bg-gray-100 dark:bg-neutral-900"> <div class="flex flex-col min-h-screen bg-gray-100 dark:bg-neutral-900">
@include('layouts.navigation') @include('layouts.navigation')
<!-- Page Content --> <!-- Page Content -->
<main> <main>
@include('user.partials.background') @include('user.partials.background')
<div class="relative max-w-[120rem] mx-auto sm:px-6 lg:px-8 space-y-6 pt-20 mt-[65px] flex flex-row justify-center md:justify-normal"> <div
<div class="grid md:grid-flow-col gap-4 w-5/6 flex-row"> class="relative max-w-[120rem] mx-auto sm:px-6 lg:px-8 space-y-6 pt-20 mt-[65px] flex flex-row justify-center md:justify-normal">
@include('profile.partials.sidebar') <div class="grid md:grid-flow-col gap-4 xl:w-5/6 flex-row">
<div class="md:col-span-2"> @include('profile.partials.sidebar')
<div class="relative overflow-x-auto rounded-lg w-full"> <div class="flex flex-col gap-2">
<table class="w-full text-sm text-left rtl:text-right text-gray-500 dark:text-white">
<thead class="text-xs text-gray-700 uppercase bg-gray-50 dark:bg-pink-700 dark:text-neutral-200"> @forelse($notifications as $notification)
<tr> <div
<th class="px-6 py-3">Type</th> class="bg-white/40 dark:bg-neutral-950/40 backdrop-blur border border-gray-200 dark:border-neutral-700 rounded-xl shadow-sm p-4 flex flex-col sm:flex-row sm:items-center sm:justify-between gap-x-4 transition hover:shadow-md">
<th class="px-6 py-3">Message</th>
<th class="px-6 py-3">Action</th> <!-- Content -->
</tr> <div class="flex flex-col gap-2 w-full h-full mt-2">
</thead> <div class="flex items-center justify-between flex-none h-2">
<tbody> <span class="text-xs font-semibold uppercase tracking-wide text-sky-600 dark:text-rose-500">
@forelse($notifications as $notification) {{ $notification->data['type'] ?? 'Notification' }}
<tr class="bg-white border-t dark:bg-neutral-950/40 backdrop-blur dark:highlight-white/5 dark:border-pink-700"> </span>
<td class="px-6 py-4"> </div>
{{ $notification->data['type'] ?? '' }}
</td> <p class="text-sm sm:text-base text-gray-700 dark:text-gray-300 leading-relaxed h-full">
<td class="px-6 py-4"> {{ $notification->data['message'] ?? '' }}
{{ $notification->data['message'] ?? '' }} </p>
</td> </div>
<td class="px-6 py-4 flex gap-4">
<a href="{{ $notification->data['url'] }}" class="inline-block rounded bg-sky-600 pl-[4px] pr-[4px] p-[1px] text-xs font-medium uppercase leading-normal text-white transition duration-150 ease-in-out hover:bg-sky-700 focus:bg-sky-600"> <!-- Actions -->
Open <div class="flex gap-2 sm:gap-2 shrink-0">
</a> <a href="{{ $notification->data['url'] }}"
<form method="POST" action="{{ route('profile.notifications.delete') }}"> class="text-center rounded-lg bg-sky-600 px-3 py-2 text-xs sm:text-sm font-medium text-white hover:bg-sky-700 transition">
@csrf Open
@method('delete') </a>
<input type="hidden" value="{{ $notification->id }}" name="id">
<button type="submit" class="inline-block rounded bg-rose-600 pl-[4px] pr-[4px] p-[1px] text-xs font-medium uppercase leading-normal text-white transition duration-150 ease-in-out hover:bg-rose-700 focus:bg-rose-600"> <form method="POST" action="{{ route('profile.notifications.delete') }}">
Delete @csrf
</button> @method('delete')
</form> <input type="hidden" value="{{ $notification->id }}" name="id">
</td>
</tr> <button type="submit"
@empty class="w-full rounded-lg bg-rose-600 px-3 py-2 text-xs sm:text-sm font-medium text-white hover:bg-rose-700 transition">
<tr class="bg-white border-t dark:bg-neutral-950/40 backdrop-blur dark:highlight-white/5 dark:border-pink-700"> Delete
<td class="px-6 py-4"> </button>
</td> </form>
<td class="px-6 py-4"> </div>
No entries (╥﹏╥)
</td>
<td class="px-6 py-4">
</td>
</tr>
@endforelse
</tbody>
</table>
</div> </div>
</div> @empty
<div class="text-center py-16 text-gray-500 dark:text-gray-400">
<p class="text-lg">No notifications</p>
<p class="text-sm opacity-70">(╥﹏╥)</p>
</div>
@endforelse
</div> </div>
</div> </div>
</main> </div>
@include('layouts.footer') </main>
</div> @include('layouts.footer')
</div>
</body> </body>
</html> </html>