ghassan 5253f89b63 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
2026-02-25 00:03:02 +00:00

164 lines
4.9 KiB
PHP

@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