diff --git a/app/Http/Controllers/NotificationController.php b/app/Http/Controllers/NotificationController.php index abb264f..62d2b0a 100644 --- a/app/Http/Controllers/NotificationController.php +++ b/app/Http/Controllers/NotificationController.php @@ -20,10 +20,17 @@ class NotificationController extends Controller } /** - * Delete Notifcation + * Delete a notification or clear all. */ public function delete(Request $request): RedirectResponse { + // Clear all notifications if no specific ID is provided + if (! $request->has('id')) { + $request->user()->notifications()->delete(); + + return redirect()->back()->with('status', 'notifications-cleared'); + } + $request->validate([ 'id' => 'required|exists:notifications,id', ]); diff --git a/resources/views/components/profile-layout.blade.php b/resources/views/components/profile-layout.blade.php new file mode 100644 index 0000000..88c057d --- /dev/null +++ b/resources/views/components/profile-layout.blade.php @@ -0,0 +1,17 @@ + + @include('partials.background') +
+
+ + {{-- Sidebar --}} +
+ @include('profile.partials.sidebar') +
+ + {{-- Content --}} +
+ {{ $slot }} +
+
+
+
\ No newline at end of file diff --git a/resources/views/livewire/user-comments.blade.php b/resources/views/livewire/user-comments.blade.php index 5d2de66..ccbf541 100644 --- a/resources/views/livewire/user-comments.blade.php +++ b/resources/views/livewire/user-comments.blade.php @@ -1,101 +1,108 @@ -
-
- - -
- - +
+ {{-- Filters --}} +
+
+ {{-- Search --}}
- -
+
+
- - + {{-- Order --}} +
+ + +
+
- -
- @forelse ($comments as $comment) + {{-- Comments --}} +
+ @forelse ($comments as $comment) - @php - $model = $comment->commentable; - $episode = $model instanceof \App\Models\Episode - ? $model - : $model->episodes->first(); + @php + $model = $comment->commentable; + $episode = $model instanceof \App\Models\Episode + ? $model + : $model->episodes->first(); - $url = route('hentai.index', ['title' => $model->slug]); - @endphp + $url = route('hentai.index', ['title' => $model->slug]); + @endphp - + -
+
- diff --git a/resources/views/livewire/user-likes.blade.php b/resources/views/livewire/user-likes.blade.php index 8e6edad..00634e5 100644 --- a/resources/views/livewire/user-likes.blade.php +++ b/resources/views/livewire/user-likes.blade.php @@ -1,27 +1,139 @@
-
- @include('livewire.partials.search-filter') -
- -
- {{ $episodes->appends(['tags' => $selectedtags])->links('pagination::tailwind') }} -
-
+
+ {{-- Slim Profile Filter --}} +
+
+ {{-- Search --}} +
+
+ + + +
+ +
+ + {{-- Order --}} +
+ + +
+ + {{-- View --}} +
+ + +
+ + {{-- Filter Buttons --}} +
+ + + +
+ + {{-- Hide Watched --}} + @auth + + @endauth +
+
+ + {{-- Modals --}} + @include('modals.filter-genres') + @include('modals.filter-studios') + @include('modals.filter-blacklist') + + + + {{-- Results --}} +
+ {{ $episodes->appends(['tags' => $selectedtags])->links('pagination::tailwind') }} +
@if ($view == 'thumbnail') -
+
@else -
+
@endif @forelse($episodes as $episode) @include('livewire.partials.search-result') @empty -
-

No results (╥﹏╥)

-
+
+
+
+ +
+

No liked episodes

+

Start exploring and like what you enjoy!

+
+
@endforelse
+ {{ $episodes->appends(['tags' => $selectedtags])->links('pagination::tailwind') }}
- {{ $episodes->appends(['tags' => $selectedtags])->links('pagination::tailwind') }}
-
\ No newline at end of file diff --git a/resources/views/livewire/watched.blade.php b/resources/views/livewire/watched.blade.php index 024992e..7fff3d5 100644 --- a/resources/views/livewire/watched.blade.php +++ b/resources/views/livewire/watched.blade.php @@ -1,28 +1,51 @@ -
-
-
    +
    +
    + {{-- Timeline --}} +
      @foreach ($watchedGrouped as $day => $episodes) -
    1. -
      -
      -
      -

      +

    2. + {{-- Timeline Dot --}} + + + + + {{-- Date Header --}} +
      + + + {{ $episodes->count() }} {{ Str::plural('episode', $episodes->count()) }} +
      -
      -
      - @foreach ($episodes as $episode) -
      - -
      - @endforeach -
      + + {{-- Episodes Grid --}} +
      + @foreach ($episodes as $episode) + + @endforeach
    3. @endforeach
    - {{ $watched->links('pagination::tailwind') }} + + {{-- Pagination --}} + @if($watched->hasPages()) +
    + {{ $watched->links('pagination::tailwind') }} +
    + @endif + + {{-- Empty State --}} + @if($watched->isEmpty()) +
    +
    + +
    +

    No watch history

    +

    Start watching and your history will appear here.

    +
    + @endif
    -
    +
\ No newline at end of file diff --git a/resources/views/profile/comments.blade.php b/resources/views/profile/comments.blade.php index b8fb09f..32cc7cb 100644 --- a/resources/views/profile/comments.blade.php +++ b/resources/views/profile/comments.blade.php @@ -1,11 +1,12 @@ - - @include('partials.background') -
-
- @include('profile.partials.sidebar') -
- -
-
+ +
+ {{-- Header --}} +

+ + {{ __('nav.comments') }} +

+ + {{-- Content from Livewire --}} +
- +
\ No newline at end of file diff --git a/resources/views/profile/index.blade.php b/resources/views/profile/index.blade.php index 835bb81..fe344a4 100644 --- a/resources/views/profile/index.blade.php +++ b/resources/views/profile/index.blade.php @@ -1,9 +1,123 @@ - - @include('partials.background') -
-
- @include('profile.partials.sidebar') - @include('profile.partials.info') + +
+ {{-- Welcome Banner --}} +
+
+
+

Welcome back, {{ $user->name }}!

+

+ Here's an overview of your activity on hstream.moe. Dive back into your favorites or discover something new. +

+
+ {{-- Decorative circles --}} +
+
+
+ + {{-- Quick Links Grid --}} + + + {{-- Recent Activity Section --}} +
+

+ + Recent Activity +

+ + @php + $recentWatched = $user->watched()->with('episode')->latest()->take(4)->get(); + $recentComments = $user->comments()->latest()->take(2)->get(); + @endphp + + @if($recentWatched->isEmpty() && $recentComments->isEmpty()) +
+
+ +
+

No activity yet. Start watching something!

+
+ @else +
+ {{-- Recently Watched --}} + @if($recentWatched->isNotEmpty()) +
+

Recently Watched

+
+ @foreach($recentWatched as $watched) + + {{ $watched->episode->title }} +
+

+ {{ $watched->episode->title }} +

+
+
+ @endforeach +
+
+ @endif + + {{-- Recent Comments --}} + @if($recentComments->isNotEmpty()) +
+

Recent Comments

+ +
+ @endif +
+ @endif
- \ No newline at end of file +
\ No newline at end of file diff --git a/resources/views/profile/likes.blade.php b/resources/views/profile/likes.blade.php index 524d675..8ad9c94 100644 --- a/resources/views/profile/likes.blade.php +++ b/resources/views/profile/likes.blade.php @@ -1,9 +1,14 @@ - - @include('partials.background') -
-
- @include('profile.partials.sidebar') - @livewire('user-likes') + +
+ {{-- Header --}} +
+

+ + {{ __('nav.likes') }} +

+ + {{-- Content from Livewire --}} + @livewire('user-likes')
- +
\ No newline at end of file diff --git a/resources/views/profile/notifications.blade.php b/resources/views/profile/notifications.blade.php index b1f52b0..2526587 100644 --- a/resources/views/profile/notifications.blade.php +++ b/resources/views/profile/notifications.blade.php @@ -1,55 +1,84 @@ - - @include('partials.background') -
-
- @include('profile.partials.sidebar') -
+ +
+ {{-- Header --}} +
+

+ + Notifications +

+ @if($notifications->isNotEmpty()) + + @endif +
- @forelse($notifications as $notification) -
+ @forelse($notifications as $notification) +
- -
-
- + {{-- Unread indicator --}} + @if(is_null($notification->read_at)) +
+ @endif + +
+
+ + {{-- Content --}} +
+
+ + {{ $notification->data['type'] ?? 'Notification' }} + + {{ $notification->created_at->diffForHumans(['parts' => 1]) }} +
-

+

{{ $notification->data['message'] ?? '' }}

- -
- - Open - + {{-- Actions --}} +
+ @if(isset($notification->data['url'])) + + Open + + + @endif
@csrf @method('delete') -
-
- @empty -
-

No notifications

-

(╥﹏╥)

-
- @endforelse +
-
+ @empty +
+
+ +
+

No notifications

+

You're all caught up! Nothing new here.

+
+ @endforelse
- + \ No newline at end of file diff --git a/resources/views/profile/partials/actions.blade.php b/resources/views/profile/partials/actions.blade.php index f85aad7..e3a4eb2 100644 --- a/resources/views/profile/partials/actions.blade.php +++ b/resources/views/profile/partials/actions.blade.php @@ -1,19 +1,27 @@ @auth -
-
- - Settings +
+
+ + + + Settings +
@csrf - + class="flex w-full items-center gap-3 rounded-lg px-3 py-2.5 text-sm font-medium text-gray-700 dark:text-gray-300 hover:bg-red-50/60 dark:hover:bg-red-950/40 hover:text-red-600 dark:hover:text-red-400 border-l-[3px] border-transparent transition-all duration-150"> + + Logout +
-@endauth +@endauth \ No newline at end of file diff --git a/resources/views/profile/partials/mobile-nav.blade.php b/resources/views/profile/partials/mobile-nav.blade.php new file mode 100644 index 0000000..28bf780 --- /dev/null +++ b/resources/views/profile/partials/mobile-nav.blade.php @@ -0,0 +1,86 @@ + \ No newline at end of file diff --git a/resources/views/profile/partials/profile.blade.php b/resources/views/profile/partials/profile.blade.php index 4aad746..1488f90 100644 --- a/resources/views/profile/partials/profile.blade.php +++ b/resources/views/profile/partials/profile.blade.php @@ -1,15 +1,68 @@ -
- -
- - {{ $user->name }} - @if ($user->hasRole(\App\Enums\UserRole::SUPPORTER)) - - @endif - - Joined - {{ $user->created_at->format('Y-m') }} +
+
+ {{-- Profile Banner Gradient --}} +
+ + {{-- Avatar overlapping the banner --}} +
+
+ {{ auth()->user()->name }} + @if(auth()->user()->hasRole(\App\Enums\UserRole::SUPPORTER)) + + + + @endif +
+
+ + {{-- User Info --}} +
+

+ {{ auth()->user()->name }} +

+

+ Joined {{ auth()->user()->created_at->format('F Y') }} +

+
+ + {{-- Quick Stats Row --}} +
+
+
+ {{ number_format(auth()->user()->watched->count()) }} +
+
+ Views +
+
+
+
+ {{ number_format(auth()->user()->commentCount()) }} +
+
+ Cmts +
+
+
+
+ {{ number_format(auth()->user()->likes()) }} +
+
+ Likes +
+
+
+
+ {{ number_format(auth()->user()->playlists->count()) }} +
+
+ Lists +
+
+
-
+
\ No newline at end of file diff --git a/resources/views/profile/partials/sidebar.blade.php b/resources/views/profile/partials/sidebar.blade.php index 54846bc..6fb04f7 100644 --- a/resources/views/profile/partials/sidebar.blade.php +++ b/resources/views/profile/partials/sidebar.blade.php @@ -1,37 +1,96 @@ -
+
+ {{-- Profile Card --}} @include('profile.partials.profile') - + {{-- Mobile Navigation (horizontal scroll tabs, visible only on mobile) --}} + @include('profile.partials.mobile-nav') +
\ No newline at end of file diff --git a/resources/views/profile/partials/user-playlists.blade.php b/resources/views/profile/partials/user-playlists.blade.php index 32c77b3..0bbecf9 100644 --- a/resources/views/profile/partials/user-playlists.blade.php +++ b/resources/views/profile/partials/user-playlists.blade.php @@ -1,112 +1,151 @@
-
- @if(count($playlists) > 0) - @foreach($playlists as $playlist) - @php - $count = $playlist->episodes->count(); - @endphp - - @endforeach - -
- ... -
-

- Create another Playlist -

- - Create - + @else + {{-- Empty State --}} +
+
+
+

No playlists yet

+

Create your first playlist to organize your favorite episodes.

+
- @else - -
- ... -
-

- No Playlist found! -

- - Create - -
-
- @endif -
+ @endif
\ No newline at end of file diff --git a/resources/views/profile/playlists.blade.php b/resources/views/profile/playlists.blade.php index 0c2434a..7ffca4f 100644 --- a/resources/views/profile/playlists.blade.php +++ b/resources/views/profile/playlists.blade.php @@ -1,14 +1,24 @@ - - @include('partials.background') -
-
- @include('profile.partials.sidebar') -
-
- @include('profile.partials.user-playlists') -
-
- @include('modals.create-playlist') + +
+ {{-- Header --}} +
+

+ + {{ __('nav.playlists') }} +

+
+ + {{-- Content --}} + @include('profile.partials.user-playlists') + + {{-- Modal --}} + @include('modals.create-playlist')
- +
\ No newline at end of file diff --git a/resources/views/profile/settings.blade.php b/resources/views/profile/settings.blade.php index 192a507..1a4cedb 100644 --- a/resources/views/profile/settings.blade.php +++ b/resources/views/profile/settings.blade.php @@ -1,30 +1,126 @@ - - @include('partials.background') -
-
- @include('profile.partials.sidebar') -
-
+ +
+ {{-- Header --}} +

+ + Settings +

+ + {{-- Settings Sections --}} +
+ + {{-- Profile Information --}} +
+
+
+
+ +
+
+

Profile Information

+

Update your name, email and avatar

+
+
+
+
@include('profile.partials.update-profile-information-form')
-
+
+ + {{-- Passkeys --}} +
+
+
+
+ +
+
+

Passkeys

+

Manage WebAuthn passkeys for passwordless login

+
+
+
+
-
+
+ + {{-- Password --}} +
+
+
+
+ +
+
+

Update Password

+

Keep your account secure

+
+
+
+
@include('profile.partials.update-password-form')
-
+
+ + {{-- Search Blacklist --}} +
+
+
+
+ +
+
+

Search Blacklist

+

Hide content with specific tags from search results

+
+
+
+
@include('profile.partials.update-blacklist-form')
-
+
+ + {{-- Website Design --}} +
+
+
+
+ +
+
+

Website Design

+

Customize your browsing experience

+
+
+
+
@include('profile.partials.update-design-form')
-
+
+ + {{-- Danger Zone --}} +
+
+
+
+ +
+
+

Danger Zone

+

Irreversible actions - proceed with caution

+
+
+
+
@include('profile.partials.delete-user-form')
- @include('profile.partials.delete-user-modal')
- @vite(['resources/js/user-blacklist.js'])
+ + {{-- Delete Account Modal --}} + @include('profile.partials.delete-user-modal') + + @vite(['resources/js/user-blacklist.js'])
- + \ No newline at end of file diff --git a/resources/views/profile/watched.blade.php b/resources/views/profile/watched.blade.php index 9d475fd..f0445a8 100644 --- a/resources/views/profile/watched.blade.php +++ b/resources/views/profile/watched.blade.php @@ -1,9 +1,12 @@ - - @include('partials.background') -
-
- @include('profile.partials.sidebar') - @livewire('watched', ['user' => $user]) -
+ +
+ {{-- Header --}} +

+ + {{ __('nav.watched') }} +

+ + {{-- Content from Livewire --}} + @livewire('watched', ['user' => $user])
- +
\ No newline at end of file