Redo notification list
This commit is contained in:
@@ -7,56 +7,55 @@
|
|||||||
<!-- 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">
|
||||||
|
<div class="grid md:grid-flow-col gap-4 xl:w-5/6 flex-row">
|
||||||
@include('profile.partials.sidebar')
|
@include('profile.partials.sidebar')
|
||||||
<div class="md:col-span-2">
|
<div class="flex flex-col gap-2">
|
||||||
<div class="relative overflow-x-auto rounded-lg w-full">
|
|
||||||
<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">
|
|
||||||
<tr>
|
|
||||||
<th class="px-6 py-3">Type</th>
|
|
||||||
<th class="px-6 py-3">Message</th>
|
|
||||||
<th class="px-6 py-3">Action</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
@forelse($notifications as $notification)
|
@forelse($notifications as $notification)
|
||||||
<tr class="bg-white border-t dark:bg-neutral-950/40 backdrop-blur dark:highlight-white/5 dark:border-pink-700">
|
<div
|
||||||
<td class="px-6 py-4">
|
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">
|
||||||
{{ $notification->data['type'] ?? '' }}
|
|
||||||
</td>
|
<!-- Content -->
|
||||||
<td class="px-6 py-4">
|
<div class="flex flex-col gap-2 w-full h-full mt-2">
|
||||||
|
<div class="flex items-center justify-between flex-none h-2">
|
||||||
|
<span class="text-xs font-semibold uppercase tracking-wide text-sky-600 dark:text-rose-500">
|
||||||
|
{{ $notification->data['type'] ?? 'Notification' }}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<p class="text-sm sm:text-base text-gray-700 dark:text-gray-300 leading-relaxed h-full">
|
||||||
{{ $notification->data['message'] ?? '' }}
|
{{ $notification->data['message'] ?? '' }}
|
||||||
</td>
|
</p>
|
||||||
<td class="px-6 py-4 flex gap-4">
|
</div>
|
||||||
<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 -->
|
||||||
|
<div class="flex gap-2 sm:gap-2 shrink-0">
|
||||||
|
<a href="{{ $notification->data['url'] }}"
|
||||||
|
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">
|
||||||
Open
|
Open
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<form method="POST" action="{{ route('profile.notifications.delete') }}">
|
<form method="POST" action="{{ route('profile.notifications.delete') }}">
|
||||||
@csrf
|
@csrf
|
||||||
@method('delete')
|
@method('delete')
|
||||||
<input type="hidden" value="{{ $notification->id }}" name="id">
|
<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">
|
|
||||||
|
<button type="submit"
|
||||||
|
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">
|
||||||
Delete
|
Delete
|
||||||
</button>
|
</button>
|
||||||
</form>
|
</form>
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
@empty
|
|
||||||
<tr class="bg-white border-t dark:bg-neutral-950/40 backdrop-blur dark:highlight-white/5 dark:border-pink-700">
|
|
||||||
<td class="px-6 py-4">
|
|
||||||
</td>
|
|
||||||
<td class="px-6 py-4">
|
|
||||||
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>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user