From 6aae6f86b6993c12f3f33097591456602c65e740 Mon Sep 17 00:00:00 2001 From: ghassan Date: Sun, 24 May 2026 14:12:08 +0300 Subject: [PATCH] Add upload type chooser and redesign upload modal Clicking Create now opens a card-based chooser (Generic / Music / Sports) before the upload modal; the chosen type is applied and its Content Type dropdown is hidden as redundant. Per type: - Generic/Match show their fields inline in the modal (no card/popup); Music keeps the track-card + Track Editor popup for multi-language tracks. - "Language Track" wording stays music-only; a single Language field is now available for generic/match too (mirrored on the mobile create page with name-swapping so only the active picker submits). Also unifies all modal controls (dropdowns, selects, inputs) to one larger, red-accented dark style scoped to #uploadModal. Co-Authored-By: Claude Opus 4.7 --- .claude/component-usage.md | 1 + .../views/layouts/partials/header.blade.php | 2 +- .../layouts/partials/upload-modal.blade.php | 323 +++++++++++++++++- resources/views/user/channel.blade.php | 4 +- resources/views/videos/create.blade.php | 26 ++ 5 files changed, 343 insertions(+), 13 deletions(-) diff --git a/.claude/component-usage.md b/.claude/component-usage.md index 70aaad5..360ec67 100644 --- a/.claude/component-usage.md +++ b/.claude/component-usage.md @@ -184,6 +184,7 @@ Stored value: IANA timezone string (e.g. `"Asia/Bahrain"`). |---|---|---| | `resources/views/layouts/partials/upload-modal.blade.php` | `primary_language` | Inside accordion track 1 body (`id="lang-tracks-section-modal"`); extra track language rows use `LANG_OPTIONS_MODAL` JS constant for inline dynamic CSD | | `resources/views/videos/create.blade.php` | `primary_language` | Inside accordion track 1 body (`id="lang-tracks-section-create"`); extra track language rows use `LANG_OPTIONS_CREATE` JS constant for inline dynamic CSD | +| `resources/views/videos/create.blade.php` | `primary_language` (`id="video_language_create"`) | Video-mode language field inside `#basic-fields-create` (generic/match). `setAudioMode()` swaps `name="primary_language"` between this and `primary_language_create` so only the active mode's picker submits | | `resources/views/components/track-editor-form.blade.php` | `$languageName` (prop) | Rendered inside the track editor form; used for primary track in edit-video-modal (prefix `t1`) | | `resources/views/videos/edit.blade.php` | `primary_language` | Inside `@else` (audio only) block; pre-populated with `value="{{ $video->language ?? '' }}"` | diff --git a/resources/views/layouts/partials/header.blade.php b/resources/views/layouts/partials/header.blade.php index 9b908bb..b7e5528 100644 --- a/resources/views/layouts/partials/header.blade.php +++ b/resources/views/layouts/partials/header.blade.php @@ -28,7 +28,7 @@ @auth diff --git a/resources/views/layouts/partials/upload-modal.blade.php b/resources/views/layouts/partials/upload-modal.blade.php index 9cf2444..2769bdd 100644 --- a/resources/views/layouts/partials/upload-modal.blade.php +++ b/resources/views/layouts/partials/upload-modal.blade.php @@ -1,4 +1,41 @@ @php use App\Data\Languages; @endphp + +{{-- ── Upload type chooser (desktop) — shown before the upload modal ── --}} +
+ +
+