diff --git a/TODO.md b/TODO.md index 423015e..13d1c2d 100644 --- a/TODO.md +++ b/TODO.md @@ -1,33 +1,27 @@ -# TODO: Add Delete and Edit options to channel video 3-dot menu +# TODO: Two-Stage Upload Modal Implementation ## Task -In `https://video.innovator.bh/channel/2`, the 3-dot menu must have Delete and Edit options. +Restructure the video upload modal to have: +- Stage 1: Upload video file (with progress bar) +- Stage 2: Title and Description +- Stage 3: Thumbnail +- Stage 4: Privacy settings -## Requirements -- `/videos` (public area) - NO edit/delete options -- `/channel/{id}` (user channel page) - Edit and Delete options for the channel owner only +## Implementation Steps -## Plan +### Step 1: Update VideoController.php ✅ +- [x] Add new endpoint for temp video upload (returns temp filename) +- [x] Modify store method to handle two-step process -### Step 1: Modify app.blade.php -- Add include for edit-video-modal partial +### Step 2: Update routes/web.php ✅ +- [x] Add route for temp video upload -### Step 2: Modify channel.blade.php -- Add conditional check for video ownership -- Add Edit button that calls openEditVideoModal() -- Add Delete button with confirmation -- Add separator before owner-only options +### Step 3: Update upload-modal.blade.php ✅ +- [x] Restructure steps: Video → Details → Thumbnail → Privacy +- [x] Update step indicators +- [x] Add video upload with progress bar in Stage 1 +- [x] Update JavaScript for new flow -### Step 3: Add JavaScript for delete functionality -- Add deleteVideo() function with AJAX call +### Step 4: Test +- [ ] Test the complete upload flow -### Step 4: Update VideoController -- Add ownership check to destroy method -- Return JSON for AJAX requests - -## Status: Completed - -## Files Modified -1. `resources/views/layouts/app.blade.php` - Added edit-video-modal include -2. `resources/views/user/channel.blade.php` - Added Edit/Delete in dropdown -3. `app/Http/Controllers/VideoController.php` - Updated destroy method diff --git a/app/Http/Controllers/VideoController.php b/app/Http/Controllers/VideoController.php index bd519c2..461a2b1 100644 --- a/app/Http/Controllers/VideoController.php +++ b/app/Http/Controllers/VideoController.php @@ -55,7 +55,7 @@ class VideoController extends Controller $request->validate([ 'title' => 'required|string|max:255', 'description' => 'nullable|string', - 'video' => 'required|file|mimes:mp4,webm,ogg,mov,avi,wmv,flv,mkv|max:2000000', + 'video' => 'required|file|mimes:mp4,webm,ogg,mov,avi,wmv,flv,mkv|max:512000', 'thumbnail' => 'nullable|image|mimes:jpg,jpeg,png,webp|max:5120', 'visibility' => 'nullable|in:public,unlisted,private', ]); diff --git a/resources/views/layouts/app.blade.php b/resources/views/layouts/app.blade.php index 8720ba4..4099dea 100644 --- a/resources/views/layouts/app.blade.php +++ b/resources/views/layouts/app.blade.php @@ -4,6 +4,9 @@