Add video platform features: authentication, video management, user profiles, likes/views tracking

- Added authentication controllers (Login, Register)
- Added UserController for user profile management
- Added VideoController with full CRUD operations
- Added Video model with relationships (user, likes, views)
- Added User model enhancements (avatar, video relationships)
- Added database migrations for video_likes, video_views, user_avatar, video_visibility
- Added CompressVideoJob for video processing
- Added VideoUploaded mail notification
- Added authentication routes
- Updated web routes with video and user routes
- Added layout templates (app, plain, partials)
- Added user views (profile, settings, channel, history, liked)
- Added video views (create, edit, index, show)
- Added email templates
This commit is contained in:
ghassan committed 2026-02-25 00:03:02 +00:00
1 parent 6a2026df4b
commit 5253f89b63
35 files changed
+5092 -849

No files matched your search

+372
View File
@@ -0,0 +1,372 @@
@extends('layouts.app')
@section('title', $user->name . "'s Channel | TAKEONE")
@section('extra_styles')
<style>
.channel-header {
background: var(--bg-secondary);
border-radius: 12px;
padding: 32px;
margin-bottom: 24px;
}
.channel-avatar {
width: 120px;
height: 120px;
border-radius: 50%;
object-fit: cover;
}
.channel-name {
font-size: 24px;
font-weight: 500;
margin: 16px 0 4px;
}
.channel-meta {
color: var(--text-secondary);
}
.channel-stats {
display: flex;
gap: 24px;
margin-top: 16px;
}
.channel-stat-value {
font-weight: 600;
}
/* Video Grid */
.yt-video-grid {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 24px;
}
.yt-video-card {
cursor: pointer;
}
.yt-video-thumb {
position: relative;
aspect-ratio: 16/9;
border-radius: 12px;
overflow: hidden;
background: #1a1a1a;
}
.yt-video-thumb img {
width: 100%;
height: 100%;
object-fit: cover;
position: absolute;
top: 0;
left: 0;
}
.yt-video-thumb video {
width: 100%;
height: 100%;
object-fit: contain;
position: absolute;
top: 0;
left: 0;
opacity: 0;
transition: opacity 0.3s ease;
background: #000;
}
.yt-video-thumb video.active {
opacity: 1;
}
.yt-video-duration {
position: absolute;
bottom: 8px;
right: 8px;
background: rgba(0,0,0,0.8);
color: white;
padding: 3px 6px;
border-radius: 4px;
font-size: 12px;
font-weight: 500;
}
.yt-video-info {
display: flex;
margin-top: 12px;
gap: 12px;
}
.yt-channel-icon {
width: 36px;
height: 36px;
border-radius: 50%;
background: #555;
flex-shrink: 0;
}
.yt-video-details {
flex: 1;
}
.yt-video-title {
font-size: 16px;
font-weight: 500;
color: var(--text-primary);
margin: 0 0 4px;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
line-height: 1.3;
}
.yt-video-title a {
color: inherit;
text-decoration: none;
}
.yt-channel-name, .yt-video-meta {
color: var(--text-secondary);
font-size: 14px;
}
/* More button */
.yt-more-btn {
background: transparent;
border: none;
color: var(--text-primary);
cursor: pointer;
padding: 4px;
border-radius: 50%;
}
.yt-more-dropdown {
background: var(--bg-secondary);
border: 1px solid var(--border-color);
border-radius: 12px;
padding: 8px 0;
min-width: 200px;
}
.yt-more-dropdown-item {
display: flex;
align-items: center;
gap: 16px;
padding: 10px 16px;
color: var(--text-primary);
text-decoration: none;
cursor: pointer;
background: transparent;
border: none;
width: 100%;
text-align: left;
font-size: 14px;
}
.yt-more-dropdown-item:hover { background: var(--border-color); }
/* Empty State */
.yt-empty {
text-align: center;
padding: 80px 20px;
}
.yt-empty-icon {
font-size: 80px;
color: var(--text-secondary);
}
.yt-empty-title {
font-size: 24px;
margin: 20px 0 8px;
}
.yt-empty-text {
color: var(--text-secondary);
margin-bottom: 20px;
}
.yt-upload-btn {
background: var(--brand-red);
color: white;
border: none;
padding: 8px 16px;
border-radius: 20px;
font-weight: 500;
display: inline-flex;
align-items: center;
gap: 8px;
cursor: pointer;
text-decoration: none;
}
.yt-upload-btn:hover {
background: #cc1a1a;
}
@media (max-width: 768px) {
.yt-video-grid {
grid-template-columns: 1fr 1fr;
}
}
@media (max-width: 480px) {
.yt-video-grid {
grid-template-columns: 1fr;
}
}
</style>
@endsection
@section('content')
<div class="channel-header">
<div class="d-flex align-items-center gap-4 flex-wrap">
@if($user->avatar)
<img src="{{ asset('storage/avatars/' . $user->avatar) }}" alt="{{ $user->name }}" class="channel-avatar">
@else
<img src="https://i.pravatar.cc/150?u={{ $user->id }}" alt="{{ $user->name }}" class="channel-avatar">
@endif
<div>
<h1 class="channel-name">{{ $user->name }}</h1>
<p class="channel-meta">Joined {{ $user->created_at->format('F d, Y') }}</p>
<div class="channel-stats">
<div>
<span class="channel-stat-value">{{ $videos->total() }}</span>
<span class="channel-meta"> videos</span>
</div>
<div>
<span class="channel-stat-value">{{ \DB::table('video_views')->whereIn('video_id', $user->videos->pluck('id'))->count() }}</span>
<span class="channel-meta"> views</span>
</div>
</div>
@auth
@if(Auth::user()->id === $user->id)
<div style="margin-top: 16px;">
<a href="{{ route('videos.create') }}" class="yt-upload-btn">
<i class="bi bi-plus-lg"></i> Upload Video
</a>
<a href="{{ route('profile') }}" class="yt-upload-btn" style="background: var(--bg-dark); margin-left: 8px;">
<i class="bi bi-pencil"></i> Edit Channel
</a>
</div>
@endif
@endauth
</div>
</div>
</div>
@if($videos->isEmpty())
<div class="yt-empty">
<i class="bi bi-camera-video yt-empty-icon"></i>
<h2 class="yt-empty-title">No videos yet</h2>
<p class="yt-empty-text">This channel hasn't uploaded any videos.</p>
@auth
@if(Auth::user()->id === $user->id)
<a href="{{ route('videos.create') }}" class="yt-upload-btn">
<i class="bi bi-plus-lg"></i> Upload First Video
</a>
@endif
@endauth
</div>
@else
<div class="yt-video-grid">
@foreach($videos as $video)
<div class="yt-video-card"
data-video-url="{{ asset('storage/videos/' . $video->filename) }}"
onmouseenter="playVideo(this)"
onmouseleave="stopVideo(this)">
<a href="{{ route('videos.show', $video->id) }}">
<div class="yt-video-thumb">
@if($video->thumbnail)
<img src="{{ asset('storage/thumbnails/' . $video->thumbnail) }}" alt="{{ $video->title }}">
@else
<img src="https://picsum.photos/seed/{{ $video->id }}/640/360" alt="{{ $video->title }}">
@endif
<video preload="none">
<source src="{{ asset('storage/videos/' . $video->filename) }}" type="{{ $video->mime_type ?? 'video/mp4' }}">
</video>
@if($video->duration)
<span class="yt-video-duration">{{ gmdate('i:s', $video->duration) }}</span>
@endif
</div>
</a>
<div class="yt-video-info">
<div class="yt-channel-icon">
@if($video->user && $video->user->avatar_url)
<img src="{{ $video->user->avatar_url }}" alt="{{ $video->user->name }}" style="width: 100%; height: 100%; object-fit: cover; border-radius: 50%;">
@endif
</div>
<div class="yt-video-details">
<h3 class="yt-video-title">
<a href="{{ route('videos.show', $video->id) }}">{{ $video->title }}</a>
</h3>
<div class="yt-channel-name">{{ $video->user->name ?? 'Unknown' }}</div>
<div class="yt-video-meta">
{{ number_format($video->size / 1024 / 1024, 0) }} MB • {{ $video->created_at->diffForHumans() }}
</div>
</div>
<div class="position-relative">
<button class="yt-more-btn" data-bs-toggle="dropdown">
<i class="bi bi-three-dots-vertical"></i>
</button>
<ul class="dropdown-menu dropdown-menu-dark yt-more-dropdown dropdown-menu-end">
@if($video->isShareable())
<li>
<button class="yt-more-dropdown-item" onclick="openShareModal('{{ $video->share_url }}', '{{ addslashes($video->title) }}')">
<i class="bi bi-share"></i> Share
</button>
</li>
@endif
<li><a class="yt-more-dropdown-item" href="{{ route('videos.edit', $video->id) }}"><i class="bi bi-pencil"></i> Edit</a></li>
<li><a class="yt-more-dropdown-item" href="{{ route('videos.show', $video->id) }}"><i class="bi bi-play"></i> Play</a></li>
<li><hr class="dropdown-divider"></li>
<li>
<form action="{{ route('videos.destroy', $video->id) }}" method="POST" onsubmit="return confirm('Delete this video?');" class="m-0">
@csrf @method('DELETE')
<button type="submit" class="yt-more-dropdown-item text-danger"><i class="bi bi-trash"></i> Delete</button>
</form>
</li>
</ul>
</div>
</div>
</div>
@endforeach
</div>
<div class="mt-4">{{ $videos->links() }}</div>
@endif
@include('layouts.partials.share-modal')
@endsection
@section('scripts')
<script>
function playVideo(card) {
const video = card.querySelector('video');
if (video) {
video.currentTime = 0;
video.play().catch(function(e) {
// Auto-play may be blocked, ignore error
});
video.classList.add('active');
}
}
function stopVideo(card) {
const video = card.querySelector('video');
if (video) {
video.pause();
video.currentTime = 0;
video.classList.remove('active');
}
}
</script>
@endsection
+178
View File
@@ -0,0 +1,178 @@
@extends('layouts.app')
@section('title', 'Watch History | TAKEONE')
@section('extra_styles')
<style>
.history-header {
margin-bottom: 24px;
}
.history-title {
font-size: 24px;
font-weight: 500;
}
/* Video Grid */
.yt-video-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
gap: 20px;
}
.yt-video-card {
cursor: pointer;
}
.yt-video-thumb {
position: relative;
aspect-ratio: 16/9;
border-radius: 12px;
overflow: hidden;
background: #1a1a1a;
}
.yt-video-thumb img {
width: 100%;
height: 100%;
object-fit: cover;
}
.yt-video-duration {
position: absolute;
bottom: 8px;
right: 8px;
background: rgba(0,0,0,0.8);
color: white;
padding: 3px 6px;
border-radius: 4px;
font-size: 12px;
font-weight: 500;
}
.yt-video-info {
display: flex;
margin-top: 12px;
gap: 12px;
}
.yt-channel-icon {
width: 36px;
height: 36px;
border-radius: 50%;
background: #555;
flex-shrink: 0;
}
.yt-video-details {
flex: 1;
}
.yt-video-title {
font-size: 16px;
font-weight: 500;
color: var(--text-primary);
margin: 0 0 4px;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
line-height: 1.3;
}
.yt-video-title a {
color: inherit;
text-decoration: none;
}
.yt-channel-name, .yt-video-meta {
color: var(--text-secondary);
font-size: 14px;
}
/* Empty State */
.yt-empty {
text-align: center;
padding: 80px 20px;
}
.yt-empty-icon {
font-size: 80px;
color: var(--text-secondary);
}
.yt-empty-title {
font-size: 24px;
margin: 20px 0 8px;
}
.yt-empty-text {
color: var(--text-secondary);
margin-bottom: 20px;
}
@media (max-width: 768px) {
.yt-video-grid {
grid-template-columns: 1fr 1fr;
}
}
@media (max-width: 480px) {
.yt-video-grid {
grid-template-columns: 1fr;
}
}
</style>
@endsection
@section('content')
<div class="history-header">
<h1 class="history-title">Watch History</h1>
</div>
@if($videos->isEmpty())
<div class="yt-empty">
<i class="bi bi-clock-history yt-empty-icon"></i>
<h2 class="yt-empty-title">No watch history</h2>
<p class="yt-empty-text">Videos you watch will appear here.</p>
<a href="{{ route('videos.index') }}" class="btn btn-primary" style="background: var(--brand-red); color: white; padding: 10px 20px; border-radius: 20px; text-decoration: none;">
<i class="bi bi-play-btn"></i> Browse Videos
</a>
</div>
@else
<div class="yt-video-grid">
@foreach($videos as $video)
<div class="yt-video-card">
<a href="{{ route('videos.show', $video->id) }}">
<div class="yt-video-thumb">
@if($video->thumbnail)
<img src="{{ asset('storage/thumbnails/' . $video->thumbnail) }}" alt="{{ $video->title }}">
@else
<img src="https://picsum.photos/seed/{{ $video->id }}/640/360" alt="{{ $video->title }}">
@endif
@if($video->duration)
<span class="yt-video-duration">{{ gmdate('i:s', $video->duration) }}</span>
@endif
</div>
</a>
<div class="yt-video-info">
<div class="yt-channel-icon">
@if($video->user && $video->user->avatar_url)
<img src="{{ $video->user->avatar_url }}" alt="{{ $video->user->name }}" style="width: 100%; height: 100%; object-fit: cover; border-radius: 50%;">
@endif
</div>
<div class="yt-video-details">
<h3 class="yt-video-title">
<a href="{{ route('videos.show', $video->id) }}">{{ $video->title }}</a>
</h3>
<div class="yt-video-meta">
{{ $video->user->name ?? 'Unknown' }} • {{ number_format($video->size / 1024 / 1024, 0) }} MB
</div>
</div>
</div>
</div>
@endforeach
</div>
@endif
@endsection
+180
View File
@@ -0,0 +1,180 @@
@extends('layouts.app')
@section('title', 'Liked Videos | TAKEONE')
@section('extra_styles')
<style>
.liked-header {
margin-bottom: 24px;
}
.liked-title {
font-size: 24px;
font-weight: 500;
}
/* Video Grid */
.yt-video-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
gap: 20px;
}
.yt-video-card {
cursor: pointer;
}
.yt-video-thumb {
position: relative;
aspect-ratio: 16/9;
border-radius: 12px;
overflow: hidden;
background: #1a1a1a;
}
.yt-video-thumb img {
width: 100%;
height: 100%;
object-fit: cover;
}
.yt-video-duration {
position: absolute;
bottom: 8px;
right: 8px;
background: rgba(0,0,0,0.8);
color: white;
padding: 3px 6px;
border-radius: 4px;
font-size: 12px;
font-weight: 500;
}
.yt-video-info {
display: flex;
margin-top: 12px;
gap: 12px;
}
.yt-channel-icon {
width: 36px;
height: 36px;
border-radius: 50%;
background: #555;
flex-shrink: 0;
}
.yt-video-details {
flex: 1;
}
.yt-video-title {
font-size: 16px;
font-weight: 500;
color: var(--text-primary);
margin: 0 0 4px;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
line-height: 1.3;
}
.yt-video-title a {
color: inherit;
text-decoration: none;
}
.yt-channel-name, .yt-video-meta {
color: var(--text-secondary);
font-size: 14px;
}
/* Empty State */
.yt-empty {
text-align: center;
padding: 80px 20px;
}
.yt-empty-icon {
font-size: 80px;
color: var(--text-secondary);
}
.yt-empty-title {
font-size: 24px;
margin: 20px 0 8px;
}
.yt-empty-text {
color: var(--text-secondary);
margin-bottom: 20px;
}
@media (max-width: 768px) {
.yt-video-grid {
grid-template-columns: 1fr 1fr;
}
}
@media (max-width: 480px) {
.yt-video-grid {
grid-template-columns: 1fr;
}
}
</style>
@endsection
@section('content')
<div class="liked-header">
<h1 class="liked-title">Liked Videos</h1>
</div>
@if($videos->isEmpty())
<div class="yt-empty">
<i class="bi bi-hand-thumbs-up yt-empty-icon"></i>
<h2 class="yt-empty-title">No liked videos</h2>
<p class="yt-empty-text">Videos you like will appear here.</p>
<a href="{{ route('videos.index') }}" class="btn btn-primary" style="background: var(--brand-red); color: white; padding: 10px 20px; border-radius: 20px; text-decoration: none;">
<i class="bi bi-play-btn"></i> Browse Videos
</a>
</div>
@else
<div class="yt-video-grid">
@foreach($videos as $video)
<div class="yt-video-card">
<a href="{{ route('videos.show', $video->id) }}">
<div class="yt-video-thumb">
@if($video->thumbnail)
<img src="{{ asset('storage/thumbnails/' . $video->thumbnail) }}" alt="{{ $video->title }}">
@else
<img src="https://picsum.photos/seed/{{ $video->id }}/640/360" alt="{{ $video->title }}">
@endif
@if($video->duration)
<span class="yt-video-duration">{{ gmdate('i:s', $video->duration) }}</span>
@endif
</div>
</a>
<div class="yt-video-info">
<div class="yt-channel-icon">
@if($video->user && $video->user->avatar_url)
<img src="{{ $video->user->avatar_url }}" alt="{{ $video->user->name }}" style="width: 100%; height: 100%; object-fit: cover; border-radius: 50%;">
@endif
</div>
<div class="yt-video-details">
<h3 class="yt-video-title">
<a href="{{ route('videos.show', $video->id) }}">{{ $video->title }}</a>
</h3>
<div class="yt-video-meta">
{{ $video->user->name ?? 'Unknown' }} • {{ number_format($video->size / 1024 / 1024, 0) }} MB
</div>
</div>
</div>
</div>
@endforeach
</div>
<div class="mt-4">{{ $videos->links() }}</div>
@endif
@endsection
+196
View File
@@ -0,0 +1,196 @@
@extends('layouts.app')
@section('title', 'Profile | TAKEONE')
@section('extra_styles')
<style>
.profile-header {
background: var(--bg-secondary);
border-radius: 12px;
padding: 32px;
margin-bottom: 24px;
}
.profile-avatar {
width: 120px;
height: 120px;
border-radius: 50%;
object-fit: cover;
margin-bottom: 16px;
}
.profile-name {
font-size: 24px;
font-weight: 500;
margin-bottom: 4px;
}
.profile-email {
color: var(--text-secondary);
margin-bottom: 16px;
}
.profile-stats {
display: flex;
gap: 24px;
margin-top: 16px;
}
.profile-stat {
text-align: center;
}
.profile-stat-value {
font-size: 20px;
font-weight: 600;
}
.profile-stat-label {
font-size: 14px;
color: var(--text-secondary);
}
.form-card {
background: var(--bg-secondary);
border-radius: 12px;
padding: 24px;
margin-bottom: 24px;
}
.form-title {
font-size: 18px;
font-weight: 500;
margin-bottom: 20px;
padding-bottom: 12px;
border-bottom: 1px solid var(--border-color);
}
.form-group {
margin-bottom: 16px;
}
.form-label {
display: block;
margin-bottom: 8px;
font-weight: 500;
}
.form-input {
width: 100%;
background: #121212;
border: 1px solid var(--border-color);
border-radius: 8px;
padding: 12px 16px;
color: var(--text-primary);
font-size: 14px;
}
.form-input:focus {
outline: none;
border-color: var(--brand-red);
}
.btn-primary {
background: var(--brand-red);
color: white;
border: none;
padding: 12px 24px;
border-radius: 8px;
font-size: 14px;
font-weight: 500;
cursor: pointer;
transition: background 0.2s;
}
.btn-primary:hover {
background: #cc1a1a;
}
.alert {
padding: 12px 16px;
border-radius: 8px;
margin-bottom: 16px;
}
.alert-success {
background: rgba(34, 197, 94, 0.2);
border: 1px solid #22c55e;
color: #22c55e;
}
</style>
@endsection
@section('content')
<div class="profile-header text-center">
@if($user->avatar)
<img src="{{ asset('storage/avatars/' . $user->avatar) }}" alt="{{ $user->name }}" class="profile-avatar">
@else
<img src="https://i.pravatar.cc/150?u={{ $user->id }}" alt="{{ $user->name }}" class="profile-avatar">
@endif
<h1 class="profile-name">{{ $user->name }}</h1>
<p class="profile-email">{{ $user->email }}</p>
<div class="profile-stats justify-content-center">
<div class="profile-stat">
<div class="profile-stat-value">{{ $user->videos->count() }}</div>
<div class="profile-stat-label">Videos</div>
</div>
<div class="profile-stat">
<div class="profile-stat-value">{{ $user->likes->count() }}</div>
<div class="profile-stat-label">Likes</div>
</div>
<div class="profile-stat">
<div class="profile-stat-value">{{ \DB::table('video_views')->whereIn('video_id', $user->videos->pluck('id'))->count() }}</div>
<div class="profile-stat-label">Total Views</div>
</div>
</div>
</div>
<div class="row">
<div class="col-lg-6">
<div class="form-card">
<h2 class="form-title">Edit Profile</h2>
@if(session('success'))
<div class="alert alert-success">
{{ session('success') }}
</div>
@endif
<form method="POST" action="{{ route('profile.update') }}" enctype="multipart/form-data">
@csrf
@method('PUT')
<div class="form-group">
<label class="form-label">Name</label>
<input type="text" name="name" class="form-input" value="{{ old('name', $user->name) }}" required>
</div>
<div class="form-group">
<label class="form-label">Avatar</label>
<input type="file" name="avatar" class="form-input" accept="image/*">
<small class="text-muted">Max size: 5MB. Supported: JPG, PNG, WebP</small>
</div>
<button type="submit" class="btn-primary">Save Changes</button>
</form>
</div>
</div>
<div class="col-lg-6">
<div class="form-card">
<h2 class="form-title">Quick Links</h2>
<a href="{{ route('channel', $user->id) }}" class="btn-primary d-inline-block text-decoration-none">
<i class="bi bi-play-btn"></i> View My Channel
</a>
<a href="{{ route('settings') }}" class="btn-primary d-inline-block text-decoration-none ms-2">
<i class="bi bi-gear"></i> Settings
</a>
</div>
</div>
</div>
@endsection
+163
View File
@@ -0,0 +1,163 @@
@extends('layouts.app')
@section('title', 'Settings | TAKEONE')
@section('extra_styles')
<style>
.settings-container {
max-width: 600px;
}
.settings-card {
background: var(--bg-secondary);
border-radius: 12px;
padding: 24px;
margin-bottom: 24px;
}
.settings-title {
font-size: 18px;
font-weight: 500;
margin-bottom: 20px;
padding-bottom: 12px;
border-bottom: 1px solid var(--border-color);
}
.form-group {
margin-bottom: 16px;
}
.form-label {
display: block;
margin-bottom: 8px;
font-weight: 500;
}
.form-input {
width: 100%;
background: #121212;
border: 1px solid var(--border-color);
border-radius: 8px;
padding: 12px 16px;
color: var(--text-primary);
font-size: 14px;
}
.form-input:focus {
outline: none;
border-color: var(--brand-red);
}
.btn-primary {
background: var(--brand-red);
color: white;
border: none;
padding: 12px 24px;
border-radius: 8px;
font-size: 14px;
font-weight: 500;
cursor: pointer;
transition: background 0.2s;
}
.btn-primary:hover {
background: #cc1a1a;
}
.alert {
padding: 12px 16px;
border-radius: 8px;
margin-bottom: 16px;
}
.alert-success {
background: rgba(34, 197, 94, 0.2);
border: 1px solid #22c55e;
color: #22c55e;
}
.alert-danger {
background: rgba(239, 68, 68, 0.2);
border: 1px solid #ef4444;
color: #ef4444;
}
.text-muted {
color: var(--text-secondary);
font-size: 12px;
}
</style>
@endsection
@section('content')
<div class="settings-container">
<h1 style="font-size: 24px; margin-bottom: 24px;">Settings</h1>
<div class="settings-card">
<h2 class="settings-title">Change Password</h2>
@if(session('success'))
<div class="alert alert-success">
{{ session('success') }}
</div>
@endif
@if($errors->any())
<div class="alert alert-danger">
{{ $errors->first() }}
</div>
@endif
<form method="POST" action="{{ route('settings.update') }}">
@csrf
@method('PUT')
<div class="form-group">
<label class="form-label">Current Password</label>
<input type="password" name="current_password" class="form-input" required>
</div>
<div class="form-group">
<label class="form-label">New Password</label>
<input type="password" name="new_password" class="form-input" required minlength="8">
<small class="text-muted">Minimum 8 characters</small>
</div>
<div class="form-group">
<label class="form-label">Confirm New Password</label>
<input type="password" name="new_password_confirmation" class="form-input" required>
</div>
<button type="submit" class="btn-primary">Update Password</button>
</form>
</div>
<div class="settings-card">
<h2 class="settings-title">Account Info</h2>
<div class="form-group">
<label class="form-label">Email</label>
<input type="email" class="form-input" value="{{ $user->email }}" disabled>
<small class="text-muted">Email cannot be changed</small>
</div>
<div class="form-group">
<label class="form-label">Member Since</label>
<input type="text" class="form-input" value="{{ $user->created_at->format('F d, Y') }}" disabled>
</div>
</div>
<div class="settings-card">
<h2 class="settings-title">Quick Links</h2>
<a href="{{ route('profile') }}" class="btn-primary text-decoration-none">
<i class="bi bi-person"></i> Edit Profile
</a>
<a href="{{ route('channel', $user->id) }}" class="btn-primary text-decoration-none ms-2">
<i class="bi bi-play-btn"></i> My Channel
</a>
</div>
</div>
@endsection